Problem: p02608
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
arr = [0] * (n + 1)

for x in range(1, 101):
  for y in range(1, 101):
    for z in range(1, 101):
      a = x**2 + y**2 + z**2 + x*z + y*z + x*z
      if a<= n:
        arr[a] += 1
        
for i in range(1,n+1):
    print(arr[i])

Failing test case input:
743

Expected output:
0
0
0
0
0
1
0
0
0
0
3
0
0
0
0
0
3
3
0
0
0
0
0
1
6
0
3
0
0
0
0
0
3
3
6
0
0
3
0
0
0
0
3
3
6
0
6
0
0
0
3
0
0
1
6
0
6
6
0
0
6
0
0
0
0
3
3
3
6
0
6
3
6
0
0
0
6
0
0
0
3
3
9
0
6
3
6
0
3
6
0
0
0
0
6
1
6
0
6
6
0
3
12
0
6
0
0
3
6
0
0
0
3
3
12
0
6
3
6
0
3
6
9
0
6
0
0
0
3
6
3
3
6
0
6
3
12
0
3
6
6
0
6
0
6
3
6
0
0
1
6
3
12
6
0
0
12
0
6
0
6
6
12
0
0
6
0
0
6
0
12
3
6
0
6
3
9
6
3
6
6
0
6
0
6
0
15
6
0
0
6
0
3
3
12
0
12
6
6
0
3
6
6
3
12
0
6
0
9
6
0
0
6
3
12
1
6
6
6
6
0
0
18
0
12
0
3
6
12
0
0
6
3
6
12
0
12
0
0
0
9
3
9
6
12
3
12
0
3
6
6
0
12
0
12
0
9
9
0
0
6
3
6
3
12
6
9
3
6
0
12
3
6
3
9
6
12
6
6
0
6
0
9
6
6
0
12
3
6
0
9
6
6
1
6
0
21
12
6
0
12
0
12
0
0
6
15
6
0
6
12
0
12
0
12
0
0
0
12
0
12
12
3
3
18
3
6
3
6
6
9
9
18
0
6
0
12
0
9
6
0
3
12
3
6
6
12
6
6
0
0
0
15
3
18
3
18
3
12
6
3
6
9
0
12
0
12
0
18
12
0
0
12
3
6
0
6
6
9
6
0
0
18
1
18
3
12
6
6
6
12
0
15
6
12
6
18
0
0
6
0
9
12
0
18
0
6
3
12
0
12
12
0
0
12
0
3
6
12
6
18
9
18
0
9
6
18
0
6
0
6
3
27
6
6
6
6
3
6
0
12
6
9
0
6
0
18
0
9
9
15
3
12
6
6
3
9
6
12
12
18
0
18
0
6
6
21
6
0
0
6
3
15
6
12
6
18
0
0
0
12
6
6
3
6
4
18
6
12
6
3
9
30
0
18
0
6
6
12
6
6
9
12
0
18
6
18
0
6
0
12
0
6
12
6
3
18
0
6
6
6
6
15
3
24
0
6
3
18
0
12
6
12
6
24
0
15
18
9
6
0
0
18
3
6
0
15
12
12
6
6
0
18
0
6
3
12
0
12
6
6
9
9
6
24
3
24
0
9
12
6
6
12
0
12
0
21
9
15
6
12
3
18
3
12
6
12
6
0
0
12
0
12
6
24
0
6
12
6
1
9
6
12
6
24
0
18
3
12
6
6
12
24
0
12
6
15
6
18
0
18
0
0
0
18
9
21
12
0
6
18
0
9
6
6
6
12
0
12
0
9
9
27
6
6
3
18
6
21
6
6
12
12
0
12
0
24
12
0
0
24
3
24
6
12
12
18
0
0
0
12
0
18
3
15
6
12
9
6
0
15
6
9
12
24
0
12
3
6
6
21
6
18
3
18
0
21
12
15
6
6
0
12
3
12
9
18
9
12
6
6
6
24
0
18
3
24
0
6
6
0
6
9
6
6
4
30
0
18
12
9
6
24
0
18
0
9
12
21
6
6
12
12


