~/algor $ cat problems/bit-hamming-masofasi
Hamming distance
Easy
1000 ms
128 MB
28%
Two non-negative integers $a$ and $b$ are given. In how many positions do their binary representations differ? (The shorter representation is considered padded with zeros on the left.) For example, $5 = 101_{2}$ and $3 = 011_{2}$ differ in two positions.
Input
One line with two integers: $a$ and $b$.
Output
One integer — the number of differing bits.
Note
$0 \le a, b \lt 2^{60}$
Examples
Input #1
5 3
Output #1
2
Input #2
0 0
Output #2
0