intcount(int n){ int res = 0; while (n != 0) { n -= (n & -n); res++; } return res; }
intmain(){ int n; scanf("%d", &n); int num[n]; for (int i = 0; i < n; i++) scanf("%d", &num[i]); for (int i = 0; i < n; i++) printf("%d ", bitCount(num[i])); return0; }