You are viewing a single comment's thread. Return to all comments →
Java
public static long sumXor(long n) { long zeroCount = Long.toBinaryString(n).codePoints().filter(code -> code == 48).count(); return (long)(zeroCount > 0 && n > 0 ? 1L << zeroCount : 1); }
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 →
Java