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

Submissions: 258 Accuracy:

56.59%

[Find n-th term of series 1, 3, 6, 10, 15, 21…]
     

Given a number n, find the n-th term in the series 1, 3, 6, 10, 15, 21…

Input:

The first line of input contains an integer T denoting the number of testcases. T test cases follow. Each test case contains an integer n.

Output:

Print the nth term

Constraints:

1<=T<=100

1<=n<=1000

Examples:

Input:

2

3

4

Output:

6

10

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

Contributor: Ankit Sharma
Author: Soul_xhacker

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.