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):
from math import sqrt, floor

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

k = floor(sqrt(N))
for x in range(1, k):
    for y in range(1, k):
        for z in range(1, k):
            c = x*x + y*y + z*z + x*y + y*z + z*x
            if 1 <= c <= N:
                d[c] += 1


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

Solution (Python):
n=int(input())
A=[0]*(n+1)
for x in range(1,101):
    for y in range(1,101):
        if x**2+y**2+x*y>n :break
        for z in range(1,101):
            qq= x**2+y**2+z**2+x*y+y*z+z*x 
            if qq>n:break
            A[qq]+=1
print(*A[1:],sep="\n")

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

f=[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:
                f[temp]+=1

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

Solution (Python):
from math import sqrt, floor

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

k = floor(sqrt(N))
for x in range(1, k):
    for y in range(1, k):
        for z in range(1, k):
            c = x*x + y*y + z*z + x*y + y*z + z*x
            if 1 <= c <= N:
                d[c] += 1


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

Solution (Python):
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
from math import sqrt
from collections import defaultdict
def main():
    n = int(input())
    n2 = int(sqrt(n) + 1)
    d1 = defaultdict(int)

    for i1 in range(1, n2):
        for i2 in range(1, n2):
            for i3 in range(1, n2):
                
                p = i1 ** 2 + i2 ** 2 + i3 ** 2 + i1 * i2 + i2 * i3 + i1 * i3
                d1[p] += 1

    for j1 in range(1, n + 1):
        print(d1[j1])

if __name__ == '__main__':
    main()

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

for x in range(1 , search):
  for y in range(1 , search):
    for z in range(1 , search):
      con = x*(x + y + z) + y*y + z*z + y*z
      if con <= N:
        ans[con] += 1
      else:
        break

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

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

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

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

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

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

ans = [0]*(N+1)


upper = int(math.sqrt(N)) + 1

for x in range(1, upper+1):
    for y in range(1, upper + 1):
        for z in range(1, upper + 1):
            v = f(x,y,z)
            if v <= N:
                ans[v] += 1
            else:
                break

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

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

n = int(input())
res = [0] * 100000
count = 0
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 > 10001:
                break
            if ans <= 10000:
                res[ans] += 1

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

Solution (Python):
c=[0 for i in range(10000)]

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+z*y+y*x+x*z
      if n<=10000:
        c[n-1]+=1
print("\n".join(list(map(str,c))[:int(input())]))

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

    count_list = [0] * n
    upper = int(n**0.5) + 2
    for x in range(1, upper):
        for y in range(1, upper):
            for z in range(1, upper):
                num = x**2 + y**2 + z**2 + x*y + y*z + z*x
                if num <= n:
                    count_list[num-1] += 1
    for count in count_list:
        print(count)


if __name__ == '__main__':
    main()

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

a = [0]*10001

for x in range(1, 101):
  for y in range(1, 101):
    for z in range(1,101):
        v = x*x+y*y+z*z+x*y+y*z+x*z
        if  v < 10001:
        	a[v] += 1
for i in range(n):
  print(a[i+1])

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):
            tmp = i*i + j*j + k*k + i*j + j*k + i*k
            if tmp <= n:
                ans[tmp] += 1

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

Solution (Python):
def main():
    n = int(input())
    d = dict()
    for i in range(1, 10001):
        d[i] = 0
    for x in range(1, 101):
        for y in range(1, 101):
            for z in range(1, 101):
                r = x**2+y**2+z**2+x*y+y*z+z*x
                if r <= 10000:
                    d[r] += 1
    for i in range(1, n+1):
        print(d[i])


main()

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


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


for i in range(1, N):
    for j in range(1, N):
        for k in range(1, N):
            x = calc(i, j, k)
            if x > N:
                break
            Ans[x] += 1

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

Solution (Python):

from sys import stdin, stdout

def input():
	a = stdin.readline()
	if a[-1] == "\n": a = a[:-1]
	return a
def print(*argv, end="\n", sep=" "):
	n = len(argv)
	for i in range(n):
		if i == n-1: stdout.write(str(argv[i]))
		else: stdout.write(str(argv[i]) + sep)
	stdout.write(end)

