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())
a=[0]*(10**4)
for i in range(1,10**2+1):
  for j in range(1,10**2+1):
    for k in range(1,10**2+1):
      b=i**2+j**2+k**2+i*j+j*k+k*i-1
      if b<=10**4-1:
        a[b]+=1
for i in range(n):
  print(a[i])

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

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

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

n = int(pow(N, 0.5))+1
for i in range(1, n+1):
    for j in range(1, n+1):
        for k in range(1, n+1):
            res = i**2+j**2+k**2+i*j+j*k+k*i
            if res>N: break
            d[res] += 1
for i in range(1, N+1):
    print(d[i])

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

ans = [0] * n

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

for ansi in ans:
    print(ansi)

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

Solution (Python):
def resolve():
    n = int(input())
    ans = [0]*(n+1)
    for i in range(1, int(n**0.5)+1):
        for j in range(1, int(n**0.5)+1):
            for k in range(1, int(n**0.5)+1):
                if (i**2 + j**2 + k **2 + i*j+i*k+j*k) <= n:
                    ans[i**2 + j**2 + k **2 + i*j+i*k+j*k] += 1
    for i in range(1,n+1):
        print(ans[i])
resolve()

Solution (Python):
n = int(input())
def f(a,b,c):
    return a * a + b * b + c * c + a * b + b * c + a * c
c = [0] * n
for i in range(1,101):
    for j in range(1,101):
        for k in range(1,101):
            x = f(i, j, k) - 1
            if x < n:
                c[x] += 1
for i in c:
    print(i)

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

f = [0] * (N + 1)
for x in range(1, int(N ** 0.5) + 1):
    for y in range(1, int(N ** 0.5) + 1):
        for z in range(1, int(N ** 0.5) + 1):
            s = x * x + y * y + z * z + x * y + y * z + z * x
            if s <= N:
                f[s] += 1

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

Solution (Python):

import sys, io, os, re
from bisect import bisect, bisect_left, bisect_right, insort, insort_left, insort_right
from pprint import pprint
from math import sin, cos, pi, radians, sqrt, floor, ceil
from copy import copy, deepcopy
from collections import deque
from fractions import gcd
from functools import reduce
from itertools import groupby
from heapq import heapify, heappush, heappop



n1 = lambda: int(sys.stdin.readline().strip())
nn = lambda: list(map(int, sys.stdin.readline().strip().split()))
f1 = lambda: float(sys.stdin.readline().strip())
fn = lambda: list(map(float, sys.stdin.readline().strip().split()))
s1 = lambda: sys.stdin.readline().strip()
sn = lambda: list(sys.stdin.readline().strip().split())
nl = lambda n: [n1() for _ in range(n)]
fl = lambda n: [f1() for _ in range(n)]
sl = lambda n: [s1() for _ in range(n)]
nm = lambda n: [nn() for _ in range(n)]
fm = lambda n: [fn() for _ in range(n)]
sm = lambda n: [sn() for _ in range(n)]

def array1(n, d=0): return [d] * n
def array2(n, m, d=0): return [[d] * m for x in range(n)]
def array3(n, m, l, d=0): return [[[d] * l for y in xrange(m)] for x in xrange(n)]
def linc(A, d=1): return map(lambda x: x + d, A)
def ldec(A, d=1): return map(lambda x: x - d, A)

N = n1()
rootN = int(ceil(sqrt(N)))

tbl = array1(10**4+1)

for i in range(1, rootN):
    for j in range(1, rootN):
        
        for k in range(1, rootN):
            n = i**2 + j**2 + k**2 + i*j + i*k + j*k
            if n <= 10000:
                tbl[n] += 1
            else:
                break

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

Solution (Python):
import math


def main():
    n = int(input())
    _n = int(math.sqrt(n))
    ret = [0] * n
    for i in range(1, _n):
        for j in range(1, _n):
            for k in range(1, _n):
                tmp = i ** 2 + j ** 2 + k ** 2 + i * j + j * k + k * i
                if tmp <= n:
                    ret[tmp-1] += 1
                else:
                    break
    for i in range(n):
        print(ret[i])

