Problem:


Score : 300 points

Problem Statement

Let f(n) be the number of triples of integers (x,y,z) that satisfy both of the following conditions:

1 \leq x,y,z

x^2 + y^2 + z^2 + xy + yz + zx = n

Given an integer N, find each of f(1),f(2),f(3),\ldots,f(N).

Constraints

All values in input are integers.

1 \leq N \leq 10^4

Input

Input is given from Standard Input in the following format:

N

Output

Print N lines. The i-th line should contain the value f(i).

Sample Input 1

20

Sample Output 1

0
0
0
0
0
1
0
0
0
0
3
0
0
0
0
0
3
3
0
0

For n=6, only (1,1,1) satisfies both of the conditions. Thus, f(6) = 1.

For n=11, three triples, (1,1,2), (1,2,1), and (2,1,1), satisfy both of the conditions. Thus, f(6) = 3.

For n=17, three triples, (1,2,2), (2,1,2), and (2,2,1), satisfy both of the conditions. Thus, f(17) = 3.

For n=18, three triples, (1,1,3), (1,3,1), and (3,1,1), satisfy both of the conditions. Thus, f(18) = 3.



Sample input:
20


Sample output:
0
0
0
0
0
1
0
0
0
0
3
0
0
0
0
0
3
3
0
0

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = [0,0,0,0,0,1,0,0,0,0,3,0,0,0,0,0,3,3,0,0,0,0,0,1,9,0,3,0,0,0,0,0,3,3,9,0,0,3,0,0,0,0,3,3,9,0,9,0,0,0,3,0,0,1,9,0,3,9,0,0,9,0,0,0,0,3,3,3,9,0,9,3,9,0,0,0,9,0,0,0,3,3,12,0,9,3,9,0,3,9,0,0,0,0,9,1,9,0,3,9,0,3,9,0,9,0,0,3,9,0,0,0,3,3,9,0,9,3,9,0,3,9,12,0,9,0,0,0,3,9,3,3,9,0,9,3,9,0,3,9,9,0,9,0,9,3,9,0,0,1,9,3,9,9,0,0,9,0,9,0,9,3,9,0,0,9,0,0,9,0,12,3,9,0,9,3,12,9,3,9,9,0,9,0,9,0,18,9,0,0,9,0,3,3,9,0,9,6,9,0,3,9,9,3,9,0,9,0,3,9,0,0,9,3,9,1,9,9,3,9,0,0,9,0,9,0,3,3,9,0,0,9,3,9,9,0,9,0,0,0,9,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9,9,9,9,9,9,0,9,9,9,9,9,0,9,0,18,9,9,18,9,12,9,9,18,9,9,12,18,0,18,9,9,18,21,18,9,12,9,9,18,9,9,9,9,0,9,3,18,9,9,12,27,9,9,9,9,9,9,18,9,0,9,12,9,9,9,9,9,3,9,0,9,9,9,9,9,0,9,9,9,9,9,9,9,9,9,3,9,9,9,15,9,0,18,9,9,9,9,9,9,0,9,9,9,9,9,18,18,0,9,3,18,3,9,9,9,9,9,0,9,18,9,9,9,0,9,9,18,9,9,9,18,18,9,0,6,18,9,9,27,0,9,0,18,18,12,9,9,9,9,18,18,18,9,9,9,0,9,3,9,12,9,18,9,9,9,3,9,9,9,9,9,0,9,9,12,9,18,0,9,12,9,9,9,18,9,9,9,0,9,9,9,9,9,18,18,9,18,0,9,0,9,9,9,0,18,0,9,9,27,3,9,9,9,9,12,9,9,9,18,0,9,9,9,9,18,9,18,9,9,9,9,9,18,9,18,0,18,0,9,9,21,9,9,9,9,9,12,9,9,9,18,0,9,9,9,9,12,9,9,9,18,0,9,9,9,9,9,0,9,0,9,12,9,9,9,9,9,6,18,9,9,9,9,0,9,9,18,15,9,9,9,9,9,9,9,18,18,0,9,0,9,12,36,9,9,9,9,0,9,9,9,9,9,9,18,0,9,0,18,9,9,9,18,18,18,0,9,9,9,9,9,0,9,0,9,9,18,3,9,3,18,12,9,18,9,9,9,0,9,9,18,9,9,18,9,6,27,9,18,18,9,0,9,0,18,3,9,9,9,18,9,9,9,9,18,9,9,9,9,0,9,9,9,9,12,9,9,3,18,0,9,9,27,18,9,0,9,3,18,3,12,9,9,9,9,9,9,9,9,9,9,0,9,9,9,9,12,9,9,9,9,3,9,9,9,9,9,0,18,9,9,9,3,18,18,9,9,9,9,9,12,12,9,0,9,9,9,18,9,9,18,9,9,0,9,9,9,18,9,0,9,3,9,9,9,9,9,9,18,3,18,18,9,9,18,0,9,9,9,9,9,9,18,9,9,9,9,9,18,9,9,0,9,0,9,18,9,9,9,9,9,0,9,9,9,18,9,0,18,9,9,12,18,9,9,9,18,0,9,9,9,9,9,0,18,3,18,9,0,12,9,12,9,9,9,9,9,12,9,0,9,9,9,9,9,9,9,13,18,0,9,18,9,9,9,0,9,3,9,12,9,12,9,18,9,9,18,9,9,9,9,0,18,9,9,9,18,9,18,3,9,0,12,18,9,9,18,0,18,9,9,9,9,9,9,9,18,0,9,9,18,9,9,0,9,9,9,9,9,9,9,9,9,0,18,9,9,9,18,0,9,9,9,9,18,9,18,3,9,9,9,9,18,0,18,0,9,9,36,9,9,9,9,9,9,0,9,9,9,9,9,0,9,0,9,9,9,9,9,9,9,6,18,18,12,18,9,0,9,9,21,9,9,18,9,3,9,12,9,9,12,9,9,0,9,0,18,9,9,9,9,9,9,9,12,9,9,9,18,0,18,3,9,18,9,9,9,9,9,0,18,9,12,18,18,0,9,9,9,9,18,18,9,9,9,9,9,9,18,12,18,0,9,9,9,18,18,9,9,9,18,3,18,18,9,9,9,0,9,0,9,9,9,9,9,9,27,9,18,9,9,9,9,0,9,9,12,18,9,9,9,6,9,0,9,9,9,9,9,0,18,3,9,9,9,9,9,9,9,3,18,9,9,9,9,0,18,9,9,12,9,9,9,9,9,12,9,9,9,9,18,0,9,0,9,12,18,9,9,18,9,9,9,9,9,3,9,0,18,12,9,9,9,9,18,9,9,0,18,9,9,9,9,0,9,9,9,6,9,9,9,9,9,9,9,9,9,9,9,0,18,9,18,9,9,9,18,12,9,3,9,9,9,9,9,0,9,1,9,9,18,9,9,9,9,9,9,9,9,9,18,0,9,9,9,12,18,9,9,9,9,0,9,9,9,18,9,0,9,0,9,27,18,9,18,9,9,9,9,9,9,9,9,0,9,9,9,3,9,27,9,9,9,9,18,9,21,9,9,0,18,9,12,18,18,9,18,9,9,0,9,9,12,9,9,0,9,9,9,9,18,9,9,9,9,0,9,18,9,9,9,0,9,0,9,9,9,9,18,3,9,9,9,9,9,9,9,0,9,9,12,9,9,9,9,18,9,3,18,9,9,9,9,0,9,0,9,9,9,9,9,9,9,18,9,18,18,9,9,0,9,9,27,9,9,9,9,12,9,0,9,9,18,9,9,0,9,0,9,12,18,9,9,9,9,9,9,9,9,9,18,0,9,0,12,12,9,9,9,9,9,9,21,9,12,9,18,0,9,3,18,9,9,9,9,12,9,9,9,9,9,12,9,0,9,12,9,9,9,9,18,12,18,0,9,9,21,9,9,0,36,9,9,9,9,12,9,3,9,9,9,9,12,9,9,0,9,0,27,9,9,9,9,9,9,3,9,9,27,9,18,0,9,9,9,9,9,6,18,18,9,18,18,9,9,9,18,0,9,18,18,3,9,9,9,9,9,0,18,9,9,9,9,0,9,0,9,9,9,9,9,12,9,9,18,9,18,3,18,0,9,9,9,9,18,9,9,9,9,6,18,9,9,9,9,0,18,0,9,9,9,9,9,0,9,9,18,9,9,9,18,0,18,9,9,9,12,9,9,10,9,0,9,18,9,9,9,0,18,0,9,12,18,9,9,9,9,18,18,9,9,9,9,0,27,0,12,18,9,9,18,18,9,9,9,9,9,9,9,0,9,0,18,9,12,9,9,9,18,9,9,18,9,9,9,0,9,18,9,9,9,9,9,9,9,0,9,9,9,9,9,0,9,0,12,9,9,9,9,12,18,9,18,18,9,9,9,0,18,12,9,9,9,9,9,9,9,0,9,18,9,9,9,0,9,9,9,9,18,9,9,12,9,9,9,9,9,18,9,0,18,3,9,9,9,18,27,9,18,0,9,18,18,9,9,0,9,3,9,12,9,9,9,9,9,15,18,9,9,9,9,0,9,9,18,12,9,18,9,9,9,9,9,0,3,18,9,0,27,3,9,9,9,27,9,9,9,9,9,9,9,9,9,0,9,9,9,21,9,9,9,9,9,0,9,9,9,9,27,0,9,3,9,9,12,9,18,9,9,12,9,9,9,9,9,0,18,9,9,9,18,9,18,9,18,9,9,9,9,9,18,0,9,9,27,12,9,9,9,9,9,9,9,9,27,9,18,0,9,9,9,12,9,9,9,12,9,0,9,9,9,9,18,0,9,12,9,12,9,12,9,9,18,9,9,18,9,3,9,0,9,9,9,9,12,9,9,9,9,9,9,9,12,9,9,0,9,0,9,9,21,18,18,9,18,9,9,18,9,9,9,0,9,9,18,18,18,9,9,9,9,0,9,9,9,9,9,0,9,0,12,9,9,9,9,9,18,3,9,9,3,9,18,0,9,9,9,9,9,9,9,9,9,9,12,9,12,9,9,0,18,0,9,9,9,12,18,9,9,9,9,9,9,9,9,0,9,9,18,18,9,18,18,9,18,0,18,9,9,9,18,0,9,9,9,9,9,9,27,9,9,9,9,9,9,9,9,0,9,0,9,9,9,9,9,9,9,12,9,9,18,9,9,0,9,3,18,0,9,9,9,6,18,9,9,9,9,12,9,0,9,9,9,9,9,9,27,12,9,0,9,18,9,18,9,0,9,3,18,9,9,12,9,9,9,9,9,18,18,9,27,0,9,9,9,12,9,9,18,9,9,9,12,9,9,9,9,0,18,9,18,9,9,9,9,9,18,9,18,9,9,12,9,0,9,9,12,18,18,9,18,9,18,0,12,18,9,18,9,0,9,9,9,9,9,9,18,3,9,3,9,18,9,9,9,0,18,9,9,9,9,0,9,9,9,9,9,0,9,18,9,0,18,0,12,9,18,12,9,9,9,9,9,18,9,9,9,0,9,0,18,9,9,18,9,9,18,0,9,18,12,18,9,0,18,0,9,12,18,0,9,9,9,9,18,18,15,9,18,0,9,12,18,9,9,9,9,9,9,9,12,9,12,9,9,0,9,3,9,18,18,9,18,9,9,0,9,18,9,18,9,0,9,9,9,9,9,9,18,9,9,0,9,18,9,18,9,0,9,3,18,9,9,9,9,9,9,9,18,9,9,9,9,0,9,9,9,9,27,9,9,12,9,9,9,9,12,18,9,0,18,3,9,9,9,18,9,9,9,9,9,9,9,9,9,0,9,9,9,9,9,18,9,9,9,0,9,9,9,0,9,0,9,9,9,18,9,18,18,9,27,9,9,9,9,9,9,0,9,3,27,12,18,9,9,9,9,3,18,9,18,9,9,0,9,9,9,12,9,18,9,9,9,9,18,9,18,9,9,0,9,12,18,9,9,9,18,6,9,0,9,9,9,9,9,0,9,0,9,21,9,9,9,9,9,3,9,9,9,9,9,0,18,9,18,9,18,9,9,9,9,12,9,9,9,9,9,0,18,0,9,9,9,9,9,9,9,18,18,9,9,9,9,0,9,9,9,9,9,9,18,9,9,0,18,9,9,9,9,0,9,0,9,9,9,9,9,0,18,9,12,9,27,9,18,0,9,12,9,18,12,18,0,9,9,3,21,18,9,18,9,0,9,9,9,9,9,9,9,9,9,9,9,9,12,18,18,0,9,0,12,9,9,9,9,9,18,0,9,9,9,27,18,0,9,0,18,9,9,9,9,9,9,9,9,9,18,9,18,0,18,9,0,9,9,18,9,9,9,9,18,9,9,9,9,0,18,3,9,9,18,12,18,9,9,9,9,9,18,9,9,0,18,9,18,9,9,9,9,9,9,0,9,18,18,9,18,0,9,0,9,9,9,9,9,9,9,9,18,9,9,9,9,0,18,9,21,9,9,9,27,9,9,9,9,9,18,9,9,0,9,9,9,9,18,18,9,9,9,9,9,9,9,9,18,0,9,9,9,9,9,9,9,9,9,0,12,9,9,9,18,0,9,9,12,27,9,9,9,12,18,9,9,9,9,21,18,0,9,0,9,9,9,27,9,12,9,0,9,18,9,9,9,0,9,0,9,12,9,12,18,9,18,9,18,9,18,9,9,0,9,9,9,9,18,9,9,3,9,0,18,18,9,9,9,0,18,1,9,9,18,18,9,9,9,9,9,9,9,12,9,0,9,9,9,9,18,9,18,3,18,12,18,9,9,9,18,0,18,3,9,9,9,18,9,9,9,9,9,9,9,9,9,0,9,12,9,9,9,9,9,9,18,0,9,9,9,9,9,0,9,9,9,9,9,9,9,9,18,9,18,9,18,9,9,0,18,9,9,9,9,9,27,9,9,9,9,9,18,9,18,0,9,9,9,9,12,9,9,12,9,9,21,9,9,9,9,0,9,9,9,9,9,18,9,9,9,0,9,9,9,9,9,0,18,0,12,9,18,9,9,6,9,9,18,9,9,9,18,0,9,9,18,9,12,9,9,12,18,9,9,9,9,9,9,0,18,9,18,9,9,9,18,18,9,9,18,9,18,9,18,0,18,18,9,9,18,9,9,9,18,0,9,9,9,9,9,0,18,3,9,18,12,9,9,18,9,0,9,9,9,9,18,0,9,9,9,12,18,9,9,9,9,0,9,9,9,9,9,0,9,0,9,18,9,9,18,9,18,9,9,9,9,9,9,0,18,0,9,9,9,9,18,18,9,0,9,9,9,9,9,0,18,9,9,12,18,9,9,12,9,21,9,9,9,9,9,0,9,0,18,9,9,9,9,18,9,6,9,9,18,9,18,0,9,12,9,9,18,9,18,18,9,9,12,9,18,12,27,0,9,9,18,18,9,9,9,18,9,0,18,9,9,18,9,0,9,0,9,18,9,9,9,9,18,9,9,9,9,18,9,0,9,18,18,9,9,9,18,9,9,9,9,18,9,9,9,0,9,0,9,9,18,18,9,9,9,9,9,9,27,9,9,0,9,9,9,9,9,9,9,0,9,0,9,18,9,9,9,0,9,3,9,9,9,18,9,9,18,3,9,9,9,9,18,0,9,9,18,9,18,9,9,9,9,9,18,9,9,18,9,0,9,0,9,9,12,18,18,9,18,9,12,9,9,9,9,0,9,9,9,18,9,9,9,3,27,0,9,9,18,9,18,0,18,9,9,9,9,3,9,9,27,9,18,9,9,18,9,0,9,0,9,9,9,9,9,9,9,9,9,9,9,18,9,0,9,0,9,9,9,18,9,9,9,9,3,18,9,9,18,0,9,9,9,18,9,9,9,9,9,0,9,9,9,9,9,0,9,0,9,9,9,9,9,12,9,9,9,9,9,9,18,0,18,3,9,9,9,9,18,9,18,9,18,9,9,9,9,0,18,6,18,9,9,9,9,9,27,9,9,9,9,9,9,0,9,9,9,9,12,9,9,0,18,0,9,18,9,9,9,0,18,9,18,3,27,9,9,15,9,9,9,9,18,12,18,0,9,18,9,18,9,9,18,9,18,3,9,9,18,18,9,0,18,9,9,18,27,12,9,9,9,9,9,9,9,9,27,0,9,9,9,18,9,9,9,12,18,0,9,9,9,9,18,0,9,0,9,9,9,9,9,9,18,9,18,0,18,9,9,0,9,9,18,9,18,18,18,9,9,9,9,9,9,9,9,0,9,9,9,9,12,9,27,9,18,9,18,9,9,9,9,0,18,9,18,15,18,9,9,18,18,0,9,9,18,9,9,0,9,0,9,9,9,9,9,9,9,18,9,9,9,9,9,0,9,9,27,9,18,9,9,9,18,0,18,9,18,9,18,0,18,0,9,9,9,9,9,12,18,9,9,9,12,9,18,0,18,9,12,9,9,9,9,9,9,0,18,9,9,9,9,0,9,3,9,9,9,9,9,9,9,9,18,36,9,9,9,0,9,9,9,9,9,9,9,9,18,9,18,9,9,9,9,0,18,9,18,9,9,9,27,9,9,18,9,9,18,9,18,0,9,9,18,9,18,18,9,12,18,0,9,9,18,9,9,0,9,9,9,9,9,9,9,9,18,9,9,9,9,18,9,0,18,9,18,9,9,9,9,9,9,9,9,18,9,0,9,0,9,3,15,18,9,9,18,9,9,9,9,9,27,9,9,0,9,9,18,9,9,9,9,9,9,0,9,9,9,9,9,0,18,0,12,9,9,9,18,9,9,9,9,9,9,9,9,0,9,9,9,12,9,9,9,9,27,12,9,18,18,9,18,0,9,9,12,12,9,18,9,9,9,9,9,9,9,9,9,0,18,12,9,9,9,9,18,3,9,0,9,18,9,9,18,0,18,0,9,12,9,12,9,9,9,18,9,9,9,12,9,0,9,9,9,18,18,9,9,18,9,6,18,9,18,18,9,0,9,0,9,9,9,9,9,12,9,18,9,9,9,12,9,0,9,18,18,12,18,9,9,18,9,0,9,9,9,9,9,0,9,0,9,9,18,9,9,9,9,0,9,9,9,9,9,0,9,12,9,9,9,9,9,9,9,9,9,9,36,9,9,0,9,9,9,9,9,9,9,9,9,9,9,18,12,9,9,0,9,9,9,9,9,9,9,9,9,0,9,9,15,18,18,0,9,3,9,18,9,18,18,9,9,18,9,9,12,9,18,0,9,9,9,9,9,9,9,9,9,3,21,27,9,9,18,0,18,9,18,9,18,9,9,9,18,9,27,9,18,9,18,0,18,9,9,9,9,9,9,9,9,0,9,9,9,9,9,0,9,3,18,18,9,9,9,12,18,9,9,9,18,18,18,0,18,12,9,9,9,9,9,9,9,9,18,9,9,9,9,0,18,9,9,9,18,9,9,9,18,9,18,9,9,9,18,0,9,9,9,9,9,18,9,10,18,0,18,9,18,9,9,0,9,9,9,9,9,9,9,18,27,3,18,9,9,12,9,0,9,9,9,18,9,9,9,9,9,9,9,9,9,18,9,0,9,0,9,12,9,18,9,12,18,0,9,18,3,12,9,0,18,9,9,9,9,9,9,15,18,0,9,9,12,9,9,0,9,0,9,18,9,9,18,9,9,18,9,9,9,9,9,0,9,9,9,9,18,9,9,9,18,3,9,9,27,9,18,0,9,9,9,9,9,9,9,9,9,9,18,9,9,12,18,0,18,9,9,9,18,9,18,9,9,0,9,9,9,18,9,0,9,9,9,9,12,9,27,9,27,3,18,9,9,9,9,0,9,0,9,9,18,9,9,18,9,9,9,9,9,9,9,0,9,0,9,9,18,9,18,0,9,18,9,9,18,18,18,0,18,9,9,9,9,9,9,9,9,0,18,9,18,9,9,0,9,3,9,3,18,9,9,9,9,9,9,9,18,9,18,0,9,9,9,18,12,9,9,9,9,3,12,9,9,9,18,0,9,9,9,9,9,9,9,9,18,9,9,18,9,15,9,0,9,9,12,18,9,9,18,9,9,0,9,18,12,18,9,0,18,9,18,18,12,18,9,9,9,9,18,18,9,18,9,0,9,9,9,9,9,18,18,12,18,9,12,18,18,9,9,0,9,0,9,18,9,9,9,9,9,9,9,18,9,9,27,0,9,0,9,9,18,27,18,9,9,0,9,9,9,9,9,0,9,0,9,9,9,9,9,9,9,9,9,9,9,18,9,0,9,9,9,9,27,9,9,9,9,3,27,18,9,9,9,0,9,9,12,9,9,9,9,6,18,9,9,9,9,9,9,0,9,9,18,9,9,9,18,9,9,0,9,9,9,9,9,0,9,3,9,12,9,9,9,18,9,12,18,9,18,9,9,0,9,9,18,12,18,9,9,9,18,9,18,9,9,9,18,0,9,4,18,9,9,18,9,9,18,9,9,9,18,9,18,0,9,18,18,12,18,9,9,9,9,0,18,9,18,9,9,0,9,9,9,9,9,9,18,9,9,12,18,18,18,9,9,0,9,9,18,9,3,18,9,9,18,9,9,18,9,9,9,0,9,9,9,12,9,9,9,9,9,9,9,9,9,18,9,0,9,3,27,18,27,9,18,9,18,0,18,18,9,9,18,0,9,12,9,9,18,18,9,18,9,9,9,9,9,9,18,0,18,18,27,9,9,9,9,3,9,9,18,9,9,9,18,0,9,0,18,3,9,9,18,9,9,9,18,9,18,3,9,0,18,9,9,12,21,9,9,9,9,0,21,9,18,9,9,0,9,0,9,9,21,9,18,12,9,12,9,9,9,9,9,0,9,9,9,9,18,9,9,9,9,9,9,18,9,0,18,0,9,3,18,18,12,18,9,9,9,9,9,9,9,9,9,0,9,9,18,9,27,9,9,9,9,0,9,9,9,9,27,0,9,9,9,9,9,9,18,9,18,9,9,9,12,9,9,0,9,9,9,9,9,18,9,9,9,3,27,18,9,18,18,0,9,12,9,9,36,9,9,9,9,9,9,9,9,9,9,0,9,9,21,9,9,9,18,9,9,0,9,9,9,9,18,0,18,0,9,9,12,9,9,9,18,9,18,9,9,18,18,0,9,9,18,9,9,9,18,9,9,9,9,9,18,9,9,0,9,9,9,9,9,9,9,12,18,9,9,9,9,12,9,0,9,9,9,9,9,9,18,6,9,0,9,9,18,9,9,0,18,0,9,9,9,27,18,9,9,9,36,9,9,9,9,0,9,9,9,27,9,9,9,12,9,12,9,18,9,18,9,0,9,0,9,9,9,9,9,9,27,9,18,18,9,9,9,0,9,9,9,9,9,9,9,18,9,0,9,9,18,18,9,0,9,0,9,9,18,9,9,12,9,18,18,9,18,9,9,0,9,3,9,27,9,9,9,9,9,9,15,18,9,9,18,0,18,9,9,18,9,12,9,9,18,9,18,9,18,9,18,0,18,9,9,18,18,9,9,9,9,0,12,9,18,9,18,0,9,3,9,9,9,18,9,9,18,9,9,18,9,9,9,0,18,18,18,9,21,9,18,9,9,9,9,9,21,9,9,0,36,0,12,9,9,18,9,9,9,9,9,9,9,18,9,0,9,9,18,9,9,9,9,9,9,0,12,18,18,9,9,0,9,9,9,9,9,3,18,9,9,12,9,9,9,9,9,0,9,9,9,9,9,18,9,9,18,9,9,9,18,9,18,0,9,9,9,18,9,9,18,9,9,9,9,9,9,9,9,0,9,12,9,9,9,9,18,9,18,0,18,9,9,9,18,0,9,3,9,9,18,18,18,9,9,9,9,9,18,9,9,0,9,9,9,9,27,9,18,9,9,9,9,9,9,9,9,0,9,0,18,9,9,9,9,9,9,9,9,9,9,9,9,0,9,9,9,27,9,9,18,9,9,0,9,18,9,9,27,0,9,3,18,9,9,9,9,9,9,9,9,9,27,18,18,0,9,9,9,12,9,9,36,9,9,12,18,18,9,9,9,0,18,0,9,9,27,9,9,9,9,9,18,9,9,9,9,0,18,12,18,9,9,9,9,9,9,0,9,9,18,9,9,0,9,9,12,12,9,9,18,18,9,9,9,9,9,9,18,0,9,9,9,9,18,9,9,6,18,12,9,18,18,9,9,0,18,3,18,9,9,18,9,18,9,9,12,9,9,9,9,0,18,9,18,9,9,9,9,9,9,0,9,18,9,9,9,0,9,0,9,9,9,9,18,9,18,9,9,9,9,9,9,0,9,9,9,9,18,9,9,18,18,3,27,18,9,9,18,0,9,18,9,9,18,12,9,9,18,9,9,9,9,18,9,0,9,9,9,12,9,9,18,18,18,0,9,9,9,9,9,0,9,9,9,9,15,18,9,3,9,9,18,9,12,9,9,0,9,0,12,18,18,9,9,9,9,13,18,9,21,18,9,0,18,0,9,9,9,9,9,9,9,9,9,9,9,9,18,0,9,9,18,27,9,18,9,9,18,0,18,9,9,27,18,0,9,3,18,9,18,9,9,9,18,9,9,9,18,9,9,0,9,9,18,9,9,18,18,9,9,9,9,9,9,9,9,0,9,0,18,18,12,9,9,9,18,9,9,18,18,9,9,0,9,12,9,3,9,18,18,9,9,0,9,9,9,9,9,0,9,9,9,18,9,9,9,3,18,18,9,9,18,9,9,0,9,9,9,9,18,18,18,9,9,0,9,18,18,9,18,0,9,9,18,9,18,9,9,9,18,9,9,9,12,9,9,0,9,9,9,12,9,9,18,9,18,0,18,9,9,9,9,0,18,0,36,18,18,9,9,12,9,0,9,9,9,6,9,0,18,9,9,9,9,9,9,12,9,9,12,27,9,9,18,0,9,0,9,18,9,9,9,9,18,9,18,9,9,9,18,0,9,9,9,12,18,18,9,12,18,0,12,9,9,9,18,0,9,3,9,18,9,9,9,9,9,9,9,9,9,12,18,0,9,9,9,9,9,9,36,9,18,9,9,9,9,9,9,0,9,0,9,9,9,9,9,9,18,9,9,9,9,9,9,0,9,9,9,9,9,9,9,18,9,0,9,9,18,9,9,0,9,9,9,9,9,12,9,9,9,12,12,9,9,18,27,0,18,6,18,9,18,9,9,3,9,9,18,18,9,9,9,0,9,9,21,9,9,9,9,9,9,18,27,9,9,18,9,0,9,12,9,9,9,18,9,18,9,0,18,9,9,9,18,0,18,9,9,9,18,9,9,9,9,9,9,9,27,9,9,0,9,18,18,9,9,9,9,9,9,0,9,9,9,9,18,0,9,3,12,9,9,9,9,9,18,9,18,9,9,9,9,0,9,9,9,18,9,9,18,9,18,0,12,9,9,18,9,0,9,0,9,9,9,9,9,9,9,9,9,18,18,9,9,0,9,9,9,18,9,9,9,9,9,9,9,9,9,9,18,0,18,9,9,9,9,18,9,10,9,9,12,18,27,9,27,0,9,9,9,12,18,9,27,9,9,0,18,9,18,9,9,0,9,9,12,9,9,9,9,3,18,9,9,18,18,9,9,0,18,9,18,9,9,9,9,15,18,9,9,9,9,18,9,0,9,0,18,3,18,9,18,18,9,0,18,9,18,3,18,0,18,9,18,18,9,9,9,9,9,0,9,9,9,18,9,0,9,0,18,12,9,9,9,9,18,21,9,9,9,9,18,0,9,9,9,21,18,9,18,9,9,9,9,9,9,9,9,0,9,12,18,9,9,9,18,9,9,9,18,9,18,9,9,0,9,18,9,12,9,9,9,9,9,0,9,18,9,9,18,0,9,9,9,9,9,9,9,9,9,15,18,9,9,9,9,0,9,9,18,9,21,27,9,18,18,9,9,9,9,18,9,0,9,3,9,9,18,9,9,9,9,9,9,18,9,18,9,0,18,9,9,9,9,9,9,9,18,0,36,9,18,9,9,0,9,3,9,9,9,18,9,9,9,9,18,9,18,3,18,0,18,9,9,18,9,9,18,9,9,9,9,9,18,9,18,0,9,9,9,12,36,18,9,9,18,9,9,9,9,9,9,0,9,9,18,9,9,9,9,9,9,0,9,9,9,9,18,0,9,9,9,9,12,9,18,12,18,6,12,9,9,9,9,0,18,0,9,18,9,9,9,18,18,12,9,9,9,9,9,0,9,0,9,18,18,9,9,9,9,18,9,9,9,9,18,0,18,9,18,12,12,9,9,12,9,0,9,9,9,18,18,0,18,0,18,18,18,18,9,18,9,9,9,9,9,9,9,0,18,9,18,9,9,9,9,9,9,9,9,9,9,9,18,0,9,6,9,9,9,9,9,9,9,9,9,9,9,9,9,0,9,9,12,18,9,9,18,9,9,0,9,18,9,9,9,0,9,0,18,9,18,9,18,9,9,9,9,9,9,9,9,0,9,9,18,9,9,9,9,9,9,9,9,9,9,9,18,0,9,9,9,9,9,9,9,18,18,9,9,9,9,9,9,0,18,9,9,27,9,9,27,9,9,0,9,9,9,27,9,0,9,1,18,9,18,9,9,12,9,12,9,18,9,15,9,0,9,12,9,9,9,9,27,12,9,9,18,9,9,18,9,0,27,9,9,9,9,12,27,9,9,18,9,9,18,9,9,0,9,9,18,12,9,18,9,9,9,0,9,18,9,9,9,0,9,9,9,9,9,9,9,18,9,9,9,9,9,12,9,0,9,18,9,9,9,9,18,9,9,9,9,18,21,9,18,0,9,0,18,9,9,9,9,12,18,9,9,9,18,9,9,0,18,9,9,9,9,9,18,9,9,0,9,18,9,9,9,0,9,3,9,9,9,9,27,9,9,9,9,9,9,9,9,0,9,9,9,9,12,9,9,9,9,9,12,9,9,9,9,0,9,9,9,9,18,9,9,9,9,9,18,9,9,9,9,0,9,9,18,18,9,9,18,9,9,0,9,9,9,9,9,0,18,9,9,9,9,18,9,9,9,9,12,18,21,6,9,0,18,9,30,18,9,9,18,9,9,3,18,9,18,9,9,0,18,0,9,18,18,9,9,9,9,9,9,18,9,0,18,0,9,9,18,9,9,18,9,9,9,0,9,9,12,9,18,0,27,9,9,9,9,9,18,12,18,9,9,18,9,18,9,0,18,12,9,9,9,9,9,9,9,9,9,9,9,9,9,0,18,9,27,9,9,9,9,12,9,9,9,18,12,9,9,0,9,9,18,9,9,18,9,9,9,0,9,9,18,9,9,0,9,0,9,18,9,18,9,9,18,9,18,18,18,9,9,0,9,9,21,18,18,18,18,12,18,12,9,9,9,9,18,0,9,0,18,9,9,9,9,9,9,9,9,18,9,18,9,0,18,0,18,9,9,18,18,9,9,0,9,9,15,18,9,0,9,0,18,9,18,18,9,9,9,9,9,9,18,9,9,0,9,9,]

