Buggy python submission (verdict: Time Limit Exceeded):
def main():
    import math
    
    N = int(input())

    for n in range(1, N + 1):
        max_itr = min(101, int(math.sqrt(n)) + 1)
        ans = 0

        for x in range(1, max_itr):
            for y in range(1, max_itr):
                for z in range(1, max_itr):

                    # left_eq = x * x + y * y + z * z + x * y + y * z + z * x
                    left_eq=x**2+y**2+z**2+x*y+y*z+z*x
                    if (left_eq == n):
                        ans += 1
        
        
        print(ans)


if __name__ == '__main__':
    main()




Fixed submission:
def main():
    import math

    N = int(input())
    
    ans_list = [0 for i in range(N)]
    
    for x in range(1, 101):
        for y in range(1, 101):
            for z in range(1, 101):

                left_eq = x * x + y * y + z * z + x * y + y * z + z * x
                if (left_eq <= N):
                    ans_list[left_eq - 1] += 1
    
    for i in range(N):
        print(ans_list[i])

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
def main():
    N = int(input())

    
    for n in range(1, N + 1):

        max_itr = min(101, int(math.sqrt(n)) + 1)
                
        
        ans = 0

        for x in range(1, max_itr):
            for y in range(1, max_itr):
                for z in range(1, max_itr):

                    # left_eq = x * x + y * y + z * z + x * y + y * z + z * x
                    left_eq=x**2+y**2+z**2+x*y+y*z+z*x
                    if (left_eq == n):
                        ans += 1
        
        
        print(ans)


if __name__ == '__main__':
    main()


Fixed submission:
def main():
    import math

    N = int(input())
    
    ans_list = [0 for i in range(N)]
    
    for x in range(1, 101):
        for y in range(1, 101):
            for z in range(1, 101):

                left_eq = x * x + y * y + z * z + x * y + y * z + z * x
                if (left_eq <= N):
                    ans_list[left_eq - 1] += 1
    
    for i in range(N):
        print(ans_list[i])

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
def main():
        
    import math

    N = int(input())

    for n in range(1, N + 1):
        max_itr = min(100, int(math.sqrt(n)) + 1)
        
        ans_list = []
        ans = 0
        
        for x in range(1, max_itr):
            for y in range(1, max_itr):
                for z in range(1, max_itr):
                    left_eq = x * x + y * y + z * z + x * y + y * z + z * x
                    if (left_eq == n):
                        ans += 1
        
        
        print(ans)


if __name__ == '__main__':
    main()



Fixed submission:
def main():
    import math

    N = int(input())
    
    ans_list = [0 for i in range(N)]
    
    for x in range(1, 101):
        for y in range(1, 101):
            for z in range(1, 101):

                left_eq = x * x + y * y + z * z + x * y + y * z + z * x
                if (left_eq <= N):
                    ans_list[left_eq - 1] += 1
    
    for i in range(N):
        print(ans_list[i])

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
def main():
        
    import math

    N = int(input())

    for n in range(1, N + 1):
        max_itr = min(100, int(math.sqrt(n)) + 1)
        
        ans_list = []
        ans = 0
        
        for x in range(1, max_itr):
            for y in range(1, max_itr):
                for z in range(1, max_itr):
                    left_eq = x * x + y * y + z * z + x * y + y * z + z * x
                    if (left_eq == n):
                        ans += 1
        
        
        print(ans)


if __name__ == '__main__':
    main()



Fixed submission:
def main():
    import math

    N = int(input())
    
    ans_list = [0 for i in range(N)]
    
    for x in range(1, 101):
        for y in range(1, 101):
            for z in range(1, 101):

                left_eq = x * x + y * y + z * z + x * y + y * z + z * x
                if (left_eq <= N):
                    ans_list[left_eq - 1] += 1
    
    for i in range(N):
        print(ans_list[i])

if __name__ == '__main__':
    main()