Buggy python submission (verdict: Runtime Error):
#! python3
# coding:utf-8
 
def main():
    n = int(input())
    ans = [0 for _ in range(n)]
    for x in range(1,100):
        for y in range(1,100):
            for z in range(1,100):
                eq = x**2 + y**2 + z**2 + x*y + y*z + z*x
                if eq < n+1:
                    ans[eq]+=1

    for i in ans:
        print(i)    

if __name__ == "__main__":
    main() 

Fixed submission:
#! python3
# coding:utf-8
 
def main():
    n = int(input())
    ans = [0 for _ in range(n)]
    for x in range(1,100):
        for y in range(1,100):
            for z in range(1,100):
                eq = x**2 + y**2 + z**2 + x*y + y*z + z*x
                if eq < n+1:
                    ans[eq-1]+=1
    for i in ans:   
        print(i)

if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
#! python3
# coding:utf-8
 
def main():
    n = int(input())
    for i in range(1,n+1):
        cnt=0
        for x in range(1,100):
            for y in range(1,100):
                for z in range(1,100):
                    if (x+y+z)>=i:
                        continue
                    eq = x**2 + y**2 + z**2 + x*y + y*z + z*x
                    if eq == i:
                        cnt+=1
        print(cnt)

if __name__ == "__main__":
    main() 

Fixed submission:
#! python3
# coding:utf-8
 
def main():
    n = int(input())
    ans = [0 for _ in range(n)]
    for x in range(1,100):
        for y in range(1,100):
            for z in range(1,100):
                eq = x**2 + y**2 + z**2 + x*y + y*z + z*x
                if eq < n+1:
                    ans[eq-1]+=1
    for i in ans:   
        print(i)

if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
#! python3
# coding:utf-8
 
def main():
    n = int(input())
    for i in range(1,n+1):
        cnt=0
    
        for x in range(1,100):
            for y in range(1,100):
                for z in range(1,100):
                    eq = x**2 + y**2 + z**2 + x*y + y*z + z*x
                    
                    if eq == i:
                        cnt+=1
        print(cnt)
if __name__ == "__main__":
    main() 

Fixed submission:
#! python3
# coding:utf-8
 
def main():
    n = int(input())
    ans = [0 for _ in range(n)]
    for x in range(1,100):
        for y in range(1,100):
            for z in range(1,100):
                eq = x**2 + y**2 + z**2 + x*y + y*z + z*x
                if eq < n+1:
                    ans[eq-1]+=1
    for i in ans:   
        print(i)

if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
#! python3
# coding:utf-8
 
def main():
    n = int(input())
    for i in range(1,n+1):
        cnt=0
    
        for x in range(1,n+1):
            for y in range(1,n-x+1):
                for z in range(1,n-x-y+1):
                    eq = x**2 + y**2 + z**2 + x*y + y*z + z*x
                    
                    if eq == i:
                        cnt+=1
        print(cnt)
if __name__ == "__main__":
    main() 

Fixed submission:
#! python3
# coding:utf-8
 
def main():
    n = int(input())
    ans = [0 for _ in range(n)]
    for x in range(1,100):
        for y in range(1,100):
            for z in range(1,100):
                eq = x**2 + y**2 + z**2 + x*y + y*z + z*x
                if eq < n+1:
                    ans[eq-1]+=1
    for i in ans:   
        print(i)

if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
#! python3
# coding:utf-8
 
def main():
    n = int(input())
    for i in range(1,n+1):
        cnt=0
    
        for x in range(1,n+1):
            for y in range(1,n-x+1):
                for z in range(1,n-x-y+1):
                    eq = x**2 + y**2 + z**2 + x*y + y*z + z*x
                    
                    if eq == i:
                        cnt+=1
        print(cnt)
if __name__ == "__main__":
    main() 

Fixed submission:
#! python3
# coding:utf-8
 
def main():
    n = int(input())
    ans = [0 for _ in range(n)]
    for x in range(1,100):
        for y in range(1,100):
            for z in range(1,100):
                eq = x**2 + y**2 + z**2 + x*y + y*z + z*x
                if eq < n+1:
                    ans[eq-1]+=1
    for i in ans:   
        print(i)

if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
#! python3
# coding:utf-8

n = int(input())
for i in range(1,n+1):
    cnt=0

    for x in range(1,100):
        for y in range(1,100):
            for z in range(1,100):
                
                tmp2 = x*y + y*z + z*x
                if (tmp2>i):
                    continue
                tmp1 = x**2 + y**2 + z**2   
                if (tmp1 + tmp2) == i:
                    cnt+=1
    print(cnt)

Fixed submission:
#! python3
# coding:utf-8
 
def main():
    n = int(input())
    ans = [0 for _ in range(n)]
    for x in range(1,100):
        for y in range(1,100):
            for z in range(1,100):
                eq = x**2 + y**2 + z**2 + x*y + y*z + z*x
                if eq < n+1:
                    ans[eq-1]+=1
    for i in ans:   
        print(i)

if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
#! python3
# coding:utf-8

n = int(input())
for i in range(1,n+1):
    cnt=0

    for x in range(1,100):
        for y in range(1,100):
            for z in range(1,100):
                
                tmp2 = x*y + y*z + z*x
                if (tmp2>i):
                    continue
                tmp1 = x**2 + y**2 + z**2   
                if (tmp1 + tmp2) == i:
                    cnt+=1
    print(cnt)

Fixed submission:
#! python3
# coding:utf-8
 
