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
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

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
Mitch Schwartz: 2014-03-08 17:54:53

A golfing version might be better for SHORTEN than for challenge section. And for such a version, I wouldn't restrict source code limit too much; sometimes it's fun to golf in languages that aren't as good for golf, such as Java or BF. I'm at 49 47 46 bytes in AWK.

--nitish--> But I dont have appropriate permissions to put on SHORTEN!

(Mitch) For SHORTEN, you can prepare the problem, making sure "Available for use in 3rd party contests" is checked, then ask Piotr Kąkol to please review it and add it if he feels it will be suitable, or give suggestions on how to improve it, etc. I've sent you an email with his email address. :)

Last edit: 2014-03-09 19:31:22
Francky: 2014-03-08 15:44:16

This problem shouldn't move imho. But another one in challenge could be possible. But I see several problems, the most important is : it's way too IO dependent, among other problems ... and in fact, I think it's nice as it is.


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