SP4188 HS08EQ - Amazing equality
Description
The definition of a perfect number is about 2300 years old. A perfect number is defined as a positive integer which is the sum of its proper positive divisors, that is, the sum of the positive divisors excluding the number itself. What can we get if, in the sum, we replace each divisor by its square? You can prove that there is no such number. But there are many numbers for which the sum of some divisors' squares is equal to _n_, so n=d $ _{1} $ $ ^{2} $ +d $ _{2} $ $ ^{2} $ +...+d $ _{k} $ $ ^{2} $ , where d $ _{1} $ , d $ _{2} $ , ...,d $ _{k} $ are distinct (positive) divisors of _n_. You have to count how many times this happens. For example: the divisors of _n_=120 are 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 20, 24, 30, 40, 60, 120. And there are exactly two amazing equalities:
120=2 $ ^{2} $ +4 $ ^{2} $ +10 $ ^{2} $
120=2 $ ^{2} $ +4 $ ^{2} $ +6 $ ^{2} $ +8 $ ^{2} $
Input Format
The first number is _T_, denoting the number of test cases (_T_
Output Format
Output _T_ lines, the answer for each _n_.