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

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

Solution (Python):
n = int(input())
ans = [0] * 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())
j=10501
l=[0 for i in range(j)]
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+y*x+x*z+z*y
      if(v<j):
        l[v]+=1
for i in range(n):
  print(l[i+1])

Solution (Python):
n=int(input())
l=[0]*(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):
      tmp=i*i+j*j+k*k+i*j+j*k+k*i
      if tmp<=n:
        l[tmp]+=1
for li in l[1:]:
  print(li)

Solution (Python):
def main():
    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):
                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])


if __name__ == "__main__":
    main()

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

ans = []

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

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

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

Solution (Python):
nn=int(input())
nc = [0] * (nn + 1)
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 + x * z + y * z
      if a > nn:
        break
      nc[a] += 1
for i in range(1, nn + 1):
  print(nc[i])

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

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

ans = [0 for i in range(10100)]

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 < 10100:
            ans[n] += 1

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

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):
def main():
    N = int(input())
    d = [0 for _ in range(N)]
    r = 100
    ii = 0
    for i in range(1, r):
        ii += 2* i - 1
        for j in range(1, i + 1):
            s = i + j
            c = ii + s * j
            l = 6
            if i == j:
                l = 3
            if c + 1 + s > N:
                break
            for k in range(1, j + 1):
                c += 2* k - 1 + s
                if c <= N:
                    if j == k:
                        l = 3
                        if i == k:
                            l = 1
                    d[c - 1] += l
                else:
                    break
                    
    print("\n".join(map(str,d)))


if __name__ == "__main__":
    main()

Solution (Python):
def main():
    N = int(input())
    dp = [0] * N
    rt = int(pow(N, 0.5)) + 1
    for i in range(1, rt):
        ii = i * i
        for j in range(1, i + 1):
            iji = ii + j * j + i * j
            if iji + 1 + i + j > N:
                break
            for k in range(1, j + 1):
                c = iji + k * k + (i + j) * k
                if c <= N:
                    if i == j or j == k:
                        l = 3
                        if i == k:
                            l = 1
                    else:
                        l = 6
                    dp[c - 1] += l
                else:
                    break
    print("\n".join(map(str,dp)))


if __name__ == "__main__":
    main()

Solution (Python):


 
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
    for i in ans:   
        print(i)

if __name__ == "__main__":
    main()

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**2 + j**2 + k**2 + 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())
n = round(N**0.5)
counter = [0]*N
for i in range(1,n+1):
  for j in range(1,n+1):
    for k in range(1,n+1):
      f = i**2+j**2+k**2+i*j+j*k+k*i
      if f <= N:
        counter[f-1] += 1
for i in range(N):
  print(counter[i])

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

li_ans = [0] * n

for a in range(1, 110):
    for b in range(1, 110):
        for c in range(1, 110):
            val = (a ** 2) + (b ** 2) + (c ** 2) + (a * b) + (b * c) + (c * a)
            if val <= n:
                li_ans[val - 1] += 1
for an in li_ans:
    print(an)

Solution (Python):
def main():
    N = int(input())
    X = 1
    Y = 1
    Z = 1

    a = [0]*(N+1)

    for x in range(1,101,1):
        if x**2 + Y**2 + Z**2 + x*Y + Y*Z + Z*x > N:
            break
        for y in range(1,101,1):
            if x**2 + y**2 + Z**2 + x*y + y*Z + Z*x > N:
                break
            for z in range(1,101,1):
                if x**2 + y**2 + z**2 + x*y + y*z + z*x <= N:
                    a[x**2 + y**2 + z**2 + x*y + y*z + z*x] += 1
                elif x**2 + y**2 + z**2 + x*y + y*z + z*x > N:
                    break
    for i in range(1,N+1,1):
        print(a[i])

main()

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

ans = [0] * N
n = int(math.sqrt(N)) 

for x in range(1, n+1):
    for y in range(1, x+1):
        for z in range(1, y+1):
            i = x**2 + y**2 + z**2 + x*y + y*z + z*x
            if i <= N:
                if x == y == z:
                    ans[i-1] += 1
                elif x == y or y == z:
                    ans[i-1] += 3
                else:
                    ans[i-1] += 6

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

Solution (Python):
N = int(input())
arr = [0]*(N)
lim = int(N**0.5 + 1)
for i in range(1,lim):
    for j in range(1,lim):
        for k in range(1,lim):
            num = i**2 + j**2 + k**2 + i*j + j*k + k*i - 1
            if num <= N-1:
                arr[num] += 1

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

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

ans = [0]*80100
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] += 1

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

Solution (Python):
n = int(input())
ans = [0 for x in range(10001)]

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

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

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

