与运算
#include <iostream>
using namespace std;
int main(){
int n;
cin >> n;
int tmp, cnt;
for(int i = 0; i < n; i ++ ){
cin >> tmp;
cnt = 0;
for(int j = 0; j < 32; j ++ ){
if(tmp >> j & 1) cnt++;
}
cout << cnt;
if(i != n-1) cout << " ";
else cout << endl;
}
return 0;
}