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:
from math import sqrt
from sympy import exp, Symbol

x = Symbol('x')
y = Symbol('y')
z = Symbol('z')

n = int(input())

ans = 0
for x in range(1, n+1):
    y = exp(-x/2 - z/2 - sqrt(-3*x**2 - 2*x*z - 3*z**2 + x*4)/2)
    z = exp(-y/2 - x/2 - sqrt(-3*y**2 - 2*y*x - 3*x**2 + x*4)/2)
        
    if (x**2 + y**2 + z**2 + x*y + y*z + z*x - x*4 == 0) and (isinstance(x, int) and isinstance(y, int) and isinstance(z, int)):
        ans += 1

print(ans)

Submission status: Runtime Error

Solution code:
N=int(input())
for h in range(1,N+1):
    num=0
    for i in range(i-1,h-3):
        for j in range(j-1,h-3):
            for k in range(k-1,h-3):
                if i**2+j**2+k**2+i*j+j*k+k*i==h:
                    num+=1
    print(num)

Submission status: Runtime Error

Solution code:
import numpy as np

def calc(n):
    if n < 2:
        return 0
    lim = int((n - 2) ** 0.5 - 1) + 1

    result=np.zeros(n+1,dtype=int)
    for x in range(1, lim):
        for y in range(1, lim):
            if x > y:
                continue
            for z in range(1, lim):
                if y > z:
                    continue
                index = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
                if index>n:continue
                s = set([x, y, z])
                if len(s) == 1:
                    result[index] += 1
                elif len(s) == 2:
                    result[index] += 3
                else:
                    result[index] += 6

    return result[1:]

for i in calc(int(input())):
    print(i)

Submission status: Runtime Error

Solution code:
from math import sqrt
from math import floor
n = int(input())

for i in range(n + 1):
    n2 = floor(sqrt(i))
    ans = 0
    for x in range(1, n2):
        for y in range(1, n2):
            if i - (pow(x, 2) + pow(y, 2) + x * y) pow(z, 2) +  y * z + z * x:
                    ans += 1
    print(ans)

Submission status: Runtime Error

Solution code:
import itertools
N = int(input())

ans = [0]*(10**4)
for i1 in range(1, 100):
    i2 = i1+1
    i3 = i1+2
    L = list(itertools.combinations_with_replacement((i1, i2, i3), 3))
    for i in L:
        i = list(i)
        x = i[0]
        y = i[1]
        z = i[2]
        n = (x**2)+(y**2)+(z**2)+(x*y)+(y*z)+(z*x)
        if n > 10**4:
            break
        if len(list(set(i))) == 1:
            ans[n] += 1
        if len(list(set(i))) == 2:
            ans[n] += 3
        if len(list(set(i))) == 3:
            ans[n] += 6
        
for k in range(1, N+1):
    print(ans[k])

Submission status: Runtime Error

Solution code:
import sys
sys.setrecursionlimit(10**9)

def mi(): return map(int,input().split())
def ii(): return int(input())
def isp(): return input().split()
def deb(text): print("-------\n{}\n-------".format(text))

INF=10**20
def main():
    N=ii()
    j = math.ceil((N+1)**0.5)

    ans = [0] * (N+1)
    for x in range(1,j+1):
        for y in range(1,j+1):
            for z in range(1,j+1):
                n = x**2+y**2+z**2+x*y+y*z+z*x
                if 1<=n<=N:
                    ans[n] += 1
            
        
    print(*ans[1:],sep="\n")

                


if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
n = 10**2
k = [0]*10**2
for x in range(1,20):
    for y in range(1,20):
        for z in range(1,20):
            for i in range(n+1):
                if (x+y+z)**2 -(x*y+y*z+z*x) == i:
                    k[i-1] += 1
for i in range(int(input())):
    print(k[i])

Submission status: Runtime Error

Solution code:
for i in range(1,int(input())+1):
  n = i
  count = 0
  if i<6: print(0)
  else: 
    for j in range(1,i-1):
      for k in range(1,j):
        for l in range(1,k+1):
          if j**2 + k**2 + l**2 + j*k + k*l + l*j == i : count += 1
  	print(count)

Submission status: Runtime Error

Solution code:
N = int(input())

N2 = int(N**0.5)

cnt = [0] * (9000)

for x in range(1,N2+1):
  for y in range(1,N2+1):
    for z in range(1,N2+1):
      xyz = x*x + y*y + z*z + x*y + y*z + z*x
      cnt[xyz] += 1
#
for i in range(1,N+1):
  print( cnt[i] )

Submission status: Runtime Error

Solution code:
n = 10**2
k = [0]*10**2
for x in range(1,34):
    for y in range(1,34):
        for z in range(1,34):
            for i in range(n+1):
                if (x+y+z)**2 -(x*y+y*z+z*x) == i:
                    k[i-1] += 1
for i in range(int(input())):
    print(k[i])

Submission status: Runtime Error

Solution code:
import itertools
N = int(input())

ans = [0]*(10**4)
for i1 in range(1, 50):
    i2 = i1+1
    i3 = i1+2
    L = list(itertools.combinations_with_replacement((i1, i2, i3), 3))
    for i in L:
        i = list(i)
        x = i[0]
        y = i[1]
        z = i[2]
        n = (x**2)+(y**2)+(z**2)+(x*y)+(y*z)+(z*x)
        if n > 10**4:
            break
        if len(list(set(i))) == 1:
            ans[n] += 1
        if len(list(set(i))) == 2:
            ans[n] += 3
        if len(list(set(i))) == 3:
            ans[n] += 6
        
for k in range(1, N+1):
    print(ans[k])

Submission status: Runtime Error

