Buggy python submission (verdict: Runtime Error):
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])

Fixed submission:
import numpy as np
def f(n):
    counts = [0]*n
    x_max = int(np.sqrt(n))
    for x in range(1,x_max+1):
        y_max = int(np.sqrt(n-x**2))
        for y in range(1,y_max+1):
            z_max = int(np.sqrt(n-x**2-y**2))
            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])

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np

def solv_quadratic_equation(a, b, c):
    """ 2次方程式を解く  """
    if b**2 - 4*a*c>=0:
        D = (b**2 - 4*a*c) ** (1/2)
        x_1 = (-b + D) / (2 * a)
        x_2 = (-b - D) / (2 * a)

        return x_1, x_2
    else:
        return 0,0

def f(n):
    count = 0
    x_max = int(np.sqrt(n/6)//1)
    for x in range(1,x_max+1):
        y_max = int(np.sqrt((n-x**2-2*x)/3)//1)
        for y in range(x,y_max+1):
            z_1,z_2 = solv_quadratic_equation(1,x+y,x**2+y**2+x*y-n)
            zs = [int(z_1),int(z_2)]
            if zs[0] == zs[1]:
                if zs[0]>=y and x**2+y**2+zs[0]**2+x*y+y*zs[0]+zs[0]*x == n:
                    if x==y and y==zs[0]:
                        count += 1
                    elif x==y and y<zs[0]:
                        count += 3
                    elif x<y and y==zs[0]:
                        count += 3
                    elif x<y and y<zs[0]:
                        count += 6
            else:
                for z in zs:
                    if z>=y and x**2+y**2+z**2+x*y+y*z+z*x == n:
                        if x==y and y==z:
                            count += 1
                        elif x==y and y<z:
                            count += 3
                        elif x<y and y==z:
                            count += 3
                        elif x<y and y<z:
                            count += 6

            '''
            z_max = int(np.sqrt(n-x**2-y**2-x*y-x-y)//1)
            for z in range(y,z_max+1):
                if x**2+y**2+z**2+x*y+y*z+z*x == n:
            
                    if x==y and y==z:
                        count += 1
                    elif x==y and y<z:
                        count += 3
                    elif x<y and y==z:
                        count += 3
                    elif x<y and y<z:
                        count += 6
            '''

    return count

N = int(input())
if N >=6:
    for i in range(5):
        print(0)
    for i in range(5,N):
        print(f(i+1))
else:
    for i in range(N):
        print(0)

Fixed submission:
import numpy as np
def f(n):
    counts = [0]*n
    x_max = int(np.sqrt(n))
    for x in range(1,x_max+1):
        y_max = int(np.sqrt(n-x**2))
        for y in range(1,y_max+1):
            z_max = int(np.sqrt(n-x**2-y**2))
            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])

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
def f(n):
    count = 0
    x_max = int(np.sqrt(n/6)//1)
    for x in range(1,x_max+1):
        y_max = int(np.sqrt((n-x**2-2*x)/3)//1)
        for y in range(x,y_max+1):
            z_max = int(np.sqrt(n-x**2-y**2-x*y-x-y)//1)
            for z in range(y,z_max+1):
                if x**2+y**2+z**2+x*y+y*z+z*x == n:
                    if x==y and y==z:
                        count += 1
                    elif x==y and y<z:
                        count += 3
                    elif x<y and y==z:
                        count += 3
                    elif x<y and y<z:
                        count += 6

    return count

N = int(input())
if N >=6:
    for i in range(5):
        print(0)
    for i in range(5,N):
        print(f(i+1))
else:
    for i in range(N):
        print(0)

Fixed submission:
import numpy as np
def f(n):
    counts = [0]*n
    x_max = int(np.sqrt(n))
    for x in range(1,x_max+1):
        y_max = int(np.sqrt(n-x**2))
        for y in range(1,y_max+1):
            z_max = int(np.sqrt(n-x**2-y**2))
            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])

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
def f(n):
    count = 0
    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:
                    count += 1
    return count

N = int(input())
if N >=6:
    for i in range(5):
        print(0)
    for i in range(5,N):
        print(f(i+1))
else:
    for i in range(N):
        print(0)

Fixed submission:
import numpy as np
def f(n):
    counts = [0]*n
    x_max = int(np.sqrt(n))
    for x in range(1,x_max+1):
        y_max = int(np.sqrt(n-x**2))
        for y in range(1,y_max+1):
            z_max = int(np.sqrt(n-x**2-y**2))
            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])

Buggy python submission (verdict: Runtime Error):
N = int(input())

def f(n):
    count = 0
    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:
                    count += 1
    return count

for i in range(5):
    print(0)
for i in range(5,N):
    print(f(i+1))

Fixed submission:
import numpy as np
def f(n):
    counts = [0]*n
    x_max = int(np.sqrt(n))
    for x in range(1,x_max+1):
        y_max = int(np.sqrt(n-x**2))
        for y in range(1,y_max+1):
            z_max = int(np.sqrt(n-x**2-y**2))
            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])