SP26132 SUMDEC2 - Sum the Decimal-part II
Description
**A much easier version of this problem can be found here-[SUMDEC1](http://www.spoj.com/problems/SUMDEC1/).
In case you haven't tried it out,try the first part.**
In this problem,You are given a number.You need to output the sum of the first 1000 decimal places of the square-root of the number(Ignore the Integral part).
For example-if the given number is 2. The square-root of 2 is 1.4142135623.....
So,ignore the number before decimal (1 in this case) and add the first 1000 digits after decimal and output them as result-4482.(in this case)
**NOTE-If the number is a perfect square,the output should be 0.**
Input Format
the first line of input consist of t (the number of test cases).
t lines follow-Each line consist of a non-negative integer n.
Output Format
Output in seperate lines the result corresponding to integer n.
#### Constraints
1