for i in range(n):
    print (ans[i])

Submission status: Wrong Answer

Solution code:
import time
import itertools


N = int(input())
def function(x,y,z,n):
    n_tmp = pow(x,2) + pow(y,2) + pow(z,2) + (x * y) + (x * z ) + (y * z)
    if n == n_tmp:
        return True
    else:
        return False

count = 0
start = time.time()

p = list(itertools.combinations_with_replacement(range(1,25), 3))
# print(p)

for n in range(1,N):
    count = 0
    for p_in in p:
        if function(p_in[0],p_in[1],p_in[2],n) == True:
            if(p_in[0] == p_in[1] == p_in[2]):
                count = count + 1
            elif(p_in[0] == p_in[1] or p_in[1] == p_in[2] or p_in[2] == p_in[0]):
                count = count + 3
            else:
                count = count + 6

    print(count)



elapsed_time = time.time() - start
# print("elapsed_time:{0}".format(elapsed_time) + "[sec]")

Submission status: Wrong Answer

Solution code:
for i in range(1, 1 + int(input())):

  result = 0

  for xyz in range(1, 13):
    if i == (xyz ** 2 * 6):
      result += 1

  for x in range(1, 32, 2):

    if i < x ** 2:
      break

    for y in range(2, 32, 2):

      if i < y ** 2:
        break

      for z in range(1, 32):

        if i < z ** 2:
          break

        subtotal = (x**2 + y ** 2 + z ** 2 + x * y + y * z + z * x)

        if i == subtotal:
            result += 3
        
        elif i  < subtotal:
          break

  print(result)

