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 .

Solution (Python):
n = int(input())
ans = [0] * (10**5)
for i in range(1,101):
    for j in range(1,101):
        for k in range(1,101):
            ans[i ** 2 + j ** 2 + k ** 2 + i * j + j * k + k * i-1] += 1
for i in range(n):
    print(ans[i])

Solution (Python):
n = int(input())
r = range(1,101)
l = [0]*n

for x in r:
    for y in r:
        for z in r:
            t = x*x+y*y+z*z+y*z+z*x+x*y
            if t <= n:
                l[t-1] +=1
for i in l:
    print(i)

Solution (Python):
n=int(input())
a=[0]*(10**5)
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*y+y*z+z*x]+=1
for i in range(1,n+1):
	print(a[i])

Solution (Python):
n = int(input())
ans = [0] * (10**5)
for i in range(1,101):
    for j in range(1,101):
        for k in range(1,101):
            ans[i ** 2 + j ** 2 + k ** 2 + i * j + j * k + k * i-1] += 1
for i in range(n):
    print(ans[i])

Solution (Python):
import sys


def input():
    return sys.stdin.readline().rstrip()



def main():
    N = int(input())

    dp = [0] * (N + 1)
    rt = int(N ** 0.5) + 1
    for i in range(1, rt):
        ii = i ** 2
        for j in range(1, i+1):
            iji = ii + j **2 + i * j

            if iji + 1 + i + j > N:
                break
            for k in range(1, j+1):
                case = iji + k**2 + i * k + j * k
                l =6
                if i == j or j == k:
                    l = 3
                    if i == k:
                        l = 1
                if case <= N:
                    dp[case] += l
                else:
                    break

    print(*dp[1:N + 1], sep="\n")


if __name__ == "__main__":
    main()

Solution (Python):
N = int(input())
ans = [0 for _ in range(10001)]
for x in range(1, 101):
    for y in range(1, 101):
        for z in range(1, 101):
            v = x**2+y**2+z**2+x*y+y*z+z*x
            if v<10001:
                ans[v] += 1
for i in range(N):
    print(ans[i+1])

Solution (Python):
import sys


def input():
    return sys.stdin.readline().rstrip()



def main():
    N = int(input())

    dp = [0] * (N + 1)
    rt = int(N ** 0.5) + 1
    for i in range(1, rt):
        ii = i ** 2
        for j in range(1, i+1):
            iji = ii + j **2 + i * j

            if iji + 1 + i + j > N:
                break
            for k in range(1, j+1):
                case = iji + k**2 + i * k + j * k
                l =6
                if i == j or j == k:
                    l = 3
                    if i == k:
                        l = 1
                if case <= N:
                    dp[case] += l
                else:
                    break

    print(*dp[1:N + 1], sep="\n")


if __name__ == "__main__":
    main()

Solution (Python):
import math
n = int(input())
l = [0 for i in range(n)]
p = min(101,math.ceil(math.sqrt(n))+1)
for x in range(1, p):
    for y in range(1, p):
        for z in range(1, p):
            s = x**2 + y**2 + z**2 + x*y + y*z + z*x;
            if s <= n:
                l[s-1] += 1
for i in range(n):
    print(l[i])

Solution (Python):
n = int(input())
ans = [0 for _ in range(10050)]
for i in range(1,105):
  for j in range(1,105):
    for k in range(1,105):
      v = i*i+j*j+k*k+i*j+j*k+k*i;
      if v<10050:
      	ans[v]+=1
for i in range(n):
	print(ans[i+1])

Solution (Python):
from math import sqrt
N = int(input())
ans = [0] * (N+1)

for x in range(1, int(sqrt(N)) + 2):
    for y in range(1,int(sqrt(N)) + 2):
        for z in range(1, int(sqrt(N)) + 2):
            n = x**2 + y**2 + z**2 + x*y + y*z + z*x
            if n <= N:
                ans[n] += 1

for i in range(1, len(ans)):
    print(ans[i])

