HLP_RAMS - Topper Rama Rao

no tags 

Rama Rao is the topper of his branch. One of his friends was jealous of it. So, he poses a question to test Rama Rao and is as follows:

For a given n, find the number of even and odd numbers among the set, { nC0, nC1 ... nCn }.

Rama Rao was having hard time solving it. He hopes you can help him.

Input

First line contains t (1 <= t <= 105), the number of test cases. Next t lines contain one integer per line, denoting n (0 <= n <= 1012).

Output

For each test case, output two space separated integers specifying the number of even numbers and odd numbers respectively.

Example

Input:
2
3
4

Output:
0 4
3 2

Explanation:

for 3, values are: 1 3 3 1. All are odd. Hence 0 4.

for 4, values are: 1 4 6 4 1. Hence 3 2.


hide comments
dwij28: 2015-08-30 12:31:02

TLE ! BITwise operators to the rescue => AC ! :)

anuveshkothari: 2015-08-02 18:23:04

the above pattern is forming PASCAL'S TRIANGLE...

adi_tri: 2015-07-25 19:24:17

learnt a new thing..

Last edit: 2015-07-25 19:30:33
chin: 2015-07-08 07:42:07

learnt a new thing!!!....:D

Aman Agarwal: 2015-06-02 09:46:31

nice problem
helped to learn a new thing

ASHUTOSH DWIVEDI: 2015-05-26 20:36:30

learnt about new thing but easy one to get 0.2 points............AC in one go :)))

Bala Vignesh [Inactive]: 2015-03-20 17:11:09

sweet!

Last edit: 2015-03-20 17:11:45
Dushyant Singh: 2015-02-24 19:37:50

What's the output for n=0?

re(vamsi): It is clear what the output is. Just follow the given instructions.

Last edit: 2015-02-25 17:01:31
Sahil Sharma: 2015-01-04 15:21:43

Hey, what does golfing version mean?

Thanks

Last edit: 2015-01-04 15:21:57

Added by:nitish rao
Date:2014-03-06
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64
Resource:My own Problem