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

list = [0]*61206

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

for n in ans:
    print(n)

Solution (Python):
n = int(input())
num = [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+1:
                num[res] += 1
                
            else:
                continue
                
for i in num[1:]:
    print(i)

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


A = [0]*70000

for x in range(1,100):
  for y in range(1,100):
    for z in range(1,100):
      t = x*x + y*y + z*z +x*y + y*z + z*x
      A[t] += 1

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

Solution (Python):
input =raw_input

N = int(input())

counts = [0] * (N+1)


x = 1
while True:
    tmp1 = x ** 2
    y = x + 1

    ycount = 0
    while True:
        tmp2 = y ** 2 + x * y
        z = y + 1

        zcount = 0
        while True:
            tmp3 = z ** 2 + x * z + y * z
            n = tmp1 + tmp2 + tmp3
            if n > N:
                break
            else:
                counts[n] += 6
            z += 1
            zcount += 1
        if zcount == 0:
            break
        ycount += 1
        y += 1

    if ycount == 0:
        break
    x += 1


x = 1
while True:
    tmp1 = x ** 2
    y = x+1
    ycount = 0
    while True:
        z = y
        tmp2 = y ** 2 + z ** 2 + x*y + y*z + z * x
        n = tmp1 + tmp2
        if n > N:
            break
        else:
            counts[n] += 3
        y += 1
        ycount += 1
    if ycount == 0:
        break
    else:
        x += 1
        

if True:
    x = 1
    while True:
        y = x
        tmp1 = x ** 2 + y ** 2 + x*y

        zcount = 0
        z = y + 1
        while True:
            tmp2 = z ** 2 + y*z + z * x
            n = tmp1 + tmp2
            if n > N:
                break
            else:
                counts[n] += 3
            z += 1
            zcount += 1
        if zcount == 0:
            break
        else:
            x += 1
 

if True:
    x = 1
    while True:
        n = 6 * (x ** 2)
        if n > N:
            break
        else:
            counts[n] += 1
        x += 1

for c in counts[1:]:
    print(c)

Solution (Python):
from itertools import combinations_with_replacement

n = int(input())
res = [0] * n
for x, y, z in combinations_with_replacement(range(1, int(n**0.5)), 3):
    if (val := x**2 + y**2 + z**2 + x*y + y*z + z*x) > n:
        continue
    if (l := len(set([x, y, z]))) == 1:
        res[val-1] += 1
    elif l == 2:
        res[val-1] += 3
    else:
        res[val-1] += 6
print('\n'.join(map(str, res)))

Solution (Python):
import sys
from math import ceil, floor, sqrt, sin, cos, pi
from itertools import accumulate, permutations, combinations
from fractions import gcd 
from collections import deque, Counter
from operator import itemgetter
from heapq import heappop,heappush
sys.setrecursionlimit(10**7)
def lcm(x, y): return ((x * y) // gcd(x, y)) 


N = int(input())
x = 0
ans = [0 for _ in range(N)]
maxv = ceil(sqrt(N)) + 1
for x in range(1, maxv):
    for y in range(1, maxv):
        for z in range(1, maxv):
            f = x*x + y*y + z*z + x*y + y*z + z*x - 1
            if f > N-1: continue
            ans[f] += 1
for i in range(N):
    print(ans[i])

Solution (Python):
import sys,queue,math,copy,itertools,bisect,collections,heapq

def main():
    sys.setrecursionlimit(10**7)
    INF = 10**18
    MOD = 10**9 + 7
    LI = lambda : [int(x) for x in sys.stdin.readline().split()]
    _LI = lambda : [-int(x) for x in sys.stdin.readline().split()]
    NI = lambda : int(sys.stdin.readline())
    SI = lambda : sys.stdin.readline().rstrip()
    DD = ((1,0),(0,1),(-1,0),(0,-1))
    eps = 10**(-10)

    N = NI()

    for n in range(1,N+1):
        ans = 0
        m = int(math.sqrt(n)) + 1
        for x in range(1,m):
            for y in range(1,m):
                a0 = x*x + y*y + x*y - n
                a1 = x + y
                if a1*a1 - 4*a0 >= 0:
                    z = (-a1 + math.sqrt(a1*a1 - 4*a0)) / 2
                    if z - int(z+eps) == 0.0 and z > 0:
                        ans += 1
        print(ans)

if __name__ == '__main__':
    main()

Solution (Python):
import math

a = []
for i in range(10001):
    a.append(0)
for i in range(1,99):
    for j in range(1,99):
        if i*i + i*j + j*j > 10000:
            break
        for k in range(1,99):
            l = i*i + j*j + k*k + i*j + i*k + j*k
            if l > 10000:
                break
            a[l]+= 1
N = int(input())
for i in range(1,N+1):
    print(a[i])

Solution (Python):
n = int(input())
dic = {}
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):
            ans = x**2 + y **2 + z**2 +x*y+y*z+z*x
            if ans in dic:
                dic[ans] +=1
            else:
                dic[ans] = 1

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

Solution (Python):


import itertools
import math


def compute(n):
    res = [0 for _ in range(n + 1)]
    n_ub = math.ceil(math.sqrt(n) + 1.0)
    for x, y, z in itertools.product(range(1, n_ub + 1), repeat=3):
        m = x * x + y * y + z * z + x * y + y * z + z * x
        if 0 <= m <= n:
            res[m] += 1
    return res



def main():
    n = int(input())
    res = compute(n)
    print(*res[1:], sep="\n")


if __name__ == '__main__':
    main()

Solution (Python):
import collections

ans=[]
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<=10000:
                ans.append(tmp)
                
c = collections.Counter(ans)

n=int(input())
for i in range(1,n+1):
    if i in c:
        print(c[i])
    else:
        print(0)

Solution (Python):
n = int(open(0).read())
from math import ceil
m = ceil((2*n)**0.5)

from collections import defaultdict

c = defaultdict(int)

for k in range(m):
    for i in range(1,k):
        for j in range(1,k-i):
            x,y,z=i,j,k-i-j
            if z>0:
                val = x**2+y**2+z**2+x*y+y*z+z*x

                c[val] += 1

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

Solution (Python):
import math
import itertools

n = int(input())
def f(x,y,z):
    return x**2+y**2+z**2+x*y+y*z+z*x
lim = 0
while lim**2+lim+4 <= n:
    lim += 1
tmp = list(range(1,lim+1))

combList = list(itertools.combinations_with_replacement(tmp,3))
ansLis = [0] * (n+1)
for item in combList:
    tmp = f(item[0],item[1],item[2])
    if tmp > n:
        pass
    else:
        if item[0] == item[1] and item[1] == item[2]:
            ansLis[tmp] += 1
        elif item[0] == item[1] or item[1] == item[2] or item[2] == item[0]:
            ansLis[tmp] += 3
        else:
            ansLis[tmp] += 6

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

Solution (Python):
import itertools

n = int(input())

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

for x, y, z in itertools.product(range(1, 10 ** 2), repeat=3):
    idx = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
    if idx <= 10 ** 4:
        cnt[idx] += 1


for num in cnt[1 : n + 1]:
    print(num)

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

ans = dict()
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

            current = ans.get(v, 0)
            ans.update({v: current+1})

for i in range(n):
    print(ans.get(i+1, 0))

Solution (Python):
from math import sqrt
l = [-1]+[0]*10**4
n = int(input())
for i in range(1,int(sqrt(n))+2):
    for j in range(1,int(sqrt(n))+2):
        for k in range(1,int(sqrt(n))+2):
            ans = i**2+j**2+k**2+i*j+j*k+k*i
            if ans <= 10**4:
                l[ans] += 1
for i in range(1,n+1):
    print(l[i])

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

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

def g( x, y, z ):
    return min( x * x + y * y + z * z + x * y + y * z + z * x, 10 ** 4 + 1 )

for x in range( 1, 101 ):
    for y in range( 1, 101 ):
        for z in range( 1, 101 ):
            n_list[ g( x, y, z ) - 1 ] += 1

for k in range( n ):
    print( n_list[ k ] )

Solution (Python):
n = int(input())
lst = [0] * 10000
def kake(a, b, c):
    return a ** 2 + b ** 2 + c ** 2 + a * b + b * c + c * a
for i in range(1,50):
  for j in range(i, 60):
    for k in range(j, 110):
      m = kake(i, j, k)
      if m <= 10000:
        if i != j and j != k:
          lst[m - 1] += 6
        elif i == j and j == k:
          lst[m - 1] += 1
        else:
          lst[m - 1] += 3
for i in range(n):
  print(lst[i])

Solution (Python):
from collections import Counter
n = int(input())

c = Counter(x * x + y * y + z * z + x * y + y * z + z * x
        for x in range(1, 100) for y in range(1, 100) for z in range(1, 100))

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

Solution (Python):
import sys, math

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

def calcf(N):
    f_values = [0] * (N+1)
    root = math.floor(math.sqrt(N) )
    for x in range(1, root+1, 1):

        for y in range(x, root+1, 1):
            sum = x**2+y**2+x*y
            if(sum > N):
                break
            for z in range(y, root+1, 1):
                sum2 = z**2+y*z+z*x+ sum
                if(sum2 > N):
                    break
                else:
                    f_values[sum2] += calcN(x, y, z)
    return f_values

if(__name__ == "__main__"):

    N = int(input().strip())

    f_values = calcf(N)
    for i in range(1, N+1):
        print(f_values[i])

Solution (Python):
"""
    こんにちは。これはクシャルです
    
    Author : thekushalghosh (クシャル)
    Team   : CodeDiggers
 
    I prefer Python language over the C++ language :p :D
        
    Visit my website : thekushalghosh.github.io
"""
import sys,math,cmath,time,itertools
start_time = time.time()


a = [0] * 10000
for i in range(1,100):
    for j in range(1,100):
        for k in range(1,100):
            if (i ** 2) + (j ** 2) + (k ** 2) + (i * j) + (j * k) + (k * i) <= 10000:
                a[(i ** 2) + (j ** 2) + (k ** 2) + (i * j) + (j * k) + (k * i) - 1] += 1
    
def solve():
    global a
    n = inp()
    for i in range(n):
        print(a[i])
    


 
def main():
    global tt
    if not ONLINE_JUDGE:
        sys.stdin = open("input.txt","r")
        sys.stdout = open("output.txt","w")
    t = 1
    for tt in range(t):
        solve()
    if not ONLINE_JUDGE:
        print("Time Elapsed :",time.time() - start_time,"seconds")
        sys.stdout.close()
    

def inp():
    return(int(input()))
def inlt():
    return(list(map(int,input().split())))
def insr():
    return(input().strip())
def invr():
    return(map(int,input().split()))
 

def counter(a):
    q = [0] * max(a)
    for i in range(len(a)):
        q[a[i] - 1] = q[a[i] - 1] + 1
    return(q)

def counter_elements(a):
    q = dict()
    for i in range(len(a)):
        if a[i] not in q:
            q[a[i]] = 0
        q[a[i]] = q[a[i]] + 1
    return(q)

def string_counter(a):
    q = [0] * 26
    for i in range(len(a)):
        q[ord(a[i]) - 97] = q[ord(a[i]) - 97],1
    return(q)
 
def factors(n):
    q = []
    for i in range(1,int(n ** 0.5) + 1):
        if n % i == 0: q.append(i); q.append(n // i)
    return(list(sorted(list(set(q)))))
 
def prime_factors(n):
    q = []
    while n % 2 == 0: q.append(2); n = n // 2
    for i in range(3,int(n ** 0.5) + 1,2):
        while n % i == 0: q.append(i); n = n // i
    if n > 2: q.append(n)
    return(list(sorted(q)))

def transpose(a):
    n,m = len(a),len(a[0])
    b = [[0] * n for i in range(m)]
    for i in range(m): 
        for j in range(n): 
            b[i][j] = a[j][i]
    return(b)


        
ONLINE_JUDGE = __debug__
if ONLINE_JUDGE:
    input = sys.stdin.readline
    
main()

Solution (Python):
n = int(input())
li = [0]*n
for i in range(1,100):
    for j in range(1,100):
        for k in range(1,100): 
            if i**2 + j**2 + k**2 + i*j + j*k + k*i <= n:
                li[i**2 + j**2 + k**2 + i*j + j*k + k*i -1] += 1
for i in range(n):
    print(li[i])

Solution (Python):
N = int(input())
ans = {i:0 for i in range(100000)}
for x in range(1, 100):
    for y in range(1, 100):
        for z in range(1, 100):
            i = x**2 + y**2 + z**2 + x*y + y*z + z*x
            ans[i] += 1
for i in range(1, N+1):
    print(ans[i])

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

lst=[0 for i in range(n+1)]

for x in range(1,int(n**0.5)):
    for y in range(1,x+1):
        if x**2+y**2+(x+y+1)**2+1>2*n : break
        for z in range(1,y+1):
            work=(x**2+y**2+z**2+(x+y+z)**2)//2
            if work>n: break
            if x==y and y==z : lst[work]+=1
            elif x==y or y==z or x==z : lst[work]+=3
            else : lst[work]+=6

for w in lst[1:]:
    print(w)

Solution (Python):
n = int(input())
ans = {i: 0 for i in range(1, n + 1)}
for x in range(1, 120):
    for y in range(1, 120):
        for z in range(1, 120):
            result = (x + y + z) ** 2 - x * y - y * z - z * x
            if result in ans:
                ans[result] += 1

for i in ans.values():
    print(i)

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

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

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

Solution (Python):
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines

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

    f = [0] * (N+1)
    for x in range(1,100):
        for y in range(1,100):
            for z in range(1,100):
                tmp = x**2 + y**2 + z**2 + x*y + y*z + z*x
                if tmp <= N:
                    f[tmp] += 1
    
    print("\n".join(map(str, f[1:])))


if __name__ == "__main__":
    main()

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

import numpy as np
import math as m
M = m.ceil(m.sqrt(N))
numbers = np.zeros(N)
for i in range(M):
    for j in range(M):
        for k in range(M):
            x = i + 1
            y = j + 1
            z = k + 1
            fn = x*x + y*y + z*z + x*y + y*z + z*x
            if fn >= 1 and fn <= N:
                numbers[fn - 1] += 1
for i in range(N):
    print(int(numbers[i]))

Solution (Python):
from itertools import permutations
from functools import reduce

n = int(input())

rn = int(n **.5) + 1

ptn = permutations([i for i in range(1, rn + 1)], 3)

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

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

Solution (Python):
import math

N = int(input())
MAX = min(math.ceil(math.sqrt(N)),101)

d = {}
for i in range(10001):
    d[i] = 0

for x in range(1,MAX):
    for y in range(1,MAX):
        for z in range(1,MAX):
            tmp = x**2 + y**2 + z**2 + x*y + y*z + z*x
            if tmp in d.keys():
                d[tmp] += 1
            else:
                d[tmp] = 1

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

Solution (Python):
import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def resolve():
    N = I()

    xyz_max = int(N ** 0.5) + 1
    ans = [0] * (N + 1)
 
    for x, y, z in itertools.product(range(1, xyz_max), range(1, xyz_max), range(1, xyz_max)):
        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])

