//转int fun1(unsigned int i) { if(i<2) return i; else return fun(i/2)+i%2; } int fun2(unsigned int i) { int n1=0; while(i) { i=i&(i-1); n1++; } return n1; }