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

n = int(input())
arr = [0] * n

for x in range(1,1001):
    for y in range(1,1001):
        for z in range(1,1001):
            ans = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
            if ans <= n:
                arr[ans - 1] += 1

for i in range(n):
    print(arr[i])

Fixed submission:
#!/usr/bin/env python3
import math

n = int(input())
arr = [0] * n

for x in range(1,101):
    for y in range(1,101):
        for z in range(1,101):
            ans = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
            if ans <= n:
                arr[ans - 1] += 1

for i in range(n):
    print(arr[i])

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

n = int(input())
arr = [0] * n

for x in range(1,201):
    for y in range(1,201):
        for z in range(1,201):
            ans = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
            if ans <= n:
                arr[ans - 1] += 1

for i in range(n):
    print(arr[i])

Fixed submission:
#!/usr/bin/env python3
import math

n = int(input())
arr = [0] * n

for x in range(1,101):
    for y in range(1,101):
        for z in range(1,101):
            ans = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
            if ans <= n:
                arr[ans - 1] += 1

for i in range(n):
    print(arr[i])

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

n = int(input())
arr = [0] * n

for x in range(1,1001):
    for y in range(1,1001):
        for z in range(1,1001):
            ans = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
            if ans <= n:
                arr[ans - 1] += 1

for i in range(n):
    print(arr[i])

Fixed submission:
#!/usr/bin/env python3
import math

n = int(input())
arr = [0] * n

for x in range(1,101):
    for y in range(1,101):
        for z in range(1,101):
            ans = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
            if ans <= n:
                arr[ans - 1] += 1

for i in range(n):
    print(arr[i])

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

n = int(input())

for i in range(1, n + 1):
    cnt = 0
    
    n = i
    x = 1
    y = 1

    while x < n:

        while y < n:

            try:
                z = (math.sqrt(4 * i - 3 * y ** 2 - 2 * x * y - 3 * x ** 2) - x - y) / 2
            
            except:
                y += 1
                continue

            if z > 0 and z.is_integer():
                if x == y:
                    if y == z:
                        cnt += 1
                    else:
                        cnt += 3
                elif x == z:
                    cnt += 3
                elif y == z:
                    cnt += 3
                else:
                    cnt += 6

                n = max(z, x, y)           
                break

            y += 1
        x += 1

    print(cnt)

Fixed submission:
#!/usr/bin/env python3
import math

n = int(input())
arr = [0] * n

for x in range(1,101):
    for y in range(1,101):
        for z in range(1,101):
            ans = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
            if ans <= n:
                arr[ans - 1] += 1

for i in range(n):
    print(arr[i])

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

n = int(input())

for i in range(1, n + 1):
    cnt = 0
    
    for x in range(1, i+1):
        if x ** 2 > i:
            break
        for y in range(1, i+1):
            if y ** 2 > i:
                break
            
            try:
                z = (math.sqrt(4 * i - 3 * y ** 2 - 2 * x * y - 3 * x ** 2) - x - y) / 2
            
            except:
                continue

            if z > 0 and z.is_integer():
                cnt += 1

    print(cnt)

Fixed submission:
#!/usr/bin/env python3
import math

n = int(input())
arr = [0] * n

for x in range(1,101):
    for y in range(1,101):
        for z in range(1,101):
            ans = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
            if ans <= n:
                arr[ans - 1] += 1

for i in range(n):
    print(arr[i])

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())

for i in range(1, n + 1):
    cnt = 0
    
    for x in range(1, i + 1):
        if x ** 2 >= i:
            break
        for y in range(1, i + 1):
            if y ** 2 >= i:
                break
        
            for z in range(1, i + 1):
                if z ** 2 == i:
                    break

                ans = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
                if ans > i:
                    break
                elif  ans == i:
                    cnt += 1

    print(cnt)

Fixed submission:
#!/usr/bin/env python3
import math

n = int(input())
arr = [0] * n

for x in range(1,101):
    for y in range(1,101):
        for z in range(1,101):
            ans = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
            if ans <= n:
                arr[ans - 1] += 1

for i in range(n):
    print(arr[i])

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())

for i in range(1, n + 1):
    cnt = 0
    
    for x in range(1, i + 1):
        
        for y in range(1, i + 1):
        
            for z in range(1, i + 1):

                ans = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
                if ans > i:
                    break
                elif  ans == i:
                    cnt += 1

    print(cnt)

Fixed submission:
#!/usr/bin/env python3
import math

n = int(input())
arr = [0] * n

for x in range(1,101):
    for y in range(1,101):
        for z in range(1,101):
            ans = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
            if ans <= n:
                arr[ans - 1] += 1

for i in range(n):
    print(arr[i])