Buggy python submission (verdict: Runtime Error):
import numpy as np

N = int(input())
res = np.zeros(N)

th = int(np.sqrt(N))
for x in range(1, th):
    for y in range(1, x + 1):
        for z in range(1, y + 1):
            n = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
            if n > N:
                continue
            if x == y and y == z:
                res[n] += 1
            elif x == y or y == z or z == x:
                res[n] += 3
            else:
                res[n] += 6
for i in range(1, N):
    print(int(res[i]))

Fixed submission:
import numpy as np

N = int(input())
res = np.zeros(N+1)

th = int(np.sqrt(N)) + 1
for x in range(1, th):
    for y in range(1, x + 1):
        for z in range(1, y + 1):
            n = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
            if n > N:
                continue
            if x == y and y == z:
                res[n] += 1
            elif x == y or y == z or z == x:
                res[n] += 3
            else:
                res[n] += 6
for i in range(1, N+1):
    print(int(res[i]))

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

N = int(input())

for n in range(1, N + 1):
    cnt = 0
    th = int(np.sqrt(n)) + 1
    for x in range(1, th):
        thy = int(np.sqrt(n - x ** 2)) + 1
        for y in range(1, x + 1):
            for z in range(1, y + 1):
                if x**2 + y**2 + z**2 + x*y + y*z + z*x == n:
                    if x == y and y == z:
                        cnt += 1
                    elif x == y or y == z or z == x:
                        cnt += 3
                    else:
                        cnt += 1
    print(cnt)

Fixed submission:
import numpy as np

N = int(input())
res = np.zeros(N+1)

th = int(np.sqrt(N)) + 1
for x in range(1, th):
    for y in range(1, x + 1):
        for z in range(1, y + 1):
            n = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
            if n > N:
                continue
            if x == y and y == z:
                res[n] += 1
            elif x == y or y == z or z == x:
                res[n] += 3
            else:
                res[n] += 6
for i in range(1, N+1):
    print(int(res[i]))

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

N = int(input())

for n in range(1, N + 1):
    cnt = 0
    th = int(np.sqrt(n)) + 1
    for x in range(1, th):
        thy = int(np.sqrt(n - x ** 2)) + 1
        for y in range(1, thy):
            try:
                thz = int(np.sqrt(n - x ** 2 - y ** 2 - x * y)) + 1
            except ValueError:
                break
            for z in range(1, thz):
                if x**2 + y**2 + z**2 + x*y + y*z + z*x == n:
                    cnt += 1
    print(cnt)

Fixed submission:
import numpy as np

N = int(input())
res = np.zeros(N+1)

th = int(np.sqrt(N)) + 1
for x in range(1, th):
    for y in range(1, x + 1):
        for z in range(1, y + 1):
            n = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
            if n > N:
                continue
            if x == y and y == z:
                res[n] += 1
            elif x == y or y == z or z == x:
                res[n] += 3
            else:
                res[n] += 6
for i in range(1, N+1):
    print(int(res[i]))

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

N = int(input())

for n in range(1, N + 1):
    cnt = 0
    th = int(np.sqrt(n)) + 1
    for x in range(1, th):
        thy = int(np.sqrt(n - x ** 2)) + 1
        for y in range(1, thy):
            try:
                thz = int(np.sqrt(n - x ** 2 - y ** 2)) + 1
            except ValueError:
                continue
            for z in range(1, thz):
                if x**2 + y**2 + z**2 + x*y + y*z + z*x == n:
                    cnt += 1
    print(cnt)

Fixed submission:
import numpy as np

N = int(input())
res = np.zeros(N+1)

th = int(np.sqrt(N)) + 1
for x in range(1, th):
    for y in range(1, x + 1):
        for z in range(1, y + 1):
            n = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
            if n > N:
                continue
            if x == y and y == z:
                res[n] += 1
            elif x == y or y == z or z == x:
                res[n] += 3
            else:
                res[n] += 6
for i in range(1, N+1):
    print(int(res[i]))

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

N = int(input())

for n in range(1, N + 1):
    cnt = 0
    th = int(np.sqrt(n)) + 1
    for x in range(1, th):
        thy = int(np.sqrt(n - x ** 2)) + 1
        for y in range(1, thy):
            thy = int(np.sqrt(n - x ** 2 - y ** 2)) + 1
            for z in range(1, th):
                if x**2 + y**2 + z**2 + x*y + y*z + z*x == n:
                    cnt += 1
    print(cnt)

Fixed submission:
import numpy as np

N = int(input())
res = np.zeros(N+1)

th = int(np.sqrt(N)) + 1
for x in range(1, th):
    for y in range(1, x + 1):
        for z in range(1, y + 1):
            n = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
            if n > N:
                continue
            if x == y and y == z:
                res[n] += 1
            elif x == y or y == z or z == x:
                res[n] += 3
            else:
                res[n] += 6
for i in range(1, N+1):
    print(int(res[i]))

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

N = int(input())


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

Fixed submission:
import numpy as np

N = int(input())
res = np.zeros(N+1)

th = int(np.sqrt(N)) + 1
for x in range(1, th):
    for y in range(1, x + 1):
        for z in range(1, y + 1):
            n = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
            if n > N:
                continue
            if x == y and y == z:
                res[n] += 1
            elif x == y or y == z or z == x:
                res[n] += 3
            else:
                res[n] += 6
for i in range(1, N+1):
    print(int(res[i]))