mod = 10**9+7
def lcm(x, y): return (x * y) / (gcd(x, y))
def comb(lst, x):
	from itertools import combination as c
	return list(comb(lst, x))
def fact(x, mod=mod):
	ans = 1
	for i in range(1, x+1): ans = (ans * i) % mod
	return ans
def arr2D(n, m, default=0):
	lst = []
	for i in range(n): temp = [default] * m; lst.append(temp)
	return lst
def sortDictV(x): return {k: v for k, v in sorted(x.items(), key = lambda item : item[1])}
def smaller(lst, x): return bisect_left(lst, x) -1
def smallerEq(lst, x): return bisect_right(lst, x) -1

def solve(n):
	lst = [0] * 10000
	for i in range(1, 101):
		for j in range(1, 101):
			for k in range(1, 101):
				val = (i**2) + (j**2) + (k**2) + (i*j) + (i*k) + (j*k)
				if val >= 1 and val <= 10000:
					lst[val-1] += 1
	for i in range(0, n):
		print(lst[i])

n = int(input())
solve(n)

Solution (Python):
import sys
def input(): return sys.stdin.readline().rstrip()
def f(x,y,z):
    return x**2 + y**2 + z**2 + x*y + y*z + z*x
def main():
    n = int(input())
    A = [0]*(n+1)
    for x in range(1,100):
        for y in range(x, 100):
            for z in range(y, 100):
                num = f(x,y,z)
                if num > n:
                    break
                if x == y and y == z:
                    A[num] += 1
                elif x == y or y == z or z == x:
                    A[num] += 3
                else:
                    A[num] += 6
    for i in range(1,n+1):
        print(A[i])

if __name__=='__main__':
    main()

Solution (Python):
import sys
def input(): return sys.stdin.readline().rstrip()
def f(x,y,z):
    return x**2 + y**2 + z**2 + x*y + y*z + z*x
def main():
    n = int(input())
    A = [0]*(n+1)
    for x in range(1,100):
        for y in range(x, 100):
            for z in range(y, 100):
                num = f(x,y,z)
                if num > n:
                    break
                if x == y and y == z:
                    A[num] += 1
                elif x == y or y == z or z == x:
                    A[num] += 3
                else:
                    A[num] += 6
    for i in range(1,n+1):
        print(A[i])

if __name__=='__main__':
    main()

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

Solution (Python):
n=int(input())
a=[0]*10001
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<10001:
        a[v]+=1
for m in range(n):
  print(a[m+1])

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

Solution (Python):
N = int(input())
x = y = z = 1
ans = [0]*N
while True:
    if x**2 + y**2 + z**2 + x*y + y*z + z*x > N:
        break
    while True:
        if x**2 + y**2 + z**2 + x*y + y*z + z*x > N:
            break
        while True:
            a = x**2 + y**2 + z**2 + x*y + y*z + z*x
            if a <= N:
                if x != y and y != z and z != x:
                    ans[a-1] += 6
                elif x == y and y == z:
                    ans[a-1] += 1
                else:
                    ans[a-1] += 3
                z += 1
            else:
                break
        y += 1
        z = y
    x += 1
    z = y = x
for n in ans:
    print(n)

Solution (Python):
from sys import stdin
inp = lambda : stdin.readline().strip()

n = int(inp())
a = [0]*10**5
for i in range(1,101):
    for j in range(1,101):
        for k in range(1,101):
            a[i**2 + j**2 + k**2 + i*j + i*k + k*j] += 1
for i in a[1:n+1]:
    print(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):
      n = int(((x + y) ** 2 + (y + z) ** 2 + (z + x) ** 2)/ 2 )
      if n <= N:
        L[n - 1] += 1
print(*L, sep='\n')

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

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

Solution (Python):
n = int(input())
li = [0]*n
p = int(n**0.5)
for x in range(1,p+1):
    for y in range(1,p+1):
        for z in range(1,p+1):
            k = x**2+y**2+z**2+x*y+y*z+z*x
            if k<=n:
                li[k-1]+=1

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

Solution (Python):
n=int(input())
a=[0 for i in range(100001)]
for i in range(1,41):
    a[6*(i**2)]+=1
