
Hamming Distance 
Time Limit: 1000ms, Special Time Limit:2500ms, Memory Limit:32768KB 
Total submit users: 113, Accepted users: 75 
Problem 10011 :
No special judgement

Problem description 
Given a positive integer A,we can write A in binary form,and the binary form of A is called code word of A.
The Hamming Distance between two code words i and j is the number of components at which the two code words differ, and is denoted by h(i,j).
Example:
i=98 and j=70
i: 01100010(code word)
j: 01000110(code word)
It is clear to see that these two words differ at the 3rd and 6th positions. We can then say that they have a Hamming Distance of 2.
Your task is to calculate Hamming distance of two given integers.

Input 
The input contains multiple test cases,one per line.
Each line of input contains two integers i and j (0< i , j <2^{64}). A line containing "0 0" indicates the end of input, and must not be processed.

Output 
For each test case, output a line containing Hamming distance h(i,j).

Sample Input 
98 70
100 100
0 0 
Sample Output 
2
0 
Problem Source 
HNU Contest

Submit
Discuss
Judge Status
Problems
Ranklist

