TopCoder

User's AC Ratio

NaN% (0/0)

Submission's AC Ratio

NaN% (0/0)

Tags

Description

To check the speed of JCN Corporation new supercomputer it was decided to figure out the sum of first N (N < 101000) positive integers. Unfortunately, by the time the calculation was finished the Chief Programmer forgot the value of N he entered. Your task is to write the program (for personal computer), which would determine the value of N by the result calculated on supercomputer.

Note: JCN Corporation manufactures only reliable computers, and its programmers write only correctly working programs.


Input Format

The first line of the input contains an integer T <= 100 indicating the total number of test cases. For each test case, there is one line containing the result of calculations on the supercomputer.

Output Format

For each test case, please output the corresponding N, which is the number entered by Chief Programmer.

Sample Input 1

2
28
6

Sample Output 1

7
3

Hints

Problem Source

Migrated from old NTUJ.

Ural 1153

Subtasks

No. Testdata Range Score

Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Output Limit (KiB) Subtasks
0 20000 65536 200