Solution (Python):
import math
N = int(input())
ans_list = [0 for i in range(N+1)]
for x in range(1,int(math.sqrt(N))+1):
    for y in range(1,int(math.sqrt(N))+1):
        for z in range(1,int(math.sqrt(N))+1):
            f = x**2 +y**2 +z**2 +x*y +y*z + z*x
            if(f<=N):
                ans_list[f] += 1

for i in range(1,N+1):
    print(ans_list[i])

Solution (Python):
N = int(input())

ans = [0] * (N + 1)
for x in range(1, 105):
    for y in range(1, 105):
        for z in range(1, 105):
            v = x * x + y * y + z * z + x * y + y * z + z * x
            if v <= N:
                ans[v] += 1

for i in range(1, N + 1):
    print(ans[i])

Solution (Python):
n = int(input())
f = [0]*(n+1)
for x in range(1, 100):
    for y in range(1, 100):
        for z in range(1, 100):
            k = x*x + y*y + z*z + x*y + y*z + z*x
            if k <= n: f[k] += 1
for i in range(n): print(f[i+1])

Solution (Python):
import sys


def input():
    return sys.stdin.readline().rstrip()



def main():
    N = int(input())

    dp = [0] * (N + 1)
    rt = int(N ** 0.5) + 1
    for i in range(1, rt):
        ii = i ** 2
        for j in range(1, rt):
            iji = ii + j **2 + i * j

            if iji + 1 + i + j > N:
                break
            for k in range(1, rt):
                case = iji + k**2 + i * k + j * k
                if case <= N:
                    dp[case] += 1
                else:
                    break

    print(*dp[1:N + 1], sep="\n")


if __name__ == "__main__":
    main()

Solution (Python):
import sys


def input():
    return sys.stdin.readline().rstrip()



def main():
    N = int(input())

    dp = [0] * (N + 1)
    rt = int(N ** 0.5) + 1
    for i in range(1, rt):
        ii = i ** 2
        for j in range(1, rt):
            iji = ii + j **2 + i * j

            if iji + 1 + i + j > N:
                break
            for k in range(1, rt):
                case = iji + k**2 + i * k + j * k
                if case <= N:
                    dp[case] += 1
                else:
                    break

    print(*dp[1:N + 1], sep="\n")


if __name__ == "__main__":
    main()

Solution (Python):
n=int(input())
ans = [0 for _ in range(10001)]
for i in range(1, 101):
  for j in range(1, 101):
    for k in range(1, 101):
      v = i*i + j*j + k*k + i*j + j*k + k*i
      if v < 10001:
        ans[v] += 1

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

Solution (Python):
n = int(input())

ans = [0 for _ in range(n+1)]

for x in range(1, int(n ** 0.5) + 1):
    for y in range(1, int(n ** 0.5) + 1):
        for z in range(1, int(n ** 0.5) + 1):
            a = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
            if a <= n:
                ans[a] += 1

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

Solution (Python):
from collections import defaultdict


def main():
    N = int(input())
    D = defaultdict(int)
    for i in range(1, 150):
        for j in range(1, 150):
            for k in range(1, 150):
                if i**2+j**2+k**2+i*j+j*k+k*i<=2*10**4:
                    D[i**2+j**2+k**2+i*j+j*k+k*i] += 1
                else:
                    break
    for i in range(1, N+1):
        print(D[i])


if __name__ == "__main__":
    main()

Solution (Python):
import sys


def input():
    return sys.stdin.readline().rstrip()



def main():
    N = int(input())

    dp = [0] * (N + 1)
    rt = int(N ** 0.5) + 1
    for i in range(1, rt):
        ii = i ** 2
        for j in range(1, rt):
            iji = ii + j * j + i * j

            if iji + 1 + i + j > N:
                break
            for k in range(1, rt):
                kk = k ** 2
                case = int(iji + kk + i * k + j * k)
                if case <= N:
                    dp[case] += 1
                else:
                    break

    print(*dp[1:N + 1], sep="\n")


if __name__ == "__main__":
    main()

Solution (Python):
from collections import defaultdict
n = int(input())

res = defaultdict(int)
for i in range(1, 105):
    for j in range(1, 105):
        for k in range(1, 105):
            v = i*i + j*j + k*k + i*j + j*k + k*i
            res[v] += 1

