We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Sum vs XOR
- Discussions
Sum vs XOR
Sum vs XOR
Sort by
recency
|
110 Discussions
|
Please Login in order to post a comment
C#
zeros in binary form of n acts as an exponent for 2 to find number of possible values that in an XOR statement with n, retains n's positive bits and their own positive bits.
Hi, C++ solution.
Just count zeros in binary representation of 'n' and return the number of all the different numbers that can be created from 1s and 0s in places of those counted zeros.
Notice that n=0 is also resolved.
Hi :) Python3 solution:
Java
Java