#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int get_num_bit(int m, int n)
{
int count = 0;
int tmp = m ^ n;
while (tmp)
{
tmp = tmp & (tmp - 1);
count++;
}
return count;
}
int main()
{
int m = 0, n = 0;
scanf("%d %d", &m, &n);
int count = get_num_bit(m, n);
printf("%d", count);
}
3=0011
15=1111
所以有2位是不同的