Money Bank

5

1 votes
Implementation, Math
Problem

Anshu's father is a billionaire but he wants Anshu to learn the value of money. So, his father gives him his pocket money in a different manner. He gives 1Rs. on first day, 2 Rs. on second, 3 Rs. on third and so on. So, Anshu gets n Rs. on any nth day.

Anshu's father asks Anshu how much money he has received in total so far after giving him the money on that day. But Anshu is weak in maths, so he needs your help to tell his father.

Input

The first line consists of a number 't which specifies the number of test cases. 1<=t<=100. 't' lines follow with a day 'n' on each line. 'n' can have upto 20001 digits. 1<=n<=(10^20000)

Output

For each test case, output the total money he has received till that day.

Time Limit: 10
Memory Limit: 1
Source Limit:
Explanation

Total Money till 3rd day = 1+2+3 = 6 Total Money till 6th day = 1+2+3+4+5+6= 21

Editor Image

?