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

tmp = []
num = [0]*(10**9)
for i in range(1,10**2+1):
    tmp.append(i**2)
    
for x in tmp:
    xx = int(x**0.5)
    for y in tmp:
        yy = int(y**0.5)
        for z in tmp:
            zz = int(z**0.5)
            ans = x + y + z + xx*yy + yy*zz + zz*xx
            num[ans] += 1
            
for i in range(1,N+1):
    print(num[i])

Fixed submission:
N = int(input())

from collections import deque
tmp = []
tmp = deque(tmp)
num = [0]*(10**4*7)
for i in range(1,10**2+1):
    tmp.append(i**2)

for x in tmp:
    xx = int(x**0.5)
    for y in tmp:
        yy = int(y**0.5)
        for z in tmp:
            zz = int(z**0.5)
            ans = x + y + z + xx*yy + yy*zz + zz*xx
            num[ans] += 1
            
for i in range(1,N+1):
    print(num[i])

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

num = [0]*(10**9)

for x in range(1,int(N**0.5)+1):
    for y in range(1,int(N**0.5)+1):
        for z in range(1,int(N**0.5)+1):
            tmp = x**2 + y**2 + z**2+ x*y + y*z + z*x
            num[tmp] += 1
            
for i in range(1,N+1):
    print(num[i])

Fixed submission:
N = int(input())

from collections import deque
tmp = []
tmp = deque(tmp)
num = [0]*(10**4*7)
for i in range(1,10**2+1):
    tmp.append(i**2)

for x in tmp:
    xx = int(x**0.5)
    for y in tmp:
        yy = int(y**0.5)
        for z in tmp:
            zz = int(z**0.5)
            ans = x + y + z + xx*yy + yy*zz + zz*xx
            num[ans] += 1
            
for i in range(1,N+1):
    print(num[i])

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

def solve(N):
    for i in range(1,N+1):
        ans = 0
        flag = 0
        for x in range(1,int(N**0.5)+1):
            for y in range(x,int(N**0.5)+1):
                for z in range(y,int(N**0.5)+1):
                    if x**2 + y**2 + z**2 + x*y + y*z + z*x == i:
                        if x == y and y == z:
                            ans = 1
                            flag = 1
                            break
                        else:
                            ans = 3
                            flag = 1
                            break
                if flag == 1:
                    break
            if flag == 1:
                break
        if flag == 1:
            print(ans)
        else:
            print(0)
        
solve(N)

Fixed submission:
N = int(input())

from collections import deque
tmp = []
tmp = deque(tmp)
num = [0]*(10**4*7)
for i in range(1,10**2+1):
    tmp.append(i**2)

for x in tmp:
    xx = int(x**0.5)
    for y in tmp:
        yy = int(y**0.5)
        for z in tmp:
            zz = int(z**0.5)
            ans = x + y + z + xx*yy + yy*zz + zz*xx
            num[ans] += 1
            
for i in range(1,N+1):
    print(num[i])

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

def solve(N):
    for i in range(1,N+1):
        ans = 0
        for x in range(1,int(N**0.5)+1):
            for y in range(1,int(N**0.5)+1):
                for z in range(1,int(N**0.5)+1):
                    if x**2 + y**2 + z**2 + x*y + y*z + z*x == i:
                        ans += 1
        print(ans)
        
solve(N)

Fixed submission:
N = int(input())

from collections import deque
tmp = []
tmp = deque(tmp)
num = [0]*(10**4*7)
for i in range(1,10**2+1):
    tmp.append(i**2)

for x in tmp:
    xx = int(x**0.5)
    for y in tmp:
        yy = int(y**0.5)
        for z in tmp:
            zz = int(z**0.5)
            ans = x + y + z + xx*yy + yy*zz + zz*xx
            num[ans] += 1
            
for i in range(1,N+1):
    print(num[i])