for i in range(1,99):
    for j in range(1,i):
        if 3*(i**2)+j**2+2*i*j<=10000:
            a[3*(i**2)+j**2+2*i*j]+=3
        if 3*(j**2)+i**2+2*i*j <=10000:
            a[3*(j**2)+i**2+2*i*j]+=3
for i in range(1,100):
    for j in range(1,i):
        if i**2+j**2+i*j+i+j>9999:
            break
        for k in range(1,j):
            if i**2+j**2+k**2+i*j+i*k+j*k>10000:
                break
            else:
                a[i**2+j**2+k**2+i*j+i*k+j*k]+=6
for i in range(1,n+1):
    print(a[i])

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

for i in range(1,101):
  for j in range(1,101):
    for k in range(1,101):
      l = i**2 + j**2 + k**2 + i*j + j*k + k*i
      if l <= n:
        ans[l-1] += 1
      
for m in range(n): 
  print(ans[m])

Solution (Python):
from typing import List


def main():
    n = int(input())
    m = xyz(n)
    for i in m:
        print(i)


def xyz(n: int) -> List[int]:
    result = [0] * n
    for x in range(1, 100):
        for y in range(1, 100):
            for z in range(1, 100):
                m = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
                if m > n:
                    break
                result[m - 1] += 1

    return result


if __name__ == '__main__':
    main()

Solution (Python):
from typing import List


def main():
    n = int(input())
    m = xyz(n)
    for i in m:
        print(i)


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


def xyz(n: int) -> List[int]:
    result = [0] * n
    for x in range(1, 100):
        for y in range(1, 100):
            for z in range(1, 100):
                m = f(x, y, z)
                if m > n:
                    break
                result[m - 1] += 1

    return result


if __name__ == '__main__':
    main()

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

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

n = int(input())
dp = [0]*(n+1)

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

