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):
import sys
from collections import defaultdict, Counter, namedtuple, deque
import itertools
import functools
import bisect
import heapq
import math
import copy


MOD = 10 ** 9 + 7




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

for a in range(1, 100):
    for b in range(1, 100):
        for c in range(1, 100):
            num = a*a + b*b + c*c + a*b + b*c + c*a
            if num <= n:
                ans[num] += 1

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

Solution (Python):

import bisect
import heapq
import math
import random
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub


import sys


buff_readline = sys.stdin.readline
readline = sys.stdin.readline

INF = 2**62-1


def read_int():
    return int(buff_readline())


def read_int_n():
    return list(map(int, buff_readline().split()))


def read_float():
    return float(buff_readline())


def read_float_n():
    return list(map(float, buff_readline().split()))


def read_str():
    return readline().strip()


def read_str_n():
    return readline().strip().split()

def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(N):
    fc = Counter()
    for x in range(1, 100+1):
        x2 = x**2
        for y in range(1, 100+1):
            y2 = y**2
            for z in range(1, 100+1):
                z2 = z**2
                f = x2 + y2 + z2 + x*y + y*z + z*x
                if f <= N:
                    fc[f] += 1

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


def main():
    N = read_int()
    (slv(N))


if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
from itertools import product
l = list(range(1, 100+1))
f = [0 for _ in range(11000)]
def func(x,y,z):
    return x**2 + y**2 + z**2 + x*y + y*z + z*x
for x, y, z in product(l, l, l):
    v = func(x,y,z)
    if v <= n:
        f[v] += 1
for ans in f[1:n+1]:
    print(ans)

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

Solution (Python):
def resolve():
    n = int(input())
    d = [0 for i in range(n)]
    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 <= n:
                    d[x**2 + y**2 + z ** 2 + x*y + y*z + z*x - 1] += 1

    for i in d:
        print(i)

resolve()

Solution (Python):
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def dp2(ini, i, j): return [[ini]*i for i2 in range(j)]





N = ii()

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


for i in range(1, 101):
    for j in range(1, 101):
        for k in range(1, 101):
            tmp = ((i+j)**2 + (j+k)**2 + (k+i)**2) // 2
            if tmp < 10**4 + 1:
                cnt[tmp] += 1

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

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

Solution (Python):
N = int(input())
ans = [0 for _ in range(N)]
for x in range(1, 1000):
    if x**2 > N:
        continue
    for y in range(1, 1000):
        if x**2 + y**2 > N:
            break
        for z in range(1, 1000):
            n = x**2 + y**2 + z**2 + x*y + y*z + z*x
            if n <= N:
                ans[n-1] += 1
            if n > N:
                break
for a in ans:
    print(a)

Solution (Python):
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):
            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 item in ans[1:]:
    print(item)

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

Solution (Python):

import sys
import math
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import itertools
import random
from collections import deque
from decimal import *
import queue

input = sys.stdin.readline

def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
def inputStr(): return input()[:-1]

inf = float('inf')
mod = 1000000007




def main():
	N = inputInt()

	ans = [0 for i in range(N)]
	for x in range(1,100+1):
		for y in range(1,100+1):
			for z in range(1,100+1):
				tmp = x**2 + y**2 + z**2 + x*y + y*z + z*x

				if tmp <= N:
					ans[tmp-1] += 1

	for i in ans:
		print(i)






if __name__ == "__main__":
	main()

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

li = [0]*(10**5)

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

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

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

import math
sq = math.ceil(math.sqrt(n) )

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

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

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

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

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

Solution (Python):
N=int(input())
D={}

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 not in D:
                D[A]=1
            else:
                D[A]+=1
for i in range(1,N+1):
    if i not in D:
        print(0)
    else:
        print(D[i])

Solution (Python):
import math
n = int(input())
ans_list = [0 for _ in range(n)]
ceil_n = math.ceil(n ** 0.5)
for x in range(1, ceil_n):
    for y in range(x, ceil_n):
        for z in range(y, ceil_n):
            value = (x ** 2) + (y ** 2) + (z ** 2) + (x*y) + (y*z) + (z * x)
            if value <= n:
                if (x == y) & (y == z):
                    point = 1
                elif (x == y) | (y == z) | (z == x):
                    point = 3
                else:
                    point = 6
                ans_list[value - 1] += point
for i in range(n):
    print(ans_list[i])

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


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

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

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

Solution (Python):
N = int(input())
ans = [0]*(N+1)
for x in range(1,100):
    xx = x*x
    for y in range(1,100):
        yy = y*y
        xy = x*y
        for z in range(1,100):
            zz = z*z
            zx = z*x
            yz = y*z
            n = xx+yy+zz+xy+yz+zx
            if n<=N: ans[n]+=1

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

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

dic = {}
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 not a in dic:
                dic[a] = 1
            
            else:
                dic[a] += 1

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