Solution code:
# aising2020_c.py
a = [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 1, 3, 0, 3, 0, , 0, 0, 0, 0, 3, 3, 3, 0, 0, 3, 0, 0, 0, 0, 3, 3, 3, 0, 3, 0, 0, 0, 3, 0, 0, 1, 3, 0, , 6, 3, 0, 0, 3, 0, 0, 0, 0, 3, 3, 3, 3, 0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9, 6, 15, 6, 12, 0, 9, 0, 15, 9, 6, 3, 9, 9, 27, 0, 9, 12, 12, , 9, 6, 0, 12, 0, 6, 0, 15, 6, 15, 6, 3, 6, 12, 3, 9, 9, 9, 0, 15, 3, 21, 9, 12, 6, 21, 3, 15, 3, 3, 12, 15, 3, 6, 0, 12, 3, 21, 3, 21, 6, 6, 3, 9, 3, 12, 6, 6, 9, 27, 0, 3, 6, 9, 6, 12, 9, 15, 6, 15, 0, 9, 0, 15, 9, 12, 0, 9, 0, 9, 12, 12, 3, 12, 3, 18, 3, 3, 3, 24, 12, 9, 0, 9, 3, 18, 3, 9, 0, 12, 9, 15, 0, 21, 12, 6, 3, 18, 0, 12, 3, 12, 12, 9, 9, 15, 3, 6, 3, 21, 6, 9, 6, 3, 0, 27, 3, 15, 9, 12, 9, 12, 3, 6, 0, 6, , 3, 15, 0, 24, 0, 12, 0, 9, 6, 21, 6, 12, 6, 12, 3, 9, 15, 6, 3, 12, 0, 12, 3, 12, 9, 12, 3, 3, 9, 6, 4, 27, 3, 15, 9, 9, 0, 18, 3, 12, 6, 15, 9, 12, 6, 18, 3, 6, 9, 21, 3, 15, 0, 3, 6, 12, 3, 9, 15, 15, 3, 15, 0, 15, 6, 6, 9, 15, 0, 18, 0, 9, 6, 21, 3, 12, 6, 0, 6, 27, 6, 12, 6, 6, 0, 9, 3, 6, 9, 3, 3, 18, 3, 27, 6, 9, 3, 15, 6, 9, 0, 15, 0, 21, 6, 12, 9, 6, 6, 15, 3, 12, 6, 15, 9, 12, 0, 6, 0, 24, 12, 21, 3, 12, 9, , 9, 0, 12, 6, 24, 6, 3, 0, 27, 0, 9, 12, 3, 6, 15, 3, 9, 6, 15, 9, 15, 3, 18, 0, 6, 3, 12, 6, 9, 9, 9, 6, 12, 0, 18, 6, 15, 3, 21, 0, 9, 3, 6, 9, 15, 3, 15, 3, 6, 3, 9, , 3, 21, 9, 15, 0, 18, 3, 15, 12, 18, 12, 15, 6, 12, 0, 6, 9, 18, 3, 3, 0, 9, 3, 30, 6, 12, 9, 15, 6, 9, 0, 9, 6, 15, 9, 18, 0, 18, 3, 6, 3, 15, 6, 15, 6, 12, 6, 21, 9, 6, 12, 6, 0, 15, 0, 15, 3, 9, 9, 9, 3, 12, 9, 6, 6, 15, 6, 15, 0, 9, 3, 21, 9, 15, 0, 3, 7, 24, 0, 15, 6, 6, 9, 24, 0, 15, 3, 15, 12, 9, 3, 12, 9, 9, 0, 21, 3, 21, 9, 12, 0, 21, 6, 15, 12, 6, 6, 12, 0, 6, 3, 9, 9, 30, 3, 15, 0, 6, 0, 12, 0, 9, 9, 15, 12, 21, 0, 18, 15, 3, 3, 6, 0, 21, 3, 15, 3, 18, 6, 18, 6, 9, 0, 15, 3, 9, 6, 6, 0, 9, 3, 12, 15, 15, 6, 21, 3, 18, 6, 9, 15, 18, 6, 15, 0, 3, 3, 27, 3, 21, 12, 12, 0, 15, 3, 6, 3, 12, 12, 15, 0, 12, 0, 12, 9, 21, 6, 21, 12, 6, 6, 15, 6, 15, 3, 6, 0, 24, 3, 6, 9, 6, 6, 18, 3, 15, 0, 12, 0, 24, 6, 6, 0, 18, 0, 12, 9, 12, 12, 9, 3, 6, 6, , 21, 9, 9, 9, 21, 0, 9, 3, 6, 12, 24, 6, 15, 6, 12, 3, 18, 3, 9, 9, 9, 0, 18, 3, 30, , 12, 3, 6, 18, 6, 18, 3, 15, 6, 18, 6, 12, 0, 9, 3, 12, 6, 21, 0, 12, 12, 9, 0, 6, 15, 21, 6, 21, 0, 18, 0, 6, 6, 12, 6, 9, 6, 12, 6, 24, 3, 9, 12, 9, 0, 18, 0, 21, 9, 9, 3, 12, 3, 6, 6, 9, 6, 15, 3, 9, 0, 15, 1, 15, 6, 33, 6, 6, 6, 24, 3, 15, 12, 9, 9, 33, 0, 9, 3, 6, 12, 15, 12, 15, 6, 9, 0, 24, 3, 15, 9, 9, 0, 12, 3, 15, 9, 12, 6, 18, 3, 24, 3, 9, 9, 21, 3, 12, 0, 6, 9, 18, 3, 6, 12, 6, 3, 24, 0, 24, 9, 0, 6, 9, 0, 18, 3, 9, 6, 27, 9, 6, 6, 3, 3, 21, 3, 15, 9, 21, 0, 15, 0, 18, 12, 12, 9, 9, 6, 9, 0, 9, 9, 27, 0, 18, 0, 12, 0, 27, 12, 9, 9, 9, 9, 21, 6, 12, 6, 18, 15, 15, 0, 18, , 6, 12, 3, 15, 0, 24, 9, 6, 3, 9, 9, 9, 9, 12, 0, 15, 0, 15, 12, 9, 6, 36, 0, 15, 3, , 12, 9, 15, 3, 12, 0, 0, 3, 12, 12, 24, 6, 3, 9, 18, 0, 15, 9, 15, 6, 12, 0, 3, 0, 9, 6, 30, 6, 18, 6, 18, 6, 15, 3, 15, 15, 12, 0, 27, 3, 12, 9, 12, 3, 18, 9, 18, 3, 15, 6, 3, 9, 15, 0, 9, 6, 27, 0, 15, 12, 18, 6, 15, 3, 18, 12, 15, 3, 15, 0, 18, 6, 6, 12, 12, 6, 9, 6, 15, 0, 24, 6, 15, 6, 6, 0, 24, 0, 9, 6, 12, 15, 15, 3, 9, 6, 12, 6, 12, 0, 33, 0, 6, 0, 15, 6, 15, 12, 9, 7, 21, 3, 12, 9, 15, 12, 12, 0, 15, 3, 9, 12, 21, 6, 6, 6, 18, 6, 27, 6, 21, 9, 3, 0, 18, 0, 30, 9, 6, 0, 33, 6, 12, 0, 3, 12, 27, 6, 12, 0, 12, 0, 18, 3, 9, 9, 15, 6, 21, 3, 9, 15, 9, 9, 15, 0, 15, 3, 15, 9, 24, 6, 12, 6, 6, 6, 18, 3, 18, 3, 6, 0, 15, 0, 15, 12, 12, 9, 21, 6, 12, 3, 6, 9, 9, 6, 21, 0, 12, 9, 33, 6, 18, 12, 3, 6, 27, 0, 18, 6, 12, 6, 18, 0, 12, 3, 12, 12, 18, 3, 15, 12, 6, 3, 18, 3, 21, 12, 15, 0, 21, 3, 6, 15, 18, 9, 18, 0, 24, 3, 18, 6, 15, , 9, 9, 0, 12, 0, 15, 3, 18, 12, 12, 3, 9, 6, 15, 6, 6, 9, 24, 0, 12, 3, 12, 12, 30, 3, 12, 6, 9, 0, 15, 6, 9, 6, 12, 0, 12, 3, 33, 15, 9, 6, 15, 3, 12, 6, 12, 6, 33, 9, , 12, 0, 12, 6, 18, 3, 18, 6, 12, 12, 21, 3, 15, 18, 15, 3, 21, 0, 21, 3, 6, 9, 9, 12, 21, 9, 6, 0, 18, 3, 12, 9, 12, 0, 24, 3, 18, 6, 12, 12, 15, 3, 18, 0, 21, 9, 30, 3, 9, 0, 6, 3, 12, 15, 15, 0, 9, 3, 21, 3, 24, 9, 12, 6, 24, 0, 3, 3, 9, 9, 9, 3, 9, 9, 15, 4, 30, 6, 21, 15, 9, 0, 18, 0, 15, 9, 15, 12, 24, 6, 15, 6, 9, 3, 21, 6, 24, 0, 9, 3, 21, 3, 18, 12, 6, 3, 18, 0, 21, 18, 9, 9, 15, 0, 33, 0, 6, 12, 21, 6, 12, 9, 9, 9, 27, 3, 9, 12, 18, 0, 15, 3, 12, 12, 6, 3, 12, 6, 18, 6, 3, 6, 24, 6, 18, 0, 18, 0, 24, 3, 15, 9, 6, 12, 18, 0, 15, 6, 15, 12, 15, 0, 3, 9, 12, 9, 33, 6, 21, 3, 6, 0, 21, 6, 15, 6, 9, 0, 27, 3, 18, 12, 6, 9, 30, 9, 15, 6, 15, 12, 12, 9, 15, 0, 18, 0, 15, 6, 24, 9, 12, 6, 12, 0, 21, 12, 6, 3, 30, 0, 9, 0, 12, 9, 27, 6, 12, 6, 15, 6, 15, 9, 30, 9, 12, 0, 18, 3, 15, 15, 6, 15, 18, 3, 15, 0, 6, 3, 21, 0, 9, 0, 9, 0, 24, 6, 24, 12, 3, 12, 21, 3, 6, 9, 15, 6, 27, 0, 21, 3, 18, 6, 9, 6, 27, 9, 15, 6, 21, 9, 12, 15, 9, 0, 24, 3, 15, 9, 18, 3, 9, 0, 9, 6, 30, 12, 21, 6, 12, 0, 9, 6, 18, 9, 18, 6, 18, 3, 39, 0, 12, 3, 3, 18, 21, 0, 12, 0, 12, 9, 18, 3, 21, 9, 6, 3, 15, 6, 18, 15, 12, 0, 21, 6, 21, 9, 15, 6, 15, 9, 15, 3, 6, 12, 27, 3, 12, 0, 9, 6, 18, 6, 9, 12, 12, 4, 15, 0, 33, 12, 12, 6, 15, 0, 24, 3, 9, 12, 21, 6, 9, 9, 9, 0, 24, 6, 27, 9, 21, 0, 15, 0, 12, 15, 15, 12, 36, 0, 15, 9, 6, 6, 15, 9, 18, 0, 3, 3, 30, 9, 12, 9, 3, 12, 27, 3, 12, 12, 12, 6, 15, 0, 15, 3, 15, 9, 27, 3, 24, 6, 15, 6, 18, 0, 12, 3, 12, 0, 27, 3, 12, 15, 9, 3, 21, 6, 18, 0, 12, 15, 9, 6, 6, 0, 12, 3, 36, 0, 30, 21, 12, 6, 15, 3, 18, 9, 9, 6, 21, 0, 15, 6, 15, 15, 27, 6, 21, 6, 9, 3, 21, 6, 21, 9, 6, 0, 15, 0, 12, 12, 12, 12, 15, 3, 33, 6, 6, 3, 36, 12, 15, 0, 12, 3, 24, 6, 6, 9, 21, 6, 9, 0, 24, 15, 18, 6, 27, 0, 6, 0, 6, 9, 18, 6, 15, 6, 12, 6, 30, 6, 15, 6, 6, 0, 21, 6, 21, 9, 24, 12, 21, 3, 6, 6, 12, 3, 15, 6, 21, 0, 15, 3, 9, 9, , 18, 6, 9, 12, 27, 3, 12, 15, 6, 18, 30, 0, 24, 0, 18, 9, 21, 3, 12, 15, 15, 0, 18, 9, 18, 9, 6, 0, 30, 0, 36, 9, 6, 6, 15, 6, 12, 9, 12, 12, 27, 6, 12, 0, 12, 3, 6, 3, , 18, 12, 18, 6, 27, 3, 18, 12, 15, 3, 24, 0, 12, 3, 18, 15, 21, 9, 9, 9, 6, 3, 27, 3, 15, 9, 18, 0, 6, 6, 9, 12, 12, 9, 15, 3, 30, 0, 18, 6, 18, 9, 24, 0, 12, 1, 21, 6, , 15, 9, 12, 6, 33, 3, 24, 12, 6, 9, 21, 0, 12, 3, 9, 9, 33, 3, 18, 12, 9, 0, 21, 6, 24, 12, 12, 0, 27, 3, 9, 12, 9, 15, 24, 3, 18, 6, 6, 12, 21, 9, 18, 0, 21, 6, 21, 3, , 30, 12, 6, 9, 9, 0, 24, 3, 3, 3, 36, 0, 15, 3, 12, 6, 18, 6, 12, 6, 15, 9, 18, 9, 21, 12, 3, 0, 27, 0, 21, 18, 9, 12, 18, 3, 9, 3, 12, 9, 39, 3, 9, 0, 9, 0, 27, 6, 18, , 9, 21, 6, 15, 0, 15, 18, 12, 12, 21, 0, 21, 9, 21, 6, 9, 6, 36, 6, 12, 0, 27, 9, 12, 12, 6, 0, 30, 0, 12, 15, 21, 6, 21, 9, 15, 3, 6, 6, 24, 6, 15, 0, 9, 6, 18, 9, 27, , 9, 9, 3, 21, 6, 24, 9, 9, 12, 27, 0, 18, 0, 12, 21, 21, 0, 6, 15, 15, 3, 30, 3, 15, , 12, 6, 0, 18, 3, 21, 6, 9, 6, 18, 6, 15, 0, 9, 9, 18, 6, 27, 0, 15, 6, 18, 12, 15, 18, 21, 6, 27, 6, 21, 12, 15, 3, 18, 0, 12, 6, 12, 6, 24, 12, 6, 3, 15, 9, 36, 6, 21, 6, 15, 0, 12, 0, 24, 9, 12, 9, 30, 6, 24, 9, 9, 12, 15, 6, 18, 0, 15, 0, 27, 6, 18, 9, 12, 9, 24, 0, 12, 12, 24, 12, 12, 0, 9, 3, 18, 6, 27, 9, 12, 6, 6, 3, 9, 6, 30, , 9, 6, 0, 30, 3, 27, 15, 6, 9, 30, 3, 12, 3, 18, 6, 18, 6, 18, 0, 18, 3, 18, 3, 18, 12, 6, 7, 21, 6, 18, 9, 15, 9, 27, 0, 15, 6, 12, 24, 27, 3, 27, 9, 9, 0, 18, 6, 21, 18, 18, 0, 15, 0, 24, 18, 9, 9, 18, 6, 15, 3, 15, 6, 33, 3, 15, 0, 9, 6, 33, 9, 12, 3, 15, 9, 24, 6, 3, 12, 15, 6, 21, 0, 36, 0, 15, 6, 24, 3, 12, 9, 6, 6, 33, 9, 9, 18, 6, 0, 27, 0, 30, 9, 9, 15, 18, 3, 6, 0, 12, 9, 27, 6, 15, 0, 3, 0, 18, 9, 30, 9, 9, 9, 24, 3, 15, 12, 12, 9, 27, 0, 27, 6, 6, 15, 27, 6, 24, 9, 27, 3, 18, 3, 21, 12, 12, 0, 12, 3, 18, 12, 9, 12, 33, 6, 9, 6, 15, 6, 39, 9, 18, 0, 15, 6, 12, 3, 12, 12, , 12, 9, 30, 0, 36, 18, 6, 9, 18, 0, 12, 3, 15, 9, 21, 9, 15, 6, 12, 6, 15, 3, 18, 12, 9, 0, 27, 6, 18, 12, 18, 3, 33, 0, 15, 3, 6, 6, 18, 12, 27, 0, 9, 3, 30, 3, 15, 12, 12, 15, 24, 0, 9, 15, 27, 6, 9, 0, 15, 6, 18, 9, 9, 6, 15, 15, 12, 0, 27, 6, 24, 3, 15, 0, 36, 0, 27, 9, 18, 15, 27, 6, 24, 6, 15, 15, 18, 9, 9, 0, 21, 3, 18, 6, 24, 15, 3, 3, 18, 3, 30, 12, 12, 9, 36, 0, 9, 3, 6, 18, 21, 0, 18, 6, 15, 6, 33, 15, 12, , 9, 12, 0, 18, 3, 15, 15, 15, 9, 21, 6, 24, 0, 21, 0, 18, 12, 12, 0, 15, 0, 21, 6, 24, 6, 18, 6, 12, 3, 15, 18, 6, 6, 30, 0, 15, 6, 9, 12, 21, 9, 18, 9, 12, 4, 24, 6, 33, 12, 15, 0, 39, 0, 9, 9, 15, 15, 12, 3, 15, 6, 18, 9, 30, 9, 27, 0, 6, 6, 18, 6, 21, 12, 15, 12, 27, 0, 9, 9, 9, 12, 42, 0, 27, 0, 15, 9, 21, 3, 18, 6, 9, 9, 27, 3, 15, 15, 12, 0, 15, 6, 33, 18, 18, 3, 21, 6, 15, 3, 3, 15, 30, 0, 9, 0, 12, 6, 27, 9, 18, 18, 15, 0, 21, 6, 30, 9, 9, 18, 9, 0, 12, 0, 9, 6, 39, 6, 24, 12, 6, 0, 24, 3, 6, 9, 21, 0, 24, 0, 18, 15, 9, 6, 24, 3, 33, 12, 12, 9, 18, 6, 24, 0, 15, 3, 33, 12, 9, 18, 12, 12, 30, 3, 18, 15, 18, 0, 24, 0, 24, 3, 18, 18, 21, 9, 12, 12, 6, 3, 12, 3, 39, 6, 18, 0, 30, 3, 6, 9, 9, 12, 30, 6, 15, 0, 21, 15, 27, 6, 9, 0, 9, 3, 30, 6, , 30, 12, 3, 9, 24, 3, 33, 9, 9, 6, 24, 0, 12, 6, 9, 9, 21, 3, 21, 9, 18, 6, 18, 9, 9, 15, 9, 0, 21, 3, 24, 15, 15, 9, 24, 6, 21, 6, 12, 9, 15, 6, 15, 0, 12, 6, 42, 6, 39, 6, 15, 3, 18, 0, 18, 21, 21, 15, 21, 0, 6, 3, 6, 3, 12, 9, 24, 9, 24, 3, 33, 12, 15, 15, 15, 0, 39, 3, 18, 9, 21, 15, 15, 6, 18, 6, 15, 3, 30, 6, 24, 0, 12, 0, 18, 12, 18, 12, 15, 6, 24, 0, 18, 6, 12, 15, 18, 0, 21, 6, 15, 15, 27, 3, 9, 6, 24, 0, 15, 3, 36, 12, 6, 0, 15, 3, 24, 12, 0, 12, 39, 9, 9, 9, 21, 9, 21, 6, 18, 0, 12, 3, 21, 6, 15, 9, 15, 10, 24, 0, 21, 15, 6, 6, 30, 0, 21, 3, 12, 15, 45, 18, 15, 6, 9, 9, 24, 6, 18, 6, 15, 0, 24, 6, 24, 18, 21, 3, 24, 3, 21, 0, 18, 12, 15, 6, 18, 0, 18, 3, 27, 6, 18, 15, 3, 15, 33, 0, 21, 12, 18, 15, 18, 0, 12, 6, 15, 9, 27, 6, 39, 15, 3, 0, 18, 6, 15, 15, 15, 0, 18, 3, 12, 18, 18, 3, 33, 3, 30, 3, 9, 15, 21, 0, 6, 0, 18, 3, 27, 3, 18, 12, 12, 6, 27, 0, 21, 6, 9, 6, 30, 0, 15, 0, 12, 12, 39, 12, 24, 9, , 9, 12, 15, 12, 24, 18, 18, 0, 15, 3, 24, 12, 6, 15, 18, 3, 27, 9, 12, 9, 33, 9, 21, , 0, 12, 0, 39, 3, 15, 6, 15, 9, 21, 6, 21, 18, 12, 12, 30, 0, 27, 6, 15, 15, 24, 6, 9, 6, 12, 0, 33, 6, 15, 9, 18, 0, 36, 3, 18, 9, 15, 15, 15, 3, 6, 9, 12, 3, 39, 9, 21, 0, 6, 3, 15, 12, 27, 9, 18, 9, 30, 3, 27, 15, 6, 12, 18, 0, 15, 0, 24, 6, 12, 3, 18, 12, 27, 3, 21, 3, 21, 18, 3, 0, 27, 6, 15, 9, 9, 9, 33, 6, 21, 0, 9, 15, 33, 6, 24, 0, 18, 3, 33, 6, 18, 15, 9, 6, 24, 3, 30, 18, 15, 6, 21, 0, 36, 3, 18, 18, 15, 6, 12, 6, 3, 9, 39, 9, 15, 3, 18, 0, 12, 0, 9, 21, 24, 12, 30, 9, 30, 6, 18, 6, 18, 9, 36, 0, 9, 6, 27, 9, 12, 15, 18, 6, 15, 0, 21, 12, 24, 9, 18, 0, 12, 3, 9, 12, 42, 6, 6, 15, 18, 6, 15, 3, 18, 9, 12, 0, 24, 3, 21, 18, 15, 3, 24, 6, 18, 3, 18, 18, 18, 12, 15, 0, 12, 1, 21, 3, 36, 15, 12, 9, 24, 6, 27, 9, 12, 12, 42, 0, 12, 3, 6, 6, 33, 9, 24, 6, 15, 0, 18, 6, 21, 12, 15, 0, 36, 0, 24, 24, 18, 9, 21, 6, 21, 9, 12, 6, 30, 9, 12, 0, 6, 15, 36, 3, 21, 15, 12, 9, 18, 3, 21, 9, 18, 6, 21, 0, 24, 6, 9, 12, 12, 9, 33, 3, 12, 0, 48, 6, 30, 15, 6, 0, 27, 3, 9, 15, 12, 12, 18, 6, 15, 0, 24, , 9, 30, 3, 27, 0, 12, 0, 27, 12, 12, 9, 15, 6, 36, 3, 3, 9, 12, 21, 21, 0, 24, 6, 15, 15, 18, 3, 15, 15, 15, 6, 21, 9, 27, 18, 15, 0, 21, 0, 36, 9, 18, 3, 33, 6, 12, 6, , 12, 12, 39, 6, 18, 0, 18, 6, 30, 9, 24, 12, 3, 9, 27, 0, 18, 15, 12, 15, 21, 0, 27, , 0, 12, 6, 30, 6, 18, 12, 12, 3, 36, 6, 24, 9, 27, 0, 15, 0, 18, 21, 15, 9, 24, 3, 21, 6, 18, 12, 18, 6, 30, 0, 9, 6, 21, 12, 21, 12, 3, 9, 36, 3, 21, 15, 9, 6, 15, 0, 12, 9, 18, 9, 30, 6, 27, 9, 12, 0, 24, 12, 18, 6, 18, 0, 33, 3, 18, 9, 12, 18, 36, 3, 12, 6, 15, 15, 18, 9, 21, 0, 21, 0, 36, 3, 24, 21, 12, 12, 30, 3, 12, 9, 18, 9, 15, 0, 27, 3, 15, 18, 30, 9, 12, 12, 9, 9, 15, 6, 12, 18, 24, 0, 39, 6, 39, 9, 15, 6, 21, 6, 24, 0, 12, 6, 39, 9, 12, 0, 9, 0, 18, 12, 15, 12, 21, 9, 15, 6, 21, 15, 27, 9, 27, 0, 18, 6, 9, 6, 24, 12, 39, 9, 9, 6, 39, 3, 12, 15, 6, 0, 21, 0, 24, 9, 9, 15, , 21, 0, 27, 9, 18, 9, 18, 3, 24, 0, 15, 6, 18, 12, 24, 3, 12, 4, 27, 0, 21, 21, 18, 12, 36, 0, 21, 0, 24, 15, 24, 9, 9, 9, 18, 9, 33, 3, 36, 15, 9, 0, 24, 0, 18, 21, 15, 9, 33, 15, 6, 6, 9, 12, 30, 3, 33, 0, 21, 0, 21, 3, 18, 12, 18, 9, 21, 3, 12, 18, 18, 12, 24, 0, 33, 6, 3, 9, 39, 12, 18, 6, 9, 0, 42, 6, 21, 15, 18, 0, 12, 0, 18, 15, 15, 3, 30, 6, 30, 3, 12, 15, 15, 3, 15, 0, 15, 9, 39, 9, 18, 12, 12, 9, 39, 0, 21, , 12, 9, 15, 21, 0, 15, 6, 12, 9, 24, 6, 30, 12, 15, 6, 12, 12, 21, 12, 12, 0, 27, 3, , 21, 15, 18, 12, 36, 6, 30, 0, 9, 12, 30, 6, 12, 0, 12, 3, 45, 6, 6, 12, 18, 6, 15, 12, 45, 12, 15, 6, 30, 0, 18, 9, 9, 15, 42, 9, 12, 9, 24, 3, 12, 0, 27, 15, 12, 0, 33, 3, 30, 18, 12, 21, 21, 3, 15, 3, 18, 6, 30, 12, 18, 0, 3, 3, 18, 9, 18, 15, 24, 15, 24, 0, 21, 18, 18, 3, 27, 0, 33, 3, 9, 9, 18, 12, 18, 9, 15, 6, 33, 3, 9, 18, 12, , 0, 48, 3, 15, 6, 21, 3, 18, 3, 18, 6, 15, 18, 21, 6, 21, 0, 9, 3, 27, 9, 42, 9, 15, , 6, 27, 6, 24, 12, 12, 18, 33, 0, 18, 6, 24, 18, 18, 6, 9, 15, 18, 0, 39, 6, 24, 12, , 15, 0, 21, 6, 24, 12, 9, 6, 30, 6, 27, 3, 12, 12, 36, 3, 33, 0, 9, 9, 18, 6, 12, 18, 18, 3, 18, 3, 33, 18, 21, 9, 24, 0, 12, 0, 15, 18, 45, 12, 12, 15, 21, 3, 30, 9, 33, 3, 9, 0, 18, 3, 21, 18, 15, 9, 18, 6, 15, 0, 9, 9, 27, 6, 24, 0, 27, 0, 27, 9, 21, 15, 18, 15, 33, 3, 6, 9, 9, 21, 30, 0, 12, 6, 33, 3, 27, 6, 24, 3, 9, 4, 18, 12, 27, 9, 15, 0, 42, 0, 18, 24, 6, 12, 30, 6, 21, 9, 21, 9, 21, 9, 24, 0, 15, 6, 24, 12, , 39, 18, 6, 6, 24, 0, 30, 9, 12, 12, 33, 0, 18, 3, 12, 12, 36, 3, 27, 6, 15, 12, 36, , 9, 15, 15, 9, 0, 21, 0, 24, 21, 6, 9, 21, 3, 27, 6, 21, 6, 36, 9, 12, 0, 12, 3, 39, , 0, 15, 12, 15, 12, 30, 3, 21, 15, 21, 12, 18, 0, 27, 6, 15, 12, 24, 12, 36, 12, 15, , 0, 24, 9, 12, 15, 6, 0, 15, 3, 12, 9, 36, 21, 21, 3, 12, 12, 6, 12, 33, 6, 30, 0, 12, 3, 33, 9, 21, 9, 12, 12, 42, 3, 18, 12, 12, 3, 45, 0, 36, 3, 12, 12, 15, 9, 9, 18, 12, 3, 33, 9, 30, 12, 18, 0, 18, 6, 33, 15, 15, 9, 45, 9, 9, 0, 12, 12, 24, 12, 15, 0, 18, 3, 18, 9, 36, 18, 15, 3, 33, 3, 30, 24, 6, 9, 18, 0, 24, 3, 18, 12, 24, 0, 30, 6, 18, 9, 36, 0, 18, 15, 15, 0, 24, 0, 18, 15, 24, 6, 27, 6, 18, 12, 9, 15, 21, 9, 27, 0, 6, 0, 30, 6, 12, 12, 15, 12, 36, 0, 33, 12, 15, 9, 18, 0, 12, 0, 24, 15, 39, 0, 21, 12, 12, 6, 21, 15, 33, 18, 12, 0, 42, 9, 12, 12, 6, 15, 27, 6, 24, 3, 18, 9, 30, 9, 15, 0, 30, 3, 27, 15, 18, 15, 18, 12, 21, 0, 27, 9, 21, 15, 27, 0, 30, 9, 12, 9, 39, 6, 12, 6, 21, 0, 21, 6, 18, 18, 18, 0, 15, 3, 36, 21, 9, 15, 36, 6, 24, 6, 21, 6, 24, 9, 12, 0, 9, 9, 30, 3, 30, 9, 18, 6, 12, 3, 15, 18, 18, 12, 45, 0, 30, 3, 12, 9, 27, 12, 24, 9, 9, 6, 27, 12, 21, 9, 9, 0, 36, 6, 21, 12, 18, 12, 18, 3, 18, 0, 18, 9, 21, 0, 30, 0, 9, 3, 21, 12, 24, 21, 18, 7, 42, 3, 15, 9, 15, 12, 39, 0, 18, 3, 27, 24, 27, 9, 15, 12, 12, 3, 30, 6, 45, 21, 15, 0, 18, 3, 18, 9, 18, 6, 27, 9, 21, 6, 15, 12, 42, 9, 21, 0, 9, 6, 27, 9, 15, 15, 24, 12, 36, 0, 27, 21, 6, 6, 18, 0, 30, 0, 15, 12, 39, 9, 21, 15, 15, 6, 27, 3, 15, 9, 12, 0, 30, 6, 27, 18, 24, 12, 27, 3, 18, 9, 6, 24, 12, 6, 15, 0, 18, 0, 51, 3, 9, 6, 12, 6, 30, 6, 24, 12, 18, 18, 33, 0, 15, 6, 15, 12, 30, 6, 27, 18, 15, 0, 18, 3, 36, 9, 18, 0, 27, 0, 15, 18, 6, 9, 30, 0, 30, 9, 21, 6, 33, 9, 21, 0, 15, 12, 30, 12, 33, 15, 0, 9, 27, 3, 42, 15, , 24, 12, 21, 0, 12, 6, 18, 21, 30, 6, 24, 6, 18, 3, 24, 6, 15, 24, 27, 0, 33, 0, 24, , 18, 15, 9, 27, 9, 18, 0, 18, 3, 30, 15, 27, 0, 18, 0, 33, 6, 21, 12, 12, 12, 24, 3, , 12, 24, 24, 6, 30, 0, 42, 6, 0, 6, 27, 12, 18, 9, 9, 9, 42, 9, 18, 9, 6, 0, 33, 3, 33, 3, 18, 27, 24, 3, 12, 12, 18, 9, 30, 3, 18, 0, 12, 3, 21, 12, 21, 9, 21, 6, 30, 0, 15, 15, 18, 18, 36, 0, 15, 0, 21, 21, 21, 6, 18, 9, 12, 9, 39, 15, 33, 15, 12, 0, , 21, 3, 33, 15, 9, 6, 54, 6, 24, 6, 12, 6, 36, 9, 15, 0, 27, 3, 15, 6, 33, 15, 24, 9, 18, 3, 27, 18, 9, 6, 27, 0, 21, 6, 18, 21, 33, 9, 18, 12, 18, 0, 39, 3, 33, 12, 18, 0, 24, 3, 15, 21, 15, 9, 15, 6, 27, 9, 18, 9, 21, 12, 33, 0, 15, 0, 27, 9, 24, 18, , 6, 15, 54, 0, 15, 12, 21, 6, 24, 0, 12, 0, 9, 6, 24, 12, 33, 12, 12, 6, 27, 6, 18, 12, 27, 0, 27, 9, 27, 21, 18, 12, 21, 3, 18, 0, 24, 24, 21, 6, 18, 0, 18, 1, 30, 9, 21, 9, 18, 9, 27, 6, 30, 15, 12, 15, 24, 0, 12, 9, 12, 9, 45, 3, 36, 9, 18, 6, 24, 3, 24, 21, 24, 0, 39, 3, 27, 15, 9, 18, 24, 9, 27, 6, 15, 12, 42, 6, 9, 0, 9, 9, 54, 6, 12, 15, 15, 12, 18, 0, 30, 15, 15, 6, 24, 0, 45, 3, 9, 9, 18, 12, 21, 12, 12, 6, 24, 12, 33, 18, 18, 0, 33, 3, 15, 9, 21, 12, 30, 6, 9, 6, 15, 9, 42, 6, 36, 0, 6, 3, , 21, 12, 24, 6, 9, 6, 48, 6, 12, 15, 15, 15, 33, 0, 24, 6, 21, 9, 21, 9, 12, 12, 12, , 0, 15, 6, 15, 21, 9, 0, 36, 0, 48, 15, 27, 9, 51, 9, 18, 3, 21, 18, 18, 9, 18, 0, 15, 9, 30, 6, 33, 21, 15, 6, 30, 3, 15, 21, 15, 15, 18, 0, 27, 3, 12, 12, 39, 6, 21, 9, 9, 6, 45, 9, 27, 9, 24, 0, 33, 6, 9, 18, 15, 9, 36, 6, 33, 0, 15, 9, 12, 3, 39, 0, 21, 6, 42, 15, 15, 18, 12, 12, 24, 0, 36, 9, 21, 15, 21, 0, 9, 9, 15, 15, 39, 3, 9, 12, 18, 0, 24, 15, 42, 3, 9, 0, 27, 0, 24, 18, 6, 18, 45, 6, 24, 9, 12, 9, 12, 9, 24, 0, 30, 0, 30, 3, 18, 21, 12, 9, 33, 0, 15, 18, 12, 9, 27, 0, 24, 3, 15, 12, 48, 9, 21, 6, 24, 12, 21, 3, 24, 12, 18, 0, 24, 0, 39, 21, 15, 6, 21, 15, 24, 6, 24, 9, 36, 18, 24, 0, 9, 6, 33, 6, 27, 18, 9, 9, 33, 6, 24, 18, 24, 9, 36, 0, 24, 6, 12, 21, 18, 9, 30, 9, 18, 0, 39, 9, 21, 18, 12, 0, 15, 0, 15, 15, 27, 12, 33, 3, 15, 12, 21, 9, 30, 9, 36, 0, 15, 9, 24, 6, 21, 9, 30, 3, 33, 9, 18, 15, 6, 9, 30, 0, 30, 0, 9, 21, 30, 9, 12, 12, 21, 3, 33, 6, 45, 21, 9, 0, 18, 3, 21, 9, 12, 12, 36, 0, 9, 0, 15, 15, 45, 9, 18, 0, 21, 3, 24, 6, 18, 21, 12, 16, 15, 6, 39, 12, 9, 9, 30, 0, 51, 6, 21, 9, 45, 6, 12, 15, 12, 6, 36, 12, 15, 9, 21, 0, 24, 0, 24, 24, 21, 9, 30, 9, 15, 6, 18, 12, 36, 9, 18, 0, 12, 9, 27, 12, 24, 18, 12, 6, 60, 0, 36, 12, 15, 15, 15, , 0, 12, 6, 39, 9, 27, 3, 42, 15, 15, 12, 21, 12, 15, 9, 15, 0, 27, 0, 21, 15, 15, 15, 36, 6, 36, 3, 15, 12, 18, 12, 15, 0, 15, 0, 45, 6, 24, 15, 12, 3, 27, 6, 24, 18, 9, 9, 39, 0, 18, 6, 9, 24, 33, 3, 27, 9, 18, 0, 27, 9, 24, 6, 15, 0, 39, 0, 24, 24, 15, 18, 18, 6, 27, 9, 3, 6, 51, 9, 24, 0, 12, 3, 30, 6, 24, 18, 18, 15, 12, 6, 33, 15, 24, 9, 27, 0, 18, 6, 24, 12, 33, 15, 30, 6, 21, 3, 51, 9, 15, 18, 9, 0, 42, 6, 27, , 12, 21, 6, 21, 0, 18, 0, 27, 12, 30, 6, 21, 0, 24, 3, 15, 6, 51, 12, 9, 15, 30, 3, 12, 18, 9, 33, 51, 0, 15, 9, 18, 12, 24, 6, 15, 15, 21, 3, 27, 6, 33, 18, 18, 0, 24, , 6, 24, 18, 15, 6, 42, 9, 15, 6, 18, 18, 27, 6, 27, 0, 18, 9, 21, 6, 15, 18, 12, 6, 36, 0, 27, 15, 18, 3, 39, 0, 21, 0, 9, 12, 33, 12, 18, 9, 12, 9, 33, 0, 21, 15, 27, 0, 15, 6, 27, 24, 24, 12, 24, 9, 36, 6, 18, 12, 21, 15, 33, 0, 9, 3, 36, 6, 21, 12, 18, 12, 45, 3, 30, 12, 18, 15, 18, 0, 30, 9, 18, 15, 42, 6, 18, 15, 9, 0, 18, 12, 27, 15, 12, 0, 42, 0, 30, 18, 18, 12, 42, 6, 15, 6, 18, 18, 33, 9, 12, 0, 15, 3, 45, 12, 33, 15, 15, 12, 18, 0, 27, 6, 27, 9, 39, 0, 18, 0, 9, 9, 27, 12, 24, 9, 33, 9, 12, 9, 18, 12, 21, 0, 33, 3, 30, 27, 12, 15, 33, 6, 33, 0, 12, 12, 33, 12, 18, 0, 21, 3, 30, 9, 15, 3, 18, 6, 27, 3, 39, 24, 18, 9, 27, 0, 15, 15, 6, 9, 30, 6, 33, 9, 24, , 7, 42, 6, 24, 21, 6, 0, 33, 3, 12, 9, 12, 21, 27, 12, 12, 6, 27, 9, 33, 6, 45, 0, 9, 3, 45, 9, 42, 12, 15, 12, 30, 0, 12, 21, 12, 12, 24, 0, 42, 3, 27, 21, 30, 6, 9, 15, 18, 9, 30, 6, 33, 24, 18, 0, 27, 3, 21, 6, 3, 9, 39, 3, 24, 6, 6, 18, 42, 0, 24, 0, 27, 3, 27, 9, 27, 27, 27, 3, 36, 3, 27, 15, 24, 15, 24, 0, 18, 3, 18, 9, 39, 12, 21, 12, 12, 0, 45, 9, 18, 12, 12, 0, 18, 0, 21, 15, 15, 18, 33, 3, 39, 12, 15, 6, 12, 9, 30, 0, 18, 6, 33, 12, 18, 12, 15, 12, 30, 6, 27, 24, 12, 9, 24, 0, 15, 3, 24, 12, 42, 9, 27, 15, 12, 6, 18, 9, 45, 15, 12, 0, 51, 6, 24, 21, 18, 12, 45, 3, 15, 0, 30, 15, 21, 9, 12, 0, 9, 0, 39, 9, 21, 15, 21, 9, 33, 9, 24, 9, 21, 6, 42, 0, 27, 3, , 9, 30, 33, 9, 27, 12, 12, 9, 30, 12, 24, 27, 18, 0, 30, 0, 33, 15, 18, 9, 15, 6, 30, 12, 15, 6, 27, 12, 12, 0, 6, 9, 54, 9, 33, 6, 15, 15]

N = int(input())
for i in range(N):
    print(a[i])

Submission status: Runtime Error

Solution code:
import itertools
N = int(input())

ans = [0]*(10**4)
for i1 in range(1, 40):
    i2 = i1+1
    i3 = i1+2
    L = list(itertools.combinations_with_replacement((i1, i2, i3), 3))
    for i in L:
        i = list(i)
        x = i[0]
        y = i[1]
        z = i[2]
        n = (x**2)+(y**2)+(z**2)+(x*y)+(y*z)+(z*x)
        if n >= 10**4:
            break
        if len(list(set(i))) == 1:
            ans[n] += 1
        if len(list(set(i))) == 2:
            ans[n] += 3
        if len(list(set(i))) == 3:
            ans[n] += 6
        
for k in range(1, N+1):
    print(ans[k])

Submission status: Runtime Error

Solution code:
N = int(input())
X = int(input(),2)

def pcrem(n,cnt):
  if (n==0):
    print(cnt)
    return 0
  pc = bin(n).count("1")
  pcrem(n%pc,cnt+1)

for i in range(N):
  f = X^(1<<N-i-1)
  pcrem(f,0)