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 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*x+y*y+z*z+x*y+y*z+z*x
            if v < 10001:
                ans[v] += 1

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

Solution (Python):
n=int(input())
m = int(n ** (0.5)) + 1
ans=[0]*(n+1)
for i in range(1,m):
    a=i**2
    for j in range(1,m):
        b=a
        b+=j**2+i*j
        for k in range(1,m):
            c=b
            c+=k**2+j*k+k*i
            if c<n+1:
                ans[c]+=1
for i in range(1,n+1):
    print(ans[i])

Solution (Python):
N = int(input())
ans = [0] * 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):
            n = x**2 + y**2 + z**2 + x*y + y*z + z*x
            if n <= N:
                ans[n-1] += 1

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

Solution (Python):
from sys import stdin
from collections import defaultdict
N = int(stdin.readline().rstrip())
d = defaultdict(int)

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
      d[v] += 1

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

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

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 < 10050:
        ans[v] += 1
for i in range(N):
  print(ans[i+1])

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

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


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

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

Solution (Python):
a=[0]*int(input())
r=range(1,99)
for x in r:
    for y in r:
        for z in r:
            n=x*(x+y+z)+y*(y+z)+z*z-1
            if n<len(a):
                a[n]+=1
print(*a)

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

count = [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):
      f = x ** 2 + y ** 2 + z ** 2 + x*y + y*z + z*x
      if f <= n:
        count[f] += 1

for i in count[1:]:
  print(i)

Solution (Python):
import sys
import math
import collections
import decimal
import itertools
from collections import deque
from functools import reduce
import heapq
import copy
n = int(input())




ans = [0 for i in range(n+1)]
for i in range(1, 100):
    for j in range(1, 100):
        for k in range(1, 100):
            if i ** 2 + j ** 2 + k ** 2 + i * j + j * k + k * i > n:
                break
            
            ans[i ** 2 + j ** 2 + k ** 2 + i * j + j * k + k * i] += 1

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

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

Solution (Python):
N = int(input())
ans = [0]*10050
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 < 10050:
        ans[v] += 1
for i in range(N):
  print(ans[i+1])

Solution (Python):
ans = [0 for i in range(10050)]
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 + i*k
      if v < 10050:
        ans[v]+=1
       
n = int(input())
for i in range(n):
  print(ans[i+1])

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

ans = [0] * n

for i in range(1, int((n+1)**0.5)):
    for j in range(i,int((n+1)**0.5)):
        for k in range(j,int((n+1)**0.5)):
            s = i**2 + j**2 + k**2 + i*j + j*k + k*i
            if s > n:
                break
            
            check = len(set([i,j,k]))
            if check == 1:
                ans[s-1] += 1
            elif check == 2:
                ans[s-1] += 3
            elif check == 3:
                ans[s-1] += 6

for i in ans:
    print(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):
            s = x*x + y*y + z*z
            s += x*y + y*z + z*x
            if (s > n):
                continue
            else:
                ans[s] += 1

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

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

a=[0]*n

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

Solution (Python):
import numpy as np
n = int(input())
res = [0]*(n+1)
for i in range(1,101):
    for j in range(1,101):
        for k in range(1,101):
            x = i*i + j*j + k*k + i*j + j*k + k*i
            if x <= n:
                res[x] += 1
for i in range(1,n+1):
    print(res[i])

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

ans = [0 for _ in range(10001)]
for x in range(1, 100):
  for y in range(1, 100):
    for z in range(1, 100):
      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):
N = int(input())


ans = [0]*(N+1)
i = 102
for x in range(1,i):
    for y in range(1,i):
        for z in range(1,i):
            total = (x + y + z)**2 - (x*y + y*z + x*z)
            if total <= N:
                ans[total] += 1

for i in range(1,N+1):
    print(ans[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):
            tmp = (x + y + z)**2 - z*(x + y) - (x*y)
            if tmp > n: continue
            ANS[tmp] += 1

for ans in ANS[1:]:
    print(ans)

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):
            tmp = (x + y + z)**2 - z*(x + y) - (x*y)
            if tmp > n: continue
            ANS[tmp] += 1

