peterverebics/CodeNet_Python_118 huggingface dataset:
import math
import itertools
import sys
input = sys.stdin.readline


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


N = int(input())
NL = []
for x in range(1, 100):
    for y in range(1, 100):
        for z in range(1, 100):
            NL.append(f(x, y, z))
for i in range(1, N):
    print(NL.count(i))
n = int(input())
for i in range(1,n+1):
    ans = 0
    for x in range(37):
        for y in range(37):
            for z in range(37):
                if (x+y+z)**2 -(x*y+y*z+z*x) == i and x>=1 and y>=1 and z>=1:
                    ans += 1
    print(ans)
def main():
    n = int(input())
    for i in range(n):
        calc(i)

def calc(n):
    count = 0
    for x in range(1, n + 1):
        for y in range(1, n + 1):
            for z in range(1, n + 1):
                if x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x == n:
                     count += 1
    print(count)
    return

if __name__ == '__main__':
    main()
import sys
import itertools
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines


n = int(readline())
# n = 1700 ** 0.5
# print(n)

l = [0]*(10**5)
for x in range(1, 50):
    for y in range(1, 50):
        for z in range(1, 50):
            i = x ** 2 + y ** 2 + z ** 2 + x*y + y*z + z*x
            l[i] += 1

for j in range(1, n+1):
    print(l[j])
N = int(input())
ans = [0] * 10000

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

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

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

            if f > N:
                break

for i in range(N):
    print(ans[i])
N = int(input())
cnt = 0
for i in range(1, N+1):
  for x in range(100):
    for y in range(100):
      for z in range(100):
        if (x+y)^2 + (y+z)^2 + (z+x)^2 == 2*i:
          cnt += 1
  print(cnt)
n=int(input())
ls=[0]*n
x=1
y=1
z=1
p=6
m=int(n**0.5)
for x in range(1,m):
  for y in range(1,x+1):
    for z in range(1,y+1):
      k=3
      if x==y and x==z:
        k=1
      j=x*x+y*y+z*z+x*y+y*z+x*z
      if j<=n:
        ls[j-1]=k
      else:
        break
for i in ls:
  print(i)
n=int(input())
def f(i):
  co=0
  for z in range(1,5):
    for y in range(1,5):
      for x in range(1,5):
        if x**2+y**2+z**2+z*y+z*x+y*x==i:
          co+=1
  return co
for i in range(1,n+1):
  co=f(i)
  print(co)
n = int(input())

for i in range(1, n+1):
    cnt = 0
    for x in range(1, 31):
        for y in range(1, 31):
            for z in range(1, 31):
                
                if i == ((x+y+z)**2 - z*(x+y) - (x*y)):
                    cnt += 1

    print(cnt)
N = int(input())

ans = [0]*(N+1)

for i in range(1, int(N**0.5)+1):
    for j in range(1, 101 - i):
       for k in range(1, 101 - i - j):
            f = i*i + j*j + k*k +i*j + j*k + k*i
            if f <= N:
                ans[f] += 1
print(*ans[1:], sep='\n')
N=int(input())
for n in range(N):
    ans = 0
    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)):
                if i**2+j**2+k**2+i*j+j*k+k*i==n:
                    ans += 1
    print(ans)
from itertools import combinations_with_replacement
N = int(input())
choise = [1]
for i in range(1,N+1):
    if (choise[-1]*6) < i:
        choise.append(choise[-1]+1)
    for j in combinations_with_replacement(choise,3):
        n = j[0]**2+j[1]**2+j[2]**2+j[0]*j[1]+j[1]*j[2]+j[0]*j[2]
        if n == i:
            if j[0]==j[1] and j[1]==j[2]:print(1)
            else:print(3)
            break
N=int(input())
sum=[0]*N
for x in range(1,N):
    for y in range(1,N):
        for z in range(1,N):
            a=x*x+y*y+z*z+x*y+y*z+x*z
            if a<=N:
                sum[a-1]=sum[a-1]+1

for i in range(N):
    print(sum[i-1])
import math

n = int(input())

cnts = [0] * (n + 1)
for s in range(int(math.sqrt(n)) + 1 + 1):
  for x in range(1, s + 1):
    for y in range(1, s - x + 1):
      z = s - x - y
      if 1 <= z:
        f = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
        if 1 <= f <= n:
          cnts[f] += 1

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

ans = [0]*(N+1)