def main():
    n = int(input())
    ans = [0 for _ in range(n)]
    for x in range(1,100):
        for y in range(1,100):
            for z in range(1,100):
                eq = x**2 + y**2 + z**2 + x*y + y*z + z*x
                if eq < n+1:
                    ans[eq-1]+=1
    for i in ans:   
        print(i)

if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
#! python3
# coding:utf-8

n = int(input())
for i in range(1,n+1):
    cnt=0

    for x in range(1,100):
        for y in range(1,100):
            for z in range(1,100):
                eq = x**2 + y**2 + z**2 + x*y + y*z + z*x
                   
                if eq == i:
                    cnt+=1
    print(cnt)

Fixed submission:
#! python3
# coding:utf-8
 
def main():
    n = int(input())
    ans = [0 for _ in range(n)]
    for x in range(1,100):
        for y in range(1,100):
            for z in range(1,100):
                eq = x**2 + y**2 + z**2 + x*y + y*z + z*x
                if eq < n+1:
                    ans[eq-1]+=1
    for i in ans:   
        print(i)

if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
#! python3
# coding:utf-8

n = int(input())
for i in range(1,n+1):
    cnt=0

    for x in range(1,n+1):
        if x > i:
            continue
        for y in range(1,n-x+1):
            for z in range(1,n-x-y+1):
                eq = x**2 + y**2 + z**2 + x*y + y*z + z*x
                   
                if eq == i:
                    cnt+=1
    print(cnt)

Fixed submission:
#! python3
# coding:utf-8
 
def main():
    n = int(input())
    ans = [0 for _ in range(n)]
    for x in range(1,100):
        for y in range(1,100):
            for z in range(1,100):
                eq = x**2 + y**2 + z**2 + x*y + y*z + z*x
                if eq < n+1:
                    ans[eq-1]+=1
    for i in ans:   
        print(i)

if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):

n = int(input())
for i in range(1,n+1):
    cnt=0

    for x in range(1,n+1):
        for y in range(1,n-x+1):
            for z in range(1,n-x-y+1):
                eq = x**2 + y**2 + z**2 + x*y + y*z + z*x
                if eq == i:
                    cnt+=1
    print(cnt)

Fixed submission:
#! python3
# coding:utf-8
 
def main():
    n = int(input())
    ans = [0 for _ in range(n)]
    for x in range(1,100):
        for y in range(1,100):
            for z in range(1,100):
                eq = x**2 + y**2 + z**2 + x*y + y*z + z*x
                if eq < n+1:
                    ans[eq-1]+=1
    for i in ans:   
        print(i)

if __name__ == "__main__":
    main()

Buggy python submission (verdict: Runtime Error):
N = int(input())
l = [0] * N


x = 1
y = 1
z = 1

ans = 6
first_judge = 1
ans_out = 0
#print("ans 6")

if N <= 5:
    for i in range(N):
        print(l[i])
else:
    while ans <= N:
        print("x,y,z=",x,y,z)
        ans = (x + y + z)**2 - (x*y+ y*z + z*x)
        # print("ans",ans)
        if first_judge == 1 and ans > N:
            if ans_out >= 2:
                # print("break!")
                break
            else:
                x += 1
                y = x
                z = x
                ans_out += 1
                first_judge = 1
                ans = 0
                # print("x_++ x,y,z=",x,y,z)
                # print("first_judge=1")
                # print("ans_out=",ans_out)
        elif ans <= N:
            ans_out = 0
            if x==y==z:
                # print("x=y=z!")
                # print("first_judge=0")
                l[ans-1] += 1
                first_judge = 0
            elif x==y or y==z or Z==x:
                # print("list in")
                # print("first_judge=0")
                l[ans-1] += 3
                first_judge = 0
            else:
                l[ans-1] += 6
                first_judge = 0
            z += 1
        else:
            y += 1
            z = y
            first_judge = 1
            ans_out += 1
            ans = 0
            # print("kousin x,y,z=",x,y,z)
            # print("first_judge=1")
            # print("ans_out=",ans_out)
            
        # print("\n")
        
    for i in range(N):
        print(l[i])

Fixed submission:
N = int(input())
l = [0] * N


x = 1
y = 1
z = 1

ans = 6
first_judge = 1
ans_out = 0
#print("ans 6")

if N <= 5:
    for i in range(N):
        print(l[i])
else:
    while ans <= N:
        # print("x,y,z=",x,y,z)
        ans = (x + y + z)**2 - (x*y+ y*z + z*x)
        # print("ans",ans)
        if first_judge == 1 and ans > N:
            if ans_out >= 2:
                # print("break!")
                break
            else:
                x += 1
                y = x
                z = x
                ans_out += 1
                first_judge = 1
                ans = 0
                # print("x_++ x,y,z=",x,y,z)
                # print("first_judge=1")
                # print("ans_out=",ans_out)
        elif ans <= N:
            ans_out = 0
            if x==y==z:
                # print("x=y=z!")
                # print("first_judge=0")
                l[ans-1] += 1
                first_judge = 0
            elif x==y or y==z or z==x:
                # print("list in")
                # print("first_judge=0")
                l[ans-1] += 3
                first_judge = 0
            else:
                l[ans-1] += 6
                first_judge = 0
            z += 1
        else:
            y += 1
            z = y
            first_judge = 1
            ans_out += 1
            ans = 0
            # print("kousin x,y,z=",x,y,z)
            # print("first_judge=1")
            # print("ans_out=",ans_out)
            
        # print("\n")
        
    for i in range(N):
        print(l[i])