for ans in ANS[1:]:
    print(ans)

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):
            s = x**2 + y**2 + z**2 + x*y + y*z + z*x
            if s <= N:
                ans[s] += 1

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

Solution (Python):


import math


def g(nx, ny, nz):
    return nx ** 2 + ny ** 2 + nz ** 2 + nx * ny + ny * nz + nz * nx


def solve(n):
    
    max_z = max(1, int(math.sqrt(n - 2) - 1) if n > 2 else 1)
    
    
    counter = [0 for _ in range(n + 1)]
    
    for z in range(1, max_z + 1):
        for y in range(1, max_z + 1):
            for x in range(1, max_z + 1):
                gn = g(x, y, z)
                if gn <= n:
                    counter[gn] += 1
    
    for i in range(1, n + 1):
        print(counter[i])


N = int(input())

solve(N)

Solution (Python):
import itertools

N = int(input())

tbl = [0]*N

for x in range(1,N):
    for y in range(1,N):
        for z in range(1,N):
            p = x*x + y*y + z*z + x*y + y*z + z*x
            if p > N:
                break
            tbl[p-1] += 1

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

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

table = [0]*(10**4+100)

for x in range(1,105):
    for y in range(1,105):
        for z in range(1,105):
            total = x**2 + y**2 + z**2 + x*y + y*z + z*x
            if total < 10100:
                table[total] += 1
            
for i in range(n):
    print(table[i+1])

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

C = [0] * (60001)

for x in range(1, 100):
    for y in range(x, 100):
        for z in range(y, 100):
            v = x * x + y * y + z * z + x * y + y * z + z * x
            k = 6
            if x == y == z:
                k = 1
            elif x == y or y == z:
                k = 3
            C[v] += k

