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.



Sample input:
20


Sample output:
0
0
0
0
0
1
0
0
0
0
3
0
0
0
0
0
3
3
0
0

Submission status: Runtime Error

Solution code:
def f(x,y,z):
    n=x**2 + y**2 + z**2 + x*y + y*z + z*x
    return n

N=int(input())

if N>=9000:
  print(aaa)

anslist=[0]*60100

for x in range(1,100):
    for y in range(1,100):
        for z in range(1,100):
            n= f(x,y,z)
            anslist[n-1]+=1

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

Submission status: Runtime Error

Solution code:
def f(x,y,z):
    n=x**2 + y**2 + z**2 + x*y + y*z + z*x
    return n

N=int(input())

if N>=8000:
  print(aaa)

anslist=[0]*60100

for x in range(1,100):
    for y in range(1,100):
        for z in range(1,100):
            n= f(x,y,z)
            anslist[n-1]+=1

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

Submission status: Runtime Error

Solution code:
def f(x,y,z):
    n=x**2 + y**2 + z**2 + x*y + y*z + z*x
    return n

N=int(input())

if N>=7000:
  print(aaa)

anslist=[0]*60100

for x in range(1,100):
    for y in range(1,100):
        for z in range(1,100):
            n= f(x,y,z)
            anslist[n-1]+=1

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

Submission status: Runtime Error

Solution code:
def f(x,y,z):
    n=x**2 + y**2 + z**2 + x*y + y*z + z*x
    return n

N=int(input())

if N>=5000:
  print(aaa)

anslist=[0]*60100

for x in range(1,100):
    for y in range(1,100):
        for z in range(1,100):
            n= f(x,y,z)
            anslist[n-1]+=1

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

Submission status: Runtime Error

Solution code:
#!/usr/bin/python
# -*- coding: UTF-8 -*-

import math
import sys


def calc_p(a, b, c):
    u = {a, b, c}
    if len(u) == 3:
        return 6
    if len(u) == 2:
        return 3
    if len(u) == 1:
        return 1
    else:
        raise


def std_in():
    return sys.stdin.readline().strip()


def _main():
    N = int(std_in())
    fn = [0] * (N + 1)
    x_max = int(math.sqrt(N - 2)) - 1

    n2 = [i**2 for i in range(1, x_max + 1)]

    ij = [[0 for _ in range(1, x_max + 1)] for _ in range(1, x_max + 1)]
    for i in range(x_max):
        for j in range(i, x_max):
            ij[i][j] = (i+1) * (j+1)

    for x in range(1, x_max + 1):
        y_min = x
        x2 = n2[x-1]
        for y in range(y_min, x_max + 1):
            z_min = y
            y2 = n2[y-1]
            xy = ij[x-1][y-1]
            tmp_n = x2 + xy + y2
            if tmp_n > N:
                break
            for z in range(z_min, x_max + 1):
                z2 = n2[z-1]
                yz = ij[y-1][z-1]
                zx = ij[x-1][z-1]
                n = tmp_n + z2 + yz + zx
                if n > N:
                    break
                fn[n] += calc_p(x, y, z)

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


if __name__ == "__main__":
    _main()

Submission status: Runtime Error

Solution code:
N = int(input())
ans = [0] (N + 1)
for i in range (1, 101):
  for j in range(1, 101):
    for k in range(1, 101):
      n = i*i+j*j+k*k+i*j+j*k+k*i
      if n <= N:
        ans[n] += 1

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())

ANS = [0] * (n)
for x in range(1, 101):
    for y in range(1, 101):
        for z in range(1, 101):
            tmp = (x + y + z)**2 - z*(x + y) - (x*y)
            if tmp > n: continue
            ANS[tmp] += 1

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

Submission status: Runtime Error

Solution code:
N = int(input())


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

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

Submission status: Runtime Error

Solution code:
N = int(input())



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



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

Submission status: Runtime Error

Solution code:
N = int(input())
f = {}

for x in range(1, 110):
	for y in range(1, 110):
		for z in range(1, 110):
			t = x*x+y*y+z*z+x*y+y*z+z*x
			f[t] = (f[t]+1 if t in f.keys() else 1)

for i in range(i,N+1):
    print(f[i] if i in f.keys() else 0)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
NN=int(input())
A=[0]*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:
        A[x**2+y**2+z**2+x*y+y*z+z*x-1]+=1
for i in range(N):
  print(A[i])

Submission status: Runtime Error

