Alice and Bob's Bit Disagreement
Alice and Bob have invented a quick game for rainy afternoons. In each round, both of them secretly write down a 64-bit unsigned integer and then reveal it. They line the two numbers up in binary, each padded with leading zeros to exactly 64 digits, and compare them digit by digit. Every position where one of them wrote a 0 and the other wrote a 1 is a disagreement, and the round's score is the number of disagreements.
For example, Alice writes 5 (binary ...0101) and Bob writes 3 (binary ...0011). They disagree in the two lowest positions and agree everywhere else, so the score is 2.
Given the numbers from all q rounds, print the score of each round.
Input
The first line contains an integer q (1 ≤ q ≤ 10^5), the number of rounds.
Each of the next q lines contains two integers a and b (0 ≤ a, b ≤ 2^64 − 1 = 18446744073709551615), the numbers written by Alice and Bob in that round.
Output
Print q lines. The i-th line must contain a single integer: the number of bit positions where the two numbers of the i-th round differ.
Notes
In the first example, 5 and 3 differ in two positions; 0 and 0 agree everywhere; 12 (1100) and 10 (1010) differ in the two middle positions; and 7 and 8 (0111 against 1000) differ in all four lowest positions.
In the second example, the numbers are at the top of the allowed range. 18446744073709551615 is 2^64 − 1, all 64 bits set, so against 0 every position is a disagreement. 9223372036854775808 is 2^63, only the highest bit set. These values do not fit in a signed 64-bit integer: read them into an unsigned 64-bit type (unsigned long long in C and C++, uint64 in Go).