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]*(n+5)

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


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

Solution (Python):
import numpy as np
def f(n):
    counts = [0]*n
    x_max = int(np.sqrt(n))
    for x in range(1,x_max+1):
        y_max = int(np.sqrt(n-x**2))
        for y in range(1,y_max+1):
            z_max = int(np.sqrt(n-x**2-y**2))
            for z in range(1,z_max+1):
                if x**2+y**2+z**2+x*y+y*z+z*x <= n:
                    counts[x**2+y**2+z**2+x*y+y*z+z*x-1] += 1
    return counts
 
N = int(input())
counts = f(N)
for i in range(N):
    print(counts[i])

Solution (Python):
import math
N=int(input())
ans=[0 for _ in range(10**4+1)]
for x in range(1, math.floor(math.sqrt(10**4))+1):
    for y in range(1, math.floor(math.sqrt(10**4))+1):
        for z in range(1, math.floor(math.sqrt(10**4))+1):
            if x*x + y*y + z*z + x*y + y*z + z*x <= 10**4:
                ans[x*x + y*y + z*z + x*y + y*z + z*x]+=1
for i in range(1,N+1):
    print(ans[i])

Solution (Python):
N = int(input())
L = [0]*10000
for i in range(1,101):
    for j in range(1,101):
        for k in range(1,101):
            tmp = i**2+j**2+k**2+i*j+j*k+i*k
            if 1 <= tmp <= 10000:
                L[tmp-1] +=1
for i in range(N):
    print(L[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):
      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):
import math
N = int(input())
ans = [0]*N
l = int(math.sqrt(N))

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

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

Solution (Python):
n = int(input())
ans = {}

for x in range(1,100+1):
    for y in range(1,100+1):
        for z in range(1,100+1):
            tmp=x**2+y**2+z**2+x*y+y*z+z*x
            ans[tmp] = ans.get(tmp, 0) + 1

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

Solution (Python):
from itertools import product
N=int(input())
f=[0]*N
for x,y,z in product(range(1,100),repeat=3):
    n=x**2+y**2+z**2+x*y+y*z+z*x
    if n<=N:
        f[n-1]+=1
print(*f,sep="\n")

Solution (Python):
n = int(input())
dp = [0] * 11000
for i in range(1,101):
    for j in range(1,101):
        for k in range(1,101):
            x = i**2+j**2+k**2+i*j+j*k+k*i
            if x <= 10**4:
                dp[x] += 1