for i in range(1, N + 1):
    print(C[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):
            w = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
            if w <= n:
                ans[w] += 1
for i in range(1, n + 1):
    print(ans[i])

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

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

result = [0] * (n+1)
for x in range(1,99):
  for y in range(1,99):
    for z in range(1,99):
      fn = x*x + y*y + z*z + x*y + y*z + z*x
      if fn > n:
        break
      result[fn] += 1

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

Solution (Python):
def main():
    num = int(input())
    counter = [0] * (num + 1)
    
    
    for x in range(1, 100):
        for y in range(1, 100):
            for z in range(1, 123 - x - y + 1):
                tmp = (x + y + z) ** 2 - x * y - y * z - z * x
                if tmp > num:
                    break
                counter[tmp] += 1
    for count in counter[1:]:
        print(count)


if __name__ == '__main__':
    main()

Solution (Python):
import itertools
n = int(input())
dic = {}
for x in range(1, 101):
  for y in range(1, 101):
    for z in range(1, 101):
      f_xyz = x**2 + y**2 + z**2 + x*y + y*z + z*x
      if f_xyz in dic:
        dic[f_xyz] += 1
      else:
        dic[f_xyz] = 1
for i in range(1, n+1):
  if i in dic:
    print(dic[i])
  else:
    print(0)

Solution (Python):
def main():
    num = int(input())
    counter = [0] * (num + 1)
    
    
    for x in range(1, 100):
        for y in range(1, 100):
            for z in range(1, 123 - x - y + 1):
                tmp = (x + y + z) ** 2 - x * y - y * z - z * x
                if tmp <= num:
                    counter[tmp] += 1
    for count in counter[1:]:
        print(count)


if __name__ == '__main__':
    main()

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

MX = 10**4
ans = {}
for x in range(1, 100):
    for y in range(1, 100):
        for z in range(1, 100):
            tmp = x**2+y**2+z**2+x*y+x*z+y*z

            if not(tmp in ans):
                ans[tmp] = 1
            else:
                ans[tmp] += 1

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

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

MX = 10**4
ans = {}
for x in range(1, 100):
    for y in range(1, 100):
        for z in range(1, 100):
            tmp = x**2+y**2+z**2+x*y+x*z+y*z
            if tmp > MX:
                break
            if not(tmp in ans):
                ans[tmp] = 1
            else:
                ans[tmp] += 1

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

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

for x in range(1, 100):
    for y in range(1, 100):
        for z in range(1, 100):
            ind = x**2+y**2+z**2+x*y+y*z+z*x
            if ind <= 10000:
                l[ind-1]+=1

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

Solution (Python):
import math

n = int(input())
arr = [0] * n

for x in range(1,700):
    for y in range(1,700):
        for z in range(1,701):
            ans = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
            if ans <= n:
                arr[ans - 1] += 1

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

Solution (Python):


import sys
import math


from sys import stdin,stdout
from collections import deque,defaultdict
from math import ceil,floor,inf,sqrt,factorial,gcd,log2
from copy import deepcopy
ii1=lambda:int(stdin.readline().strip())
is1=lambda:stdin.readline().strip()
iia=lambda:list(map(int,stdin.readline().strip().split()))
isa=lambda:stdin.readline().strip().split()
mod=1000000007


n=ii1()
ans=[0]*(n+1)
for i in range(1,102):
    for j in range(1,102):
        for k in range(1,102):
            res=i*i + j*j +k*k +i*j +j*k + k*i
            if res<n+1:
                ans[res]+=1
for i in range(1,n+1):
    print(ans[i])

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

Solution (Python):
"""
(x+y+z)^2 = (x^2+y^2+z^2) + 2(xy+yz+zx)
"""
def func(x, y, z): return (x + y + z) ** 2 - x * y - y * z - z * x


def main():
    num = int(input())
    counter = [0] * (num + 1)
    
    
    for x in range(1, 100):
        for y in range(1, 100):
            for z in range(1, 123 - x - y + 1):
                if (tmp := func(x, y, z)) <= num:
                    counter[tmp] += 1
    for count in counter[1:]:
        print(count)


if __name__ == '__main__':
    main()

Solution (Python):
import sys
input = sys.stdin.readline
import math
def main():
    N = int(input())
    n = int(math.sqrt(N)) + 1
    ans = [0]*10001
    for x in range(1,n):
        for y in range(1,n):
            for z in range(1,n):
                v = x**2 + y**2 + z**2 + x*y + y*z + z*x
                if v <= 10000:
                    ans[v] += 1 
    for i in range(1,N+1):
        print(ans[i])

if __name__ == '__main__':
    main()

Solution (Python):
n=int(input())
end=int(n**0.5)+1
cnt=0
l=[0 for i in range(6*end*end)]
for i in range(1,end):
  for j in range(1,end):
    for k in range(1,end):
      now=i*i+j*j+k*k+i*j+i*k+j*k
      l[now-1]+=1
for i in range(n):
  print(l[i])

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):
            v = i*i+j*j+k*k+i*j+i*k+j*k
            if v < 10050:
                a[v-1] += 1
 
for i in range(N):
    print(a[i])

Solution (Python):
res = [0]*10001

for x in range(1,101):
    for y in range(1,101):
        for z in range(1,101):
            tmp = x**2 + y**2 + z**2 + x*y + y*z + z*x

            if tmp <= 10000:
                res[tmp] += 1

N = int(input())

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

Solution (Python):
import sys
sys.setrecursionlimit(10000000)
MOD = 10 ** 9 + 7
INF = 10 ** 15

def main():
    N = int(input())
    ans = [0] * (N + 1)
    for i in range(1,101):
        for j in range(1,101):
            for k in range(1,101):
                x = i*i + j*j + k*k + i*j + j*k + k*i 
                if x <= N:
                    ans[x] += 1
    for i in range(1,N + 1):
        print(ans[i])
if __name__ == '__main__':
    main()

Solution (Python):
from itertools import product
N = int(input())
cnt = [0 for _ in range(N+1)]
for x, y, z in product(range(1, 101), repeat=3):
    if x*x+y*y+z*z+x*y+y*z+z*x <= N:
  	  cnt[x*x+y*y+z*z+x*y+y*z+z*x] += 1

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

