BETA
Java loops | Set 1
Submissions: 2741   Accuracy:

36.74%

  Difficulty: School
*School Problem's Submission isn't counted in score!
     

For a given N, prints the sum of even and odd integers of the first N natural numbers.

Input:
First line of the input contains an integer T which denotes the number of test cases. Then T test cases follow.  Each test case contains a single line containing N.

Output: 
For each test case, print space separated sums of even and odd integers of the first N natural numbers respectively.

Constraints:
1 <= T< = 200
1<=N<=10000

Example:
Input:

2
1

Output:
0 1
12 9  

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Gaurav Miglani
Author: gaurav miglani


Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.