I viewed other people's solutions, impressive, but mine is even faster. 42ms
s = bin(x ^ y)[2:]
return len([x for x in s if x == '1'])
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.