Solution (Python):
import math

n = int(input())
arr = [0] * n

for x in range(1,750):
    for y in range(1,750):
        for z in range(1,750):
            ans = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
            if ans <= n:
                arr[ans - 1] += 1

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

Solution (Python):
import math

n = int(input())
arr = [0] * n

for x in range(1,500):
    for y in range(1,500):
        for z in range(1,501):
            ans = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
            if ans <= n:
                arr[ans - 1] += 1

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

Solution (Python):
import math

n = int(input())
arr = [0] * n

for x in range(1,300):
    for y in range(1,300):
        for z in range(1,301):
            ans = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
            if ans <= n:
                arr[ans - 1] += 1

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

Solution (Python):
import math

n = int(input())
arr = [0] * n

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

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

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

lst = [0]*n
a = int(n ** 0.5)

for x in range(1, a):
    for y in range(1, a):
        for z in range(1, a):
            b = x**2 + y**2 + z**2 + x*y + y*z + z*x
            if b > n:
                continue
            else:
                lst[b - 1] += 1

for i in lst:
    print(i)

Solution (Python):
n = int(input())
a = [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 ** 2 + j ** 2 + k ** 2 + i * j + j * k + k * i
            if(v < 10050):
                a[v] += 1
for i in range(n):
    print(a[i + 1])

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):
            v = i*i+j*j+k*k+i*j+i*k+j*k
            if v < 10050:
                a[v-1] += 1

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

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

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 < 10050:
                ans[v] += 1

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

Solution (Python):
n=int(input())
ans=[0]*10800
for x in range(1,108):
  for y in range(1,108):
    for z in range(1,108):
      v=x*x+y*y+z*z+x*y+y*z+z*x
      if 0<=v<10800:
        ans[v]+=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())
a = [0]*n
cnt = 0
for i in range(1,100):
  for j in range(1,100):
    for k in range(1,100):
      b = i**2 + j**2 + k**2 + i*j + j*k + k*i
      if b <= n:
        a[b-1] += 1

for i in a:
  print(i)

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

ans = [0] * (N + 5)
for x in range(1, 101):
    for y in range(1, 101):
        for z in range(1, 101):
            tmp = x**2 + y**2 + z**2 + x*y + y*z + z*x
            if tmp <= N:
                ans[tmp] += 1

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

Solution (Python):
from sys import stdin, stdout, setrecursionlimit
from collections import deque, defaultdict, Counter
from heapq import heappush, heappop
import math

rl = lambda: stdin.readline()
rll = lambda: stdin.readline().split()
rli = lambda: map(int, stdin.readline().split())
rlf = lambda: map(float, stdin.readline().split())

INF, NINF = float('inf'), float('-inf')

def main():
	n = int(rl())
	f = lambda x, y, z: x**2 + y**2 + z ** 2 + x*y + y*z + z*x
	vals = defaultdict(lambda: 0)
	for x in range(1, 120):
		for y in range(1, 120):
			for z in range(1, 120):
				cand = f(x,y,z)
				if cand > n: break
				vals[cand] += 1
	for i in range(1, n+1):
		print(vals[i])
	stdout.close()

if __name__ == "__main__":
	main()

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

countlist=[0]*n
maxn=int(n**0.5)
for i in range(1,maxn+1):
    for j in range(1,maxn+1):
        for k in range(1,maxn+1):
            tmp=i**2+j**2+k**2+i*j+j*k+k*i
            if tmp <= n :
                countlist[tmp-1] += 1

for count in countlist:
    print(count)

Solution (Python):


import sys
input = sys.stdin.buffer.readline
sys.setrecursionlimit(10**6)
INF = float("inf")

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

    F = [0]*(N+1)
    for x in range(1, int(N**.5)+1):
        for y in range(1, int(N**.5)+1):
            for z in range(1, int(N**.5)+1):
                a = x**2 + y**2 + z**2 + x*y + y*z + z*x
                if a <= N:
                    F[a] += 1
    
    for i in range(1,N+1):
        print(F[i])