for i in range(1, n + 1):
    print(res.get(i, 0))

Solution (Python):
import math
n = int(input())
l = [0 for i in range(n)]
p = min(101,math.ceil(n)+1)
for x in range(1, p):
    for y in range(1, p):
        for z in range(1, p):
            s = x**2 + y**2 + z**2 + x*y + y*z + z*x;
            if s <= n:
                l[s-1] += 1
for i in range(n):
    print(l[i])

Solution (Python):
from itertools import (
    accumulate,  
    groupby,  
    permutations,  
    combinations,  
    product,  
    combinations_with_replacement,  
)

N = int(input())

ans = [0] * (10**5)

for i, j, k in product(list(range(1, 101)), repeat=3):
    tmp = i**2 + j**2 + k**2 + i*j + j*k + k*i
    ans[tmp] += 1

for i in range(1, N+1):
    print(ans[i])

Solution (Python):
import sys


def input():
    return sys.stdin.readline().rstrip()


def tc():
    N = int(input())



def main():
    N = int(input())

    dp = [0]*(N+1)
    rt = int(N **0.5) +1
    for i in range(1,rt):
        ii = i**2
        for j in range(1,rt):
            jj = j**2
            ij = i*j
            if ii + jj + 1 + ij + i + j  >N:
                break
            for k in range(1,rt):
                kk = k**2
                case =int( ii + jj + kk + ij + i*k + j*k )
                if case <=N:
                    dp[case] +=1
                else:
                    break

    print(*dp[1:N+1], sep="\n")









if __name__ == "__main__":
    main()

Solution (Python):
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
N = I()
ans = [0 for _ in range(0, 10050)]
for i in range(1, 101):
    for j in range(1, 101):
        for k in range(1, 101):
            n = i*i + j*j + k*k + i*j + j*k + k*i
            if n < 10050:
                ans[n] += 1
            else:
                continue
for i in range(1, N +1):
    print(ans[i])

Solution (Python):

n = int(input())
l = [0 for i in range(n)]
for x in range(1, 101):
    for y in range(1, 101):
        for z in range(1, 101):
            s = x**2 + y**2 + z**2 + x*y + y*z + z*x
            if s <= n:
                l[s-1] += 1
for i in range(n):
    print(l[i])

Solution (Python):

n = int(input())
l = [0 for i in range(n)]
for x in range(1, 101):
    for y in range(1, 101):
        for z in range(1, 101):
            s = x**2 + y**2 + z**2 + x*y + y*z + z*x;
            if s <= n:
                l[s-1] += 1
for i in range(n):
    print(l[i])

Solution (Python):
n = int(input())
ans = [0 for _ in range(n+1)]
def calc(n):
    for x in range(1, int(n**0.5)+1):
        for y in range(1, int(n**0.5)+1):
            for z in range(1, int(n**0.5)+1):
                v = x**2 + y**2 + z**2 + x*y + y*z + z*x
                if v < n+1:
                    ans[v] += 1

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

Solution (Python):
N=int(input())
ans=[0]*10001
for x in range(1,101):
    for y in range(1,101):
        for z in range(1,101):
            n=x*x+y*y+z*z+x*y+y*z+z*x
            if n<=10000:
                ans[n]+=1
for i in range(1,N+1):
    print(ans[i])

Solution (Python):
import sys


def input():
    return sys.stdin.readline().rstrip()


def tc():
    N = int(input())



def main():
    N = int(input())

    dp = [0]*(N+1)
    rt = int(N **0.5) +1
    for i in range(1,rt):
        ii = i**2
        for j in range(1,rt):
            jj = j**2
            ij = i*j
            if ii + jj + 1 + ij + i + j  >N:
                break
            for k in range(1,rt):
                kk = k**2
                case =int( ii + jj + kk + ij + i*k + j*k )
                if case <=N:
                    dp[case] +=1
                else:
                    break

    for l in range(1,N+1):
        print(dp[l])










if __name__ == "__main__":
    main()

Solution (Python):
import sys


