This problem is a programming version of Problem 251 from projecteuler.net
A triplet of positive integers is called a Cardano Triplet if it satisfies the condition:
For example, is a Cardano Triplet.
There exist Cardano Triplets for which .
Find how many Cardano Triplets exist such that .
The first line of each test file contains a single integer , which is the number of queries. lines follow, each containing the corresponding .
Print exactly lines with the answer to the corresponding query on each one.
Sample Input 0
Sample Output 0
is the only triplet with the sum .
Sample Input 1
Sample Output 1