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

51.3%

  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


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



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


to report an issue on this page.