for i in range(1, math.ceil(math.sqrt(n))):
  for j in range(i, math.ceil(math.sqrt(n))):
    for k in range(j, math.ceil(math.sqrt(n))):
      tmp = f(i, j, k)
      if tmp > n:
        break
      else:
        if i == j and j == k:
          ans[tmp] += 1
        elif i == j or j == k:
          ans[tmp] += 3
        else:
          ans[tmp] += 6
        
for i in range(1, n+1):
  print(ans[i])

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

ans = [0 for _ in range(10**4+1)]

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 + j*k + k*i
            if val <= 10**4:
                ans[val] += 1

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

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

f = [0] * (n+1)

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

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

Solution (Python):
ans = [0] * 10000
for x in range(1, 101):
  for y in range(1, 101):
    for z in range(1, 101):
      k = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
      if k > 10000:
        break
      ans[k - 1] += 1

n = int(input())
for i in range(n):
  print(ans[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())
NUM = [0] * 500000
for x in range(1,101):
    for y in range(1,101):
        for z in range(1,101):
            nya = x**2 + y**2 + z**2 + x*y + y*z + z*x
            NUM[nya] += 1
n = I()
for i in range(1,n+1):
    print(NUM[i])

Solution (Python):
def solve():
  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):
        left = x*x+y*y+z*z+x*y+y*z+z*x
        if left<=N:
          ans[left] += 1
  return ans[1:]
print(*solve(),sep='\n')

Solution (Python):




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


for x in range(1, 101):
    for y in range(1, 101):
        for z in range(1, 101):
            calc_n = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
            if calc_n <= n:
                alist[calc_n] = alist[calc_n] + 1
            else:
                break


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

Solution (Python):
N = int(input())
from collections import Counter
c = Counter()
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
            c[n] += 1
for i in range(1,N+1):
    print(c[i])

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

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

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

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

ans = [0] * n
for v in itertools.product(list(range(1,101)), repeat=3):
    x,y,z = v[0], v[1], v[2]
    a = x*x + y*y + z*z + x*y + y*z + z*x
    if a <= n:ans[a-1] += 1
    else: continue
for i in ans: print(i)

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

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

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

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

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())
ans = [0] * 10010

def get_ans(n):
  cnt = 0
  for x in range(1, 101):
    for y in range(1, 101):
      for z in range(1, 101):
        k = x**2 + y**2 + z**2 + x*y + y*z + z*x
        if(k <= 10000):
          ans[k] += 1        
  return ans

ans = get_ans(n)
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):
import itertools

N = int(input())

ans = [0] * (100**2)
for x, y, z in itertools.product(range(1, 101), repeat=3):
    n = x**2 + y**2 + z**2 + x * y + y * z + z * x
    if  n <= 100**2:
        ans[n - 1] += 1

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

Solution (Python):
import math
N = int(input())
ans = [0]*(N+1)
Nruto = math.sqrt(N)
Nruto = math.floor(Nruto)+1
for x in range(1, Nruto):
    for y in range(1, Nruto):
        for z in range(1, Nruto):
            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())
k=int(n**0.5)+1
a=[0 for i in range(n+1)]
for x in range(1,k):
    for y in range(1,k):
        for z in range(1,k):
            g=x*x+y*y+z*z+x*y+y*z+x*z
            if g<=n:
                a[g]+=1
print(*a[1:],sep='\n')

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

res = [0] * (n+1)
x = 1
while x*x <= n:
  y = 1
  while y*y <= n:
    z = 1
    while z*z <= n:
      w = x*x+y*y+z*z+x*y+y*z+z*x
      if w <= n:
        res[w] += 1
      z += 1
    y += 1
  x+= 1
  
for i in range(1,n+1):
  print(res[i])

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


from collections import deque
from collections import defaultdict
d = defaultdict(int)
n,m=3,100
y = [[x] for x in range(1,50+1)]
tmp=deque(y)
out=0
while tmp:
    T=tmp.pop()
    if len(T) < n:
        for i in range(int(T[-1]),m+1):
            tmp.append(T+[i]) 
    else:
        ans = int((sum(T))**2-(T[0]*T[1]+T[1]*T[2]+T[2]*T[0]))
        if ans <= 10000:
            if T[0] == T[1] and T[1] == T[2]:
                plus = 1
            elif T[0] == T[1] or T[1] == T[2]:
                plus = 3
            else:
                plus = 6
            d[ans] += plus
            
for i in range(N):
    print(d[i+1])

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


def main():
    n = int(readline().rstrip())
    a = [0] * 10100
    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 - 1
                if m < 10050:
                    a[m] += + 1
    for s in range(n):
        print(a[s])


