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 _ 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 sys
import numpy as np
import math
import collections
import copy
from collections import deque 
from functools import reduce
from itertools import product



N = int(input())
if N > 100:
    n = int(np.sqrt(N)) + 5
else:
    n = N
n_np = np.zeros(105**3)
for i in range(1, n+1):
    for j in range(1, n+1):
        for k in range(1, n+1):
            idx = i**2 + j**2 + k **2 + i*j + i*k + j*k
            n_np[idx-1] += 1
for i in range(N):
    print(int(n_np[i]))

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

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

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

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

Solution (Python):
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):
            if i * j + j * k + k * i + i * i + j * j + k * k<=n:
                ans[i * j + j * k + k * i + i * i + j * j + k * k] += 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, 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))):
            t = x**2+y**2+z**2+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())
cnt=[0]*(n+1)

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 <=n:
                cnt[tmp]+=1


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

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

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 <=n:
                cnt[tmp]+=1


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

Solution (Python):
import numpy as np

def f(a, b, c): 
    return a*a + b*b + c*c + a*b + b*c + c*a

def tansaku(N, A):
    for i in range(1, 101):
        for j in range(i, 101):
            for k in range(j, 101):
                n = f(i, j, k)
                if(n>N):
                    break;
                if((i==j) and (j==k)):
                    A[n] += 1
                if((i==j) and (j!=k)):
                    A[n] += 3
                if((i!=j) and (j==k)):
                    A[n] += 3
                if((i!=j) and (j!=k)):
                    A[n] += 6
    return A

def main():
    N = int(input())
    A = np.zeros(N+1)
    A = tansaku(N, A)
    for i in range(1,N+1):
        print('{:d}'.format(int(A[i])))


main()

Solution (Python):
import numpy as np

def tansaku(N, A):
    for i in range(1, 101):
        for j in range(i, 101):
            for k in range(j, 101):
                n = i*i + j*j + k*k + i*j + j*k + k*i
                if(n>N):
                    break;
                if((i==j) and (j==k)):
                    A[n] += 1
                if((i==j) and (j!=k)):
                    A[n] += 3
                if((i!=j) and (j==k)):
                    A[n] += 3
                if((i!=j) and (j!=k)):
                    A[n] += 6
    return A

def main():
    N = int(input())
    A = np.zeros(N+1)
    A = tansaku(N, A)
    for i in range(1,N+1):
        print('{:d}'.format(int(A[i])))


main()

Solution (Python):
import math

n = int(input())

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