Submission status: Wrong Answer

Solution code:
N = int(input())
n = [0 for _ in range(N)]

def cob(m):
    if m <= 0:
        return m
    return m + cob(m-1)

# x > y > z
test = 0
for x in range(1,N+1):
    if test > 5:
        break
    for y in range(1,x+1):
        if test > 5:
            break
        for z in range(1,y+1):
            ans = x**2 + y**2 + z**2 + x*y + y*z + z*x
            if len(set([x,y,z])) == 3:
                cnt = 6
            elif len(set([x,y,z])) == 2:
                cnt = 3
            else:
                cnt = 1
            if ans > N:
                test += 1
                break
            n[ans-1] += cnt

for i in range(N):
    print(n[i])

Submission status: Wrong Answer

Solution code:
N = int(input())
ls = [0]*15000


for i in range(1,42):
    for j in range(1,42):
        for k in range(1,42):
            t = i**2 + j**2 + k**2 + i*j + j*k + k*i 
            ls[t-1] = ls[t-1] + 1

for p in range(0,N):
    print(ls[p])

Submission status: Wrong Answer

Solution code:
import math

n = int(input())

for i in range(1, n+1, 1):
    maxn = math.ceil(i**0.5)
    cnt = 0
    flag = False

    for x in range(1, maxn+1):
        if x**2 > i:
            break
        
        for y in range(x, maxn+1):
            if x**2 + y**2 + x* y > i:
                break
            else:
                tmp = x**2 + y**2 + x*y - i
                z = (-(x + y) + ((x+y)**2 - 4 * tmp)**0.5) / 2
                zmin = max(math.ceil(z), y)
                zmax = math.floor(z)
                if zmax < y:
                    break
                for z in range(zmin, zmax+1):
                    if x**2 + y**2 + z**2 + x*y + y*z + z*x == i:
                        if x == y and y == z :
                            cnt += 1
                        elif x != y and y != z:
                            cnt += 6
                        else:
                            cnt += 3
                    elif x**2 + y**2 + z**2 + x*y + y*z + z*x > i:
                        break
            
    print(i, cnt)