if __name__ == '__main__':
    main()

Solution (Python):
def main():
    N = int(input())
    ans = [0 for i in range(N + 1)]

    for x in range(1, 101):
        for y in range(1, 101):
            for z in range(1, 101):
                s = x**2 + y**2 + z**2 + x*y + y*z + z*x

                if 1 <= s <= N:
                    ans[s] += 1

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

if __name__ == "__main__":
    main()

Solution (Python):
def main():
    N = int(input())
    ans = [0 for i in range(N + 1)]

    for x in range(1, 100):
        for y in range(1, 100):
            for z in range(1, 100):
                s = x**2 + y**2 + z**2 + x*y + y*z + z*x

                if 1 <= s <= N:
                    ans[s] += 1

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

if __name__ == "__main__":
    main()

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

for i in range(1,2*10**2+1):
    for j in range(1,2*10**2+1):
        for k in range(1,2*10**2+1):
            cnt[((i+j)**2+(j+k)**2+(k+i)**2)//2-1]+=1
for i in range(n):
    print(cnt[i])

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

A = [0]*12000

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 < 12000:
                A[i**2 + j**2 + k**2 + i*j + i*k + j*k] += 1

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

Solution (Python):
import math

N = int(input())
ans = [0] *(N+1)
a = int(math.sqrt(N)) + 1

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

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

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

Solution (Python):

import numpy as np
import sys
from collections import deque
from collections import defaultdict
import heapq
import collections
import itertools
import bisect
from itertools import accumulate
import copy


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


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


def S():
    return sys.stdin.readline()


def C(line):
    return [sys.stdin.readline()[:-1] for _ in range(line)]


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

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

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

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


f = {}

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
            f[n] = f.get(n, 0) + 1

for i in range(1, N+1):
    print(f.get(i, 0))

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

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

Solution (Python):
def f(x, y, z):
    return x**2+y**2+z**2+x*y+y*z+z*x
n = int(input())
ans = {}
for x in range(1, 100):
    for y in range(1, 100):
        for z in range(1, 100):
            tmp = f(x, y, z)
            if tmp > n:
                break
            else:
                if tmp not in ans:
                    ans[tmp] = 1
                else:
                    ans[tmp] += 1

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

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

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

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

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

for item in ans:
    print(item)

Solution (Python):
def main():
    import math

    N = int(input())
    
    ans_list = [0 for i in range(N)]
    
    for x in range(1, 101):
        for y in range(1, 101):
            for z in range(1, 101):

                left_eq = x * x + y * y + z * z + x * y + y * z + z * x
                if (left_eq <= N):
                    ans_list[left_eq - 1] += 1
    
    for i in range(N):
        print(ans_list[i])

if __name__ == '__main__':
    main()

Solution (Python):



import math
from collections import defaultdict,deque
ml=lambda:map(int,input().split())
ll=lambda:list(map(int,input().split()))
ii=lambda:int(input())
ip=lambda:list(input())
ips=lambda:input().split()

"""========main code==============="""
n=ii()
d=defaultdict(int)
for i in range(1,100):
    for j in range(1,100):
        for k in range(1,100):
            w=i*i+j*j+k*k+i*j+i*k+j*k
            d[w]+=1
for i in range(1,n+1):
    print(d[i])

Solution (Python):
N=int(input())
li=[0]*N
for x in range(1,101):
    for y in range(1,101):
        for z in range(1,101):
            temp=x**2+y**2+z**2+x*y+y*z+z*x
            if temp<=N:
                li[temp-1]+=1
for i in range(N):
    print(li[i])

Solution (Python):
from math import floor,ceil,sqrt,factorial,log
from collections import Counter, deque
from functools import reduce
import numpy as np
import itertools
def S(): return input()
def I(): return int(input())
def MS(): return map(str,input().split())
def MI(): return map(int,input().split())
def FLI(): return [int(i) for i in input().split()]
def LS(): return list(MS())
def LI(): return list(MI())
def LLS(): return [list(map(str, l.split() )) for l in input()]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def LLSN(n: int): return [LS() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]

N = I()

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

for i in range(1,100):
    for j in range(1,100):
        for k in range(1,100):
           v = (i+j+k)**2 - (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+1)
for x in range(1,101):  
    for y in range(1,101):
        for z in range(1,101):
            fn=x**2+y**2+z**2+x*y+y*z+z*x
            if fn>N:
                break
            else:
                ans[fn]=ans[fn]+1
for n in range(1,N+1):
    print(ans[n])

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

ans=[0]*N

for x in range(1,int(N**(1/2))):
    for y in range(1,int(N**(1/2))):
        for z in range(1,int(N**(1/2))):
            cnt=x**2+y**2+z**2+x*y+y*z+z*x
            if cnt>N:
                break
            else:
                ans[cnt-1]+=1
for i in range(N):
    print(ans[i])

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

def main():
    ans = [0]*(n+1)
    for x in range(1, 101):
        for y in range(1, 101):
            for z in range(1, 101):
                fn = x**2 + y**2 + z**2 + x*y + y*z + z*x
                if fn > n:
                    break
                else:
                    ans[fn] += 1

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

if __name__ == '__main__':
    main()

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

def main():
    ans = [0]*(n+1)
    for x in range(1, 101):
        for y in range(1, 101):
            for z in range(1, 101):
                fn = x**2 + y**2 + z**2 + x*y + y*z + z*x
                if fn > n:
                    break
                else:
                    ans[fn] += 1

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

if __name__ == '__main__':
    main()

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

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

ans = [0 for i in range(10**4+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 <= 10**4:
                ans[n] += 1

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

Solution (Python):

from collections import defaultdict
N=int(input())
n=1
s=3
brkLoop=False
while True :
    r=(s)**2-(1)-(1)-(n)
    if ( r >= N ):
        break;  
    else:
        n=n+1   
        s=s+1
out=defaultdict(list)
for (x,y,z) in tuple((i,j,k) for i in range(1, n+1) for j in range (1,n+1) for k in range(1,n+1)):
    r=(x+y+z)**2-(x*y)-(y*z)-(x*z)
    if ( r <= N ):
        out[r].append((x,y,z))
for i in range(1,N+1):
    if ( i in out):
        print (len(out[i]))
    else:
        print(0)

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

count = 0

i = 1

count = 0
limit = 100

nums = [0] * n

for x in range(limit):
    for y in range(limit):
        for z in range(limit):
            cal =  (x + 1) ** 2 + (y + 1) ** 2 + (z + 1) ** 2 + (x + 1) * (y + 1) + (y + 1) * (z + 1) + (z + 1) * (x + 1)
            if(cal > n):
                break
            nums[cal - 1] += 1

for n in nums:
    print(n)

Solution (Python):

N = int(input())
myans = [ 0 for n in range(N+1)]
upper = int(N**(2/3))

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 < N+1:
                myans[v] += 1

for a,b in enumerate(myans):
    if a != 0:
        print(b)

Solution (Python):
n=int(input())
l=[0]*n
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 + x*z + y*z
            if ans<=n:
                l[ans-1]+=1
for i in l:
    print(i)

Solution (Python):
n = int(input())
xyz = [0] * ((10 ** 4) + 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 + x * z - 1
            if v < 10 ** 4 + 1:
                xyz[v] += 1
for i in range(n):
    print(xyz[i])

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

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

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
input = sys.stdin.readline
from math import sqrt
def main():
    N = int(input())
    A = [0]*(N+1)
    n = int(sqrt(N)) + 1
    for x in range(1, n):
        for y in range(1, n):
            for z in range(1, n):
                tmp = x*x + y*y + z*z + x*y + y*z + z*x
                if tmp <= N:
                    A[tmp] += 1
    for i in range(1,N+1):
        print(A[i])

if __name__ == '__main__':
    main()

Solution (Python):
N=int(input())
f=[0 for i in range(10001)]


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
            if tmp >10000:
                continue
            f[tmp]+=1

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

Solution (Python):
import math
n=int(input())
num=int(math.sqrt(n))
ans=[0]*(n+1)
for i in range(1,num+1):
    for j in range(1,num+1):
        for k in range(1,num+1):
            v=i*i+j*j+k*k+i*j+i*k+j*k
            if v<=n:
                ans[v]+=1
for i in range(n):
    print(ans[i+1])

Solution (Python):
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,x+1):
        for z in range(1,y+1):
            if x**2+y**2+z**2+x*y+y*z+z*x<=n:
                if x==y==z:
                    ans[x**2+y**2+z**2+x*y+y*z+z*x] += 1
                if (x==y and y != z) or (y==z and z !=x) or (z==x and x != y):
                    ans[x**2+y**2+z**2+x*y+y*z+z*x] += 3
                if (x!=y) and (y!=z) and (z!=x):
                    ans[x**2+y**2+z**2+x*y+y*z+z*x] += 6
for a in ans[1:]:
    print(a)

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

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

temp = 0
ans = [0] * 100000
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
            ans[temp] += 1

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

Solution (Python):
N = int(input())
lis = [0]*N
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 -1
            if ans >= N:
                pass
            else:
                lis[ans] += 1
for i in range(N):
    print(lis[i])