for i in range(1,math.ceil(math.sqrt(n))):
    for j in range(1,math.ceil(math.sqrt(n))):
        for k in range(1,math.ceil(math.sqrt(n))):
            v = i**2 + j**2 + k**2 + 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]*(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:
                continue
            ans[n] += 1


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

Solution (Python):
N=int(input())
a=[0]*10**4
for j in range(1,101):
    for k in range(1,101):
        for h in range(1,101):
            tmp=h**2+j**2+k**2+h*j+j*k+k*h
            if tmp<=10000:
                a[tmp-1]+=1
for i in range(N):
    print(a[i])

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

Solution (Python):
import sys
from math import ceil

sys.setrecursionlimit(10 ** 7)
rl = sys.stdin.readline


def solve():
    N = int(rl())
    
    ans = [0] * (N + 1)
    for x in range(1, ceil(N ** 0.5) + 1):
        for y in range(1, ceil(N ** 0.5) + 1):
            tmp = x ** 2 + y ** 2 + x * y
            if N <= tmp:
                break
            for z in range(1, ceil(N ** 0.5) + 1):
                n = tmp + z ** 2 + y * z + z * x
                if n <= N:
                    ans[n] += 1
    print(*ans[1:], sep='\n')


if __name__ == '__main__':
    solve()

Solution (Python):
import itertools

N = int(input())
lst = [0]*N
for x,y,z in itertools.product(list(range(1,int(N**0.5))),repeat=3):
    val = x*x + y*y + z*z + x*y + y*z + z*x
    if val <= N:
        lst[val-1] += 1
print(*lst,sep="\n")

Solution (Python):
import math
from queue import PriorityQueue
from sys import stdin,stdout
from collections import defaultdict

def solve():
    n=int(input())
    ans=[0 for _ in range(200050)]
    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+k*j+k*i
                ans[v]+=1
    for i in range(n):
        print(ans[i+1])
    

    
    
    
def main():
    solve()
main()

Solution (Python):
n=int(input())
v=[0]*10001
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+x*z+y*z
      if d>10000:
        continue
      else:
        v[d]+=1
for i in range(n):
  print(v[i+1])

Solution (Python):


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

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

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

Solution (Python):
from itertools import product

N = int(input())

ans = [0] * (N + 1)
for x, y, z in product(range(1, 101), repeat=3):
    f = x**2 + y**2 + z**2 + x * y + y * z + z * x
    if f <= N:
        ans[f] += 1

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

Solution (Python):
def resolve():
    import sys
    sys.setrecursionlimit(10 ** 6)  
    to_index = lambda x: int(x) - 1  
    print_list_in_2D = lambda x: print(*x, sep="\n")  

    
    def input_int():
        return int(input())

    def map_int_input():
        return map(int, input())

    MII = map_int_input

    def MII_split():
        return map(int, input().split())

    def MII_to_index():
        return map(to_index, input())

    def MII_split_to_index():
        return map(to_index, input().split())

    
    def list_int_inputs():
        return list(map(int, input()))

    LII = list_int_inputs

    def LII_split():
        return list(map(int, input().split()))

    
    def LII_2D(rows_number):
        return [LII() for _ in range(rows_number)]

    def LII_split_2D(rows_number):
        return [LII_split() for _ in range(rows_number)]

    import math
    def L(x, y, z):
        return int(x * x + y * y + z * z + x * y + y * z + z * x)

    N = input_int()
    

    ans = [0 for _ in range(N)]
    for x in range(1, 105):
        for y in range(1, 105):
            for z in range(1, 105):
                f = L(x, y, z)

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

    for a in ans:
        print(a)
resolve()

Solution (Python):

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

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

for i in range(1, 101):
    for j in range(1, 101):
        for k in range(1, 101):
            z = i**2+j**2+k**2+i*j+j*k+k*i
            if z <= n:
                memo[z] += 1


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

Solution (Python):
from collections import defaultdict

d = defaultdict(int)
def f():
  global d
  for x in range(1, 10**2+1):
    x2 = x**2
    if x2 >= 10**4:
      break
    for y in range(x, 10**2+1):
      y2 = y**2
      if x2 + y2 >= 10**4:
        break
      for z in range(y, 10**2+1):
        z2 = z**2
        num = x2 + y2 + z2 + x*y + y*z + z*x
        if num > 10**4:
          break
        l = len(set([x, y, z]))
        if l == 1:
            d[num] += 1
        elif l == 2:
            d[num] += 3
        else:
            d[num] += 6
  return True

_ = f()
N = int(input())
ans = []
for i in range(1, N+1):
  ans.append(d[i])

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

Solution (Python):
import math

n = int(input())
ans = {}

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

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

for a in ans.values():
    print(a)

Solution (Python):
import sys


def resolve():
    import numpy as np

    readline = sys.stdin.readline

    N = int(readline())

    f = np.zeros(10001, np.int64)

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

resolve()

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

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

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

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

for x in range(1,101):
    for y in range(1,101):
        for z in range(1,101):
            p = (x+y)*(x+z)+y**2+z**2
            if p > N:
                break
            else:
                lst[p] += 1
for i in range(1,N+1):
    print(lst[i])

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

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

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

Solution (Python):
import itertools
N = int(input())
ans = [0 for i in range(0,N)]
for x, y, z in itertools.product(range(1,int(N**(1/2)+1)),range(1,int(N**(1/2)+1)),range(1,int(N**(1/2)+1))):
    kai = x**2+y**2+z**2+x*y+x*z+y*z
    if 0 < kai <= N:
        ans[kai-1] += 1

print("\n".join(map(str,ans)))

Solution (Python):


N = int(input())

Ans = 0
numlist = [0] * 10001

if int(float(N)**0.5) <= 1:
  rMax = 1
else:
  rMax = int(float(N)**0.5)  

for x in range(1,rMax+1):
  for y in range(1,rMax+1):
    for z in range(1,rMax+1):
      Ans = x**2 + y**2 + z**2 + (x * y) + (y * z) + (z * x)
      if Ans <= 10000:
        numlist[Ans] += 1
  
for r in range(1,N+1):
  print(numlist[r])

Solution (Python):
n=int(input())
d={}
for i in range(1,100):
    for j in range(i,100):
        if i**2>n or j**2>n: break
        for k in range(j,100):
            tmp=i**2+j**2+k**2+i*j+j*k+k*i
            if tmp>n: break
            if i==k: x=1
            elif i==j or j==k: x=3
            else: x=6
            if tmp in d: d[tmp]+=x
            else: d[tmp]=x
for i in range(1,n+1):
    if i in d: print(d[i])
    else: print(0)

Solution (Python):
import numpy as np


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

    ans = np.zeros(10050, int)

    for x in range(1, 105):
        for y in range(1, 105):
            for z in range(1, 105):
                fx = x ** 2 + y ** 2 + z ** 2 + x*y + y*z + z*x
                if fx < 10050:
                    ans[fx] += 1
    for i in range(N):
        print(ans[i+1])


if __name__ == "__main__":
    main()

Solution (Python):
n=int(input())
d={}
for i in range(1,100):
    if i**2>n: break
    for j in range(i,100):
        if j**2>n: break
        for k in range(j,100):
            tmp=i**2+j**2+k**2+i*j+j*k+k*i
            if tmp>n: break
            if i==k: x=1
            elif i==j or j==k: x=3
            else: x=6
            if tmp in d:
                d[tmp]+=x
            else:
                d[tmp]=x
for i in range(1,n+1):
    if i in d: print(d[i])
    else: print(0)

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

for x in range(1,105):
  for y in range(1,105):
    for z in range(1,105):
      v = x**2 + y**2 + z**2 + z*x + y*z + x*y
      if v <= 10001:
        cont[v]+=1

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

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

for x in range(1,105):
  for y in range(1,105):
    for z in range(1,105):
      v = x**2 + y**2 + z**2 + z*x + y*z + x*y
      if v <= 10001:
        cont[v]+=1

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

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

result = [0] * (N + 1)
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 > N:
                break
            result[n] += 1

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

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

t = [0] * (N + 1)
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 > N:
                break
            t[n] += 1

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

Solution (Python):



def main():
    N = int(input())
    
    ret =[0]*(N+1)
    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:
                    ret[n] += 1
    for i in ret[1:N+1]:
        print(i)

if __name__ == '__main__':
    main()

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

Solution (Python):

import sys
import math
import collections


def II(): return int(sys.stdin.readline())


def MI(): return map(int, sys.stdin.readline().split())


def LI(): return list(map(int, sys.stdin.readline().split()))


def main():
    N = II()
    list_counter = collections.Counter()

    for i in range(1, math.floor(N**(1/2))+1):
        for j in range(1,  math.floor(N**(1/2))+1):
            for k in range(1,  math.floor(N**(1/2))+1):
                n = i**2 + j**2 + k**2 + i*j + j*k + k*i
                list_counter.update({n: 1})

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


    
    
main()

Solution (Python):
import sys
import itertools as itr
readline = sys.stdin.buffer.readline
N=int(readline())
n=int(pow(N,0.5))
chk=list(itr.product(range(1,n),repeat=3))
cnt=[0]*(N+1)
for c in chk:
  i=c[0]
  j=c[1]
  k=c[2]
  if i*i+j*j+k*k+i*j+j*k+k*i<=N:
    cnt[i*i+j*j+k*k+i*j+j*k+k*i]+=1
for i in range(1,N+1):
  print(cnt[i])

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

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

Solution (Python):
import sys
import itertools as itr
readline = sys.stdin.buffer.readline



N=int(readline())
n=int(pow(N,0.5))
chk=list(itr.product(range(1,n),repeat=3))
cnt=[0]*(N+1)
for _ in range(len(chk)):
  i=chk[_][0]
  j=chk[_][1]
  k=chk[_][2]
  if pow(i,2)+pow(j,2)+pow(k,2)+i*j+j*k+k*i<=N:
    cnt[pow(i,2)+pow(j,2)+pow(k,2)+i*j+j*k+k*i]+=1
          

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

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

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 + i * j + j * k + k * i <= n:
                answer[i ** 2 + j ** 2 + k ** 2 + i * j + j * k + k * i - 1] = answer[i ** 2 + j ** 2 + k ** 2 + i * j + j * k + k * i - 1] + 1
for i in range(n):
    print(answer[i])

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]*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):
            tmp_n = x*y+x*z+y*z+x**2+y**2+z**2
            if tmp_n <= n:
                ans[tmp_n-1] += 1
