精妙
#include <bitset> class Solution { public: int NumberOf1(int n) { return bitset<32>(n).count(); } };