for i in range(1, int(N**0.5)+1):
    for j in range(1, 101 - i):
       for k in range(1, 101 - i - j):
            f = i*i + j*j + k*k +i*j + j*k + k*i
            if f <= N:
                ans[f] += 1
print(*ans, sep='\n')
import math
n=int(input())
z=0
d=0
ans=0
for i in range(1,n+1):
  for x in range(1,int(math.sqrt(n)+1)):
    d=4*x*x-4*(3*x*x-i)
    if d<0:
      continue
    z=(math.sqrt(d)-2*x)/2
    if z.is_integer():
      if x==int(z) and int(z)>=1:
        ans+=1
        continue
      elif int(z)>=1:
        ans+=3
        continue
    else:
      continue
  print(ans)
  ans=0
import math
import sys
N = int(sys.stdin.readline())
for i in range(1,N+1):
  ans = 0
  n = math.ceil(math.sqrt(i))
  for j in range(1,n):
    wan = n - j
    for k in range(1,wan):
      n_sub = i -j*j - k*(j + k)
      if n_sub <= 0:
        break
      b = j + k
      check = ((b**2 + 4*n_sub) ** (1/2) - b)
      if check % 2 == 0:
        ans +=1
        break
  print(ans)
from itertools import product

n = int(input())
pro = product([x for x in range(1,5)],repeat=3)
lst = [0]*n
for p in pro:
    for i in range(1,n+1):
        if ((p[0]**2) + (p[1]**2) + (p[2]**2) + (p[0]*p[1]) + (p[1]*p[2]) + (p[2]*p[0])) == i:
            lst[i-1]+=1
for i in lst:
    print(i)
#C
n = int(input())

f = [0 for _ in range(10**5)]

for i in range(1,60):
    for j in range(1,60):
        for k in range(1,60):
            f[i**2 + j**2 + k**2 + i*j + j*k + k*i] += 1

for l in range(n):
    print(f[l+1])
N = int(input())
ans = [0 for _ in range(N + 1)]

for x in range(1, 100):
  for y in range(1, 100):
    for z in range(1, 100):
      v = x * x + y * y + z * z  + x * y + y * z + z * x
      if v > N:
        continue
      ans[v] += 1

for i in range(N):
  print(ans[i])
#!/usr/bin/env python3

import math

n = int(input())

result = [0] * (n + 1)
border = int(math.sqrt(n) / 2) + 1 + 1
for x in range(1, border):
    for y in range(1, border):
        for z in range(1, border):
            r = ((x + y) ** 2 + (y + z) ** 2 + (z + x) ** 2) // 2
            if r > n:
                break
            else:
                result[r] += 1

for num in result[1::]:
    print(num)
def main():
    n = int(input())
    res = [0]*(n+1)

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


    for i in range(1,n+1):
        print(res[i])
if __name__ == '__main__':
    main()
#! python3
# coding:utf-8
 
def main():
    n = int(input())
    ans = [0 for _ in range(n)]
    for x in range(1,100):
        for y in range(1,100):
            for z in range(1,100):
                eq = x**2 + y**2 + z**2 + x*y + y*z + z*x
                if eq < n+1:
                    ans[eq-1]+=1
    print(ans)
    for i in range(len(ans)):
        print(i,ans[i])    

if __name__ == "__main__":
    main()
