/*版一*/unsigned int bitcount(unsigned int x){ int b; for(b=0;x != 0;x >>= 1) { if(x&01) b++; } return b;}
/*其实这个算法很简单,就是把这个数中的所有的1都加起来就可以了*/