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())

anss = [0] * (N+1)
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:
                anss[a] += 1

print('\n'.join(map(str, anss[1:])))

Solution (Python):
n=int(input())
r=range(1,100)
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-1
      if t<n: l[t]+=1
for i in l: print(i)

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 7)

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N = int(input())

CNT = [0] * 10010
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:
                continue

            CNT[f] += 1

for i in range(1, N + 1):
    print(CNT[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):
def ans_xyz(x, y, z):
    return ((x ** 2) + (y ** 2) + (z ** 2) + (x * y) + (y * z) + (z * x))

N = int(input())
ans = [0] * (10 ** 5)
for x in range(1, 101):
    for y in range(1, 101):
        for z in range(1, 101):
            ans[ans_xyz(x, y, z)] += 1
print(*ans[1:N + 1], sep='\n')

Solution (Python):
N=int(input())
ans = [0]*10000000
for i in range(1,100):
    for j in range(1,100):
        for k in range(1,100):
            ans[i**2+j**2+k**2+i*j+j*k+i*k] += 1
for i in range(1,N+1):
    print(ans[i])

Solution (Python):
import collections

n = int(input())
ans_list = []
for x in range(1,100):
  for y in range(1,100):
    for z in range(1,100):
        ans_list.append(x*x+y*y+z*z+x*y+y*z+z*x)

counter = collections.Counter(ans_list)
for i in range(1,n+1):
  print(counter[i])

Solution (Python):
N = int(input())
L = [0 for _ in range(N+1)]
for i in range(1,int(N**0.5)+1):
    for j in range(i, int(N ** 0.5)+1):
        for k in range(j, int(N ** 0.5)+1):
            a = i*i + j*j + k*k + i*j + j*k + k*i
            if a > N:
                break
            elif a >= 0:
                if i == j == k:
                    L[a] += 1
                elif i == j or j == k:
                    L[a] += 3
                else:
                    L[a] += 6
for i in range(1,N+1):
    print(L[i])

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

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

Solution (Python):
n=int(input())
y=[0 for _ in range(10**4+1)]
for j in range(1,100):
   for k in range(1,100):
      for u in range(1,100):
         a=j*j+k*k+u*u+j*k+k*u+u*j
         if a <= 10**4:
            y[a-1]+=1
for o in range(n):
   print(y[o])

Solution (Python):
import math
import sys


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def S(): return input()
def LS(): return input().split()


INF = float('inf')


def f(m):
    res = 0
    r_m = math.sqrt(m)
    for i in range(1, int(r_m) + 1):
        for j in range(1, int(r_m) + 1):
            for k in range(1, int(r_m) + 1):
                if i ** 2 + j ** 2 + k ** 2 + i * j + j * k + k * i == m:
                    print(f'{(m, i, j, k)=}')
                    res += 1
    return res


n = I()
cnt = [0] * 10001
r_n = int(math.sqrt(n)) + 1
for x in range(1, r_n):
    for y in range(1, r_n):
        for z in range(1, r_n):
            v = x**2 + y**2 + z**2 + x*y + y*z + z*x
            if v <= n:
                cnt[v] += 1

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

Solution (Python):
N = int(input())
ans = [0] * 100000
for x in range(1, 100):
    for y in range(1, 100):
        for z in range(1, 100):
            ans[x*x+y*y+z*z+x*y+y*z+z*x-1] += 1
for i in range(N):
    print(ans[i])

Solution (Python):

import sys

sysread = sys.stdin.buffer.readline
read = sys.stdin.buffer.read


sys.setrecursionlimit(10**7)






import math

def run():
    N = int(input())
    for n in range(1, N+1):
        ret = 0
        val = int(math.sqrt(2 * n))
        for X in range(2, val+1):
            for Y in range(2, val+1):
                tmp1 = 2 * n - X ** 2 - Y ** 2
                if tmp1 >= 0 and math.sqrt(tmp1) == int(math.sqrt(tmp1)):
                    Z_ = int(math.sqrt(tmp1))
                    if Z_ != 0:
                        for k in [-1, 1]:
                            Z = Z_ * k
                            if not (X + Y + Z) % 2:
                                xyz = (X + Y + Z) // 2
                                x = xyz - Y
                                y = xyz - Z
                                z = xyz - X
                                if x >= 1 and y >= 1 and z >= 1:
                                    ret += 1
                                    


        print(ret)



if __name__ == "__main__":
    run()

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

Solution (Python):

n = int(input())

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

while True:
    f = x * x + y * y + z * z + x * y + y * z + z * x
    if f > n:
        if z > 1:
            y += 1
            z = 1
        elif y > 1:
            x += 1
            y = 1
        else:
            break
    else:
        ans[f] += 1
        z += 1

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

Solution (Python):
import sys
import math
from collections import defaultdict
from bisect import bisect_left, bisect_right

sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]