if __name__ == "__main__":
    main()

Solution (Python):


import sys

class CXYZTriplets:
    def solve(self, tc=0):
        from collections import defaultdict
        n = int(input())
        
        mp = defaultdict(int)
        for x in range(1, 101):
            for y in range(1, 101):
                for z in range(1, 101):
                    mp[x ** 2 + y ** 2 + z ** 2 + x * y + y * z + x * z] += 1
        for k in range(1, n + 1):
            ans = 0
            
            
            
            
            
            

            print(mp[k])

solver = CXYZTriplets()
input = sys.stdin.readline

solver.solve()

Solution (Python):
from sys import stdin
nii=lambda:map(int,stdin.readline().split())
lnii=lambda:list(map(int,stdin.readline().split()))

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

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

Solution (Python):
N = int(input())
from itertools import product

count_dic = {i: 0 for i in range(1, N+1)}
def func(x, y, z):
    return x**2 + y**2 + z**2 + x*y + y*z + z*x

for x, y, z in list(product(range(1, 101), repeat=3)):
    res = func(x, y, z)
    if res > N:
        continue
    count_dic[res] += 1

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

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

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 + y*z + z*x <= n:
                A[x**2 + y**2 + z**2 + x*y + y*z + z*x - 1] += 1
            else:
                break

for ans in A:
    print(ans)

Solution (Python):
import math
import itertools
import collections
import bisect
import heapq

def IN(): return int(input())
def sIN(): return input()
def MAP(): return map(int,input().split())
def LMAP(): return list(map(int,input().split()))
def TATE(n): return [input() for i in range(n)]
MOD = 10**9 + 7

N = IN()
lis = [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):
      n = x**2 + y**2 + z**2 + x*y + y*z + z*x 
      if n > N:
        continue
      else:
        lis[n-1] += 1
      
for i in lis:
  print(i)

Solution (Python):
import sys
from operator import itemgetter

sys.setrecursionlimit(10**9)
input = sys.stdin.readline

def ii(): return int(input())
def mi(): return map(int, input().split())
def lmi(): return list(map(int, input().split()))
def iif(n): return [int(input()) for _ in range(n)]
def lmif(n): return [list(map(int, input().split())) for _ in range(n)]
def ss(): return input().split()

def main():
    mod = 1000000007
    
    N = ii()
    ans = [0] * N

    xyz = range(1, 101)
    for x in xyz:
        for y in xyz:
            for z in xyz:
                tmp = x*x + y*y + z*z + x*y + y*z + z*x
                if tmp <= N:
                    ans[tmp-1] += 1
    
    print(*ans, sep="\n")

    return

main()

Solution (Python):
import math

import itertools
import queue
import bisect
from collections import deque,defaultdict
import heapq as hpq
from sys import stdin,setrecursionlimit


ipt = stdin.readline
setrecursionlimit(10**7)

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

def main():
    n = int(ipt())
    num = [0]*(n+1)
    for x in range(1,n):
        if calc(x,1,1) > n:
            break
        for y in range(1,n):
            if calc(x,y,1) > n:
                break
            for z in range(1,n):
                ci = calc(x,y,z)
                if ci > n:
                    break
                num[ci] += 1
    for i in num[1::]:
        print(i)

    return None

if __name__ == '__main__':
    main()

Solution (Python):
import sys


def _i(): return int(sys.stdin.readline().strip())


def main():
    n = _i()
    ans = [0 for _ in range(n)]
    for x in range(1, 101):
        x2 = x**2
        for y in range(1, 101):
            xy = x * y
            y2 = y ** 2
            for z in range(1, 101):
                t = x2 + y2 + z**2 + xy + y*z + z*x
                if t <= n:
                    ans[t-1] += 1

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