def input():
    return sys.stdin.readline().rstrip()


def tc():
    N = int(input())



def main():
    N = int(input())

    dp = [0]*(N+1)
    rt = int(N **0.5) +1
    for i in range(1,rt):
        ii = i**2
        for j in range(1,rt):
            jj = j**2
            if ii + jj + 1 + i*j + i + j  >N:
                break
            for k in range(1,rt):
                kk = k**2
                case =int( ii + jj + kk + i*j + i*k + j*k )
                if case <=N:
                    dp[case] +=1
                else:
                    break

    for l in range(1,N+1):
        print(dp[l])










if __name__ == "__main__":
    main()

Solution (Python):
import sys


def input():
    return sys.stdin.readline().rstrip()


def tc():
    N = int(input())



def main():
    N = int(input())

    dp = [0]*(N+1)
    rt = int(N **0.5) +1
    for i in range(1,rt):
        for j in range(1,rt):
            if i**2 + j **2 + 1 + i*j + i + j  >N:
                break
            for k in range(1,rt):
                case =int( i**2 + j **2 + k **2 + i*j + i*k + j*k )
                if case <=N:
                    dp[case] +=1
                else:
                    break

    for l in range(1,N+1):
        print(dp[l])










if __name__ == "__main__":
    main()

Solution (Python):
n = int(input())
l = [0] * n

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

Solution (Python):
N = int(input())
def f(a, b, c):
    return a**2 + b**2 + c**2 + a*b + b*c + c*a
ans = [0] * N

for x in range(1, 101):
    for y in range(1, 101):
        for z in range(1, 101):
            n = f(x,y,z)
            if n <= N:
                ans[n-1] += 1
for a in ans:
    print(a)

Solution (Python):
import numpy as np

n = int(input())
ans = [0 for _ in range(n+1)]

tmp = int(np.sqrt(n)+1)
for i in range(1, tmp):
    for j in range(1, tmp):
        for k in range(1, tmp):
            v = i**2+j**2+k**2+i*j+i*k+j*k
            if v <= n:
                ans[v]+=1
for a in ans[1:]:
    print(a)

Solution (Python):
import sys


def input():
    return sys.stdin.readline().rstrip()


def tc():
    N = int(input())



def main():
    N = int(input())

    dp = [0]*(N+1)
    rt = int(N **0.5) +2
    for i in range(1,rt):
        for j in range(1,rt):
            if int( i**2 + j **2 + 1 + i*j + i*1 + j*1 ) >N:
                break
            for k in range(1,rt):
                case =int( i**2 + j **2 + k **2 + i*j + i*k + j*k )
                if case <=N:
                    dp[case] +=1
                else:
                    break

    for l in range(1,N+1):
        print(dp[l])










if __name__ == "__main__":
    main()

Solution (Python):
n = int(input())
cnt  = [0 for i in range(10001)]

for x in range(1,101):
    for y in range(1, 105):
        for z in range(1, 105):
            ans = x**2 + y**2 + z**2 + x*y + y*z + z*x 
            if ans <= 10000:    
                cnt[ans] +=1
for i in range(1,n+1):  
    print(cnt[i])

Solution (Python):
import sys
import math

import heapq

def input():
    return sys.stdin.readline().rstrip()


def tc():
    N = int(input())



def main():
    N = int(input())

    dp = [0]*(N+1)
    rt = int(N **0.5) +2
    for i in range(1,rt):
        for j in range(1,rt):
            if int( i**2 + j **2 + 1 + i*j + i*1 + j*1 ) >N:
                break
            for k in range(1,rt):
                case =int( i**2 + j **2 + k **2 + i*j + i*k + j*k )
                if case <=N:
                    dp[case] +=1
                else:
                    break

    for l in range(1,N+1):
        print(dp[l])










if __name__ == "__main__":
    main()

Solution (Python):
import sys
import math

import heapq

def input():
    return sys.stdin.readline().rstrip()


def tc():
    N = int(input())



