You are viewing a single comment's thread. Return to all comments →
C solution
long sumXor (long n) { long result = 0; while(n) { if(!(n & 0x1)) { result++; } n = n>>0x1; } return 0x1ULL << (result); }
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 →
C solution