for a in ans:
    print(a)

Solution (Python):
n = int(input())
ans = [0]*10005
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 <= n:
                ans[s] += 1

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

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

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

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
            num[ans] += 1
            
print(*num[1:N+1], sep ='\n')

Solution (Python):
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)+2):
       for k in range(1, int(N**0.5)+2):
            f = i*i + j*j + k*k +i*j + j*k + k*i
            if f <= N:
                ans[f] += 1
print(*ans[1:], sep='\n')

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

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


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


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

for x in range(1, 100):
	for y in range(1, 100):
		for z in range(1, 100):
			i = calc(x, y, z)
			
			if i > N:
				break
			else:
				ans[i] += 1

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

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

N = int(readline())

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

Solution (Python):

n=int(input())
ans=[0 for i in range(10500)]
for i in range(1,105):
  for j in range(1,i+1):
    for k in range(1,j+1):
      sumg=(i+j)**2+(j+k)**2+(k+i)**2
      if sumg<21000:
        if i==j and j==k:
          ans[int(sumg/2)]+=1
        elif i!=j and j!=k and k!=i:
          ans[int(sumg/2)]+=6
        else:
          ans[int(sumg/2)]+=3
for i in range(n):
  print(ans[i+1])

Solution (Python):
from math import sqrt
n = int(input())
sqn_int = int(sqrt(n))
a = [0] * n
for x in range(1, 1 + sqn_int):
    for y in range(1, 1 + sqn_int):
        for z in range(1, 1 + sqn_int):
            left = x**2 + y**2 + z**2 + x*y + y*z + z*x
            if left <= n:
                a[left - 1] += 1
