Buggy python submission (verdict: Time Limit Exceeded):
def resolve():
    import sys
    import math

    readline = sys.stdin.readline

    N = int(readline())

    for i in range(1, N + 1):
        ans = 0
        li = int(math.sqrt(i))
        for x in range(1, li):
            xx = x * x
            for y in range(1, li):
                yy = y * y
                xy = x * y
                x_y = x + y
                value = (x_y) ** 2 - 4 * (xx + yy + xy - i)
                if value <= 0:
                    continue
                cal = math.sqrt(value)
                z1 = (-(x_y) + cal) * 0.5
                z2 = (-(x_y) - cal) * 0.5
                if (1
                        and 1 <= z1
                        and z1 % 1 == 0):
                    ans += 1
                if (1
                        and 1 <= z2
                        and z2 % 1 == 0):
                    ans += 1
        print(ans)


resolve()


Fixed submission:
import sys


def resolve():
    import numpy as np

    readline = sys.stdin.readline

    N = int(readline())

    f = np.zeros(10001, np.int64)

    for x in range(1, 101):
        for y in range(1, 101):
            for z in range(1, 101):
                n = x * x + y * y + z * z + x * y + y * z + z * x
                if n > 10000:
                    continue
                f[n] += 1
    for i in range(1, N + 1):
        print(f[i])

resolve()

Buggy python submission (verdict: Time Limit Exceeded):
def resolve():
    import sys
    import math

    readline = sys.stdin.readline

    N = int(readline())

    for i in range(1, N + 1):
        ans = 0
        li = int(math.sqrt(i))
        for x in range(1, li):
            xx = x * x
            for y in range(1, li):
                yy = y * y
                xy = x * y
                x_y = x + y
                value = (x_y) ** 2 - 4 * (xx + yy + xy - i)
                if value <= 0:
                    continue
                cal = math.sqrt(value)
                z1 = (-(x_y) + cal) / 2
                z2 = (-(x_y) - cal) / 2
                if (1
                        and 1 <= z1
                        and z1 % 1 == 0):
                    ans += 1
                if (1
                        and 1 <= z2
                        and z2 % 1 == 0):
                    ans += 1
        print(ans)


resolve()


Fixed submission:
import sys


def resolve():
    import numpy as np

    readline = sys.stdin.readline

    N = int(readline())

    f = np.zeros(10001, np.int64)

    for x in range(1, 101):
        for y in range(1, 101):
            for z in range(1, 101):
                n = x * x + y * y + z * z + x * y + y * z + z * x
                if n > 10000:
                    continue
                f[n] += 1
    for i in range(1, N + 1):
        print(f[i])

resolve()

