#P1586. 四方定理
四方定理
Description
The four-square theorem is well known: any positive integer can be written as a sum of at most four squares of integers. For example: , and there are other representations as well, and . Given a positive integer , write a program to count the total number of its representations. Note: and are considered the same representation.
Input Format
The first line contains a positive integer , followed by lines, each containing a positive integer .
Output Format
For each positive integer , output the total number of representations.
1
2003
48
Hint
Translated by ChatGPT 5
京公网安备 11011102002149号