for i in range(1, n+1):
  print(dp[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())
l=[0]*(n+1)
for i in range(1,101):
    for j in range(1,101):
        for k in range(1,101):
            s=i**2+j**2+k**2+i*k+i*j+j*k
            if(s<=n):
                l[s]+=1
for i in range(1,n+1):
    print(l[i])

Solution (Python):
def solve():
  N = int(input())
  ans = [0]*N
  for x in range(1,101):
    for y in range(1,101):
      for z in range(1,101):
        p = x*x + y*y + z*z + x*y + y*z + z*x
        if p <= N:
          ans[p-1] += 1
  return ans
print(*solve(),sep='\n')

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

Solution (Python):
n = int(input())
ans = [0]*(n+1)
for x in range(1, 103):
    for y in range(1, 103):
        for z in range(1, 103):
            k = x**2+y**2+z**2+x*y+y*z+z*x
            if k<=n: ans[k]+=1
for i in range(1, n+1):
    print(ans[i])

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

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

for i in range(1, 105):
    for j in range(1, 105):
        for k in range(1, 105):
            m = i**2 + j**2 + k**2 + i*j + j*k + k*i
            if m < 10005:
                ans[m] += 1

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

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

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

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

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

Solution (Python):
n=int(input())
a=[0]*(n+1)
d=0
for i in range(1,101):
    for j in range(1,101):
        for h in range(1,101):
            c=i**2+j**2+h**2+i*j+j*h+i*h
            if c<=n:
                a[c]+=1
for i in a[1:]:
    print(i)

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

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

N = int(input())
result = [0] * N

n = int(sqrt(N))

for x in range(1, n+1):
    for y in range(1, n+1):
        for z in range(1, n+1):
            check = x**2 + y**2 + z**2 + x * y + y * z + z * x

            if check <= N:
                result[check-1] += 1

for i in result:
    print(i)

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

ans = [0]*(N+1)

root = int(N**0.5)

for x in range(1, root+1):
    for y in range(1, root+1):
        for z in range(1, root+1):
            F = x**2 + y**2 + z**2 + x*y + y*z + z*x
            if F <= N:
                ans[F] += 1
            else:
                continue

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

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

N = int(input())

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

for v in ans:
    print(v)

Solution (Python):
import math
N = int(input())
ans = [0]*(N+1)
Nruto = math.floor(math.sqrt(N))
for x in range(1, Nruto):
    a = x**2
    for y in range(1, Nruto):
        b = y**2
        c = x*y
        for z in range(1, Nruto):
            keisan = a+b+c+z*(z+y+x)
            if keisan > N:
                break
            ans[keisan] += 1
for i in range(1, N+1):
    print(ans[i])

Solution (Python):



from fractions import gcd
from itertools import combinations,permutations,accumulate, product 

from collections import deque,defaultdict,Counter
import decimal
import re












import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
n = I()
ya = [0] * 1000001
for x in range(1,101):
    for y in range(1,101):
        for z in range(1,101):
            l = x**2 + y**2 + z**2 + x*y + y*z + z*x
            ya[l] += 1
for i in range(1,n+1):
    print(ya[i])

Solution (Python):
import itertools
from collections import defaultdict


def main():
    N = int(input())
    A = defaultdict(int)
    for x in range(1, N + 1):
        breakflag = False
        for y in range(1, N + 1):
            for z in range(1, N + 1):
                a = x**2 + y**2 + z**2 + x * y + y * z + z * x
                if a <= N:
                    A[a] += 1
                else:
                    break
    for i in range(N):
        print(A[i + 1])


if __name__ == '__main__':
    main()

Solution (Python):
def solve():
  N = int(input())
  ans = [0]*N
  for x in range(1,101):
    for y in range(1,101):
      for z in range(1,101):
        p = x*x + y*y + z*z + x*y + y*z + z*x
        if p <= N:
          ans[p-1] += 1
  return ans
print(*solve(),sep='\n')

Solution (Python):
import sys

input = sys.stdin.readline


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

    f = [0] * (10000 + 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 <= 10000:
                    f[n] += 1

    print("\n".join(map(str, f[1:N + 1])))


if __name__ == "__main__":
    main()

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):
            Num = X*X+Y*Y+Z*Z+X*Y+X*Z+Y*Z
            if Num>N: break
            else: L[Num-1] += 1
print('\n'.join(str(X) for X in L))

Solution (Python):
N = int(input())
C = {i:0 for i in range(1,N+1)}
for x in range(1,142):
    for y in range(1,142):
        for z in range(1,142):
            a = (x+y)**2+(y+z)**2+(z+x)**2
            if a%2==0 and a//2<=N:
                C[a//2] += 1
for i in range(1,N+1):
    print(C[i])

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

Solution (Python):
N = int(input())
 
V = [0]*10000
 
for j in range (1, 100):
	for k in range (1, 100):
		for l in range (1, 100):
			if j**2+k**2+l**2+j*k+k*l+j*l < 10001:
				V[j**2+k**2+l**2+j*k+k*l+j*l-1]+=1

for i in range (0, N):
	print(V[i])

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

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

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):
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):
N=int(input())
sum=[0]*N
for x in range(1,100):
    for y in range(1,100):
        for z in range(1,100):
            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 sum:
    print(i)

Solution (Python):
import numpy as np

N = int(input())





num=np.zeros(10**4+1)
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
            if ans < 10**4+1:
                num[ans]+=1


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

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

for i in ans:
    print(i)

Solution (Python):



from fractions import gcd
from itertools import combinations,permutations,accumulate 

from collections import deque,defaultdict,Counter
import decimal
import re












import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
ya = [0] * 100001
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
            ya[n] += 1
n = I()
for i in range(1,n+1):
    print(ya[i])

Solution (Python):



from fractions import gcd
from itertools import combinations,permutations,accumulate 

from collections import deque,defaultdict,Counter
import decimal
import re












import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
ya = [0] * 100001
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
            ya[n] += 1
n = I()
for i in range(1,n+1):
    print(ya[i])

Solution (Python):

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

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

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

def calc(n):
    ans = [0 for i in range(n+1)]
    for x in range(1,n+1):
        a = x**2
        if a>=n:
            break
        for y in range(1,1+n):
            b = y**2
            if b>=n:
                break
            for z in range(1,1+n):
                c = z**2
                if c>=n:
                    break
                f = a+b+c+x*y+y*z+z*x
                if f>n:
                    break
                ans[f]+=1
    return ans

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

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

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