def main():
    n = int(input())
    f = [0 for i in range(n+1)]
    Max = n**0.5
    Max = int(Max//1) +1 
    for x in range(1,Max):
        for y in range(1,Max):
            for z in range(1,Max):
                tmp = x**2+y**2+z**2+x*y+y*z+x*z
                if tmp<n:
                    f[tmp] += 1
    for i in range(1,n+1):
        print(f[i])

main()
N = int(input())
cnt = 0
for i in range(1, N+1):
  for x in range(10):
    for y in range(10):
      for z in range(10):
        if (x+y)^2 + (y+z)^2 + (z+x)^2 == 2*i:
          cnt += 1
print(cnt)
N=1000
for i in range(N):
    ret=0
    x=1
    y=1
    z=1
    while x*x+y*y+z*z+x*y+y*z+z*x <= i: 
        if x*x+y*y+z*z+x*y+y*z+z*x==i:
            ret=ret+1
        if x==y:
            x+=1
        elif y==z:
            y+=1
        else :
            z+=1
    print(ret)
### Problem C
import math

N = int(input())
rt = []

for i in range(1,N+1):
    if i <= 3000:
        rt.append(int(math.sqrt(i)))
    elif i > 3000:
        rt.append(int(math.sqrt(i)/1.4))

for x in range(0,N):
    cnt = 0
    for i in range(1,rt[x]):
        for j in range(1,rt[x]):
            for k in range(1,rt[x]):
                if (i + j + k)**2 == x + (i*j + j*k + k*i):
                    cnt += 1
    print(cnt)
import itertools
n = int(input())
N = 1
while N**2 < n:
    N += 1
if N ** 2 > n: N-=1
ans = [0] * n

for x,y,z in itertools.combinations_with_replacement(list(range(1,N+1)), 3):
    a = x**2+y**2+z**2 + x*y+y*z+z*x
    if a > n: continue
    if x==y==z: b = 1
    elif x==y or x==z or y==z: b = 3
    elif x!=y and y!=z and x!=z: b = 6
    ans[a-1] = b
for i in ans: print(i)
from collections import defaultdict
n = int(input())

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

for i in range(n):
    print(res.get(i, 0))
N = int(input())
record = [0] * 1000000

for i in range(1,N+1):
    for j in range(1,N+1):
        sum = i**2 + i**2 + j**2 + i*i + i*j +j*i
        if sum >= N: break
        # print(i,j)
        if i==j: record[sum] += 1
        else: record[sum] += 3


for num in record[1:N+1]:
    print(num)
N = int(input())

keys = [i for i in range(1, N+1)]
values = [0] * N
count_dict = dict(zip(keys, values))

for x in range(1, N//6+7):
    for y in range(x, N//6+7):
        for z in range(y, N//6+7):
            n = x**2 + y**2 + z**2 + x*y + y*z + z*x
            if n > N:
                break
            count_dict[n] += 3
            if x == y and y == z:
                count_dict[n] -= 2

for v in count_dict.values():
    print(v)
def f(n):
    cnt = 0
    for x in range(1,5):
        for y in range(1, 5):
            for z in range(1,5):
                if (((x**2 )+(y**2) +(z**2) +x*y +y*z+ z*x)) == n:
                    cnt += 1

    return cnt
N=int(input())
for i in range(1,N+1):
    print(f(i))
from collections import defaultdict
n = int(input())
d = defaultdict(int)
for i in range(1, 33):
  for j in range(1, 33):
    for k in range(1, 33):
      d[i ** 2 + j ** 2 + k ** 2 + i * j + j * k + i * k] += 1
for i in range(n):
  print(d[i + 1])
from itertools import product
from math import *

N = int(input())
pro = list(product(range(1, int(sqrt(N))), repeat=3))

for i in range(1, N+1):
    ans = 0
    for j in range(len(pro)):
        x = pro[j][0]; y = pro[j][1]; z = pro[j][2]
        if x*x + y*y + z*z + x*y + y*z + z*x == i:
            ans += 1
    print(ans)

print(pro, len(pro))
N=int(input())

for i in range(1, N+1, 1):
    print(len([[x,y,z] for x in range(1,(i+1)%6,1) for y in range(1,i-x*x,1) for z in range(1,i-x*x-y*y-x*y,1) if x*x+y*y+z*z+x*y+y*z+z*x == i]))
from collections import defaultdict
from sys import stdin


def main():
    input = lambda: stdin.readline()[:-1]
    N = int(input())

    ans = defaultdict(int)
    for x in range(1, 101):
        for y in range(1, 10):
            for z in range(1, 101):
                n = x * x + y * y + z * z + x * y + y * z + z * x
                ans[n] += 1

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


main()
from math import sqrt
from math import floor
n = int(input())

for i in range(n + 1):
    n2 = floor(sqrt(i))
    ans = 0
    for x in range(1, n2):
        for y in range(1, n2):
            for z in range(1, n2):
                if i == pow(x, 2) + pow(y, 2) + pow(z, 2) + x * y + y * z + z * x:
                    ans += 1
    print(ans)
n = int(input())
from itertools import product
l = list(range(1, 100+1))
f = [0 for _ in range(11000)]
def func(x,y,z):
    return x**2 + y**2 + z**2 + x*y + y*z + z*x
for x, y, z in product(l, l, l):
    v = func(x,y,z)
    if v <= n:
        f[v] += 1
for ans in f[:n+1]:
    print(ans)
N = int(input())
ans = [0] * N
sqrt_N = (int(N**0.5 + 1))

for x in range(1,sqrt_N):
    for y in range(1,sqrt_N):
        for z in range(1,sqrt_N): 
            print(x,y,z)
            xyz = (x**2)+(y**2)+(z**2)+(x*y)+(y*z)+(z*x)
            if xyz <= N:
                ans[xyz - 1] = ans[xyz - 1] + 1

[print(i) for i in ans]
import math
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):
            t = x**2 + y**2 + z**2 + x*y + y*z + z*x 
            if t < 10000:
                ans[t] += 1
for i in range(1,n+1):
    print(ans[i])
N = int(input().strip())
s=[]
n=int(N**(0.3537))
for a in range (1,n+2):
    for b in range(1,n+2):
        for c in range(1,n+2):
            s.append(a*a+b*b+c*c+a*b+b*c+c*a)
s.sort()

for l in range(1,N+1):
    print(s.count(l))
import math
n=int(input())
z=0
d=0
ans=0
for i in range(1,n+1):
  for x in range(1,int(math.sqrt(n))):
    d=4*x*x-4*(3*x*x-i)
    if d<0:
      continue
    z=(math.sqrt(d)-2*x)/2
    if z.is_integer():
      if x==int(z) and int(z)>=1:
        ans+=1
        continue
      elif int(z)>=1:
        ans+=3
        continue
    else:
      continue
  print(ans)
  ans=0
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 = pow(x,2) + pow(y,2) + pow(z,2) + x*y + y*z + z*x
      if n <= N:
        ans[n] += 1
        
for i in range(1,N):
  print(ans[i])
import math

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

    rn = math.ceil(math.sqrt(N))

    for x in range(1,rn):
        for y in range(1,rn):
            for z in range(1,rn):
                k = x**2 + y**2 + z**2 + x*y + y*z + z*x
                if k <= N:
                    ans[k] += 1
    
    for i in range(len(ans)):
        print(ans[i])
    
main()
n=int(input())

ch=[0]*10001

for i in range(1,100):
  for j in range(1,100):
    for k in range(1,100):
      x=i**2+j**2+k**2+i*j+j*k+k*i
      if x<10000:
        ch[x]+=1
for i in range(n):
  print(ch[i+1])
N = int(input())
ans = list()

for i in range(N+1):
    ans.append(0)

for x in range(1,105):
    for y in range(1,105):
        for z in range(1,105):
            tmp = x**2 + y**2 + z**2 + x*y + y*z + z*x
            if tmp < N:
                ans[tmp] += 1
for i in range(N):
    print(ans[i+1])
from itertools import combinations_with_replacement

n = int(input())

for i in range(1, n+1):
    ans = 0
    for v in combinations_with_replacement(range(1, 22), 3):        
        x, y, z = v

        if x**2 + y**2 + z**2 + x*y + y*z + z*x == i:
            if x == y == z:
                ans = 1
            else:
                ans = 3
            break

    print(ans)
n = int(input())
ans = []

for i in range(1, n + 1):
  cnt = 0
  for x in range(1, 50):
    for y in range(x, 50):
      for z in range(y, 50):
        if (x + y) ** 2 + (y + z) ** 2 + (z + x) ** 2 == i * 2:
          if (x == y and y != z) or (x != y and y == z) or (z == x and z != y):
            cnt += 3
          elif x == y == z:
            cnt += 1
          else:
            cnt += 6
  ans.append(cnt)
for j in range(n):
  print(ans[j])
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*x+x*z
			if v>n:
				break
			ans[v-1]+=1

print(*ans)
n = 20
answer_list = []
for x in range(1, 99, 1):
    for y in range(1, 99, 1):
        for z in range(1, 99, 1):
            formula = (x+y+z)**2 - (x*y + y*z + z*x)
            if formula >= n:
                continue
            else:
                answer_list.append(formula)
answer_list = sorted(answer_list)
for i in range(0, n, 1):
    print(answer_list.count(i))
N = int(input())

cnt = 0

for n in range(1,N+1):
    for z in range(1,36):
        for y in range(1,36):
            for x in range(1,36):
                if x*x+y*y+z*z+x*y+y*z+z*x == n:
                    cnt +=1
    print(cnt)
    cnt=0
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:
    print(ans)
n = int(input())
ans = []

for i in range(1, n + 1):
  cnt = 0
  for x in range(1, 50):
    for y in range(x, 50):
      for z in range(y, 50):
        if (x + y) ** 2 + (y + z) ** 2 + (z + x) ** 2 == i * 2:
          if (x == y and y != z) or (x != y and y == z):
            cnt += 3
          elif x == y == z:
            cnt += 1
          else:
            cnt += 6
  ans.append(cnt)
for j in range(n):
  print(ans[j])
import numpy as np
n = int(input())
res = [0]*(n+1)
for i in range(1,100):
    for j in range(1,100):
        for k in range(1,100):
            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):
    print(res[i])
N = int(input())
ans = [0]*N
n = int((N)**(0.5))+1
for x in range(1, n):
    for y in range(1, n):
        for z in range(1, n):
            i = x**2+y**2+z**2+x*y+x*z+y*z
            if i > N-1:
                break
            else:
                ans[i-1] += 1
for a in ans:
    print(a)
n = int(input())
for l in range(n):
    c=0
    for i in range(n):
        for j in range(n):
            for k in range(n):
                if i>=1 and j>=1 and k>=1:
                    m = i*i+j*j+k*k+i*j+j*k+k*i
                    if m == l:
                        c += 1
    print(c)
N = int(input())


d={}


for a in range(100):
	for b in range(100):
		z=(a+1)**2+(b+1)**2+(a+1)*(b+1)
		for c in range(100):
			gokei=z+(c+a+3+b)*(c+1)
			if gokei in d:
				d[gokei]+=1
			else:
				d[gokei]=1

for i in range(N):
	if i in d:
		print(d[i])
	else:
		print(0)
n = int(input())

a = [0] * 10010

# x,y,z
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 + y*z + z*x > n:
        continue
      a[x*x + y*y + z*z + x*y + y*z + z*x] += 1


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

for x in range(1, 9):
    for y in range(1, 9):
        for z in range(1, 9):
            tmp = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
            if tmp <= 100:
                ans_list.append(tmp)

N = int(input())

ans_list = sorted(ans_list)
ans_set = set(ans_list)

for i in range(1, N + 1):
    if i in ans_set:
        print(ans_list.count(i))
    else:
        print(0)
N=int(input())

Z=[0]*10005
for i in range(1,102):
    for j in range(1,102):
        for k in range(1,102):
            n=i**2+j**2+k**2+i*j+j*k+k*i
            if n<=N:
                Z[n]+=1
for i in range(N+1):
    print(Z[i])
n=int(input())
ans=0
for N in range(1,n+1):
  for i in range(1,10**2+1):
    for j in range(1,10**2+1):
      for k in range(1,10**2+1):
        if (i+j)**2+(j+k)**2+(k+i)**2==2*N:
          ans+=1
  print(ans)
n = int(input())
cnt = [0]*(10**4+1)

for i in range(1,50):
  for j in range(1,50):
    for k in range(1,50):
      v = (i**2)+(j**2)+(k**2)+i*j+j*k+k*i
      if v<10**4:
        cnt[v] += 1
for i in range(1,n+1):
  print(cnt[i])
N = int(input())

dp = [0 for _ in range(N+1)]
for x in range(1,int(N**0.5)+1):
    if x * x > N:
        continue
    for y in range(1,int(N**0.5)+1):
        if x * x + y * y + x * x > N:
            continue
        for z in range(1,int(N**0.5)+1):
            t = x * x + y * y + z * z + x * y + y * z + z * x
            if t <= N:
                dp[t] += 1

for i in range(1,N+1):
    print(dp[i])
n = int(input())
ans = [0 for i in range(n)]

for i in range(1,n+1):
  for x in range(1,33):
    for y in range(1,33):
      for z in range(1,33):
        if x**2+y**2+z**2+x*y+y*z+z*x == i:
          
          ans[i-1]+=1
          
for i in ans:
  print(i)
import itertools

def calc(x, y, z):
  return (x*x + y*y + z*z + x*y + y*z + z*x)
  
N = int(input())

for i in range(1,N):
  output = []
  for x in range(1,i):
    for y in range(1,i):
      for z in range(1,i):
        tmp = calc(x,y,z)
        if tmp==i:
          output.append(tmp)
  print(len(output))
N = int(input())
ans = [0 for _ in range(N+1)]
for x in range(1, int(N**0.5)+1):
    for y in range(1, int(N**0.5)+1):
        for z in range(1, int(N**0.5)+1):
            v = x**2+y**2+z**2+x*y+y*z+z*x
            if v<N:
                ans[v] += 1
print(ans)
for i in range(N):
    print(ans[i+1])
N=int(input())

ans=0
for i in range(1,N):
    for j in range(1,N):
        for k in range(1,N):
            for l in range(1,N):
                if l**2+j**2+k**2+l*j+j*k+k*l==i:
                    ans+=1
    print(ans)
    ans=0
N = int(input())
 
for n in range(N + 1):
  c = 0
  for x in range(1,100):
    for y in range(1,100):
      for z in range(1,100):
        if x**2 + y**2 + z**2 + x*y + x*z + y*z == n:
          c += 1
  print(c)
N = int(input())
ans = [0 for _ in range(N+1)]
for x in range(1, int(N**0.5)+1):
    for y in range(1, int(N**0.5)+1):
        for z in range(1, int(N**0.5)+1):
            v = x**2+y**2+z**2+x*y+y*z+z*x
            if v<N:
                ans[v] += 1
for i in range(N):
    print(ans[i+1])
N = int(input().strip())
s=[]
n=int(N**(0.3535))
for a in range (1,n+2):
    for b in range(1,n+2):
        for c in range(1,n+2):
            s.append(a*a+b*b+c*c+a*b+b*c+c*a)
s.sort()

for l in range(1,N+1):
    print(s.count(l))
N = int(input())

keys = [i for i in range(1, N+1)]
values = [0] * N
count_dict = dict(zip(keys, values))

for x in range(1, N//6+1):
    for y in range(x, N//6+1):
        for z in range(y, N//6+1):
            n = x**2 + y**2 + z**2 + x*y + y*z + z*x
            if n > N:
                break
            count_dict[n] += 3
            if x == y and y == z:
                count_dict[n] -= 2

for v in count_dict.values():
    print(v)
n=int(input())

ans=[0]*10001

for x in range(1,51):
    for y in range(1,51):
        for z in range(1,51):
            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])
n = int(input())
for i in range(1, n):
    ans = 0
    for x in range(1, 100):
        for y in range(1, 100):
            p = i - (x**2 + y**2 + x * y)
            if p <= 0:
                break
            for zz in range(1, p + 1):
                if zz * (zz + x + y) > p:
                    break
                if zz * (zz + x + y) == p:
                    ans += 1
    print(ans)
import math
n = int(input())

for i in range(n):
  count = 0

  rout = int(math.sqrt(i))
  for x in range(1, rout+1):
    for y in range(1, rout+1):
      for z in range(1, rout+1):
        if (x+y)**2 + (y+z)**2 + (z+x)**2 == 2*i:
          count += 1

  print(count)
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(n):
    print(cnt[i])
N = int(input())
L=[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)):
            f=x**2+y**2+z**2+x*y+y*z+z*x
            if f<=N:
                if x==y and x==z:
                    L[f-1]=1
                else:
                    L[f-1]=3
for i in range(N):
    print(L[i])
import itertools
n = int(input())
ans = [0] * n
for x,y,z in itertools.combinations_with_replacement(list(range(1,10**2+1)),3):
    a = x**2 + y**2 + z**2 + x*y + y*z + z*x
    if a > n: continue
    if x==y==z: b = 1
    elif x==y or x==z or y==z: b = 3
    else: b = 6
    ans[a-1] = b
for i in ans: print(i)
N = int(input())

cnt = 0

for n in range(1,N+1):
    for z in range(1,35):
        for y in range(1,35):
            for x in range(1,35):
                if x*x+y*y+z*z+x*y+y*z+z*x == n:
                    cnt +=1
    print(cnt)
    cnt=0
import itertools
n=int(input())
mylist=[0]*n
a=1
while(6*(a**2)<n):
    a+=1
l=list(range(1,3*a-1))
for c in itertools.product(l,repeat=3):
    sum_num=sum(c)**2-(c[0]*c[1]+c[1]*c[2]+c[2]*c[0])
    if sum_num<n:
        mylist[sum_num-1]+=1
for i in mylist:
    print(i)
n = int(input())
ans = [0 for _ in range(10**4 + 100)]
for x in range(1, 100):
    for y in range(1, 100):
        for z in range(1, 100):
            p = x**2 + y**2 + z**2 + x * y + y * z + z * x
            if p <= 10**4:
                ans[p] += 1
for i in range(n + 1):
    print(ans[i])