Buggy python submission (verdict: Time Limit Exceeded):
def resolve():
    import sys
    import math

    readline = sys.stdin.readline

    N = int(readline())

    for i in range(1, N + 1):
        ans = 0
        li = int(math.sqrt(i) // 1)
        for x in range(1, li):
            xx = x * x
            for y in range(1, li):
                yy = y * y
                xy = x * y
                x_y = x + y
                value = (x_y) ** 2 - 4 * (xx + yy + xy - i)
                if value <= 0:
                    continue
                cal = math.sqrt(value)
                z1 = (-(x_y) + cal) / 2
                z2 = (-(x_y) - cal) / 2
                if (1
                        and 1 <= z1
                        and z1 % 1 == 0):
                    ans += 1
                if (1
                        and 1 <= z2
                        and z2 % 1 == 0):
                    ans += 1
        print(ans)


resolve()


Fixed submission:
import sys


def resolve():
    import numpy as np

    readline = sys.stdin.readline

    N = int(readline())

    f = np.zeros(10001, np.int64)

    for x in range(1, 101):
        for y in range(1, 101):
            for z in range(1, 101):
                n = x * x + y * y + z * z + x * y + y * z + z * x
                if n > 10000:
                    continue
                f[n] += 1
    for i in range(1, N + 1):
        print(f[i])

resolve()

Buggy python submission (verdict: Time Limit Exceeded):
import sys
 
 
def resolve():
    import math
 
    readline = sys.stdin.readline
 
    N = int(readline())
 
    for i in range(1, N + 1):
        ans = 0
        li = int(math.sqrt(i) // 1)
        for x in range(1, li):
            for y in range(1, li):
                xx = x * x
                yy = y * y
                xy = x * y
                value = (x + y) ** 2 - 4 * (xx + yy + xy - i)
                if value <= 0:
                    continue
                cal = math.sqrt(value)
                z1 = (-(x + y) + cal) / 2
                z2 = (-(x + y) - cal) / 2
                if (1
                        and 1 <= z1
                        and z1 % 1 == 0):
                    ans += 1
                if (1
                        and 1 <= z2
                        and z2 % 1 == 0):
                    ans += 1
        print(ans)
 
 
resolve()

Fixed submission:
import sys


def resolve():
    import numpy as np

    readline = sys.stdin.readline

    N = int(readline())

    f = np.zeros(10001, np.int64)

    for x in range(1, 101):
        for y in range(1, 101):
            for z in range(1, 101):
                n = x * x + y * y + z * z + x * y + y * z + z * x
                if n > 10000:
                    continue
                f[n] += 1
    for i in range(1, N + 1):
        print(f[i])

resolve()

Buggy python submission (verdict: Time Limit Exceeded):
import sys


def resolve():
    import math

    readline = sys.stdin.readline

    N = int(readline())

    for i in range(1, N + 1):
        ans = 0
        li = int(math.sqrt(i) // 1)
        for x in range(1, li):
            for y in range(1, li):
                xx = x * x
                yy = y * y
                xy = x * y
                value = (x + y) ** 2 - 4 * (xx + yy + xy - i)
                if value <= 0:
                    continue
                cal = math.sqrt(value)
                z1 = (-(x + y) + cal) / 2
                z2 = (-(x + y) - cal) / 2
                if (1
                        and 1 <= z1
                        and z1 % 1 == 0):
                    ans += 1
                if (1
                        and 1 <= z2
                        and z2 % 1 == 0):
                    ans += 1
        print(ans)


resolve()


Fixed submission:
import sys


def resolve():
    import numpy as np

    readline = sys.stdin.readline

    N = int(readline())

    f = np.zeros(10001, np.int64)

    for x in range(1, 101):
        for y in range(1, 101):
            for z in range(1, 101):
                n = x * x + y * y + z * z + x * y + y * z + z * x
                if n > 10000:
                    continue
                f[n] += 1
    for i in range(1, N + 1):
        print(f[i])

resolve()

Buggy python submission (verdict: Time Limit Exceeded):
def resolve():
    import sys
    import math
 
    readline = sys.stdin.readline
 
    N = int(readline())
 
    for i in range(1, N + 1):
        ans = 0
        li = int(math.sqrt(i) // 1)
        for x in range(1, li):
            for y in range(1, li):
                xx = x * x
                yy = y * y
                xy = x * y
                value = (x + y) ** 2 - 4 * (xx + yy + xy - i)
                if value <= 0:
                    continue
                cal = math.sqrt(value)
                z1 = (-(x + y) + cal) / 2
                z2 = (-(x + y) - cal) / 2
                if (1
                        and 1 <= z1
                        and z1 % 1 == 0
                        and xx + yy + z1 * z1 + xy + y * z1 + z1 * x == i):
                    ans += 1
                if (1
                        and 1 <= z2
                        and z2 % 1 == 0
                        and xx + yy + z2 * z2 + xy + y * z2 + z2 * x == i):
                    ans += 1
        print(ans)
 
 
resolve()

Fixed submission:
import sys


def resolve():
    import numpy as np

    readline = sys.stdin.readline

    N = int(readline())

    f = np.zeros(10001, np.int64)

    for x in range(1, 101):
        for y in range(1, 101):
            for z in range(1, 101):
                n = x * x + y * y + z * z + x * y + y * z + z * x
                if n > 10000:
                    continue
                f[n] += 1
    for i in range(1, N + 1):
        print(f[i])

resolve()

Buggy python submission (verdict: Time Limit Exceeded):
def resolve():
    import sys
    import math

    readline = sys.stdin.readline

    N = int(readline())

    for i in range(1, N + 1):
        ans = 0
        li = int(math.sqrt(i) // 1)
        for x in range(1, li):
            for y in range(1, li):
                xx = x * x
                yy = y * y
                xy = x * y
                value = (x + y) ** 2 - 4 * (xx + yy + xy - i)
                if value <= 0:
                    continue
                cal = math.sqrt(value)
                z1 = (-(x + y) + cal) / 2
                z2 = (-(x + y) - cal) / 2
                if (1
                        and 1 <= z1
                        and z1 % 1 == 0
                        and xx + yy + z1 * z1 + xy + y * z1 + z1 * x == i):
                    ans += 1
                if (1
                        and 1 <= z2
                        and z2 % 1 == 0
                        and xx + yy + z2 * z2 + xy + y * z2 + z2 * x == i):
                    ans += 1
        print(ans)


resolve()


Fixed submission:
import sys


def resolve():
    import numpy as np

    readline = sys.stdin.readline

    N = int(readline())

    f = np.zeros(10001, np.int64)

    for x in range(1, 101):
        for y in range(1, 101):
            for z in range(1, 101):
                n = x * x + y * y + z * z + x * y + y * z + z * x
                if n > 10000:
                    continue
                f[n] += 1
    for i in range(1, N + 1):
        print(f[i])

resolve()