Submission status: Wrong Answer

Solution code:
n = int(input())
for i in range(1,n+1):
    ans = 0
    for x in range(50):
        for y in range(50-x):
            for z in range(50-x-y):
                if (x+y+z)**2 -(x*y+y*z+z*x) == i and x>=1 and y>=1 and z>=1:
                    ans += 1
    print(ans)

Submission status: Wrong Answer

Solution code:
def f(x, y, z):
    return x**2 + y**2 + z**2 + x*y + y*z + z*x
def calc(n):
    count = 0
    for x in range(1,n):
        if n < f(x, 1, 1):
            return False
        for y in range(1,n):
            if x < y:
                break
            for z in range(1, n):
                if y < z:
                    break
                if n == f(x, y, z):
                    return (x, y, z)
                if n < f(x, y, z):
                    break
    return False

n = int(input())
counts = []
for i in range(n):
    result = calc(i)
    if result:
        length = len(set(result))
        if length == 3:
            print(6)
        elif length == 2:
            print(3)
        elif length == 1:
            print(1)
        else:
            print(0)
    else:
        print(0)
    # print(f"{i}: {result}")

Submission status: Wrong Answer

Solution code:
def main():
        
    import math

    N = int(input())

    for n in range(1, N + 1):
        max_itr = min(35, int(math.sqrt(n)) + 1)
        
        ans_list = []
        ans = 0
        
        for x in range(1, max_itr):
            # for y in range(1, x+1):
            for y in range(1, max_itr):

                # for z in range(1, x+1):
                for z in range(1, max_itr):

                    left_eq = x * x + y * y + z * z + x * y + y * z + z * x
                    if (left_eq == n):
                        ans_list = [x, y, z]
                        ans_len = len(set(ans_list))
                        


                        ans += 1
                        
                        # if (ans_len==3):
                        #     ans += 6
                        # elif (ans_len == 2):
                        #     ans += 3
                        # else:
                        #     ans += 1

        
        
        print(ans)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
