#include <iostream>
using namespace std;
const int i = 0xffffffff;
int fun(int a, int b){
return ((bool)(a / b)*i)&a | ((bool)(b / a)*i)&b;
}
int main(){
cout << fun(7, 9) << endl;
return 0;
}
挺有意思的!
#include <iostream>
using namespace std;
const int i = 0xffffffff;
int fun(int a, int b){
return ((bool)(a / b)*i)&a | ((bool)(b / a)*i)&b;
}
int main(){
cout << fun(7, 9) << endl;
return 0;
}
挺有意思的!