Buggy python submission (verdict: Runtime Error):
# vim: fileencoding=utf-8


def main():
    N = int(input())
    for n in range(1, N + 1):
        ans = 0
        if n <= 5:
            print(ans)
            continue

        zMax = int((N + 1) / 6) + 1
        print(f"{n}")
        for x in range(1, int((N + 1) / 6) + 1):
            tx = x ** 2
            if tx + x + 3 >= n or x >= zMax:
                break
            for y in range(x, int((N + 1) / 6) + 1):
                ty = tx + y ** 2 + x * y
                if ty + y + x + 1 >= n or y >= zMax:
                    break
                for z in range(y, int((N + 1) / 6) + 1):
                    print(f"x :{x} y :{y} z :{z}")
                    t = ty + z ** 2 + y * z + z * x
                    if t == n:
                        print(f"ans x :{x} y :{y} z :{z}")
                        if x == y and x == z:
                            ans += 1
                        elif x == y or y == z:
                            ans += 3
                        else:
                            ans += 6
                        if z <= zMax:
                            zMax = z
                        break
                    if t >= n:
                        break
        print(ans)


if __name__ == "__main__":
    main()


Fixed submission:
# vim: fileencoding=utf-8


def main():
    N = int(input())
    ans = [0] * N
    for x in range(1, 101):
        for y in range(1, 101):
            for z in range(1, 101):
                t = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x - 1
                if t >= len(ans):
                    break
                ans[t] += 1

    print(*ans)


if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
# vim: fileencoding=utf-8


def main():
    N = int(input())
    for n in range(1, N + 1):
        ans = 0
        if n <= 5:
            print(ans)
            continue

        zMax = int((N + 1) / 6) + 1
        for x in range(1, int((N + 1) / 6) + 1):
            tx = x ** 2
            if tx + x >= n or x >= zMax:
                break
            for y in range(x, int((N + 1) / 6) + 1):
                ty = tx + y ** 2 + x * y
                if ty + y + x >= n or y >= zMax:
                    break
                for z in range(y, int((N + 1) / 6) + 1):
                    t = ty + z ** 2 + y * z + z * x
                    if t == n:
                        if x == y and x == z:
                            ans += 1
                        elif x == y or y == z:
                            ans += 3
                        else:
                            ans += 6
                        if z <= zMax:
                            zMax = z
                        break
                    if t >= n:
                        break
        print(ans)


if __name__ == "__main__":
    main()


Fixed submission:
# vim: fileencoding=utf-8


def main():
    N = int(input())
    ans = [0] * N
    for x in range(1, 101):
        for y in range(1, 101):
            for z in range(1, 101):
                t = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x - 1
                if t >= len(ans):
                    break
                ans[t] += 1

    print(*ans)


if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
# vim: fileencoding=utf-8


def main():
    N = int(input())
    for n in range(1, N + 1):
        ans = 0
        if n <= 5:
            print(ans)
            continue
        for x in range(1, int((N + 1) / 6) + 1):
            tx = x ** 2
            if tx >= n:
                break
            for y in range(1, int((N + 1) / 6) + 1):
                ty = tx + y ** 2 + x * y
                if ty >= n:
                    break
                for z in range(1, int((N + 1) / 6) + 1):
                    t = ty + z ** 2 + y * z + z * x
                    if t == n:
                        ans += 1
                    if t >= n:
                        break
        print(ans)


if __name__ == "__main__":
    main()


Fixed submission:
# vim: fileencoding=utf-8


def main():
    N = int(input())
    ans = [0] * N
    for x in range(1, 101):
        for y in range(1, 101):
            for z in range(1, 101):
                t = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x - 1
                if t >= len(ans):
                    break
                ans[t] += 1

    print(*ans)


if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
# vim: fileencoding=utf-8


def main():
    N = int(input())
    for n in range(1, N + 1):
        ans = 0
        if n <= 5:
            print(ans)
            continue
        for x in range(1, int((N + 1) / 6) + 1):
            tx = x ** 2
            if tx >= n:
                break
            for y in range(1, int((N + 1) / 6) + 1):
                ty = tx + y ** 2 + x * y
                if ty >= n:
                    break
                for z in range(1, int((N + 1) / 6) + 1):
                    t = ty + z ** 2 + y * z + z * x
                    if t == n:
                        ans += 1
        print(ans)


if __name__ == "__main__": main()


Fixed submission:
# vim: fileencoding=utf-8


def main():
    N = int(input())
    ans = [0] * N
    for x in range(1, 101):
        for y in range(1, 101):
            for z in range(1, 101):
                t = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x - 1
                if t >= len(ans):
                    break
                ans[t] += 1

    print(*ans)


if __name__ == "__main__":
    main()