Find n-th term of series 1, 3, 6, 10, 15, 21…
Submissions: 2183   Accuracy:

52.62%

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

Given a number N, find the Nth term in the series 1, 3, 6, 10, 15, 21…

Input :
The first line of input contains a positive integer T denoting the number of testcases. For each test case, there will be a single line containing an integer N.

Output:
For each testcase, 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


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

to report an issue on this page.