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.
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.
For each test case, please output the corresponding N, which is the number entered by Chief Programmer.
2 28 6
7 3
Migrated from old NTUJ.
Ural 1153
No. | Testdata Range | Score |
---|