Solution code:
N = int(input())
ans = [ 0 for _ in range(N+1)]
for i in range(N+1):
  for j in range(N+1): 
    for k in range(N+1):
      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])

Submission status: Runtime Error

Solution code:
N = int(input())
ans = [ 0 for _ in range(N+1)]
for i in range(N+1):
  for j in range(N+1): 
    for k in range(N+1):
      v = i**2 + j**2 + k**2 + i*j + J*k + k*i 
      if v < 10050:
        ans[v] += 1
for i in range(N+1):
  print(ans[i])

Submission status: Runtime Error

Solution code:
    n=int(input())
    f=[0]*10005
    for x in range(1,101):
      for j in range(1,101):
        for z in range(1,101):
          c=x**2+j**2+z**2+x*j+j*z+z*x
          if c<=n:
            f[c]+=1
    for i in range(1,n+1):
      print(f[i])

Submission status: Runtime Error

Solution code:
n = int(input())

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

Submission status: Runtime Error

Solution code:
n = int(input())

ans = 0
ans1 = [0] * n
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 + k*i
      if(l+1 < 10000):
        ans1[l] += 1
for i in range(n):
  print(ans1[i])

Submission status: Runtime Error

Solution code:
n = int(input())

ans = 0
ans1 = [0] * n
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 + k*i
      for l in range(100):
        if(l+1 < 10000):
          ans1[l] += 1
for i in range(n):
  print(ans1[i])

Submission status: Runtime Error

Solution code:
n = int(input())

ans = 0
ans1 = [0] * n
for i in range(1,n):
  for j in range(1,n):
      ans = i**2 + j**2 +k**2 + i*j + j*k + k*i
      for l in range(6,n-1):
        if(l+1 == ans):
          ans1[l] += 1
for i in range(n):
  print(ans1[i])

Submission status: Runtime Error

Solution code:
import math
from queue import PriorityQueue
from sys import stdin,stdout
from collections import defaultdict

def solve():
	n=int(input())
	ans=[0 for _ in range(20005)]
	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+k*j+k*i
				ans[v]+=1
	for i in range(n):
		print(ans[i+1])
    

    
    
    
def main():
	solve()
main()

Submission status: Runtime Error

Solution code:
n=int(input())
ans=[0 for _ in range(10050)]
for i in range(105):
  for j 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])

Submission status: Runtime Error

Solution code:
n = int(input())
memo = [0]*1010

for i in range(1, 101):
    for j in range(1, 101):
        for k in range(1, 101):
            z = i**2+j**2+k**2+i*j+j*k+k*i
            if z <= n:
                memo[z] += 1


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

Submission status: Runtime Error

Solution code:
N = int(input())
zeros = [0 for i in range(10000)]
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:
                zeros[n]+=1

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

Submission status: Runtime Error

Solution code:
N = int(input())
list = []*(N+1)

M =int((N-2)**0.5)
for x in range(1,M+1):
    for y in range(1,M+1):
        for z in range(1,M+1):
            p = (x+y)*(x+z)+y**2+z**2
            if p > N:
                break
            else:
                list[p] = list[p] + 1
for i in range(1,N+1):
    print(list[i])

Submission status: Runtime Error

Solution code:
n=int(input())
d={}
for i in range(1,100):
    for j in range(i,100):
        if i**2>n or j**2>n: break
        for k in range(j,100):
            tmp=i**2+j**2+k**2+i*j+j*k+k*i
            if tmp>n: break
            if i==k: x=1
            elif i==j or j==k: x=3
            else: x=6
            if tmp in d: d[tmp]+=x
            else: d[tmp]=x