if __name__ == '__main__':
    resolve()

Solution (Python):
def main():

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

    for x in range(1, int(N ** 0.5) + 2):
        for y in range(1, int(N ** 0.5) + 2):
            for z in range(1, int(N ** 0.5) + 2):
                n = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
                if n > N:
                    continue

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


if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
limit = 100
memo = {}

for a in range(1, limit):
  for b in range(1, limit):
    for c in range(1, limit):
      t = a**2 + b**2 + c**2 + a*b + b*c + c*a
      if not t in memo:
        memo[t] = 1
      else:
        memo[t] += 1
        
for i in range(1, N+1):
  if not i in memo:
    print(0)
  else:
    print(memo[i])

Solution (Python):
import sys
import numpy as np


MODE = 1


DIMENSION = 0


INT_TYPE = 1

if not (MODE):
    with open("input.txt", "r") as f:
        s = f.read()
else:
    s = sys.stdin.read()

if DIMENSION == 0:
    if INT_TYPE == 1:
        s = int(s)
elif DIMENSION == 1:
    if INT_TYPE == 0:
        s = s.split()
    elif INT_TYPE == 1:
        s = [int(x) for x in s.split()]
elif DIMENSION == 2:
    if INT_TYPE == 0:
        s = [x.split() for x in s.splitlines()]
    elif INT_TYPE == 1:
        s = [[int(y) for y in x.split()] for x in s.splitlines()]

