Problem A: 【中级组】海明距离
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:209
Solved:122
Description
任意两个整数之间对应二进制位上不同数的个数,定义为这两个数之间的海明距离。
例如:(00)与(01)的海明距离是1,(110)和(101)的海明距离是2。
给定两个整数a与b( 0<=数的范围<=32767), 编写一个程序,使用位运算求出两数的海明距离。
Input
给定两个整数a与b(0<=数的范围<=32767) 。
Output
输出一个整数,使用位运算求出两数的海明距离。
Sample Input Copy
5 8
Sample Output Copy
3