for i in range(1,n+1):
    if i in d: print(d[i]

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
N = int(input())

Ans = 0
numlist = [0] * 10000

if int(float(N)**0.5) <= 1:
  rMax = 1
else:
  rMax = int(float(N)**0.5)  

for x in range(1,rMax+1):
  for y in range(1,rMax+1):
    for z in range(1,rMax+1):
      Ans = x**2 + y**2 + z**2 + (x * y) + (y * z) + (z * x)
      if Ans <= 10000:
        numlist[Ans] += 1
  
for r in range(1,N+1):
  print(numlist[r])

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
N = int(input())

Ans = 0
numlist = [0] * 10000

if int(float(N)**0.5) <= 1:
  rMax = 1
else:
  rMax = int(float(N)**0.5)  

for x in range(1,rMax+1):
  for y in range(1,rMax+1):
    for z in range(1,rMax+1):
      Ans = x**2 + y**2 + z**2 + (x * y) + (y * z) + (z * x)
      numlist[Ans] += 1
  
for r in range(1,N+1):
  print(numlist[r])

Submission status: Runtime Error

Solution code:
N=int(input())
ans=[0 for _ in range(10000)]
for x in range(1,100):
    for y in range(1,100):
        for z in range(1,100):
            v=x**2+y**2+z**2+x*y+y*z+z*x
            if v<10050:
                ans[v]+=1

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

Submission status: Runtime Error

Solution code:
from tqdm import tqdm
for i in range(1, 20+1):
    ans=0
    for x in range(1, 10):
        for y in range(1, 10):
            for z in range(1, 10):
                if x**2 + y**2 + z**2 + x*y + y*z + z*x == i:
                    ans+=1
                    #print(i, x,y,z)
    if ans != 0:
        print(ans)
    else:
        print(ans)

Submission status: Runtime Error

Solution code:
ans = [0]*(N+1)

for i in range(1, int(N**0.5)+1):
    for j in range(1, int(N**0.5)+2):
       for k in range(1, int(N**0.5)+2):
            f = i*i + j*j + k*k +i*j + j*k + k*i
            if f <= N:
                ans[f] += 1
print(*ans[1:], sep='\n')

Submission status: Runtime Error

Solution code:
import collections
import sys
input = sys.stdin.readline

n = int(input())
ans = [0] * n
tmp = []
#可能なすべてのx,y,zについてx^2+y^2+z^2+xy+yz+zxの値を求める
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)
			tmp.append(x**2+y**2+z**2+x*y+y*z+z*x)
#x^2+y^2+z^2+xy+yz+zxの値の個数を数える
cnt = collections.Counter(tmp)
#各iについて、x^2+y^2+z^2+xy+yz+zxの値がiであるものの個数が答えとなる
for i in range(1, n+1):
	print(cnt[i])

Submission status: Runtime Error

Solution code:
n = int(input())
ans = [0]
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])

Submission status: Runtime Error

Solution code:
n = int(input())

cnt = [0] * 10000

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

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

Submission status: Runtime Error

Solution code:
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])

Submission status: Runtime Error

Solution code:
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])

Submission status: Runtime Error

Solution code:
n = int(input())
ans = [0]*n
tmp = []

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):
            tmp.append(x**2+y**2+z**2+x*y+y*z+z*x)

cnt = collections.Counter(tmp)

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

Submission status: Runtime Error

Solution code:
#C
N = int(input())

count = [0] * 10000
for j in range(1, 100):
    for k in range(1, 100):
        for l in range(1, 100):
            v = (j+k+l) ** 2 - (j*k + k*l + l*j)
            if v <= 10000:
                count[v] += 1

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

Submission status: Runtime Error

Solution code:
import math

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

n = int(input())
fs = [0] * n

lim = math.floor(math.sqrt(n))
rng = range(2, lim)

for(x in rng):
  for(y in rng):
    for(z in rng):
      v = f(x, y, z)
      if v <= n:
      	fs[v - 1] += 1
      
for(i in range(n)):
  print(fs[i])

Submission status: Runtime Error

Solution code:
import math

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

n = int(input())
fs = [0] * n

lim = math.floor(math.sqrt(n))
rng = range(2, lim)

for(x in rng):
  for(y in rng):
    for(z in rng):
      fs[f(x, y, z) - 1] += 1
      
for(i in range(n)):
  print(fs[i])

Submission status: Runtime Error

Solution code:
#C
import math

N = int(input())


count = [0] * 10050
for j in range(1, 105):
    for k in range(1, 105):
        for l in range(1, 105):
            v = (j+k+l) ** 2 - (j*k + k*l + l*j)
            if v <= 10050:
                count[v] += 1

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

Submission status: Runtime Error

Solution code:

N = int(input())

for n in range(1,N+1):
    cnt = 0
    sqrtn = int(math.sqrt(n))
    for x in range(1,sqrtn):
        for y in range(1,sqrtn):
            for z in range(1,sqrtn):
                cnt += x**2 + y**2 + z**2 +x*y + y*z + z*x == n
    print(cnt)

Submission status: Runtime Error

Solution code:
for n in range(1,N+1):
    cnt = 0
    sqrtn = int(math.sqrt(n))
    for x in range(1,sqrtn):
        for y in range(1,sqrtn):
            for z in range(1,sqrtn):
                cnt += x**2 + y**2 + z**2 +x*y + y*z + z*x == n
    print(cnt)

