You are viewing a single comment's thread. Return to all comments →
int count = 0; for(long i =0; i<=n; i++){ long x = n + i; long y = n ^ i; if(x == y){ count++; } } return count;
Seems like cookies are disabled on this browser, please enable them to open this website
Sum vs XOR
You are viewing a single comment's thread. Return to all comments →