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

def func(x,y,z):
    return x**2+y**2+z**2+x*y+y*z+z*x
 
n = int(input())
s = int(math.sqrt(n))
nums = list(range(1,s))
arr = []
com = list(itertools.product(nums, repeat=3))
for i in range(len(com)):
    # print(com)
    # ans = func(com[i][0],com[i][1],com[i][2])
    ans = com[i][0]**2+com[i][1]**2+com[i][2]**2+com[i][0]*com[i][1]+com[i][1]*com[i][2]+com[i][0]*com[i][2]
    arr.append(ans)
 
for i in range(n):
    print(arr.count(i+1))

Fixed submission:
import itertools
import math
import collections
def main():
    n = int(input())
    s = int(math.sqrt(n))
    a = list(itertools.product(range(1,s),repeat=3))
    ans = []
    for i in range(len(a)):
        t = a[i][0] ** 2 + a[i][1] ** 2 + a[i][2] ** 2 + a[i][0] * a[i][1] + a[i][1] * a[i][2] + a[i][2] * a[i][0]
        ans.append(t)
        # print(ans)
    c = collections.Counter(ans)
    for i in range(1,n+1):
        print(c[i])
        
        
main()

Buggy python submission (verdict: Runtime Error):
import itertools
import math
import collections
​
def main():
    n = int(input())
​
    s = int(math.sqrt(n))
    a = list(itertools.product(range(1,s),repeat=3))
​
    ans = []
    for i in range(len(a)):
        t = a[i][0] ** 2 + a[i][1] ** 2 + a[i][2] ** 2 + a[i][0] * a[i][1] + a[i][1] * a[i][2] + a[i][2] * a[i][0]
        ans.append(t)
        # print(ans)
​
    c = collections.Counter(ans)
    for i in range(1,n+1):
        print(c[i])
        
        
main()

Fixed submission:
import itertools
import math
import collections
def main():
    n = int(input())
    s = int(math.sqrt(n))
    a = list(itertools.product(range(1,s),repeat=3))
    ans = []
    for i in range(len(a)):
        t = a[i][0] ** 2 + a[i][1] ** 2 + a[i][2] ** 2 + a[i][0] * a[i][1] + a[i][1] * a[i][2] + a[i][2] * a[i][0]
        ans.append(t)
        # print(ans)
    c = collections.Counter(ans)
    for i in range(1,n+1):
        print(c[i])
        
        
main()

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

def func(x,y,z):
    return x**2+y**2+z**2+x*y+y*z+z*x
 
n = int(input())
s = int(math.sqrt(n))
nums = list(range(1,s))
arr = []
com = list(itertools.product(nums, repeat=3))
for i in range(len(com)):
    # print(com)
    ans = func(com[i][0],com[i][1],com[i][2])
    arr.append(ans)
 
for i in range(n):
    print(arr.count(i+1))

Fixed submission:
import itertools
import math
import collections
def main():
    n = int(input())
    s = int(math.sqrt(n))
    a = list(itertools.product(range(1,s),repeat=3))
    ans = []
    for i in range(len(a)):
        t = a[i][0] ** 2 + a[i][1] ** 2 + a[i][2] ** 2 + a[i][0] * a[i][1] + a[i][1] * a[i][2] + a[i][2] * a[i][0]
        ans.append(t)
        # print(ans)
    c = collections.Counter(ans)
    for i in range(1,n+1):
        print(c[i])
        
        
main()

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

def func(x,y,z):
    return x**2+y**2+z**2+x*y+y*z+z*x
 
n = int(input())
nums = list(range(1,100))
arr = []
com = list(itertools.product(nums, repeat=3))
for i in range(len(com)):
    # print(com)
    ans = func(com[i][0],com[i][1],com[i][2])
    arr.append(ans)
 
for i in range(n):
    print(arr.count(i+1))

Fixed submission:
import itertools
import math
import collections
def main():
    n = int(input())
    s = int(math.sqrt(n))
    a = list(itertools.product(range(1,s),repeat=3))
    ans = []
    for i in range(len(a)):
        t = a[i][0] ** 2 + a[i][1] ** 2 + a[i][2] ** 2 + a[i][0] * a[i][1] + a[i][1] * a[i][2] + a[i][2] * a[i][0]
        ans.append(t)
        # print(ans)
    c = collections.Counter(ans)
    for i in range(1,n+1):
        print(c[i])
        
        
main()

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

def func(x,y,z):
    return x**2+y**2+z**2+x*y+y*z+z*x

n = int(input())
nums = list(range(1,100))
arr = []
ans = 0
i = 0
p = itertools.product(nums,nums)

for com in itertools.product(nums, repeat=3):
    # print(com)
    ans = func(com[0],com[1],com[2])
    arr.append(ans)

for i in range(n):
    print(arr.count(i+1))

Fixed submission:
import itertools
import math
import collections
def main():
    n = int(input())
    s = int(math.sqrt(n))
    a = list(itertools.product(range(1,s),repeat=3))
    ans = []
    for i in range(len(a)):
        t = a[i][0] ** 2 + a[i][1] ** 2 + a[i][2] ** 2 + a[i][0] * a[i][1] + a[i][1] * a[i][2] + a[i][2] * a[i][0]
        ans.append(t)
        # print(ans)
    c = collections.Counter(ans)
    for i in range(1,n+1):
        print(c[i])
        
        
main()

Buggy python submission (verdict: Time Limit Exceeded):
def func(x,y,z):
    return x**2+y**2+z**2+x*y+y*z+z*x

n = int(input())

ans = 0
arr = []
for x in range(1,100):
    for y in range(1,100):
        for z in range(1,100):
            ans = func(x,y,z)
            arr.append(ans)
            if ans > n:
                break
for i in range(n):
    print(arr.count(i+1))

Fixed submission:
import itertools
import math
import collections
def main():
    n = int(input())
    s = int(math.sqrt(n))
    a = list(itertools.product(range(1,s),repeat=3))
    ans = []
    for i in range(len(a)):
        t = a[i][0] ** 2 + a[i][1] ** 2 + a[i][2] ** 2 + a[i][0] * a[i][1] + a[i][1] * a[i][2] + a[i][2] * a[i][0]
        ans.append(t)
        # print(ans)
    c = collections.Counter(ans)
    for i in range(1,n+1):
        print(c[i])
        
        
main()

Buggy python submission (verdict: Time Limit Exceeded):
def func(x,y,z):
    return x**2+y**2+z**2+x*y+y*z+z*x

n = int(input())

ans = 0
arr = []
for x in range(1,100):
    for y in range(1,100):
        for z in range(1,100):
            arr.append(func(x,y,z))
for i in range(n):
    print(arr.count(i+1))

Fixed submission:
import itertools
import math
import collections
def main():
    n = int(input())
    s = int(math.sqrt(n))
    a = list(itertools.product(range(1,s),repeat=3))
    ans = []
    for i in range(len(a)):
        t = a[i][0] ** 2 + a[i][1] ** 2 + a[i][2] ** 2 + a[i][0] * a[i][1] + a[i][1] * a[i][2] + a[i][2] * a[i][0]
        ans.append(t)
        # print(ans)
    c = collections.Counter(ans)
    for i in range(1,n+1):
        print(c[i])
        
        
main()