Submission status: Runtime Error

Solution code:
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):
      n = x^2 + y^2 + z^2 + xy + yz + zx
      if n <= N:
        ans[n] += 1
        
for i in range(1,N):
  print(ans[i])

Submission status: Runtime Error

Solution code:
import sys

N = int( sys.argv[1])

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


for n in range(1,N+1):
  count = 0
  
  for X in range(1,N):
    for Y in range(1,N):
      for Z in range(1,N):
        t = f(X,Y,Z)
        if t== n:
          count += 1
          break 
        
          
  
  print(count)

Submission status: Runtime Error

Solution code:
n = int(input())
ans = [0] * (n + 1)
for x in range(1, n**0.5 + 1):
    for y in range(1, n**0.5 + 1):
        for z in range(1, n**0.5 + 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
print(*ans[1:], sep='\n')

Submission status: Runtime Error

Solution code:
n = int(input())
ret = [0 for _ in range(1,21)]
def f(x,y,z):
	return x*x + y*y + z*z + x*y + y*z + x*z

for x in range(1,n+1):
	for y in range(1,n+1):
		for z in range(1,n+1):
			if f(x,y,z) > n:
				z = 1
				break
			ret[f(x,y,z)-1] += 1
		if f(x,y,z) > n:
			y = 1
			break
	if f(x,y,z) > n:
		x = 1
		break

for i in ret:
	print(i)

Submission status: Runtime Error

Solution code:
N = int(input())
num = [0]*N
for i in range(1,10**2 + 1):
    for j in range(1,10**2 + 1):
        for k in range(1,10**2 + 1):
            ans = i**2 + j**2 + k**2 + i*j + j*k + k*i
            if ans <= N:
                num[ans] += 1
for i in range(N):
    print(num[i])

Submission status: Runtime Error

Solution code:
n = int(input())
a = [0 for _ in range(10000)]
for i in range(1, 100):
    for j in range(1, 100):
        for k in range(1, 100):
            b = i*i+j*j+k*k+i*j+j*k+k*i-1
            if b < 10000:
                a[b] += 1
for i in range(n):
    print(a[n])

Submission status: Runtime Error

Solution code:
import sys
si = sys.stdin.readline


def main():
    n = int(si())
    ans = [0 for _ in range(n+1)]
    for x in range(1, 100):
        for y in range(1, 100):
            for z in range(1, 100):
                v = ((x+y+z)**2+x**2+y**2+z**2)//2
                if v > 10000:
                    break
                ans[v] += 1

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


if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
import math
n = int(input())
ans = [0 for _ in range(10000)]

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

Submission status: Runtime Error

Solution code:
import math
n = int(input())
l = [0 for i in range(n)]
p = min(101,math.sqrt(n)+1)
for x in range(1, p):
    for y in range(1, p):
        for z in range(1, p):
            s = x**2 + y**2 + z**2 + x*y + y*z + z*x;
            if s <= n:
                l[s-1] += 1
for i in range(n):
    print(l[i])

Submission status: Runtime Error

Solution code:
from math import sqrt
N = int(input())
ans = [0] * N

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

for a in ans:
    print(a)

Submission status: Runtime Error

Solution code:
def f(n):
  count = 0
  for i in range(1,n+1):
    for j in range(i,n+1):
      for l in range(j,n+1):
        if (j + l) >= 100 or (j + i) >= 100 or (i+l) >= 100:
        break
        if (i+j)**2 + (j+l)**2 + (l+i)**2 == 2*n:
          if i == j == l:
            count += 1
          elif i == j or j == l or l == i:
            count += 3
          else:
            count += 6
  return (count)
n = int(input())
for i in range(1,n+1):
  print(f(i))

Submission status: Runtime Error

Solution code:
from collections import Counter

N = int(input())

def solve():
    memo = Counter()
    for x in range(1, N):
        for y in range(x, N):
            res = x * x + y * y + x * y
            if res >= N:
                return
            for z in range(y, N):
                if x == y == z:
                    cnt = 1
                elif x < y < z:
                    cnt = 6
                else:
                    cnt = 3
                memo[res + z * z + y * z + x * z] += cnt

C = solve()
for i in range(1, N + 1):
    print(C[i])

Submission status: Runtime Error

Solution code:
from itertools import (
    accumulate,  # 累積和のイテレータ
    groupby,  # 値をkey,同じ値の集まりをgroup
    permutations,  # 順列
    combinations,  # 組み合わせ
    product,  # 重複あり順列（直積, 深いネストにも使える）
    combinations_with_replacement,  # 重複あり組み合わせ
)

N = int(input())

ans = [0] * (10**9)

for i, j, k in product(list(range(1, 101)), repeat=3):
    tmp = i**2 + j**2 + k**2 + i*j + j*k + k*i
    ans[tmp] += 1

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

Submission status: Runtime Error

Solution code:
from itertools import (
    accumulate,  # 累積和のイテレータ
    groupby,  # 値をkey,同じ値の集まりをgroup
    permutations,  # 順列
    combinations,  # 組み合わせ
    product,  # 重複あり順列（直積, 深いネストにも使える）
    combinations_with_replacement,  # 重複あり組み合わせ
)

N = int(input())

ans = [0] * (10**9)

for i, j, k in product(range(1, 101), repeat=3):
    tmp = i**2 + j**2 + k**2 + i*j + j*k + k*i
    ans[tmp] += 1

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

Submission status: Runtime Error

Solution code:
N=int(input())
ans = [0 for _ in range(10001)]
for i in range(101):
  for j in range(101):
    for k in range(101):
      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])

