__builtin_popcount(n) 计算32位二进制数中有多少个1 例: n=63;//(111111)2 x=__builtin_popcount(n); x=6; 转载于:https://www.cnblogs.com/lyp-Bird/p/10336832.html