n&(n-1)???????n??????????е????λ?1????0
1???ж??????????2?????
n > 0 && ((n & (n - 1)) == 0 )
2?????????????????????1?????
while (n >0 ) {
count ++;
n &= (n-1);
}
3??????N!????????2???????
N - ??N??????????1???????
原文地址:https://www.cnblogs.com/ZCWang/p/12928240.html