def main():
    N = int(input())

    dp = [0]*(N+1)
    rt = int(N **0.5) +2
    for i in range(1,rt):
        for j in range(1,rt):
            if int( i**2 + j **2 + 1 + i*j + i*1 + j*1 ) >N:
                break
            for k in range(1,rt):
                case =int( i**2 + j **2 + k **2 + i*j + i*k + j*k )
                if case <=N:
                    dp[case] +=1
                else:
                    break

    for l in range(1,N+1):
        print(dp[l])










if __name__ == "__main__":
    main()

Solution (Python):
n=int(input())
ans=[0 for _ in range(n+1)]
for x in range(1,int(n**0.5)+1):
  for y in range(1,int(n**0.5)+1):
    for z in range(1,int(n**0.5)+1):
      a=x*x+y*y+z*z+x*y+y*z+z*x
      if a<=n:
        ans[a]+=1
for i in range(1,n+1):
  print(ans[i])

Solution (Python):
n = int(input())
ans = [0 for _ in range(10050)]
for i in range(1,105):
	for j in range(1,105):
		for k in range(1,105):
			v = i*i+j*j+k*k+i*j+j*k+k*i
			if v<10050:
				ans[v]+=1
for i in range(n):
	print(ans[i+1])

Solution (Python):
N = int(input())
f = lambda x,y,z:x*x+y*y+z*z+x*y+y*z+z*x
ans = [0]*(10001)
for x in range(1, 101):
    for y in range(1, 101):
        for z in range(1, 101):
            if f(x,y,z)>10000:
                break
            ans[f(x,y,z)]+=1
for i in range(1, N+1):
    print(ans[i])

Solution (Python):
import sys

def I(): return int(sys.stdin.readline().rstrip())

N = I()

A = [0]*(N+1)

for i in range(1,101):
    for j in range(1,101):
        for k in range(1,101):
            a = i**2+j**2+k**2+i*j+j*k+k*i
            if a <= N:
                A[a] += 1

del A[0]

print(*A,sep='\n')

Solution (Python):
def calc(x, y, z):
    return (x + y + z) ** 2 - x * y - y * z - z * x

def comb(x):
    fact = 1
    while x > 1:
        fact *= x
        x -= 1
    return fact

N = int(input())
res = [0] * (N + 1)
for i in range(1, 100):
    for j in range(i, 100):
        for k in range(j, 100):
            tmp = calc(i, j, k)
            if tmp > N:
                continue
            cnt = len(set([i, j, k]))
            res[tmp] += 6 // comb(4 - cnt)
print(*res[1:], sep='\n')

Solution (Python):
import itertools
import math
import collections
N = int(input())
candidate = range(1, math.ceil(N ** (1 / 2)) + 1)
answers = [0] * (N + 1)
for x, y, z in itertools.combinations_with_replacement(candidate, 3):
    q = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
    counter = collections.Counter([x,y,z])
    if q < N + 1:
        add = math.factorial(3)
        for key in counter:
            add //= math.factorial(counter[key])
        answers[q] += add
for a in answers[1:N + 1]:
    print(a)

Solution (Python):
import math

N = int(input())
ans = [0 for _ in range(10050)]


for x in range(1,math.ceil(math.sqrt(N))):
  for y in range(1,math.ceil(math.sqrt(N))):
    for z in range(1,math.ceil(math.sqrt(N))):
      v = x**2 + y**2 + z**2 + x*y + y*z + z*x
      if v < 10050:
        ans[v] += 1

for i in range(N):
  print(ans[i+1])

Solution (Python):
n = int(input())
ans = [0 for _ in range(10050)]
for i in range(1,105):
    for j in range(1,105):
        for k in range(1,105):
            v = i*i+j*j+k*k+i*j+j*k+k*i;
            if v<10050:
                ans[v]+=1
for i in range(n):
    print(ans[i+1])

Solution (Python):
def solve():
    N = int(input())
    f = lambda x,y,z:x*x+y*y+z*z+x*y+y*z+z*x
    MAX = 10000

    ans = [0]*(MAX+1)
    for x in range(1, 101):
        for y in range(1, 101):
            for z in range(1, 101):
                if f(x,y,z)>MAX:
                    break
                ans[f(x,y,z)]+=1
    for i in range(1, N+1):
        print(ans[i])