mod = 10**9 + 7

def I(): return int(input())
def LI(): return list(map(int, input().split()))
def LIR(row,col):
    if row <= 0:
        return [[] for _ in range(col)]
    elif col == 1:
        return [I() for _ in range(row)]
    else:
        read_all = [LI() for _ in range(row)]
        return map(list, zip(*read_all))



N = I()

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

ans = [0]*(N+1)

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

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

Solution (Python):
def g(x, y, z):
    g_xyz = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
    return g_xyz


N = int(input())
ans_list = [0 for _ in range(60000)]
for x in range(1, 100):
  for y in range(1, 100):
      for z in range(1, 100):
          ans_list[g(x=x, y=y, z=z) - 1] += 1
           
for i in range(N):
    print(ans_list[i])

Solution (Python):
N = int(input())
ans = [0] * 100000
for x in range(1, 100):
    for y in range(1, 100):
        for z in range(1, 100):
            ans[x*x+y*y+z*z+x*y+y*z+z*x-1] += 1
for i in range(N):
    print(ans[i])

Solution (Python):
def f(a,b,c):
    n=(a+b+c)**2 -a*b -b*c -c*a
    return n

N=int(input())

anslist=[0]*1000005

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())
ans=[0]*N
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:
        ans[temp-1]+=1
[print(x) for x in ans]

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

cnt = 0
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
      if f <= n:
        ans[f - 1] += 1
ans.append(cnt)

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

Solution (Python):
import math
N=int(input())
for n in range(1,N+1):
    saidai=math.floor((abs(n-2))**0.5)
    saishou=math.ceil((n//6)**0.5)
    answer=0
    for z in range(saishou,saidai+1):
        if 3+z**2+2*z>n:
            break
        for y in range(1,z+1):
            if y**2+z**2+1+y+z+y*z>n:
                break
            for x in range(1,y+1):
                if x**2+y**2+z**2+x*y+y*z+z*x>n:
                    break

                if x**2+y**2+z**2+x*y+y*z+z*x==n:
                    if x==y==z:
                        answer+=1
                        break
                    elif x==y or y==z or z==x:
                        answer+=3
                        break
                    else:
                        answer+=6
                        break
    print(answer)

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

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

Solution (Python):
N = int(input())
ls = [0]*(N+2)

for i in range(1,100):
    for j in range(1,100):
        for k in range(1,100):
            t = i**2 + j**2 + k**2 + i*j + j*k + k*i 
            if t <= N :
                ls[t] += 1

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

Solution (Python):
import math as m
N=int(input())
ans=[0]*N
if N>5:
    for x in range(1,int(m.sqrt(N-5))+1):
        for y in range(1,x+1):
            if x**2+y**2+x*y+x+y+1>N:
                break
            for z in range(1,y+1):
                if x**2+y**2+x*y+x*z+y*z+z**2>N:
                    break
                if len(list(set([x,y,z])))==3:
                    ans[x**2+y**2+x*y+x*z+y*z+z**2-1]+=6
                elif len(list(set([x,y,z])))==2:
                    ans[x**2+y**2+x*y+x*z+y*z+z**2-1]+=3
                elif len(list(set([x,y,z])))==1:
                    ans[x**2+y**2+x*y+x*z+y*z+z**2-1]+=1

for a in ans:
    print(a)

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

lis = [0] * (n+1)

s = int(n ** 0.5)

for i in range(1, s+1):
    for j in range(1, s+1):
        for k in range(1, s+1):
            t = i**2 + j**2 + k**2 + i*j + j*k + i*k
            tmp = [i,j,k]
            
            if t <= n:
                lis[t] += 1

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