for i in a[:n]:
    print(i)

Solution (Python):
n = int(input())
L = [0]*(110**2*6+1)

for i in range(1,110):
    for j in range(1,110):
        for k in range(1,110):
            a = i**2 + j**2 + k**2 + i*j +j*k + k*i
            if a <= n:
                L[a-1] +=1
for i in range(n):
    print(L[:n+1][i])

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

from collections import defaultdict
res = defaultdict(list)



limit = int(10000**.5)+1
for x in range(1, limit):
    for y in range(1, limit):
        for z in range(1, limit):
            f = x**2 + y**2 + z**2 + x*y + y*z + z*x
            res[f].append((x,y,z))

for i in range(1, N+1):
    
    print(len(set(res[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):
import collections
import sys
input=sys.stdin.readline

n=int(input())
ans=[0]*n
tmp=[]
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):
           tmp.append(x**2+y**2+z**2+x*y+y*z+z*x)
cnt=collections.Counter(tmp) 
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):
import sys
from math import ceil

sys.setrecursionlimit(10 ** 7)
rl = sys.stdin.readline


def solve():
    N = int(rl())
    
    ans = [0] * (N + 1)
    for x in range(1, ceil(N ** 0.5) + 1):
        for y in range(1, ceil(N ** 0.5) + 1):
            for z in range(1, ceil(N ** 0.5) + 1):
                n = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
                if n <= N:
                    ans[n] += 1
    print(*ans[1:], sep='\n')


if __name__ == '__main__':
    solve()

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

counts = [0 for i in range(N+1)]

for i in range(1,150):
    for j in range(1,150):
        for k in range(1,150):
            now = i**2 + j**2 + k**2 + i*j + j*k + k*i
            try:
                counts[now] += 1
            except:
                pass
for i in range(1,N+1):
    print(counts[i])

Solution (Python):
import math

n = int(input())
ans_list = [0 for i in range(n+1)]

for i in range(1,101):
    for j in range(1, 101):
        for k in range(1, 101):
            temp = i*i + j*j + k*k + i*j + j*k + k*i
            if temp <= n:
                ans_list[temp] += 1

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

Solution (Python):
import sys
import numpy as np
import math
import collections
import copy
from collections import deque 
from functools import reduce
from itertools import product



N = int(input())
ans = [0 for _ in range(105**3)]
for i in range(1, 105):
    for j in range(1, 105):
        for k in range(1, 105):
            idx = i**2 + j**2 + k **2 + i*j + i*k + j*k
            ans[idx-1] += 1
for i in range(N):
    print(ans[i])

Solution (Python):
import sys
import numpy as np
import math
import collections
import copy
from collections import deque 
from functools import reduce
from itertools import product



N = int(input())
n_np = np.zeros(105**3)
for i in range(1, 105):
    for j in range(1, 105):
        for k in range(1, 105):
            idx = i**2 + j**2 + k **2 + i*j + i*k + j*k
            n_np[idx-1] += 1
for i in range(N):
    print(int(n_np[i]))

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

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

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

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

if __name__ == "__main__":
    main()

Solution (Python):

from collections import Counter


def main():
    N = int(input())
    calc = lambda x, y, z: x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
    lim = int(N ** 0.5) + 1
    cnt = Counter(
        calc(i, j, k)
        for i in range(1, lim + 1)
        for j in range(1, lim + 1)
        for k in range(1, lim + 1)
    )
    res = [cnt[i] for i in range(1, N + 1)]
    print("\n".join(map(str, res)))


if __name__ == "__main__":
    main()

Solution (Python):

from collections import Counter


def main():
    N = int(input())
    calc = lambda x, y, z: x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
    cnt = Counter(
        calc(i, j, k)
        for i in range(1, 101)
        for j in range(1, 101)
        for k in range(1, 101)
    )
    res = [cnt[i] for i in range(1, N + 1)]
    print("\n".join(map(str, res)))


if __name__ == "__main__":
    main()

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

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

Solution (Python):
import numpy as np

N = int(input())


ans = np.zeros(int(1e+5),dtype = int)
for x in range(1,int(N**0.5+1)):
  for y in range(x,int((N-x**2)**0.5+1)):
    for z in range(y,int((N-x**2-y**2)**0.5+1)):
      n = x**2 + y**2 + z**2 +x*y+y*z+z*x
      num = len({x,y,z})
      if num == 1:
        ans[n] += 1
      elif num == 2:
        ans[n] += 3
      elif num == 3:
        ans[n] += 6

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

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

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

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

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

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

ans = [0 for _ in range(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


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

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

n= int(input())

tmp = []

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):
            tmp.append(x**2+y**2+z**2+x*y+y*z+z*x)
cnt = collections.Counter(tmp)

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

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

n=int(input())
ans=[0]*n
tmp=[]
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):
           tmp.append(x**2+y**2+z**2+x*y+y*z+z*x)
cnt=collections.Counter(tmp) 
for i in range(1,n+1): 
   print(cnt[i])

Solution (Python):
import sys
sys.setrecursionlimit(1000000000)
input = sys.stdin.readline
n=int(input())

a=[0]*(n)
for j in range(1,n+1):
    for k in range(1,n+1):
        for l in range(1,n+1):
            if j**2+k**2+l**2+j*k+k*l+l*j>n:
                break
            else:
                a[j**2+k**2+l**2+j*k+k*l+l*j-1]+=1

for i in a:
    print(i)

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

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

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

Solution (Python):
import math
def equal(x,y,z):
    return x**2 + y**2 + z**2 +x*y+y*z+z*x

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

Solution (Python):

N = int(input())

count = [0] * 10050
for j in range(1, 105):
    for k in range(1, 105):
        for l in range(1, 105):
            v = (j+k+l) ** 2 - (j*k + k*l + l*j)
            if v < 10050:
                count[v] += 1

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