if __name__ == "__main__":
    print(main())

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

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

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

Solution (Python):

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

N = int(input())

num = [0 for i in range(N)]

for x in range(1,100):
    for y in range(1,100):
        for z in range(1,100):
            value = score(x,y,z)
            if value <= N:
                num[value-1] += 1

for n in num:
    print(n)

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

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

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

Solution (Python):
N = int(input())
d = [0] * (10**4+2)
for x in range(1, 10**2):
    xx = x**2
    for y in range(1, 10**2):
        yy = y**2
        for z in range(1, 10**2):
            i = xx + yy + z**2 + x*y + y*z + z*x 
            if 1 <= i <= N+1:
                d[i] += 1
print(*d[1:N+1], sep='\n')

Solution (Python):
import math

n = int(input())
count_lis = [0]*n
for i in range(1, math.floor(n**(1/2))):
    for j in range(1, math.floor(n**(1/2))):
        for k in range(1, math.floor(n**(1/2))):
            if i**2 + j**2 + k**2 + i*j + j*k + k*i <= n:
                count_lis[i**2 + j**2 + k**2 + i*j + j*k + k*i-1] += 1
for i in range(n):
    print(count_lis[i])

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

Solution (Python):
num = [ 0 for i in range(10**6)]

for i in range(1,150):
    for j in range(1,150):
        for k in range(1,150):
            tmp = i**2+j**2+k**2+i*j+j*k+k*i
            
            num[tmp] += 1
N = int(input())

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

Solution (Python):
import sys
sys.setrecursionlimit(10 ** 8)

def Z(): return int(input())
def ZZ(): return [int(_) for _ in input().split()]

def main():
    N = Z()
    ans = [0] * (10**4 + 1)

    for i in range(1, 101):
        for j in range(1, 101):
            for k in range(1, 101):
                w = i*i + j*j + k*k + i*j + j*k + k*i
                if 1 <= w < 10 ** 4 + 1:
                    ans[w] += 1
    for i in range(1, N+1):
        print(ans[i])

    return

if __name__ == '__main__':
    main()

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

dp = [0] * 70000

for x in range(1, 101):
    for y in range(1, 101):
        for z in range(1, 101):
            idx_tmp = x*x + y*y + z*z + x*y + y*z + z*x
            dp[idx_tmp] += 1 

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

Solution (Python):
n = int(input())
l = [0 for i in range(10**4+1)]
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 <= 10**4:
        l[tmp] += 1

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

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

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

L = [0]*(10**4+1)

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

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

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