Actual output:
0
0
0
0
0
1
0
0
0
1
1
1
0
0
1
1
1
1
1
1
1
1
0
3
0
1
1
2
2
1
2
0
2
2
1
1
2
1
2
3
1
2
1
3
1
4
0
2
1
1
4
1
2
2
3
3
4
1
1
4
2
0
1
3
3
2
3
2
2
5
2
5
3
1
0
5
1
2
4
1
4
2
1
4
4
3
2
5
5
2
3
2
2
4
2
4
3
0
6
1
2
4
2
5
5
5
1
6
4
2
2
4
3
4
4
3
1
3
3
4
6
1
2
8
2
5
4
2
6
4
3
3
5
1
5
8
3
0
3
4
6
4
1
4
6
4
2
7
2
3
4
5
6
5
4
6
4
2
4
6
4
4
3
2
7
5
0
6
4
4
4
7
2
4
4
5
8
2
7
5
8
1
2
10
2
6
3
2
5
6
6
4
7
2
1
6
2
6
8
3
6
3
2
10
8
2
5
6
7
4
7
5
2
9
0
6
8
3
4
8
3
2
2
8
5
6
1
6
8
2
7
7
7
6
8
5
4
4
4
10
9
1
4
9
2
8
3
2
10
2
5
4
7
4
3
9
7
2
6
6
8
5
4
8
10
4
4
9
2
9
6
4
7
8
2
10
6
1
4
11
7
2
3
4
5
9
4
9
7
4
6
8
2
3
10
5
11
7
3
5
10
6
4
13
6
5
3
6
8
8
4
4
9
1
9
10
2
0
9
5
12
6
3
10
5
5
2
8
10
5
9
5
6
10
2
11
9
3
8
11
5
7
2
7
9
7
3
6
10
2
7
11
5
8
6
8
3
7
6
7
10
1
2
12
6
8
6
8
13
4
2
10
10
3
7
12
5
8
11
5
6
6
2
10
14
4
7
6
10
3
9
2
8
11
2
13
6
0
5
8
11
2
7
9
7
12
4
10
13
6
4
8
2
8
12
11
8
5
3
10
14
5
6
15
4
6
6
3
11
6
2
11
9
6
5
15
1
8
4
6
9
7
9
8
14
4
2
9
11
8
10
6
4
9
7
13
13
1
9
14
6
5
10
5
13
10
5
7
10
2
8
9
8
4
4
10
10
10
2
12
13
2
3
13
6
7
8
3
14
7
7
10
5
7
9
18
6
8
11
8
12
5
2
14
16
6
2
12
6
7
10
6
9
10
4
8
6
6
10
14
9
7
3
9
6
12
1
6
17
2
11
14
6
6
6
9
14
5
7
12
14
6
8
18
6
5
9
6
12
11
5
5
16
5
7
15
2
6
8
9
17
8
3
14
8
3
5
14
11
5
11
2
4
12
9
11
15
2
6
12
10
8
8
12
11
11
5
9
15
4
6
13
5
14
11
9
8
7
8
11
19
2
7
18
2
10
4
7
15
10
6
10
8
9
3
18
7
4
7
10
15
2
4
14
16
2
9
13
5
11
14
6
12
13
2
14
8
6
12
12
13
4
7
9
9
15
8
12
20
6
5
13
8
6
12
6
11
4
5
16
12
7
3
17
9
11
11
2
12
6
6
12
19
4
12
13
2
2
10
12
16
8
5
15
12
8
2
19
8
9
13
5
11
13
6
12
19
5
6
17
10
12
5
10
12
12
2
12
18
2
12
10
5
9
10
17
2
12
8
10
20
3
4
17
9
7
8
4
14
12
9
10
6
2
7
22
12
12
15
6
11
10
2


Fixed submission (verdict: Accepted):
n = int(input())
arr = [0] * (n + 1)

for x in range(1, 101):
  for y in range(1, 101):
    for z in range(1, 101):
      a = x**2 + y**2 + z**2 + x*z + y*z + x*y
      if a<= n:
        arr[a] += 1
        
for i in range(1,n+1):
    print(arr[i])