Given a positive integer n, count the number of set bits in the binary representation of n.
| n | Binary(n) | # Set Bits |
| 1 | 1 | 1 |
| 5 | 101 | 2 |
| 8 | 1000 | 1 |
The first line contains an integer âTâ denoting the number of test cases.
For each test case, the input has one line containing a positive integer ânâ.
For each test case, the output has one line containing the number of set bits in the binary representation of n.
3
1
5
8
1
2
1
1 <= T <= 105
1 <= n <= 109