The Hamming distance between two integers is the number of bit positions where they differ. Given x and y, return their Hamming distance.
Input: one line, two integers x y.
Output: the Hamming distance.
1 4
2
001 vs 100 — bits 0 and 2 differ.
3 1
1
Run your code against the sample tests, or Submit to run the full suite.