if __name__ == "__main__":
    main()

Solution (Python):
n = int(input())
final_dict = {}
for x in range(1,n):
    for y in range(1,n):
        p = x*x + y*y 
        if p>=n:
            break
        for z in range(1,n):
            if p+z*z >=n:
                break
            val = (p + z*z +x*y +y*z +x*z)
            if val in final_dict:
                final_dict[val]+=1
            else:
                final_dict[val]=1
for i in range(1,n+1):
    p = 0
    if i in final_dict:
        p = final_dict[i]
    print(p)

Solution (Python):
N = int(input())
f = {}

for x in range(1, 110):
	for y in range(1, 110):
		for z in range(1, 110):
			t = x*x+y*y+z*z+x*y+y*z+z*x
			f[t] = (f[t]+1 if t in f.keys() else 1)

for i in range(1,N+1):
    print(f[i] if i in f.keys() else 0)

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):
import math

N = int(input())

ans = [0] * (N + 1)

for i in range(1, int(math.sqrt(N)) + 1):
    for j in range(1, int(math.sqrt(N)) + 1):
        for k in range(1, int(math.sqrt(N)) + 1):
            v = i * i + j * j + k * k + i * j + j * k + k * i
            if v <= N:
                ans[v] += 1

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

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

Solution (Python):


n = int(input())
ans = [0] * (n+1)
m = int(n**(1/2)) + 1
for x in range(1, m):
    for y in range(1, m):
        for z in range(1, m):
            res = x**2 + y**2 + z**2 + x*y + y*z + z*x
            if res <= n:
                ans[res] += 1
for i in ans[1:]:
    print(i)

Solution (Python):
import math
n=int(input())
t=int(math.sqrt(n))
ans=[0 for i in range(100001)]
for j in range(1,t):
  for k in range(1,t):
    for l in range(1,t):
      s=j**2+k**2+l**2+j*k+k*l+j*l
      if s<10001:
        ans[s]+=1
          
for m in range(1,n+1):
  print(ans[m])

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


n_max=math.ceil(math.sqrt(N))
res=[0]*(N+1)

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

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

Solution (Python):
N = int(input())
ans_list = [0 for _ in range(1,10100)]

for i in range(1,100):
    for j in range(1,100):
        for k in range(1,100):
            value = i**2 + j**2 + k**2 + i*j + j*k + k*i
            if value <= 10000:
                ans_list[value] += 1

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

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

for x in range(1,100):
	for y in range(1,100):
		for z in range(1,100):
			v=x**2 + y**2 + z**2 + x*y +y*z +x*z
			if v>n:
				break
			ans[v-1]+=1

print(*ans)

Solution (Python):
def f(x,y,z):
    n=x**2 + y**2 + z**2 + x*y + y*z + z*x
    return n

N=int(input())

anslist=[0]*60100

for x in range(1,100):
    for y in range(1,100):
        for z in range(1,100):
            n= f(x,y,z)
            anslist[n-1]+=1

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

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

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

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

for x in range(1,100):
    for y in range(1,100):
        for z in range(1,100):
            value = x*x + y*y + z*z + x*y + y*z + z*x
            if value <= 11000:
                cnt[value] += 1