res = [0] * n
for s in range(1, 101):
    for t in range(1, 101):
        for u in range(1, 101):
            temp = (s + t) ** 2 + (s + u) ** 2 + (t + u) ** 2
            if temp > 2 * n:break
            if temp %2 == 0:
                res[temp//2 - 1] += 1

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

Solution (Python):
ans=[0 for i in range(10**4+1)]

n=int(input())

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

for i in range(1,100):
    for q in range(1,100):
        for p in range(1,100):
            if calc(i,q,p)<=10**4:
                ans[calc(i,q,p)]+=1

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

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

dict = [0] * N
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 > N:
                break
            else:
                dict[t-1] += 1

for ans in dict:
    print(ans)

Solution (Python):









def solve():

    N = int(input())

    counts = [0] * (N+1)

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

    return counts[:N]


def main():
    print(*solve())


if __name__ == "__main__":
    main()

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

Solution (Python):


import re
import math
from collections import defaultdict,deque,Counter
from fractions import Fraction
import bisect
import itertools
from itertools import accumulate
from copy import deepcopy
import heapq
import random
import time
import os
import sys
from functools import lru_cache,reduce
readline=sys.stdin.readline
sys.setrecursionlimit(100000)
alp="abcdefghijklmnopqrstuvwxyz"
numbers="0123456789"
mod=int(10**9+7)
inf=int(10**19)
class Set():
    def __init__(self,A=[]):
        self.heap=[]
        self.dic=defaultdict(bool)
        self.size=0
        for a in A:self.add(a)
    
    def __str__(self):
        return str(self.heap)
    
    def add(self,x):
        if not self.find(x):
            heapq.heappush(self.heap,x)
            self.dic[x]=True
            self.size+=1

    def remove(self,x):
        if self.find(x):
            self.dic[x]=False
            self.size-=1

    def find(self,x):
        return self.dic[x]
    
    def top(self):
        while self.heap and self.dic[self.heap[0]]==False:
            heapq.heappop(self.heap)
        if self.heap:return self.heap[0]
        else:return None

    def pop(self):
        ret=None
        if self.heap:
            ret=self.top()
            self.remove(ret)
        return ret
class multiset():
    def __init__(self,A=[]):
        self.heap=[]
        self.dic=defaultdict(int)
        self.size=0
        for a in A:self.add(a)
    
    def __str__(self):
        return str(self.heap)
    
    def add(self,x):
        heapq.heappush(self.heap,x)
        self.dic[x]+=1
        self.size+=1

    def remove(self,x):
        if self.dic[x]>0:
            self.dic[x]-=1
            self.size-=1
    
    def count(self,x):
        return self.dic[x]

    def find(self,x):
        return self.dic[x]>0
    
    def top(self):
        while self.heap and self.dic[self.heap[0]]==0:
            heapq.heappop(self.heap)
        if self.heap:return self.heap[0]
        else:return None

    def pop(self):
        ret=None
        if self.heap:
            ret=self.top()
            self.remove(ret)
        return ret
class Edge():
    def __init__(self,x,y,val=1):
        self.x=x
        self.y=y
        self.val=val
class unionfind():
    def __init__(self,n):
        self.n=n
        self.P=[a for a in range(n)]
        self.rank=[0]*n
 
    def find(self,x):
        if(x!=self.P[x]):
            self.P[x]=self.find(self.P[x])
        return self.P[x]
 
    def same(self,x,y):
        return self.find(x)==self.find(y)
 
    def link(self,x,y):
        if self.rank[x]<self.rank[y]:
            self.P[x]=y
        elif self.rank[y]<self.rank[x]:
            self.P[y]=x
        else:
            self.P[x]=y
            self.rank[y]+=1
 
    def unite(self,x,y):
        self.link(self.find(x),self.find(y))
 
    def size(self):
        S=set()
        for a in range(self.n):
            S.add(self.find(a))
        return len(S)
def yn(b):print("yes" if b else "no")
def Yn(b):print("Yes" if b else "No")
def YN(b):print("YES" if b else "NO")
def ispow(a,b):
    now=b
    while now<a:
        now*=b
    return now==a
def getbin(num,size):
    A=[0]*size
    for a in range(size):
        if (num>>(size-a-1))&1==1:
            A[a]=1
        else:
            A[a]=0
    return A
def getfacs(n,mod_=0):
    A=[1]*(n+1)
    for a in range(2,len(A)):
        A[a]=A[a-1]*a
        if(mod_>0):A[a]%=mod_
    return A
def comb(n,r,mod,fac):
    if(n-r<0):return 0
    return (fac[n]*pow(fac[n-r],mod-2,mod)*pow(fac[r],mod-2,mod))%mod
def nextcomb(num,size):
    x=num&(-num)
    y=num+x
    z=num&(~y)
    z//=x
    z=z>>1
    num=(y|z)
    if(num>=(1<<size)):return False
    else:return num
def getprimes(n):
    if n==0:return []
    A=[True]*(n+1)
    A[0]=False
    A[1]=False
    for a in range(2,n+1):
        if A[a]:
            for b in range(a*2,n+1,a):
                A[b]=False
    ret=[]
    for a in range(n+1):
        if(A[a]):ret.append(a)
    return ret
def isprime(num):
    if(num<=1):return False
    i=2
    while i*i<=num:
       if(num%i==0):return False
       i+=1
    return True
def ifelse(b,t,f):return t if b else f
def factorize(n):
    b = 2
    ret=defaultdict(int)
    while b * b <= n:
        while n % b == 0:
            n //= b
            ret[b]+=1
        b+=1
    if n > 1:ret[n]+=1
    return ret
def inputintlist(row=1): 
    if row==1:
        ret=list(map(int,input().split()))
    else:
        ret=[None]*row
        for a in range(row):
            ret[a]=int(input())
    return ret
def inputfloatlist(row=1): 
    if row==1:
        ret=list(map(float,input().split()))
    else:
        ret=[None]*row
        for a in range(row):
            ret[a]=float(input())
    return ret
def istanchouzouka(A):
    f=True
    prev=min(A)-1
    for a in A:
        if prev>=a:
            f=False
        prev=a
    return f
def istanchouhigensyou(A):
    f=True
    prev=min(A)-1
    for a in A:
        if prev>a:
            f=False
        prev=a
    return f
def getallsum(A):
    s=sum(A)
    dp=defaultdict(int)
    dp[0]=1
    for a in range(0,len(A)):
        for b in range(s,-1,-1):
            if b-A[a]>=0:
                dp[b]+=dp[b-A[a]]
    return dp
def yuukoutomukou(edges):
    ret=deepcopy(edges)
    for edge in edges:
        if not edge.x==edge.y:
            ret.append(Edge(edge.y,edge.x,edge.val))
    return ret
def dijkstra(edges,V,start):
    mincost=[inf]*V
    G=[[] for a in range(V)]
    for edge in edges:
        G[edge.x].append([edge.val,edge.y])
    Q=PriorityQueue()
    Q.put([0,start])
    while not Q.empty():
        nowcost,nowx=Q.get()
        if mincost[nowx]==inf:
            mincost[nowx]=nowcost
            for cost,y in G[nowx]:
                newcost=nowcost+cost
                Q.put([newcost,y])
    return mincost
def warshallfloyd(edges,V):
    mincost=[[inf for b in range(V)] for a in range(V)]
    for a in range(V):mincost[a][a]=0
    for edge in edges:
        mincost[edge.x][edge.y]=min(mincost[edge.x][edge.y],edge.val)
    for k in range(V):
        for s in range(V):
            for t in range(V):
                if mincost[s][k]==inf or mincost[k][t]==inf:continue
                mincost[s][t]=min(mincost[s][t],mincost[s][k]+mincost[k][t])
    return mincost
def bellemanford(edges,V,start):
    mincost=[inf]*V
    mincost[start]=0
    for _ in range(V):
        for edge in edges:
            if mincost[edge.x]==inf:continue
            mincost[edge.y]=min(mincost[edge.y],mincost[edge.x]+edge.val)
    return mincost
def getmd(x1,y1,x2,y2):return abs(x1-x2)+abs(y1-y2)
def geted(x1,y1,x2,y2):return math.sqrt((x1-x2)**2+(y1-y2)**2)
class fordfulkerson():
    def __init__(self,edges,V,s,t):
        self.V=V
        self.used=[False]*V
        self.G=[[] for a in range(V)]
        self.s=s
        self.t=t
        for edge in edges:
            self.G[edge.x].append({"x":edge.x,"y":edge.y,"cap":edge.val,"rev":len(self.G[edge.y])})
            self.G[edge.y].append({"x":edge.y,"y":edge.x,"cap":0,"rev":len(self.G[edge.x])-1})
    def dfs(self,v,t,f=inf):
        if v==t:return f
        self.used[v]=True
        for a in range(len(self.G[v])):
            x=self.G[v][a]["x"]
            y=self.G[v][a]["y"]
            cap=self.G[v][a]["cap"]
            rev=self.G[y][self.G[x][a]["rev"]]
            if self.used[y] or cap==0:continue
            f2=self.dfs(y,t,min(f,cap))
            if f2>0:
                self.G[v][a]["cap"]-=f2
                rev["cap"]+=f2
                return f2
        return 0
    def maxflow(self):
        flow=0
        while True:
            self.used=[False]*V
            zouka=self.dfs(self.s,self.t)
            if zouka==0:break
            flow+=zouka
        return flow
def zipsort(*args):
    ziplist=sorted(zip(*args))
    for a in range(len(args)):
        for b in range(len(ziplist)):
            args[a][b]=ziplist[b][a]
def zipreverse(*args):
    ziplist=list(zip(*args))
    rev=[]
    for a in range(len(ziplist)-1,-1,-1):
        rev.append(ziplist[a])
    for a in range(len(args)):
        for b in range(len(rev)):
            args[a][b]=rev[b][a]




N=int(input())
F=[0]*(10**5)
for x in range(1,101):
    for y in range(1,101):
        for z in range(1,101):
            num=x**2+y**2+z**2+x*y+y*z+z*x
            F[num]+=1
for a in range(1,N+1):
    print(F[a])

Solution (Python):

n = int(input())
buf = [0 for i in range(100000)]

for i in range(1,101):
    for j in range(1,101):
        for k in range(1,101):
            tp = i*i+j*j+k*k+i*j+j*k+k*i
            buf[tp] += 1

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

Solution (Python):
from collections import defaultdict
n=int(input())
dic=defaultdict(int)
for x in range(1,100,1):
    for y in range(1,100,1):
        for z in range(1,100,1):
            temp=x**2+y**2+z**2+x*y+y*z+z*x
            dic[temp]+=1
for i in range(n):  print(dic[i+1])

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

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

ans = [0] * N

for x in range(1, 101):
    for y in range(x, 101):
        for z in range(y, 101):
            p = f(x, y, z)
            if (p <= N):
                if (x == y and y == z):
                    ans[p-1] += 1
                elif (x == y or y == z or z == x):
                    ans[p-1] += 3
                else:
                    ans[p-1] += 6

for a in ans:
    print(a)

Solution (Python):
"""
                            pppppppppppppppppppp
                         ppppp  ppppppppppppppppppp
                      ppppppp    ppppppppppppppppppppp
                      pppppppp  pppppppppppppppppppppp
                      pppppppppppppppppppppppppppppppp
                              pppppppppppppppppppppppp
       ppppppppppppppppppppppppppppppppppppppppppppppp  pppppppppppppppppppp
      pppppppppppppppppppppppppppppppppppppppppppppppp  ppppppppppppppppppppp
     ppppppppppppppppppppppppppppppppppppppppppppppppp  pppppppppppppppppppppp
    ppppppppppppppppppppppppppppppppppppppppppppppp    pppppppppppppppppppppppp
   pppppppppppppppppppppppppppppppppppppppppppppp     pppppppppppppppppppppppppp
  ppppppppppppppppppppppppppppppppppppppppppppp      pppppppppppppppppppppppppppp
  pppppppppppppppppppppppppppppppp               pppppppppppppppppppppppppppppppp
  pppppppppppppppppppppppppppp     pppppppppppppppppppppppppppppppppppppppppppppp
  ppppppppppppppppppppppppppp    pppppppppppppppppppppppppppppppppppppppppppppppp
    pppppppppppppppppppppppp  pppppppppppppppppppppppppppppppppppppppppppppppppp
     ppppppppppppppppppppppp  ppppppppppppppppppppppppppppppppppppppppppppppppp
      pppppppppppppppppppppp  ppppppppppppppppppppppppppppppppppppppppppppppp
       ppppppppppppppppppppp  ppppppppppppppppppppppppppppppppppppppppppppp
                              pppppppppppppppppppppppp
                              pppppppppppppppppppppppppppppppp
                              pppppppppppppppppppppp  pppppppp
                              ppppppppppppppppppppp    ppppppp
                                 ppppppppppppppppppp  ppppp
                                    pppppppppppppppppppp
"""


import sys
from collections import Counter as C
def data(): return sys.stdin.readline().strip()
def out(var): sys.stdout.write(str(var))
def outa(*var, end="\n"): sys.stdout.write(' '.join(map(str, var)) + end)


d = C()
for i in range(1, 101):
    for j in range(1, 101):
        for k in range(1, 101):
            d[i ** 2 + j ** 2 + k ** 2 + i * j + j * k + k * i] += 1
n = int(data())
for i in range(1, n+1):
    out(str(d[i])+"\n")

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

n = int(input())

cnt = {}
for x in range(1, 101):
    for y in range(1, 101):
        if(f(x, y, 1) > n): break
        for z in range(1, 101):
            if(f(x, y, z) > n): break
            
            val = f(x, y, z)

            if(cnt.get(val) is None): cnt[val] = 1
            else: cnt[val] += 1

for i in range(1, n+1):
    if(cnt.get(i) is None): print(0)
    else: print(cnt[i])

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):
'''
    Auther: ghoshashis545 Ashis Ghosh
    College: jalpaiguri Govt Enggineering College

'''
from os import path
import sys
from heapq import heappush,heappop
from functools import cmp_to_key as ctk
from collections import deque,defaultdict as dd 
from bisect import bisect,bisect_left,bisect_right,insort,insort_left,insort_right
from itertools import permutations
from datetime import datetime
from math import ceil,sqrt,log,gcd
def ii():return int(input())
def si():return input()
def mi():return map(int,input().split())
def li():return list(mi())
abc='abcdefghijklmnopqrstuvwxyz'
mod=1000000007

