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

nums = [0]*n
a = int(n**0.5)+1
for x in range(1,a):
  for y in range(1,a):
    if x**2 + y**2 + x*y > n: break
    for z in range(1,a):
      s = x**2 + y**2 + z**2 + x*y + y*z + z*x
      if s <= n: nums[s-1] += 1
print(*nums, sep="\n")

Solution (Python):
import numpy as np
from itertools import permutations
N = int(input())

counter = np.zeros(N, dtype=int)

for x in range(1, 100):
    for y in range(1, 100):
        for z in range(1, 100):
            res = x**2 + y**2 + z**2 + x * y + x * z + y * z
            if res <= N:  
                counter[res - 1] += 1

for c in counter:
    print(c)

Solution (Python):
nn = int(input())
number_of_match = [0 for _ in range(10005)]
for xx in range(1,105):
  xxxx = xx**2
  for yy in range(1,105):
    yyyy = yy**2
    xxyy = xx*yy
    for zz in range(1,105):
      result = xxxx + yyyy + (zz)**2 + xxyy + (yy)*(zz) + (zz)*(xx)
      if result < 10005:
        number_of_match[result] += 1
for i in range(1,nn+1):
  print(number_of_match[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):
            num = x*x + y*y + z*z + x*y + y*z + z*x
            if num>N:
                break
            ans[num] = ans[num] + 1
for m in ans[1:]:
    print(m)

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

Solution (Python):
def get_ints():
	return map(int, input().split())
def get_list():
	return list(map(int, input().split()))

n = int(input())
dp = [0 for ans in range(10050)]
for x in range(1, 105):
	for y in range(1, 105):
		for z in range(1, 105):
			v = x*x + y*y + z*z + x*y + y*z + z*x
			if v < 10050:
				dp[v] += 1
for i in range(n):
	print(dp[i + 1])

Solution (Python):
N = int(input())
list = []
for i in range(10100):
    list.append(0)

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

Solution (Python):

import itertools

def main():
    
    input_lines_n = input()
    n = int(input_lines_n)
    xyz_max = 100
    l = [0] * 10001
    
    for x, y, z in itertools.product(range(xyz_max), range(xyz_max), range(xyz_max)):
        fn = 0
        if x > 0 and y > 0 and z > 0:
            fn = x**2 + y**2 + z**2 + x*y + y*z + z*x
            if fn <= n:
                l[fn] += 1
    
    for i in range(1, n+1):
        print(l[i])
                    
    
if __name__ == "__main__":
    main()

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

Solution (Python):
import math

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

for x in range(1,101):
    for y in range(1,101):
        for z in range(1,101):
            res=x**2+y**2+z**2+x*y+y*z+z*x
            if res<=N:
                ARR[res]+=1

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

Solution (Python):



N = int(input())


ans_list = [0]*(10**6)


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


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

Solution (Python):
import itertools
N = int(input())
num = int(N**0.5)+1

ans = [0]*(N+1)





for x,y,z in itertools.product(range(1, num+1), repeat=3):
    fn = x**2 + y**2 + z**2 + x*y + y*z + z*x
    if fn > N:
        continue
    else:
        ans[fn] += 1

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

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

import math

N = math.ceil(math.sqrt(n))
from collections import defaultdict
counter = defaultdict(int)

from collections import defaultdict
counter = defaultdict(int)

for x in range(1,N + 1):
    answer_x = x * x
    for y in range(x, N + 1):
        answer_y = answer_x + y * y + x * y
        if answer_y > n:
            continue
        for z in range(y, N + 1):
            answer_z = answer_y + z * z + x * z + y * z
            if answer_z <= n:
                if x == y and x == z:
                    counter[answer_z] += 1
                elif x == y or x == z or y == z:
                    counter[answer_z] += 3
                else:
                    counter[answer_z] += 6

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

Solution (Python):
n=int(input())
l = [0] * 10001
for a in range(1, 101):
    for b in range(1,101):
        for c in range(1, 101):
            o = a**2 + b**2 + c**2 + a*b + a*c + c*b
            if o <= 10000:
                l[o] += 1
for i in range(1, n+1):
    print(l[i])

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

l = [0] * 10001

for i in range(1, 101):
	for j in range(1, 101):
		for k in range(1, 101):
			x = i**2 + j**2 + k**2 + i*j + j*k + i*k
			if x <= 10000:
				l[x] += 1

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

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

def calc_combination_num(x, y, z):
    if x == y and y == z:
        
        return 1
    if x == y or y == z:
        
        return 3
    
    return 6

N = int(input())

result_map = {}
for i in range(1, N + 1):
    result_map[i] = 0


for x in range(1, N):
    tempFn1 = calc(x, 0, 0)
    if tempFn1 > N:
        
        break
    for y in range(x, N):
        tempFn2 = calc(x, y, 0)
        if tempFn2 > N:
            
            break
        for z in range (y, N):
            fn = calc(x, y, z)
            if fn > N:
                
                break
            
            combination_num = calc_combination_num(x, y, z)
            result_map[fn] = result_map[fn] + combination_num

for result in result_map.values():
    print(result)

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

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

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

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

Solution (Python):
n = int(input())
ans = [0 for _ in range(10050)]
for i in range(1,105):
  for j in range(1,105):
    for k in range(1,105):
      v = i*i+j*j+k*k+i*j+j*k+k*i;
      if v<10050:
        ans[v]+=1
for i in range(n):
    print(ans[i+1])

Solution (Python):
from collections import defaultdict
ans = defaultdict(int)
N = int(input())

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

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

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

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

Solution (Python):
from math import sqrt

N = int(input())
limit = int(sqrt(N))

res = [0] * (N + 1)
for x in range(1, limit+1):
    for y in range(1, limit+1):
        for z in range(1, limit+1):
            val = x * x + y * y + z * z + x * y + y * z + z * x
            if val <= N:
                res[val] += 1
            else:
                break

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

Solution (Python):
MAX = pow(10,2)+10
N = int(input())
ans = [0 for _ in range(N+1)] 

def func(a,b,c):
  return a*a+b*b+c*c+a*b+b*c+c*a
for x in range(1,MAX):
  for y in range(1,MAX):
    for z in range(1,MAX):
      temp = func(x,y,z)
      if temp <= N:
        ans[temp] += 1
for i in range(1,N+1):
  print(ans[i])

Solution (Python):

import math
import itertools

n = int(input())

ans = [0] * n

for x, y, z in itertools.product(range(1, int(math.sqrt(n))), range(1, int(math.sqrt(n))), range(1, int(math.sqrt(n)))):
    idx = x**2 + y**2 + z**2 + x*y + y*z + z*x
    if idx <= n:
        ans[idx-1] += 1

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

Solution (Python):
import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush
from math import *
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction



mod = int(pow(10, 9) + 7)
mod2 = 998244353
def data(): return sys.stdin.readline().strip()
def out(*var, end="\n"): sys.stdout.write(' '.join(map(str, var))+end)
def L(): return list(sp())
def sl(): return list(ssp())
def sp(): return map(int, data().split())
def ssp(): return map(str, data().split())
def l1d(n, val=0): return [val for i in range(n)]
def l2d(n, m, val=0): return [l1d(n, val) for j in range(m)]

try:
    sys.stdin = open("input.txt", "r")
except:
    pass



  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  

n=L()[0]
dp=[0 for i in range(n+1)]
for i in range(1,100):
    for j in range(1,100):
        for k in range(1,100):
            val=i*i+j*j+k*k+i*j+i*k+j*k
            if val<=n:
                dp[val]+=1
for i in range(1,n+1):
    print(dp[i])

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

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

for i in range(1, 101):
    for j in range(1, 101):
        for k in range(1, 105):
            v = i*i + j*j + k*k + i*j + j*k + k*i
            if v < 10001:
                ans[v] += 1

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

Solution (Python):
import math

N = int(input())

















ans_dict = {i:set() for i in range(1,N+1)}

if N != 1:
    for i in range(1,1 + math.floor(-1 + math.sqrt(N - 2))):
        for j in range(1,1 + math.floor(-1 + math.sqrt(N - 2))):
            for k in range(1,1 + math.floor(-1 + math.sqrt(N - 2))):
                n = i**2 + j**2 + k**2 + i*j + j*k + k*i
                if 1 <= n <= N:
                    ans_dict[n].add((i,j,k))
                
    for i in range(1,N+1):
        print(len(ans_dict[i]))
else:
    print(0)