One Last Task

2.9

21 votes
Problem

Ramesh and Suresh are now given One Last Task, to distribute tickets to all the students as their admissions are finalized. Sounds simple, but there's one twist, they are supposed to give 1 ticket to the first student, 2 tickets to the second student, 3 tickets to the third student and so on. Now, the professor knows the total no. of admitted students. So, he would tell them the number of students n and ask the total no. of tickets required. The One who tells all the answers correctly gets admitted to the College.

Input: The first line of the input contains T, the number of test cases. T lines follow. Each test case contains a single integer N denoting the no. of students.

Output: Print the total no. of stickers required for each test case in a new line.

Constraints:

1 <= T <= 10

1 <= N <= 10^8

Time Limit: 1
Memory Limit: 256
Source Limit:
Editor Image

?