Cod sursa(job #2761212)
Utilizator | Data | 1 iulie 2021 09:45:26 | |
---|---|---|---|
Problema | Xor Max | Scor | 0 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.41 kb |
#include<fstream>
using namespace std;
ifstream f("xormax.in");
ofstream g("xormax.out");
int xormax(int a, int b)
{
int axorb=a^b;
int position=0;
while(axorb!=0)
{
position++;
axorb+1=1;
}
return axorb;
}
int main()
{
f>>a;
f>>b;
g<< xormax(a,b);
f.close();
g.close();
return 0;
}