if __name__ == "__main__":
    solve()

Solution (Python):
n = int(input())
f = [0]*(n+1)
for x in range(1, n):
    if x*x >= n: break
    for y in range(1, n):
        if y*y >= n: break
        if x*y >= n: break
        for z in range(1, n):
            if z*z >= n: break
            k = x*x + y*y + z*z + x*y + y*z + z*x
            if 1 <= k <= n: f[k] += 1
for i in range(1, n+1): print(f[i])

Solution (Python):
n = int(input())

ans = [0 for _ in range(n+1)]
m = int(n**0.5) + 1
for x in range(1, m):
    for y in range(1, m):
        for z in range(1, m):
            t = x*x + y*y + z*z + x*y + y*z + z*x
            if t < n + 1:
                ans[t] += 1

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

Solution (Python):
n = int(input())

ans = [0 for _ in range(n+1)]
m = int(n**0.5) + 1
for x in range(1, m):
    for y in range(1, m):
        for z in range(1, m):
            t = x*x + y*y + z*z + x*y + y*z + z*x
            if t < n + 1:
                ans[t] += 1

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

Solution (Python):
n = int(input())
f = [0]*(n+1)
x = 1
while x*x < n:
    y = 1
    while y*y < n:
        if x*y >= n: break
        z = 1
        while z*z < n:
            k = x*x + y*y + z*z + x*y + y*z + z*x
            if 1 <= k <= n: f[k] += 1
            z += 1
        y += 1
    x += 1
for i in range(1, n+1): print(f[i])

Solution (Python):
def solve():
    N = int(input())
    f = lambda x,y,z:x*x+y*y+z*z+x*y+y*z+z*x
    MAX = 10000

    ans = [0]*(MAX+1)
    for x in range(1, 101):
        if f(x,0,0)>MAX:
            break
        for y in range(1, 101):
            if f(x,y,0)>MAX:
                break
            for z in range(1, 101):
                if f(x,y,z)>MAX:
                    break
                ans[f(x,y,z)]+=1
    for i in range(1, N+1):
        print(ans[i])

if __name__ == "__main__":
    solve()

Solution (Python):



import sys
import itertools
import math

def input():
    return sys.stdin.readline()


def resolve():
    n = int(input().rstrip())
    max_n = n
    max_n = math.sqrt(max_n)
    max_n = math.ceil(max_n)

    ans = [0] * 10050

    for i in range(1, max_n+1):
        for j in range(1, max_n+1):
            for k in range(1, max_n+1):
                v = i*i + j*j + k*k + i*j + j*k + k*i
                if v < 10050:
                    ans[v] += 1

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

    """
    p = itertools.combinations_with_replacement(range(1, max_n), 3)

    
    ans_list = []


    for v in p:

        x, y, z = v
        ans_cnt = 0
        ans_list.append(x * x + y * y + z * z + x * y + y * z + z * x)



        if ans == m:
            if x == y == z:
                ans_cnt += 1
            elif x == y or y == z or x == z:
                ans_cnt += 3
            else:
                ans_cnt += 6
    """


    """
    for m in range(1, n+1):

        max_n = math.sqrt(m)
        max_n = math.ceil(max_n)
        p = itertools.combinations_with_replacement(range(1,max_n), 3)

        ans_cnt = 0
        for v in p:
            
            x, y, z = v
            ans = x*x + y*y + z*z + x*y + y*z + z*x

            if ans == m:
                if x == y == z:
                    ans_cnt += 1
                elif x == y or y == z or x == z:
                    ans_cnt += 3
                else:
                    ans_cnt += 6

        print(ans_cnt)
    """


if __name__ == "__main__":
    resolve()

Solution (Python):
N = int(input())
list = [0]*(N+1)
for i in range(1,100):  
    for j in range(1,100):
        a = i*i + j*j + i*j
        for k in range(1,100):
            a = i*i + j*j + k*k + i*j +j*k + i*k
            if a <= N:
                list[a] += 1
for i in range(1,N+1):
    print(list[i])

