#K75272. Pills Per Day

    ID: 34383 Type: Default 1000ms 256MiB

Pills Per Day

Pills Per Day

A patient takes a specific number of pills every day following a unique pattern. On the first day, the patient takes 1 pill. For any day n (where n > 1), the number of pills taken is given by the formula:

$$ pills(n) = \frac{n(n-1)}{2} + 1 $$

For example, on day 4, the number of pills is calculated as:

$$ pills(4) = \frac{4 \times 3}{2} + 1 = 7 $$

You are required to write a program that reads several test cases and prints the number of pills taken on each specified day.

inputFormat

The first line contains an integer T representing the number of test cases. Each of the following T lines contains a single integer n (the day number).

outputFormat

For each test case, output a single line with the number of pills taken on that day.

## sample
4
1
4
5
6
1

7 11 16

</p>