for i in range(1,N+1):
    print(cnt[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())
from collections import defaultdict
ans = defaultdict(int)
for a in range(1,101):
  for b in range(1,101):
    for c in range(1,101):
      ans[a**2 + b**2 + c**2 + a*b + a*c + b*c] += 1
for n in range(1,N+1):
  print(ans[n])

Solution (Python):
import math
n = int(input())
ans = [0] * n
a = math.floor(n**0.5)
b = 0
for x in range(1, a):
    for y in range(1, a):
        for z in range(1, a):
            m = x * x + y * y + z * z + x * y + y * z + z * x
            if m <= n:
                ans[m - 1] += 1

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

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*x+y*y+z*z+x*y+y*z+z*x
      if v<10001:
        ans[v]+=1

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

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

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

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

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

anslist = [0] * N

for i in range(1,int(N**0.5)+1):
    for j in range(1,int(N**0.5)+1):
        for k in range(1,int(N**0.5)+1):
            a = i**2 + j**2 + k**2 + i*j + j*k + k*i
            if a <= N:
                anslist[a-1] += 1
    

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

Solution (Python):
n = int(input())
cnt = [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):
            ind = (x+y+z)**2-x*y-y*z-z*x
            if ind > 0 and ind < n+1:
                cnt[ind] += 1
for i in range(n):
    print(cnt[i+1])

Solution (Python):
from collections import defaultdict as d
dico = d(int)
n = int(input())
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+x*z+y*z
      if s > n:break
      dico[s]+=1
for i in range(1, n+1):
  print(dico[i])

Solution (Python):
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines

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

    f = [0] * (N+1)
    for x in range(1,100):
        for y in range(1,100):
            for z in range(1,100):
                tmp = x*x + y*y + z*z + x*y + y*z + z*x
                if tmp > N:
                    break
                f[tmp] += 1
    
    print("\n".join(map(str, f[1:])))


if __name__ == "__main__":
    main()

Solution (Python):
import sys
import collections

n = int(sys.stdin.readline().rstrip("\n"))
l = []
for a in range(1,100):
    for b in range(1,100):
        for c in range(1,100):
            l.append(a**2+b**2+c**2+a*b+b*c+c*a)
c = collections.Counter(l)
for i in range(1,n+1):
    print(c[i])

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

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

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

Solution (Python):
import sys
import collections

sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline


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

    c = collections.Counter()

    for x in range(1, 101):
        for y in range(1, 101):
            for z in range(1, 101):
                c[x * x + y * y + z * z + x * y + y * z + z * x] += 1

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


if __name__ == '__main__':
    main()

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

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

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

n=int(input())
an=[0]*n
for i in range(1,100):
    for j in range(1,100):
        for k in range(1,100):
            wk=ff(i,j,k)
            if wk<=n:
                an[wk-1]+=1
for i in an:
    print(i)

Solution (Python):
import sys
import collections

sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline


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

    c = collections.Counter()

    for x in range(1, 101):
        for y in range(1, 101):
            for z in range(1, 101):
                if x * x + y * y + z * z + x * y + y * z + z * x >= 10001:
                    continue
                c[x * x + y * y + z * z + x * y + y * z + z * x] += 1

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


if __name__ == '__main__':
    main()

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

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

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

Solution (Python):
import math
n=int(input())
M=int(math.sqrt(n))
N=3

A=[]
def dfs(nums,length):
    if length==N:
        A.append(nums)
        return
    for i in range(1,M+1):
        new_nums=nums+[i]
        dfs(new_nums,length+1)
dfs([],0)

dp=[0 for i in range(n)]
for i,j,k in A:
    ans=i**2+j**2+k**2+i*j+j*k+k*i
    if ans<=n:
        if i==j and j==k:
            dp[ans-1]+=1
        elif i==j or j==k or k==i:
            dp[ans-1]+=1
        else:
            dp[ans-1]+=1
for i in dp:
    print(i)

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

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

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

Solution (Python):
import math

n = int(input())
answer_lists = [0 for i in range(10001)]
for x in range(1, int(math.sqrt(n+1)), 1):
    for y in range(1, int(math.sqrt(n+1)), 1):
        for z in range(1, int(math.sqrt(n+1)), 1):
            formula = (x+y+z)**2 - (x*y + y*z + z*x)
            if formula <= n:
                answer_lists[formula] += 1
            else:
                break
for i in range(1, n+1, 1):
    print(answer_lists[i])

Solution (Python):
import math
n = int(input())
ar = [0 for i in range(n)]
r = int(math.sqrt(n))
for i in range(1,r+1):
    for j in range(1,r+1):
        for k in range(1,r+1):
            m = i ** 2 + j ** 2 + k ** 2 + i * j + i * k + j * k
            if m <= n:
                ar[m-1] += 1
for r in ar:
    print(r)