Solution (Python):
N = int(input())
ans = [0] * (N+1)
 
for x in range(1,101):
    for y in range(1,101):
        for z in range(1,101):
            n = x**2 + y**2 + z**2 + x*y + y*z + z*x
            if n <= N:
                ans[n] += 1
print(*ans[1:], sep='\n')

Solution (Python):
import math

n = int(input())
ans = [0] * (n+1)

f = int(math.sqrt(n)) + 1
for x in range(1, f):
    for y in range(1, f):
        for z in range(1, f):
            v = (x ** 2) + (y ** 2) + (z ** 2) + (x * y) + (y * z) + (z * x)
            if v < n + 1:
                ans[v] += 1
            
for i in range(n):
    print(ans[i+1])

Solution (Python):
N = int(input())
arr = [0]*(N+2)
 
for x in range(1,101):
    for y in range(1,101):
        for z in range(1,101):
            n = x**2 + y**2 + z**2 + x*y + x*z + y*z
            if n <= N :
                arr[n] += 1
 
for i in range(1,N+1):
    print(arr[i])

Solution (Python):
def main_v2():
    N = int(input())
    f_list = [0 for _ in range(N)]

    for x in range(1, 101):
        for y in range(1, 101):
            for z in range(1, 101):
                ans = x*x + y*y + z*z + x*y + y*z + z*x
                if ans <= N:
                    f_list[ans - 1] += 1

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


if __name__ == "__main__":
    main_v2()

Solution (Python):
n = int(input())
ans = [0 for _ in range(10050)]
for i in range(1,105):
    for j in range(1,105):
        for k in range(1,105):
            v = i*i+j*j+k*k+i*j+j*k+k*i;
            if v<10050:
                ans[v]+=1
for i in range(n):
    print(ans[i+1])

Solution (Python):
n = int(input())
ans = [0 for i in range(10001)]
for x in range(1,101):
  for y in range(1,101):
    for z in range(1,101):
      v = x**2+y**2+z**2+x*y+y*z+z*x
      if v<=10000:
        ans[v]+=1
for i in range(n):
  print(ans[i+1])

Solution (Python):
n=int(input())
ans=[0]*(n+1)
for x in range(1,105):
  for y in range(1,105):
    for z in range(1,105):
      t=x*x+y*y+z*z+x*y+y*z+z*x
      if t<=n:
        ans[t]+=1
for i in range(1,n+1):
  print(ans[i])

Solution (Python):
n = int(input())
f = [0]*(n+1)
x = 1
while x*x < n:
    y = 1
    while y*y < n:
        if x*y >= n: continue
        z = 1
        while z*z < n:
            k = x*x + y*y + z*z + x*y + y*z + z*x
            if 1 <= k <= n: f[k] += 1
            z += 1
        y += 1
    x += 1
for i in range(1, n+1): print(f[i])

Solution (Python):
n = int(input())
ans = [0 for i in range(10001)]

for i in range(1,105):
    for j in range(1,105):
        for m in range(1,105):
            v = i**2+j**2+m**2+i*j+j*m+m*i
            
            if v<10001:
                ans[v]+=1


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

Solution (Python):
N = int(input())
cnt = [0] * (N + 1)

for x in range(1,100):
    for y in range(1,100):
        for z in range(1,100):
            check = x*x + y*y + z*z + x*y + y*z + z*x
            if check <= N:
                cnt[check] += 1
            else:
                break

for i in range(1,N+1):
    print(cnt[i])

Solution (Python):
N = int(input())
cnt = [0] * (N + 1)

for x in range(1,100):
    for y in range(1,100):
        for z in range(1,100):
            check = x*x + y*y + z*z + x*y + y*z + z*x
            if check <= N:
                cnt[check] += 1

for i in range(1,N+1):
    print(cnt[i])

Solution (Python):
import sys

import itertools
input = sys.stdin.readline
 
N=int(input())

ans=[0]*10050

for i in range(1,100):
    for j in range(1,100):
        for k in range(1,100):
            v=i*i+j*j+k*k+i*j+i*k+j*k
            if v<10050:
                ans[v]+=1