Submission status: Runtime Error

Solution code:
n = int(input())
cnt  = [0 for i in range(10001)]

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

Submission status: Runtime Error

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

f = int(math.sqrt(n)) + 1
for x in range(1, f):
    for y in range(1, f):
        for z in range(1, f):
            v = (x ** 2) + (y ** 2) + (z ** 2) + (x * y) + (y * z) + (z * x)
            if v < n + 1:
                ans[v] += 1
            
for i in range(n):
    print(ans[i+1])

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
list = [0]*1001
for i in range(1,100):  
    for j in range(1,100):
        a = i*i + j*j + i*j
        for k in range(1,100):
            a = i*i + j*j + k*k + i*j +j*k + i*k
            if a <= N:
                list[a] += 1
for i in range(1,N+1):
    print(list[i])

Submission status: Runtime Error

Solution code:
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])

Submission status: Runtime Error

Solution code:
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])

Submission status: Runtime Error

Solution code:
n = int(input())
cnt  = [0 for i in range(10001)]

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

Submission status: Runtime Error

Solution code:
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])

Submission status: Runtime Error

Solution code:
N = int(input())
list = [0]*1001
for i in range(1,int(N**0.5)):  
    for j in range(1,int(N**0.5)):
        a = i*i + j*j + i*j
        for k in range(1,int(N**0.5)):
            a = i*i + j*j + k*k + i*j +j*k + i*k
            if a <= N:
                list[a] += 1
for i in range(1,N+1):
    print(list[i])

Submission status: Runtime Error

Solution code:
n = int(input())
cnt  = [0 for i in range(10001)]

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

Submission status: Runtime Error

Solution code:
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])

Submission status: Runtime Error

Solution code:
N = int(input())
list = [0]*1001
for i in range(1,int(N**0.5)):  
    for j in range(1,int(N**0.5)):
        a = i*i + j*j + i*j
        for k in range(1,int(N**0.5)):
            a = i*i + j*j + k*k + i*j +j*k + i*k
            if a <= N:
                list[a] += 1
for i in list[1:]:
    print(i)

Submission status: Runtime Error

Solution code:
n = int(input())
arr = [0]*10100
for i in range(1,110):
    for j in range(1,110):
        for k in range(1,110):
            s = i*i+j*j+k*k+i*j+j*k+k*i;
            if s<10100:
                ans[s]+=1
for i in range(n):
    print(arr[i+1])

Submission status: Runtime Error

Solution code:
N = int(input())
c = 0
n = 0
list = [0] *1001
for l in range(1,N+1):
    list = []
    for i in range(1,int(N**0.5)):
        if i*i > l:
            break;       
        for j in range(1,int(N**0.5)):
            a = i*i + j*j + i*j
            for k in range(1,int(N**0.5)):
              a = i*i + j*j + k*k + i*j +j*k + i*k
                if i*i + j*j + k*k + i*j +j*k + i*k <= N:
                    list[a] += 1
for i in range(N):
  print(lsit[i])

Submission status: Runtime Error