for i in range(1,n+1):
    print(dp[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):
            s = x*x + y*y + z*z + x*y + y*z + z*x
            if s <= 10000:
                ans[s] += 1

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

Solution (Python):
import itertools
import math
import fractions
import functools
import copy
from collections import deque
from functools import reduce
from decimal import Decimal


def main():
    n = int(input())
    l = [0]*(n+1)
    for x in range(1,101):
        for y in range(1,101):
            for z in range(1,101):
                temp = x**2 + y**2 + z**2 + x*y + y*z + z*x
                if temp <= n:
                    l[temp] += 1

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


if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
ans = {}

for x in range(1,100+1):
    for y in range(1,100+1):
        for z in range(1,100+1):
            tmp=x**2+y**2+z**2+x*y+y*z+z*x
            ans[tmp] = ans.get(tmp, 0) + 1

for i in range(n):
    print(ans.get(i+1,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):

n = int(input())
ans = [0]*10001

for i in range(1, 101):
    for j in range(1, 101):
        for z in range(1, 101):
            aaa = i**2+j**2+z**2+i*j+j*z+z*i
            if aaa <= 10**4:
                ans[aaa] += 1
for i in range(n):
    print(ans[i+1])

Solution (Python):

n = int(input())
ans = [0]*10001

for i in range(1, 101):
    for j in range(1, 101):
        for z in range(1, 101):
            aaa = i**2+j**2+z**2+i*j+j*z+z*i
            if aaa <= 10**4:
                ans[aaa] += 1
for i in range(n):
    print(ans[i+1])

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

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

Solution (Python):
import math
import numpy as np
 
def f(x,y,z):
  return x**2+y**2+z**2+x*y+y*z+z*x
 
N = int(input())
f_list = np.zeros((N,1), dtype=int)
 
for x in range(1,math.floor((N//6)**0.5)+1):
  for z in range(1,math.floor(N**0.5)+1):
    for y in range(x,z+1):
      if f(x,y,z)<=N:
        if((x-y)*(y-z)*(z-x)==0): 
          if(x==y and y==z):
            f_list[f(x,y,z)-1] = f_list[f(x,y,z)-1] + 1
          else:
            f_list[f(x,y,z)-1] = f_list[f(x,y,z)-1] + 3
        else:
          f_list[f(x,y,z)-1] = f_list[f(x,y,z)-1] + 6
 
for i in range(N):
  print(f_list[i][0])

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

ans = [0] * (10**4 + 1)

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

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

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

res = [0 for i in range(10 ** 4)]
for x in range(1, math.ceil(math.sqrt(10 ** 4))):
    for y in range(1, math.ceil(math.sqrt(10 ** 4))):
        for z in range(1, math.ceil(math.sqrt(10 ** 4))):
            ans = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
            if ans <= 10 ** 4:
                res[ans - 1] += 1

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

Solution (Python):
n = 10005
f = [0]*10005
for i in range(1, int(n**0.5)):
    a = n - i**2
    if a >= 1:
        for j in range(1, int(a**0.5)):
            b = n - i**2 - j**2
            if b >= 1:
                for k in range(1, int(b**0.5)):
                    c = i**2 + j**2 + k**2 + i*j + j*k + k*i
                    if c <= 10001:
                        f[c] += 1

n = int(input())
for i in range(1, n+1):
    print(f[i])

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

Solution (Python):
'''Author- Akshit Monga'''
list=[0 for i in range(10**4+1)]
for x in range(1,100):
    for y in range(1,100):
        for z in range(1,100):
            var=x**2 +y**2 +z**2 +x*y +y*z +z*x
            if var<=10**4:
                list[var]+=1
            
n=int(input())
for i in range(1,n+1):
    print(list[i])

Solution (Python):
import sys
input = sys.stdin.buffer.readline


import math










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

    ans = [0]*(n+1)

    for x in range(1, int(math.sqrt(n))):
        for y in range(1, int(math.sqrt(n))):
            for z in range(1, int(math.sqrt(n))):

                e = x**2 + y**2 + z**2 + x*y + y*z + z*x
                if e >= 1 and e <= n:
                    ans[int(e)] += 1

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




                

                
                
                
                

                
                
                
                

        




if __name__ == '__main__':
    main()

Solution (Python):
import sys
N = int(sys.stdin.readline())
if N < 6:
  x, y, z = 0, 0, 0
else:
  x = int((N / 6)**0.5)
  y = int(round(((((N -1)/3) - 1/9)**0.5 - 1/3)+ 0.5, 0))
  z = int((N - 5)**0.5 + 1)            
n = [0]*(N+1)
for i in range(1,x+1):
  for j in range(i,y+1):
    for k in range(j, z+1):
      p = int((i + j + k)**2 - i*(j + k) - j*k)
      if N < p:
        break
      if i == j:
        if j == k:
          n[p] += 1
        else:
          n[p] += 3
      else:
        if i == k:
          n[p] += 3
        else:
          if j == k:
            n[p] += 3
          else:
            n[p] += 6
for i in range(1,N+1):
  print(n[i])

Solution (Python):

n = int(input())
arr = [0] * 20000
for i in range(1,1001):
    for j in range(1,1001):
        for k in range(1,1001):
            if i*i+j*j+k*k >= n :
                break 
            arr[i*i+j*j+k*k+i*j+i*k+k*j] += 1 
for i in range(1,n+1):
    print(arr[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**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):
cnt=[0] * 11000
n = int(input())

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

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

Solution (Python):

N = int(input())



n = 105


    





















ans = [0] * 10050
for j in range(1, n):
    for l in range(1, n):
        for r in range(1, n):
            value = j * j  + l * l + r * r + j * l + j * r + l * r
            if value < 10050:
                ans[value] += 1

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

Solution (Python):
N=int(input())
def sq(n):
    c=0
    A=[0 for j in range(n+1)]
    for i in range(n//2):
        p=(i+1)**2
        if p>n:
            for j in range(i**2,n+1):
                A[j]=i
            break
        else:
            for j in range(i**2,p):
                A[j]=i
    return A
A=sq(N)
a=A[N]
L=[0 for j in range(N+1)]
for x in range(1,a+1):
    for y in range(1,a+1):
        for z in range(1,a+1):
            p=x**2+y**2+z**2+x*y+y*z+z*x
            if p<=N:
                L[p]=L[p]+1
            else:
                break
for i in range(1,N+1):
    print(L[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*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):
def f(x, y, z):
    return (x+y+z)**2 - x*y - y*z - z*x


N = int(input())
pattern = {i:0 for i in range(1,10001)}

for x in range(1, 101):
    for y in range(1, 101):
        for z in range(1, 101):
            result = f(x, y, z)
            try:
                pattern[result] += 1
            except KeyError:
                pass
for i in range(1, N+1):
    print(pattern[i])

Solution (Python):
def main():
    n = int(input())
    ans = [0]*(n+1)
    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)):
                t = i**2+j**2+k**2+i*j+j*k+k*i
                if t<=n:
                    ans[t] += 1
    for a in ans[1:]:
        print(a)
if __name__ == "__main__":
    main()

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

res = [0]*20000

for x in range(1, int(N**0.5)):
    for y in range(1, int(N**0.5)):
        for z in range(1, int(N**0.5)):
            idx = x**2 + y**2 + z**2 + x*y + y*z + z*x
            if idx < 20000:
                res[idx] += 1

for r in res[1:N+1]:
    print(r)

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

Solution (Python):
import sys

input = sys.stdin.readline

def main():
    ans = [0]* 10010
    n = int(input())
    for x in range(1,101):
        for y in range(1,101):
            for z in range(1,101):
                v = (x+y+z)**2 - x*y - y*z - z*x
                if v <= n:
                    ans[v] += 1
    for i in range(1,n+1):
        print(ans[i])

if __name__ == '__main__':
    main()

Solution (Python):


import sys
import math

def main():
    n = int(input())
    root_n=math.ceil(math.sqrt(n))
    ans=[0]*n
    count=0

    for x in range(1,root_n):
        for y in range(1,root_n):
            for z in range(1,root_n):
                tmp=x**2+y**2+z**2+x*y+y*z+z*x
                if tmp<n+1:
                    ans[tmp-1]+=1
    for i in ans:
        print(i)

if __name__ == "__main__":
    main()

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

ans = [0] * 110000

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

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

Solution (Python):
from math import sqrt
N = int(input())
L = [0 for _ in range(N)]
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 + x*z + y*z
            if a >=1 and a <= N:
                L[a-1] +=1
for x in L:
    print(x)

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

a=[0]*N

x=1
while x*x<=N:
    y=1
    while x*x+y*y+x*y<=N:
        z=1
        while z*z+x*x+y*y+x*y+z*y+z*x<=N:
            a[z*z+x*x+y*y+x*y+z*y+z*x-1]+=1
            z+=1
        y+=1
    x+=1

for n in a:
    print(n)

Solution (Python):
n = int(input())
res = [0] * 100001
for x in range(1,110):
    for y in range(1,110):
        for z in range(1,110):
            v = x*x + y*y + z*z + x*y + y*z + x*z
            if v < 100001:
                res[v] += 1
for i in range(n):
    print(res[i+1])

Solution (Python):
n = int(input())
ans = [0]*(10**4+1)
for x in range(1,10**2+1):
    for y in range(1,10**2+1):
        for z in range(1,10**2+1):
            i = x*x + y*y + z*z + x*y + x*z + y*z
            if i <= 10**4:
                ans[i] += 1
            else:
                break

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

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

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

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

Solution (Python):
n = int(input())
ans  = [0 for i in range(10**5)]
for x in range(1,100):
    for y in range(1,100):
        for z in range(1,100):
            ans[x**2 + y**2 + z**2 + x*y + y*z + z*x] += 1

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

Solution (Python):
n=int(input())
a = [0]*(20000)
for i in range(1,101):
    for j in range(1,101):
        for k in range(1,101):
            if i**2+j**2+k**2 >= n:
                break
            a[i**2+j**2+k**2+i*j+j*k+i*k]+=1
for i in range(1,n+1):
    print(a[i])

Solution (Python):
import sys
INF = 1 << 60
MOD = 10**9 + 7 
sys.setrecursionlimit(2147483647)
input = lambda:sys.stdin.readline().rstrip()
from itertools import product
def resolve():
    n = int(input())
    ans = [0] * (n + 1)
    for x, y, z in product(range(1, 101), repeat = 3):
        k = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
        if k <= n:
            ans[k] += 1
    print(*ans[1:], sep = '\n')
resolve()

Solution (Python):

import sys,io,os,time
from collections import defaultdict
from collections import OrderedDict
from collections import deque
from itertools import combinations
from itertools import permutations
import bisect,math,heapq
alphabet = "abcdefghijklmnopqrstuvwxyz"

input = sys.stdin.readline


n = int(input())
arr = [0]*(10000+11)

for i in range(1,101):
	for j in range(1,101):
		for k in range(1,101):
			if i*i + j*j + k*k + i*j + j*k + k*i <= n:
				arr[i*i + j*j + k*k + i*j + j*k + k*i]+=1
for i in range(1,n+1):
	print(arr[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 for x in range(N)]
L = int(N**0.5)
for i in range(1,L):
    for j in range(1,L):
        for k in range(1,L):
            n = i*i+j*j+k*k+i*j+j*k+i*k
            if n <= N:
                a[n-1] += 1
for i in range(N):
    print(a[i])

Solution (Python):
N = int(input())
anslist = [0] * (N + 1)
for x in range(1,100): 
  for y in range(1,100):
    for z in range(1,100):
      temp = x**2 + y**2 + z**2 + x*y + y*z + z*x
      if temp <= N:
        anslist[temp] += 1

anslist.pop(0)

for i in anslist:
  print(i)

Solution (Python):
if __name__ == "__main__":
    
    n = int(input())

    """for o in range(1, n+1):
        s = 1
        if o > 6:
            s = -1 + int((o-2)**0.5)
        for x in range(s, 100):
            isFound = False
            for y in range(1, x+1):
                for z in range(1, y+1):
                    m = x**2+y**2+z**2+x*y+y*z+z*x
                    if m == o:
                        isFound = True
                        if x==y and y==z: print(1)
                        elif x==y or y==z or z==x: print(3)
                        else: print(6)
                        break
                    elif m > o:
                        break
                if isFound: break
            if isFound: break
        if not isFound: print(0)"""

    ans = [0 for _ in range(10001)]
    for x in range(1, 101):
        for y in range(1, 101):
            for z in range(1, 101):
                m = x**2+y**2+z**2+x*y+y*z+z*x
                if m > 10000: break
                ans[m] += 1

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

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

ans = [0]*N

for i in range(1,101,1):
  for j in range(1,101,1):
    for k in range(1,101,1):
      n = i**2+j**2+k**2+i*j+j*k+k*i
      if n > N:
        continue
      else:
        ans[n-1]+=1
      
for i in range(N):
  print(ans[i])

Solution (Python):
from sys import stdin
from sys import maxsize


def two_div(l):
    divs = []
    if l == 2:
        return [(1,1)]
    if l == 3:
        return [(2,1)]
    preL = 0
    for m in range(l-1,l//2 -1,-1):
        if preL == l-m:
            break
        divs.append((m,l-m))
        preL = m
    return divs


def three_div(mmm):
    if mmm == 3:
        return[(1,1,1)]
    if mmm == 4:
        return[(2,1,1)]
    divs = []
    rest = 1
    for m in range(mmm-2,mmm//3 -1,-1):
        rest += 1
        two_c = two_div(rest)
        for t in two_c:
            if m < t[0]:
                continue
            c = (m,t[0],t[1])
            divs.append(c)
    return divs

def triple(x,y,z):
    v = x*x + y*y + z*z + x*y + y*z + z*x
    return v

def main():
    n = int(input())
    
    ans = [0] * (n+1)
    for goukei in range(3,300):
        mini = maxsize
        factors = three_div(goukei)
        
        for x,y,z in factors:
            
            v = triple(x,y,z)
            

            if x == y and y == z and v <= n:
                
                
                ans[v] += 1
            elif x!=y and y!=z and z!=x and v <= n:
                
                
                ans[v] += 6  
            elif v <= n:
                
                
                ans[v] += 3

            if mini > v:
                mini = v
        if mini >= n:
            break

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

if __name__ == "__main__":
    main()

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*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):
N = int(input())

list = [0] * 10000
for i in range(1, 101):
    for j in range(1, 101):
        for k in range(1, 101):
            v = i**2 + j**2 + k**2 +i*j + j*k + k*i
            if v <= 10000:
                list[v-1] += 1

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

Solution (Python):
ans=[0 for i in range(10**4+1)]

n=int(input())

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

for i in range(1,100):
    for q in range(1,100):
        for p in range(1,100):
            if calc(i,q,p)<=10**4:
                ans[calc(i,q,p)]+=1

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

Solution (Python):
import numpy as np
N = int(input())
ans = np.zeros((10**4+5))
for i in range(1,100):
  for j in range(1,100):
    for l in range(1,100):
      f = (i+j)**2+(j+l)**2+(l+i)**2
      if((f%2==0) and (f<=2*10**4)):
        ans[int(f/2)] += 1

for i in range(1,N+1):
  print(int(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):
import math
n = int(input())
ans = [0] * (n + 1)
for x in range(1, int(math.sqrt(n))):
    for y in range(1, int(math.sqrt(n))):
        for z in range(1, int(math.sqrt(n))):
            a = x * x + y * y + z * z + x * y + y * z + z * x
            if n >= a >= 1:
                ans[a] += 1
print(*ans[1:],sep="\n")

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

v = [0]*(100000)

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

print('\n'.join(map(str,v[1:n+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):

import math

n = int(input())
m = int(math.sqrt(n))+1
x = y = z = 0 

def p(x, y, z): 
    return x*x + y*y + z*z + x*y + y*z + z*x 

anss = [0 for _ in range(n)]

for x in range(1, m): 
    for y in range(1, m): 
        for z in range(1, m): 
            if p(x, y, z)-1 <= n-1:
                anss[p(x, y, z)-1] += 1

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

Solution (Python):
n = int(input())
ans = [0] * (n)
for x in range(1, n):
    if x * x > n:
        break
    for y in range(1, n):
        if x * x + y * y + x * y > n:
            break
        for z in range(1, n):
            key = x * x + y * y + z * z + x * y + y * z + z * x
            if key > n:
                break
            ans[key - 1] += 1
for i in range(n):
    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):
import math
N = int(input())

ans = [0] * (10100)

for x in range(1, 101):
    for y in range(1, 101):
        for z in range(1, 101):
            tmp = x*x + y*y + z*z + x*y + y*z + z*x
            if tmp > 10000:
                break
            ans[tmp] += 1

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

Solution (Python):

 
import sys,math,collections,itertools
input = sys.stdin.readline
 
N = int(input())
ans = [0]*N
 
for x in range(1,101):
    for y in range(x+1,101):
        for z in range(y+1,101):
            n = x**2+y**2+z**2+x*y+y*z+z*x
            if n <= N:
                ans[n-1] +=6
                
for x in range(1,101):
    y = x
    for z in range(1,101):
        if z == x:
            continue
        else:
            n = x**2+y**2+z**2+x*y+y*z+z*x
            if n <= N:
                ans[n-1] +=3
 
for x in range(1,101):
    y = x
    z = x
    n = x**2+y**2+z**2+x*y+y*z+z*x
    if n <= N:
        ans[n-1] +=1
        
for i in range(N):
    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):
            f= x**2 + y**2 + z**2 + x*y + y*z + z*x
            if f<=n:
                ans[f]+=1

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

Solution (Python):
def resolve():
    N = int(input())
    ans = [0 for _ in range(100005)]
    for x in range(1, 105):
        for y in range(1, 105):
            for z in range(1, 105):
                tmp = x * x + y * y + z * z + x * y + y * z + z * x
                if tmp < 10005:
                    ans[tmp] += 1
    
    for i in range(1, N+1):
        print(ans[i])
    return
 
resolve()

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

counts = [0] * 10001
for i in range(1, 101):
    for j in range(1, i + 1):
        for k in range(1, j + 1):
            result = i ** 2 + j ** 2 + k ** 2 + i * j + j * k + k * i
            if result > 10000:
                continue
            if i == j and j == k:
                counts[result] += 1
            elif i == j or j == k:
                counts[result] += 3
            else:
                counts[result] += 6

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

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

def count(a, b, c):
    return (a+b+c)**2-a*b-b*c-c*a

table = [0] * (N+1)
for x in range(1, 101):
    for y in range(1, 101):
        for z in range(1, 101):
            tmp = count(x, y, z)
            if tmp <= N:
                table[tmp] += 1
print(*table[1:], sep="\n")

Solution (Python):
n = int(input())
ans = [0 for a 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):

import math
N = int(input())


ans = [0]*10001

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

Solution (Python):

 
import sys,math,collections,itertools
input = sys.stdin.readline
 
N = int(input())
ans = [0]*N
 
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] +=1
                
 
for i in range(N):
    print(ans[i])

Solution (Python):
N=int(input())
ans=[0]*(N+5)
for i in range(1,100) :
    for j in range(1,100) :
        for k in range(1,100) :
            n=i*i+j*j+k*k+i*j+j*k+k*i
            if N>=n :
                ans[n]+=1

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