Buggy python submission (verdict: Time Limit Exceeded):
import math
N = int(input())
#for i in range(1,N+1):
    #print(sum(1 for x in range(1,int(math.sqrt(i))) for y in range(1,int(math.sqrt(i))) for z in range(1,int(math.sqrt(i))) if x*(x+y+z)+y*(y+z)+z*z==i))
for i in range(1,N+1):
    count=0
    for x in range(1,int(math.sqrt(i))):
        for y in range(1,int(math.sqrt(i))):
            for z in range(1,int(math.sqrt(i))):
                if x*(x+y+z)+y*(y+z)+z*z>i:
                    break
                    
                if x*(x+y+z)+y*(y+z)+z*z==i:
                    count+=1
    print(count) 

Fixed submission:
a=[0]*int(input())
r=range(1,99)
for x in r:
    for y in r:
        for z in r:
            n=x*(x+y+z)+y*(y+z)+z*z-1
            if n<len(a):
                a[n]+=1
print(*a)

Buggy python submission (verdict: Time Limit Exceeded):
import math
N = int(input())
for i in range(1,N+1):
    print(sum(1 for x in range(1,int(math.sqrt(i))) for y in range(1,int(math.sqrt(i))) for z in range(1,int(math.sqrt(i))) if x*x+y*y+z*z+x*y+y*z+z*x==i))

Fixed submission:
a=[0]*int(input())
r=range(1,99)
for x in r:
    for y in r:
        for z in r:
            n=x*(x+y+z)+y*(y+z)+z*z-1
            if n<len(a):
                a[n]+=1
print(*a)

Buggy python submission (verdict: Runtime Error):
import math
N = int(input())
for i in range(1,N+1):
    print(sum(1 for x in range(1,int(math.sqrt(i))) for y in range(1,int(math.sqrt(i))) for z in ra

Fixed submission:
a=[0]*int(input())
r=range(1,99)
for x in r:
    for y in r:
        for z in r:
            n=x*(x+y+z)+y*(y+z)+z*z-1
            if n<len(a):
                a[n]+=1
print(*a)

Buggy python submission (verdict: Time Limit Exceeded):
import math
N = int(input())
for i in range(1,N+1):
    count=0
    for x in range(1,int(math.sqrt(i))):
        for y in range(1,x+1):
            for z in range(1,y+1):
                if x*x+y*y+z*z+x*y+y*z+z*x==i:
                    if x==y and y==z:
                        count+=1
                    elif (x==y and x!=z) or (y==z and y!=x):
                        count+=3
                    else:
                        count+=6
    print(count)

Fixed submission:
a=[0]*int(input())
r=range(1,99)
for x in r:
    for y in r:
        for z in r:
            n=x*(x+y+z)+y*(y+z)+z*z-1
            if n<len(a):
                a[n]+=1
print(*a)

Buggy python submission (verdict: Time Limit Exceeded):
import math
N = int(input())
def f(n):
    count=0
    for x in range(1,int(math.sqrt(n))):
        for y in range(1,x+1):
            for z in range(1,y+1):
                if x*x+y*y+z*z+x*y+y*z+z*x==n:
                    if x==y and y==z:
                        count+=1
                    elif (x==y and x!=z) or (y==z and y!=x):
                        count+=3
                    else:
                        count+=6
    print(count)

for i in range(1,N+1):
    f(i)

Fixed submission:
a=[0]*int(input())
r=range(1,99)
for x in r:
    for y in r:
        for z in r:
            n=x*(x+y+z)+y*(y+z)+z*z-1
            if n<len(a):
                a[n]+=1
print(*a)

Buggy python submission (verdict: Time Limit Exceeded):
import math
N = int(input())
def f(n):
    count=0
    for x in range(1,int(math.sqrt(n))):
        for y in range(1,x+1):
            for z in range(1,y+1):
                if x*x+y*y+z*z+x*y+y*z+z*x==n:
                    if x==y and y==z:
                        count+=1
                    else:
                        count+=3
    print(count)

for i in range(1,N+1):
    f(i)

Fixed submission:
a=[0]*int(input())
r=range(1,99)
for x in r:
    for y in r:
        for z in r:
            n=x*(x+y+z)+y*(y+z)+z*z-1
            if n<len(a):
                a[n]+=1
print(*a)

Buggy python submission (verdict: Time Limit Exceeded):
import math
N = int(input())
def f(n):
    count=0
    for x in range(1,int(math.sqrt(n))):
        for y in range(1,x+1):
            for z in range(1,x+1):
                if x*x+y*y+z*z+x*y+y*z+z*x==n:
                    if x==y and y==z:
                        count+=1
                    else:
                        count=3
    print(count)

for i in range(1,N+1):
    f(i)

Fixed submission:
a=[0]*int(input())
r=range(1,99)
for x in r:
    for y in r:
        for z in r:
            n=x*(x+y+z)+y*(y+z)+z*z-1
            if n<len(a):
                a[n]+=1
print(*a)

Buggy python submission (verdict: Time Limit Exceeded):
import math
N = int(input())
def f(n):
    count=0
    for x in range(1,int(math.sqrt(n))):
        for y in range(1,int(math.sqrt(n))):
            for z in range(1,int(math.sqrt(n))):
                if x*x+y*y+z*z+x*y+y*z+z*x==n:
                    count +=1
    print(count)

for i in range(1,N+1):
    f(i)

Fixed submission:
a=[0]*int(input())
r=range(1,99)
for x in r:
    for y in r:
        for z in r:
            n=x*(x+y+z)+y*(y+z)+z*z-1
            if n<len(a):
                a[n]+=1
print(*a)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
def f(n):
    count=0
    for x in range(1,n):
        for y in range(1,n):
            for z in range(1,n):
                if x*x+y*y+z*z+x*y+y*z+z*x==n:
                    count +=1
    print(count)
    
for i in range(1,N+1):
    f(i)

Fixed submission:
a=[0]*int(input())
r=range(1,99)
for x in r:
    for y in r:
        for z in r:
            n=x*(x+y+z)+y*(y+z)+z*z-1
            if n<len(a):
                a[n]+=1
print(*a)