2581. 0 and 1

单点时限: 2.0 sec

内存限制: 256 MB

As we all kown,in computer’s world,the language is represented by ‘0’s and 1’s.The problem is coming,partychen want to know how many ‘0’s and ‘1’in a number based on binary if he give you a number based on decimal.

输入格式

The first line of input gives the number of cases, $N(1 \leqslant N \leqslant 100)$. $N$ test cases follow.

The next $N$ lines will each contain a integers $M(1 \leqslant M \leqslant 10000000)$ based on decimal, as described above.

输出格式

For each test case, output two numbers in one line separately represent the sum of ‘0’s and ‘1’s.

Hint:

If give you a 10 base on decimal,you get 1010 base on binary,and there are two ‘0’s and two ‘1’s.So you must output 2 2.

样例

Input
2
10
11
Output
2 2
1 3

1064 人解决,1157 人已尝试。

1289 份提交通过,共有 1946 份提交。

0.1 EMB 奖励。

创建: 15 年,7 月前.

修改: 6 年,3 月前.

最后提交: 1 月,1 周前.

来源: partychen

题目标签