BETA
School Problem's Submission isn't counted in score!

Submissions: 1475 Accuracy:

40.27%

Java loops | Set 1
     

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

Set Default Code

					   
It is recommended to 'Compile & Test' your code before clicking 'Submit'!

Compilation/Execution Result:

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