Limits 1s, 1.0 GB

Smriti is a Bangla word means memory.

When we see an equation, we go back to the memories of our school life. We solved many equations in our school life like, if y = 3 find the value of x from the equation x2 + y = 4 and answer is 1 .
But now we will solve following equation

Input

First line will contain an integer T ( 1 ≤ T ≤ 106 ) denoting the number of test case.
Next T line will contain one integer Z ( 0 ≤ Z ≤ 106 ).

Output

Find the value of X and Y for each value of Z using the given equation according to the given description and print the difference of | X - Y2 | following the sample.

Sample

InputOutput
5
1
7
26500
4
19169
1
1
50
2
39

Submit

Login to submit.

Statistics

82% Solution Ratio
RenegadesEarliest, Jan '18
Kuddus.6068Fastest, 0.6s
RenegadesLightest, 4.1 MB
mdvirusShortest, 248B
Toph uses cookies. By continuing you agree to our Cookie Policy.