#P17098. [ICPC 2017 Qingdao R] Pythagoras, One More Time
[ICPC 2017 Qingdao R] Pythagoras, One More Time
Problem Description
“Pythagoras, One More Time” triples over are all solutions of where , and are constrained to be positive integers less than or equal to .
You are to calculate the number of the triples such that .
Input Format
The first line is an integer () indicating the total number of cases. For each test case a line contains the integer ().
Output Format
For each case output the total number of triples in a line.
10
1
2
3
4
5
6
7
8
9
10
0
0
1
1
2
3
3
3
4
4