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
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 ).
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.
Input | Output |
---|---|
5 1 7 26500 4 19169 | 1 1 50 2 39 |