inf = float("inf")
vow=['a','e','i','o','u']
dx,dy=[-1,1,0,0],[0,0,1,-1]

def bo(i):
    return ord(i)-ord('a')

file=0




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


    
    
        

    n=ii()
    ans=[0]*(n+1)
    for i in range(1,n+1):
        for j in range(1,n+1):
            if f(i,j,1)>n:
                break
            for k in range(1,n+1):
                x=f(i,j,k)
                if x>n:
                    break
                ans[x]+=1

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





        
if __name__ =="__main__":

    if(file):

        if path.exists('input1.txt'):
            sys.stdin=open('input1.txt', 'r')
            sys.stdout=open('output1.txt','w')
        else:
            input=sys.stdin.readline
    solve()

Solution (Python):
N=int(input())
a=[0]*(N+1)
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<=N:
                a[t]+=1
for i in a[1:]:
    print(i)

Solution (Python):
n = int(input())
ans = [0]*10**7
for i in range(1,5*10**2):
    for j in range(1,5*10**2):
        for k in range(1,5*10**2):
            ans[(i+j+k)**2-(i*j+j*k+k*i)] += 1
for i in ans[1:n+1]:
    print(i)

Solution (Python):
n = int(input())
a = [0 for i in range(10000)]
for x in range(1,100):
    for y in range(1,100):
        for z in range(1,100):
            w = (x+y+z)**2-z*x-z*y-x*y
            if w <= 10000:
                a[w-1] += 1
for i in range(n):
    print(a[i])

Solution (Python):
import sys
stdin = sys.stdin
sys.setrecursionlimit(10**6)
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

n = ni()
ans = [0]*n

for x in range(1,101):
    for y in range(x,101):
        for z in range(y,101):
            p = 3 if x==y else 6
            if y==z:
                p = 1 if p==3 else 3
            k = x**2+y**2+z**2+x*y+y*z+z*x
            if k <= n:
                ans[k-1] += p

for i in ans:
    print(i)

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

if __name__ == "__main__":
    main()

Solution (Python):

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

for i in range(1, 101):
    for j in range(1, 101):
        for z in range(1, 101):
            aaa = i**2+j**2+z**2+i*j+j*z+z*i
            if aaa <= 10**4:
                ans[aaa] += 1
for i in range(n):
    print(ans[i+1])