Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
for i in range(1,n+1):
    c = 0
    total = n
    while 1:
        for x in range(1, i//2):
            for y in range(x, i//2):
                for z in range(y, i//2):
                    total = ((x+y)**2 + (z+y)**2 + (x+z)**2) / 2
                    if total == i:
                        if x == y == z:
                            c += 1
                            # print("b")
                        elif x == y or y == z:
                            c += 3
                        else:
                            c += 6
                        break
                    elif total>i:
                        # print("a")
                        break
                if total == i:
                    break
        if total>i:
            break
    print(c)

Fixed submission:
n = int(input())
a = [0 for i in range(n)]
c = 0
total = n
for x in range(1, n//2):
    for y in range(x, n//2):
        for z in range(y, n//2):
            total = int(((x+y)**2 + (z+y)**2 + (x+z)**2) / 2)
            try:
                if x == y == z:
                    a[total-1] += 1
                elif x == y or y == z:
                    a[total-1] += 3
                else:
                    a[total-1] += 6
            except:
                break
for i in a:
    print(i)

Buggy python submission (verdict: Runtime Error):
import math
n = int(input())
for i in range(1,n+1):
    c = 0
    total = n
    while 1:
        for x in range(1,math.sqrt(i)):
            for y in range(x,math.sqrt(i)):
                for z in range(y,math.sqrt(i)):
                    total = ((x+y)**2 + (z+y)**2 + (x+z)**2) / 2
                    if total == i:
                        if x==y==z:
                            c += 1
                        elif x ==y or y == z:
                            c += 3
                        else:
                            c += 6
                        break
                    elif total>i:
                        break
                if total==i:
                    break
            if total==i:
                break
        if total>i:
            break
    print(c)

Fixed submission:
n = int(input())
a = [0 for i in range(n)]
c = 0
total = n
for x in range(1, n//2):
    for y in range(x, n//2):
        for z in range(y, n//2):
            total = int(((x+y)**2 + (z+y)**2 + (x+z)**2) / 2)
            try:
                if x == y == z:
                    a[total-1] += 1
                elif x == y or y == z:
                    a[total-1] += 3
                else:
                    a[total-1] += 6
            except:
                break
for i in a:
    print(i)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
for i in range(1,n+1):
    c = 0
    total = n
    while 1:
        for x in range(1,i//2):
            for y in range(x,i//2):
                for z in range(y,i//2):
                    total = ((x+y)**2 + (z+y)**2 + (x+z)**2) / 2
                    if total == i:
                        if x==y==z:
                            c += 1
                        elif x ==y or y == z:
                            c += 3
                        else:
                            c += 6
                        break
                    elif total>i:
                        break
        if total>i:
            break
    print(c)

Fixed submission:
n = int(input())
a = [0 for i in range(n)]
c = 0
total = n
for x in range(1, n//2):
    for y in range(x, n//2):
        for z in range(y, n//2):
            total = int(((x+y)**2 + (z+y)**2 + (x+z)**2) / 2)
            try:
                if x == y == z:
                    a[total-1] += 1
                elif x == y or y == z:
                    a[total-1] += 3
                else:
                    a[total-1] += 6
            except:
                break
for i in a:
    print(i)