for i in range(N):
    print(ans[i+1])

Solution (Python):
from heapq import *
import sys
from collections import *
from itertools import *
from decimal import *
import copy
from bisect import *
import math
sys.setrecursionlimit(4100000)
def gcd(a,b):
    if(a%b==0):return(b)
    return (gcd(b,a%b))
input=lambda :sys.stdin.readline().rstrip()
N=int(input())
lst=[0 for i in range(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*y+y*z+z*x
            if a<=N:
                lst[a]+=1
for i in range(1,N+1):
    print(lst[i])

Solution (Python):
N = int(input())
ans = [0] * 10050

for x in range(1, 105):
    for y in range(1, 105):
        for z in range(1, 105):

            f = x**2 + y**2 + z**2 + x*y + y*z + z*x

            if f < 10050:
                ans[f-1] = ans[f-1] + 1 


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

Solution (Python):
N = int(input())
ans = [ 0 for _ in range(10500)]
for i in range(1, 105):
  for j in range(1, 105):
    for k in range(1, 105):
      v = i**2 + j**2 + k**2 + i*j + j*k + k*i
      if v < 10500:
        ans[v] += 1
for i in range(N):
  print(ans[i + 1])

Solution (Python):

n = int(input())
ans = [0 for _ in range(10050)]
for i in range(1, 105):
    for j in range(1, 105):
        for k in range(1, 105):
            v = i*i+j*j+k*k+i*j+j*k+k*i
            if v < 10050:  
                ans[v] += 1
for i in range(n):
    print(ans[i+1])

Solution (Python):

n = int(input())
a = int(n**0.5) + 1
ans = [0]*(n+1)
for x in range(1, a):
    for y in range(1, a):
        for z in range(1, a):
            s = x**2+y**2+z**2+x*y+y*z+z*x
            if s <= n:
                ans[s] += 1

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

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

Solution (Python):
n = int(input())
ANS =[0 for _ in range(n)]
for x in range(1, 100):
    for y in range(1, 100):
        for z in range(1, 100):
            if x**2 + y**2 + z**2 + x*y + y*z + z*x > n:
                continue
            ANS[(x**2 + y**2 + z**2 + x*y + y*z + z*x) - 1] += 1
for i in ANS:
    print(i)

Solution (Python):
n = int(input())
ans = [0] * 1030302

for i in range(1, 101):
    for j in range(1, 101):
        for k in range(1, 101):
            number = i ** 2 + j ** 2 + k ** 2 + i * j + j * k + k * i
            ans[number] += 1


for x in range(1, n+1):
    print(ans[x])

Solution (Python):
N = int(input())
a = [0] * 10050
for i in range(1, 105):
    for j in range(1, 105):
        for k in range(1, 105):
            x = i**2+j**2+k**2+i*j+j*k+k*i 
            if x <= N:
                a[x] += 1
            
for i in range(N):
    print(a[i+1])

Solution (Python):
def main():
    MX = 10 ** 2
    
    N = int(input())

    ctr = [0] * (N + 1)
    for x in range(1, MX + 1):
        for y in range(1, MX + 1):
            for z in range(1, MX + 1):
                t = x * x + y * y + z * z + x * y + y * z + z * x
                if t <= N:
                    ctr[t] += 1

    print(*ctr[1:], sep='\n')


if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
ans = [0 for i in range(n)]


for i in range(100):
  for j in range(100):
    for k in range(100):
      a = (i+1)*(i+1) +(j+1)*(j+1) + (k+1)*(k+1) + (i+1)*(j+1) +(j+1)*(k+1) + (k+1)*(i+1)
      if a <= n:
        ans[a-1]+=1
for i in ans:
  print(i)

Solution (Python):
n = int(input())
ans = [0 for i in range(n)]


for i in range(100):
  for j in range(100):
    for k in range(100):
      a = (i+1)*(i+1) +(j+1)*(j+1) + (k+1)*(k+1) + (i+1)*(j+1) +(j+1)*(k+1) + (k+1)*(i+1)
      if a <= n:
        ans[a-1]+=1
for i in ans:
  print(i)