Solution code:
N = int(input())
c = 0
n = 0
list = [0] *1001
for l in range(1,N+1):
    list = []
    for i in range(1,int(N**0.5)):
        if i*i > l:
            break;       
        for j in range(1,int(N**0.5)):
            a = i*i + j*j + i*j
            for k in range(1,int(N**0.5)):
              a = i*i + j*j + k*k + i*j +j*k + i*k
                if i*i + j*j + k*k + i*j +j*k + i*k <= N:
                    list[a] += 1
    print(sum(list))

Submission status: Runtime Error

Solution code:
N = int(input())
 
ans = [0 for _ in range(10050)]
for x in range(1,int(N**0.5)):
  for y in range(1,int(N**0.5)):
    for z in range(1,int(N**0.5)):
      n = x**2 + y**2 + z**2 + x*y + y*z + z*x
      ans[n] += 1

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

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;
long long n,tiln = 0;
int counter=0;
int main() {
    cin >> n;
    vector<int> a(10001);
        for(int x = 1;x<;x++){
            for(int y = 1;y<100;y++){
                for(int z = 1;z<100;z++){
                    tiln = (x*x) + (x*y) + (y*y) + z*(y+x) + z*z;
                    a(tiln)++;
                }
            }
        }
    for(int i = 1;i<=tiln;i++){
        cout << a.at(i) << endl;
    }
    return 0;
}

Submission status: Runtime Error

Solution code:
N = int(input())
 
ans = [0 for _ in range(10050)]
for x in range(1,int(N**0.5)):
  for y in range(1,int(N**0.5)):
    for z in range(1,int(N**0.5)):
      n = x**2 + y**2 + z**2 + x*y + y*z + z*x;
      ans[n] += 1

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

Submission status: Runtime Error

Solution code:
N = int(input())
 
ans = [0 for _ in range(10050)]
for x in range(1,int(N**0.5)):
    for y in range(1,int(N**0.5)):
        for z in range(1,int(N**0.5)):
            n = x**2 + y**2 + z**2 + x*y + y*z + z*x
            ans[n] += 1
 
for i in range(N):
    print(ans[i+1])

Submission status: Runtime Error

Solution code:
import sys

input = sys.stdin.readline

def calc(n):
    for i in range(1,int((n+1)**0.5)):
        for j in range(1,int((n+1)**0.5)):
            for k in range(1, int((n+1)**0.5)):
                if (i+j+k)**2 - i*j - j*k - k*i == n:
                    if i == j == k:
                        return 1
                    else:
                        return 3
    return 0    

def main():
    ans = ''
    n = int(input())
    for i in range(1,n+1):
        ans += str(calc(i)) + '\n'
    prtin(ans)

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
import numpy as np


def function(N):
    for n in range(1, N+1):
        if n < 6:
            print(0)
        else:
            ans = 0
            number = int(np.sqrt(2*n))
            X = [int(i) for i in range(2, number+1)]
            for x in X:
                Y = [int(i) for j in range(x, number+1)]
                for y in Y:
                    Z = [int(i) for k in range(y, number+1)]
                    for z in Z:
                        if x**2+y**2+z**2 == 2*n:
                            if x+y > z+1 & (x+y+z) % 2 == 0:
                                if x == y & y == z:
                                    ans += 1
                                else:
                                    ans += 3

            print(ans)


if __name__ == '__main__':
    N = int(input())
    function(N)

Submission status: Runtime Error

Solution code:
import numpy as np
def f(n):
    counts = [0]*n
    x_max = int(np.sqrt(n-5)//1)
    for x in range(1,x_max+1):
        y_max = int(np.sqrt(n-x**2-4)//1)
        for y in range(1,y_max+1):
            z_max = int(np.sqrt(n-x**2-y**2-3)//1)
            for z in range(1,z_max+1):
                if x**2+y**2+z**2+x*y+y*z+z*x < n:
                    counts[x**2+y**2+z**2+x*y+y*z+z*x-1] += 1
    return counts
 
N = int(input())
counts = f(N)
for i in range(N):
    print(counts[i])

Submission status: Runtime Error

Solution code:
n = int(input())

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

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

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

Submission status: Runtime Error

Solution code:
N = int(input())

ans = [0 for _ in range(10050)]
for x in range(1,int(N**0.5)):
    for y in range(1,int(N**0.5)):
        for z in range(1,int(N**0.5)):
            n = x**2 + y**2 + z**2 + x*y + y*z + z*x;
            ans[n] += 1

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

Submission status: Runtime Error

Solution code:
import math
N = int(input())
ans = [0]*N
l = int(math.sqrt(N-3))

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

s = '\n'.join([str(n) for n in ans])
print(s)

# print(ans, sep='\n')