[print(i) for i in ans]

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

ans=[0]*(N+1)
t=int(N**0.5+1)
for x in range(1, t):
    for y in range(1, t):
        for z in range(1, t):
            v=x*x+y*y+z*z+x*y+y*z+z*x
            if v<=N: ans[v]+=1
for i in range(1,N+1):
    print(ans[i])

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

ans=[0]*(n+1)
r=int(n**0.5)+1

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

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

Solution (Python):
import math
N =int(input())
M = int(math.sqrt(N))
ans = [0 for _ in range(10050)]
for j in range(M):
  for k in range(M):
    for l in range(M):
      v = (j+1)**2 + (k+1)**2 + (l+1)**2 + (j+1)*(k+1) + (k+1)*(l+1) + (l+1)*(j+1)
      if (v<=N):
        ans[v] += 1
for i in range(N):
  print(ans[i+1])

Solution (Python):
import math
N = int(input())
ans = [0]*(N+1)
owari = math.sqrt(N)
owari = math.ceil(owari)
for x in range(1, owari):
    a = x*x
    for y in range(1, owari):
        b = y*y
        c = x*y
        for z in range(1, owari):
            hantei = z*(z+x+y)+a+b+c
            if hantei > N:
                break
            ans[hantei] += 1

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

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

table = [0] * 10001

for x in range(1, 101):
    for y in range(1, 101):
        for z in range(1, 101):
            k = (x * x) + (y * y) + (z * z) + (x * y) + (y * z) + (z * x)
            if k < 10001:
                table[k] += 1

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

Solution (Python):
n = int(input())
ans = [0 for i in range(20000)]
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())
ans = [0] * n
if n >= 100: N = 100
else: N = n
for x in range(1,N+1):
    for y in range(1, N+1):
        for z in range(1, N+1):
            a =  x**2 + y**2 + 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
stdin = sys.stdin

def ns(): return stdin.readline().rstrip()
def ni(): return int(ns())
def na(): return list(map(int, stdin.readline().split()))

def main():
    n = ni()

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

if __name__ == "__main__":
    main()

Solution (Python):
N = int(input())
C = {i:0 for i in range(1,N+1)}
for x in range(1,142):
    for y in range(1,142):
        for z in range(1,142):
            k = (x+y)**2+(y+z)**2+(z+x)**2
            if k%2==0 and k//2<=N:
                C[k//2] += 1
for i in range(1,N+1):
    print(C[i])

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

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

for v in ansl[1:]:
    print(v)

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

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

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

Solution (Python):
N = int(input())
res=[0 for _ in range(10050)]
for x in range(1,105):
    for y in range(1,105):
        for z in range(1,105):
            k=x*x+y*y+z*z+x*y+y*z+z*x
            if k<10050:
                res[k]+=1
for i in range(N):
    print(res[i+1])

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

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

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

Solution (Python):
N = int(input())
n_list = []
count = 1
max_val = 1
res = 0
for x in range(1,100):
    for y in range(x,100):
        for z in range(y,100):
            res = x**2 +y**2 + z**2 + x*y + y*z + z*x
            for i in range(int(x!=y) + int(y!=z) + int(z!=x)-1):
                count *= 3-i
            if max_val < res:
                for i in range(max_val, res+1):
                    if i != res: n_list.append(0)
                    else: n_list.append(count)
                max_val = res+1
            else:
                n_list[res-1] += count
            count = 1

            

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

Solution (Python):
from collections import defaultdict

N = int(input())

d = defaultdict(int)

for x in range(1,100):
    for y in range(x,100):
        for z in range(y,100):
            n = x**2+y**2+z**2+x*y+y*z+z*x
            if x == y == z:
                d[n] += 1
            elif x == y or y == z or z == x:
                d[n] += 3
            else:
                d[n] += 6
            
            if n > N:
                break

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

Solution (Python):
n=int(input())
from collections import defaultdict
d=defaultdict(int)
for i in range(1,100):
    for j in range(1,100):
        for k in range(1,100):
            d[i**2+j**2+k**2+i*j+j*k+k*i]+=1
for i in range(1,n+1):
    print(d[i])