N = s
cnt = [0 for _ in range(N)]
for x in range(1, 100):
    xx = x*x
    for y in range(x, 100):
        yy = y * y
        xy = x*y
        for z in range(y, 100):
            zz = z * z
            yz = y * z
            zx = z*x
            n = xx + yy + zz + xy + yz + zx
            if n > N:
                break
            else:
                
                if x == y and y == z:
                    cnt[n-1] += 1
                elif x == y or y == z:
                    cnt[n-1] += 3
                else:
                    cnt[n-1] += 6
for i in range(N):
    print(cnt[i])

Solution (Python):
import itertools
import decimal
import math
import collections
import sys

import copy







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



resolve()

Solution (Python):
from itertools import combinations_with_replacement

n = int(input())
res = [0] * n
for x, y, z in combinations_with_replacement(range(1, int(n**0.5)), 3):
    val = x**2 + y**2 + z**2 + x*y + y*z + z*x
    if val > n:
        continue
    if (l := len(set([x, y, z]))) == 1:
        res[val-1] += 1
    elif l == 2:
        res[val-1] += 3
    else:
        res[val-1] += 6
print('\n'.join(map(str, res)))

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

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

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


if __name__ == '__main__':
    main()

Solution (Python):
import math
N=int(input())
d=int(math.sqrt(2*N)+1)
bucket=[0 for i in range(N)]
for i in range(0,d+1):
  for j in range(i,d+1):
    for k in range(j,d+1):
      if(i**2+j**2+k**2<=2*N and (i**2+j**2+k**2)%2==0 and i+j-k>=2 and j+k-i>=2 and k+i-j>=2):
        x=i+j-k
        y=j+k-i
        z=k+i-j
        if((x==z and z<y) or (x<z and z==y)):
          bucket[(i**2+j**2+k**2)//2-1]+=3
        elif(y==x and x==z):
          bucket[(i**2+j**2+k**2)//2-1]+=1
        else:
          
          bucket[(i**2+j**2+k**2)//2-1]+=6
for i in range(N):
  print(bucket[i])

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


def read():
    N = int(input().strip())
    return N,


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


def solve(N):
    T = [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):
                n = f(x, y, z)
                if n <= N:
                    T[n] += 1
    for i in range(1, N+1):
        print(T[i])


if __name__ == '__main__':
    inputs = read()
    outputs = solve(*inputs)
    if outputs is not None:
        print("%s" % str(outputs))

Solution (Python):

N = int(input())
ans_list = [0 for i in range(N + 1)]
for i in range(1, 101):
    for j in range(1, 101):
        for k in range(1, 101):
            now_num = i ** 2 + j ** 2 + k ** 2 + i * j + j * k + k * i
            if now_num > N:
                break
            ans_list[now_num] += 1

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

Solution (Python):
n = int(input())
cnt = [0] * 10**5

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

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

Solution (Python):
N=int(input())
ans=[0]*(10**5)
L=list(i for i in range(1,100))

from itertools import*
P=list(product(L,repeat=3))
for x,y,z in P:
    ans[x**2+y**2+z**2+x*y+y*z+z*x-1]+=1

for a in ans[:N]:
    print(a)

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

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

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

Solution (Python):
import math

n = int(input())
lst = [0]*n
const = int(math.sqrt(n))

if n < 6:
  for i in range(n):
    print(0)
  exit()

for x in range(1, const):
  for y in range(1, const):
    for z in range(1, const):
      s = x*x + y*y + z*z + x*y + y*z + z*x
      if s > n:
        continue
      else:
        lst[s-1] += 1

for i in lst:
  print(i)

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

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

Solution (Python):


N = int(input())

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

for i in range(1, 101):
    for j in range(1, 101):
        for k in range(1, 101):
            r = i**2 + j**2 + k**2 + i*j + j*k + i*k
            if r > len(Ret): print(r)
            Ret[r] += 1

for r in Ret[1:N+1]:
    print(r)

Solution (Python):
N=int(input())
A = [0 for _ in range(10001)]
for x in range(1,101):
    for y in range(1,101):
        for z in range(1,101):
            h=x**2+y**2+z**2+x*y+y*z+z*x 
            if h <= 10000:
                A[h]+=1;
                
for i in range(1,N+1):
    print(A[i])

Solution (Python):
import math
n = int(input())
max = int(math.sqrt(n))

a = [0] * (n + 1)

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


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

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






counter = [0]*100001

for i in range(1, 100):
    for j in range(1, 100):
        for k in range(1, 100):
            check = i**2 + j**2 + k**2 + i*j + j*k + k*i
            if check > 0 and check % 1 == 0:
                counter[check-1] += 1

answer = counter[:N]

for i in answer:
    print(i)

Solution (Python):

def func(x, y, z):
    ret = x**2 + y**2 + z**2 + x*y + y*z + z*x
    return ret

def main():
    n = int(input())
    cnt = [0 for _ in range(n+1)]

    for x in range(1, n):
        if func(x, x, x) > n:
            break
        for y in range(x, n):
            if func(x, y, y) > n:
                break
            for z in range(y, n):
                f = func(x, y, z)
                if f <= n:
                    if len({x, y, z}) == 1:
                        cnt[f] += 1
                    elif len({x, y, z}) == 2:
                        cnt[f] += 3
                    elif len({x, y, z}) == 3:
                        cnt[f] += 6
                else:
                    break

    for c in cnt[1:]:
        print(c)


if __name__ == '__main__':
    main()

Solution (Python):

import sys


def solve(N: int):
    from itertools import product
    from collections import defaultdict, Counter
    ans = defaultdict(int)
    def f(x_y_z):
        x, y, z = x_y_z
        return x * x + y * y + z * z + x * y + y * z + z * x
    c = Counter(map(f, product(range(1, 101), repeat=3)))    
    return [c[i] for i in range(1, N+1)]


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    print(*solve(N), sep="\n")

def test():
    import doctest
    doctest.testmod()

if __name__ == '__main__':
    
    main()

Solution (Python):
N=int(input())
ans_dist={}
for n in range(1,N+1):
    ans_dist[n]=0

for x in range(1,100):
    for y in range(1,100):
        for z in range(1,100):
            a=x**2 + y**2 + z**2 + x*y + y*z + x*z
            if a <= N:
                ans_dist[a]+=1
            
for k in ans_dist.keys():
    print(ans_dist[k])

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

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

Solution (Python):
from sys import stdin
import sys
import math
import random
from decimal import Decimal
import itertools as it

N = int(input())

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

for x in range(1, 101):
    x2 = x**2
    for y in range(1, 101):
        y2 = y**2
        for z in range(1, 101):
            a = x2+y2+z**2+x*y+y*z+x*z
            if a <= N:
                f[a-1] += 1
            else:
                break
for i in f:
    print(i)

Solution (Python):
n=int(input())
r=range(1,int((2*10**4)**.5)+1)
l=[0]*-~n
for i in r:
  for j in r:
    for k in r:
      t=(j+k)**2+(k+i)**2+(i+j)**2
      if t<=n*2 and t%2<1:
        l[t//2]+=1
for i in range(n): print(l[i+1])

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

for i in range(1, N):
  a = i**2
  if 6*a > N:
    break
  for j in range(i, N):
    b = j**2
    d = i*j
    if a+2*b+2*i+j**2 > N:
      break
    for k in range(j, N):
      c = k**2
      e = i*k
      f = j*k
      s = a+b+c+d+e+f
      if s <= N:
        if (a==b) and (b==c):
          l[s-1] += 1
        elif (a==b) or (b==c):
          l[s-1] += 3
        else:
          l[s-1] += 6
      else:
        break
        
for num in l:
  print(num)

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

from collections import defaultdict
ansd = defaultdict(int)

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

for x in range(1,100):
    for y in range(1, 100):
        for z in range(1,100):
            ansd[calc(x,y,z)] += 1

for k in range(1, N+1):
    print(ansd[k])

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

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

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

Solution (Python):
from __future__ import print_function
import sys


if sys.subversion[0] == "PyPy":
    import io, atexit

    sys.stdout = io.BytesIO()
    atexit.register(lambda: sys.__stdout__.write(sys.stdout.getvalue()))

    sys.stdin = io.BytesIO(sys.stdin.read())
    input = lambda: sys.stdin.readline().rstrip()
RS = raw_input
RA = lambda x=int: map(x, RS().split())
RN = lambda x=int: x(RS())


def solve():
    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 + z * y + x * z
                
                if val <= n:
                    res[val - 1] += 1
    for r in res:
        print(r)
    return




n = RN()
res = [0] * n
solve()

Solution (Python):
from math import sqrt
inpl = lambda: list(map(int,input().split()))
N = int(input())
ans = [0]*(N+1)
M = int(sqrt(N-1))
for x in range(1,M):
    for y in range(x,M):
        n = x*x + y*y + 1 + x*y + y + x
        if n > N:
            break
        for z in range(y,M):
            n = x*x + y*y + z*z + x*y + y*z + z*x
            if n > N:
                break
            elif x==y==z:
                ans[n] += 1
            elif x==y or y==z:
                ans[n] += 3
            else:
                ans[n] += 6
for n in range(1,N+1):
    print(ans[n])

Solution (Python):
import sys
import math
import itertools
import bisect
from copy import copy,deepcopy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(map(int,input().split()))
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
INF = 10**9
mod = 10**9+7

N = i()
L = [0]*(10**4)
for i in range(1,100):
    for j in range(1,100):
        for k in range(1,100):
            ans = i**2+j**2+k**2+i*j+j*k+i*k
            if ans <= 10**4:
                L[ans-1] += 1
for i in range(N):
    print(L[i])