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

sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline
f_inf = float('inf')
mod = 10 ** 9 + 7


def resolve():
    N = int(input())

    for n in range(1, N + 1):
        res = 0
        for x in range(1, int(pow(n, 0.5)) + 1):
            for y in range(x, int(pow(n, 0.5)) + 1):
                for z in range(y, int(pow(n, 0.5)) + 1):
                    if pow(x, 2) + pow(y, 2) + pow(z, 2) + x * y + y * z + z * x == n:
                        if x == y == z:
                            res += 1
                        elif x == y or y == z or z == z:
                            res += 3
                        elif x != y != z:
                            res += 6
        print(res)


if __name__ == '__main__':
    resolve()

# t = n - pow(x, 2) - pow(y, 2) - x * y
# if t >= 1:

Fixed submission:
import sys

sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline
f_inf = float('inf')
mod = 10 ** 9 + 7


def resolve():
    n = int(input())

    res = [0] * (n + 10)
    for x in range(1, int(pow(n, 0.5)) + 1):
        for y in range(1, int(pow(n, 0.5)) + 1):
            for z in range(1, int(pow(n, 0.5)) + 1):
                t = pow(x, 2) + pow(y, 2) + pow(z, 2) + x * y + y * z + z * x
                if t <= n:
                    res[t] += 1

    for x in range(1, n + 1):
        print(res[x])


if __name__ == '__main__':
    resolve()

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

sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline
f_inf = float('inf')
mod = 10 ** 9 + 7


def resolve():
    N = int(input())

    for n in range(1, N + 1):
        res = 0
        for x in range(1, int(pow(n, 0.5)) + 1):
            for y in range(1, int(pow(n, 0.5)) + 1):
                t = n - pow(x, 2) - pow(y, 2) - x * y
                if t >= 1:
                    for z in range(1, int(pow(t, 0.5)) + 1):
                        if pow(x, 2) + pow(y, 2) + pow(z, 2) + x * y + y * z + z * x == n:
                            res += 1
        print(res)


if __name__ == '__main__':
    resolve()


Fixed submission:
import sys

sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline
f_inf = float('inf')
mod = 10 ** 9 + 7


def resolve():
    n = int(input())

    res = [0] * (n + 10)
    for x in range(1, int(pow(n, 0.5)) + 1):
        for y in range(1, int(pow(n, 0.5)) + 1):
            for z in range(1, int(pow(n, 0.5)) + 1):
                t = pow(x, 2) + pow(y, 2) + pow(z, 2) + x * y + y * z + z * x
                if t <= n:
                    res[t] += 1

    for x in range(1, n + 1):
        print(res[x])


if __name__ == '__main__':
    resolve()

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

sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline
f_inf = float('inf')
mod = 10 ** 9 + 7


def resolve():
    N = int(input())

    for n in range(1, N + 1):
        res = 0
        for x in range(1, int(pow(n, 0.5)) + 1):
            for y in range(1, int(pow(n, 0.5)) + 1):
                for z in range(1, int(pow(n, 0.5)) + 1):
                    if pow(x, 2) + pow(y, 2) + pow(z, 2) + x * y + y * z + z * x == n:
                        res += 1
        print(res)


if __name__ == '__main__':
    resolve()


Fixed submission:
import sys

sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline
f_inf = float('inf')
mod = 10 ** 9 + 7


def resolve():
    n = int(input())

    res = [0] * (n + 10)
    for x in range(1, int(pow(n, 0.5)) + 1):
        for y in range(1, int(pow(n, 0.5)) + 1):
            for z in range(1, int(pow(n, 0.5)) + 1):
                t = pow(x, 2) + pow(y, 2) + pow(z, 2) + x * y + y * z + z * x
                if t <= n:
                    res[t] += 1

    for x in range(1, n + 1):
        print(res[x])


if __name__ == '__main__':
    resolve()