from numba import jit
nn = int(input())


@jit
def aa(nn):
    ans_L = []
    for n in range(1,nn+1):
        ans = 0
        for x in range(1,42):
            for y in range(1,42):
                for z in range(1,42):
                    if x**2 + y**2 + z**2 + x*y + y*z + x*z == n:
                        ans += 1

        ans_L.append(ans)
    return ans_L

ans_L = aa(nn)
for i in ans_L:
    print(i)

Submission status: Wrong Answer

Solution code:
import sys
import numpy as np
import math
import collections
import copy
from collections import deque 
from functools import reduce
from itertools import product

# input = sys.stdin.readline

def ff(N):
#     print("call ff{0}".format(N))
    if N > 100:
        n = int(np.sqrt(20))+1
    else:
        n = N
    cnt = 0
    for x in range(1, n+1):
        x2 = x**2
        for y in range(1, n+1):
            y2 = y**2
            xy = x * y
            tt = x2 + y2 + xy
            if tt > n:
                break
            for z in range(1, n+1):
                num = tt + z**2 + x*z + y*z
                if N == num:
                    cnt += 1
                elif N < num:
                    break
    return(cnt)    
    
N = int(input())    
n = int(np.sqrt(20))+1
for i in range(1, N+1):
#     ff(i)
     print(ff(i))

Submission status: Wrong Answer

Solution code:
num_limit = int(input())
s_limit = int(num_limit**0.5)
for i in range(1,num_limit+1):
    xyz_list = []
    if i >=1 and i <= 5:
        print(0)
    else:
        s_limit = int(i ** 0.5)
        for j in range(1,s_limit+1):
            for k in range(1,s_limit+1):
                for l in range(1,s_limit+1):
                    if i == j**2 + k**2 + l**2 + j*k + k*l + l*j:
                        xyz_list.append([i,j,k])
    print(len(xyz_list))

Submission status: Wrong Answer

Solution code:
n = int(input())
f = [0]*15000
for x in range(1,50):
    for y in range(1,50):
        for z in range(1,50):
            f[x**2+y**2+z**2+x*y+y*z+z*x-1]+=1
            z+=1
        y+=1
    x+=1
for i in range(n):
    print(f[i])