All Tracks Math Combinatorics Basics of Combinatorics Problem

Win the game
Tag(s):

Easy, Number Theory

Problem
Editorial
Analytics

Chotta Patwari is the best coder in the university. His university is organising the inter-university coding contest. Being a member of coding club, Chotta Patwari is given the responsibility of setting a hard problem for the contest.

Monk also took part in the contest and solved all the problems except the Chotta Patwari's one. In order to win the contest, monk has to solve all the problems. Monk was having hard time solving it. He hopes you can help him. The problem is:

For a given n, find the number of even(X[ ]) and odd(Y[ ]) numbers among the set, { nC\(_0\) ,nC\(_1\), .....nC\(_n\) } where nC\(_r\)= \({ n! }\over{r!(n-r)!}\)

Input Format

First line contains t, the number of test cases. Next T lines contain one integer per line, denoting n.

Output Format

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

Constraints

\(1 \le T \le 10^{5}, 1 \le n \le 10^{9}\)

SAMPLE INPUT
3
7
5
2
SAMPLE OUTPUT
0 8
2 4
1 2
Time Limit: 0.2 sec(s) for each input file.
Memory Limit: 256 MB
Source Limit: 1024 KB
Marking Scheme: Marks are awarded when all the testcases pass.
Allowed Languages: Bash, C, C++, C++14, Clojure, C#, D, Erlang, F#, Go, Groovy, Haskell, Java, Java 8, JavaScript(Rhino), JavaScript(Node.js), TypeScript, Julia, Kotlin, Lisp, Lisp (SBCL), Lua, Objective-C, OCaml, Octave, Pascal, Perl, PHP, Python, Python 3, R(RScript), Racket, Ruby, Rust, Scala, Swift, Swift-4.1, Visual Basic

CODE EDITOR

Initializing Code Editor...
Your Rating:

Contributor

Notifications
View All Notifications

?