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

table = [0] * 1001

for x in range(1, 101):
    for y in range(1, 101):
        for z in range(1, 101):
            k = (x * x) + (y * y) + (z * z) + (x * y) + (y * z) + (z * x)
            if k < 1001:
                table[k] += 1

for i in range(1, n + 1):
    print(table[i])


Fixed submission:
import sys
input = sys.stdin.readline
# sys.setrecursionlimit(100000)


def checker():
    ans = [0] * 10001
    for a in range(1, 101):
        for b in range(1, 101):
            for c in range(1, 101):
                n = a * a + b * b + c * c + a * b + b * c + c * a
                if n > 10000:
                    continue
                else:
                    ans[n] += 1
    return ans


def main():
    N = int(input().strip())
    ans = checker()
    for n in range(1, N + 1):
        print(ans[n])
    return


if __name__ == "__main__":
    main()

Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline
# sys.setrecursionlimit(100000)


def checker():
    ans = [0] * 10000
    for a in range(1, 101):
        for b in range(1, 101):
            for c in range(1, 101):
                n = a * a + b * b + c * c + a * b + b * c + c * a
                if n > 10000:
                    continue
                else:
                    ans[n] += 1
    return ans


def main():
    N = int(input().strip())
    ans = checker()
    for n in range(1, N + 1):
        print(ans[n])
    return


if __name__ == "__main__":
    main()


Fixed submission:
import sys
input = sys.stdin.readline
# sys.setrecursionlimit(100000)


def checker():
    ans = [0] * 10001
    for a in range(1, 101):
        for b in range(1, 101):
            for c in range(1, 101):
                n = a * a + b * b + c * c + a * b + b * c + c * a
                if n > 10000:
                    continue
                else:
                    ans[n] += 1
    return ans


def main():
    N = int(input().strip())
    ans = checker()
    for n in range(1, N + 1):
        print(ans[n])
    return


if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline
# sys.setrecursionlimit(100000)


def checker(n):
    ans = 0
    for a in range(1, 101):
        if a ** 2 + 2 * a > n:
            break
        for b in range(1, 101-a):
            if a * 2 + b * 2 > n:
                break
            _rest = n - a ** 2 - b ** 2
            for c in range(1, 101-a-b):
                if (c + a) * (c + b) == _rest:
                    ans += 1
                    break
                elif (c + a) * (c + b) > _rest:
                    break
    return ans


def main():
    N = int(input().strip())
    for n in range(1, N + 1):
        print(checker(n))
    return


if __name__ == "__main__":
    main()


Fixed submission:
import sys
input = sys.stdin.readline
# sys.setrecursionlimit(100000)


def checker():
    ans = [0] * 10001
    for a in range(1, 101):
        for b in range(1, 101):
            for c in range(1, 101):
                n = a * a + b * b + c * c + a * b + b * c + c * a
                if n > 10000:
                    continue
                else:
                    ans[n] += 1
    return ans


def main():
    N = int(input().strip())
    ans = checker()
    for n in range(1, N + 1):
        print(ans[n])
    return


if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline
# sys.setrecursionlimit(100000)


def checker(n):
    ans = 0
    for a in range(1, 101):
        if a ** 2 + 2 * a > n:
            continue
        for b in range(1, 101-a):
            if a * 2 + b * 2 > n:
                continue
            for c in range(1, 101-a-b):
                if a ** 2 + b ** 2 + c ** 2 + a * b + b * c + c * a == n:
                    ans += 1
                elif a ** 2 + b ** 2 + c ** 2 + a * b + b * c + c * a > n:
                    break
    return ans


def main():
    N = int(input().strip())
    for n in range(1, N+1):
        print(checker(n))
    return


if __name__ == "__main__":
    main()


Fixed submission:
import sys
input = sys.stdin.readline
# sys.setrecursionlimit(100000)


def checker():
    ans = [0] * 10001
    for a in range(1, 101):
        for b in range(1, 101):
            for c in range(1, 101):
                n = a * a + b * b + c * c + a * b + b * c + c * a
                if n > 10000:
                    continue
                else:
                    ans[n] += 1
    return ans


def main():
    N = int(input().strip())
    ans = checker()
    for n in range(1, N + 1):
        print(ans[n])
    return


if __name__ == "__main__":
    main()