Buggy python submission (verdict: Time Limit Exceeded):
def solve():
    dp = [0]*(n+2)
    for x in range(1,151):
        for y in range(1,151):
            for z in range(1,151):
                a = x**2+y**2+z**2+x*y+y*z+z*x
                if a<=n:
                    dp[a] += 1
    for i in range(1,n+1):
        print(dp[i])                

if __name__=="__main__":
    n = int(input())
    solve()


Fixed submission:
N = int(input())
ls = [0]*(N+2)
 
for i in range(1,151):
    for j in range(1,151):
        for k in range(1,151):
            t = i*i + j*j + k*k + i*j + j*k + k*i 
            if t <= N :
                ls[t] += 1
 
for p in range(1,N+1):
    print(ls[p])

Buggy python submission (verdict: Time Limit Exceeded):
def solve():
    for n in range(1,N+1):
        cnt = 0
        for x in range(1,int(n**0.5)):
            if 6*(x**2) == n:
                cnt += 1
                break
            for y in range(x,int(n**0.5)):
                if 3*(x**2) + y**2 + 2*x*y == n:
                    cnt += 3
                    x += 1
                    break 
                for z in range(y,int(n**0.5)):
                    if x**2+y**2+z**2+x*y+y*z+z*x==n:
                        cnt += 3
                        x += 1
                        break                
        print(cnt)

if __name__=="__main__":
    N = int(input())
    solve()


Fixed submission:
N = int(input())
ls = [0]*(N+2)
 
for i in range(1,151):
    for j in range(1,151):
        for k in range(1,151):
            t = i*i + j*j + k*k + i*j + j*k + k*i 
            if t <= N :
                ls[t] += 1
 
for p in range(1,N+1):
    print(ls[p])

Buggy python submission (verdict: Time Limit Exceeded):

def solve():
    for n in range(1,N+1):
        cnt = 0
        for x in range(1,int(n**0.5)):
            for y in range(1,x+1):
                for z in range(1,x+1):
                    if x**2+y**2+z**2+x*y+y*z+z*x==n:
                        if x==y==z:
                            cnt += 1
                        else:
                            cnt += 3
                            x += 1
        print(cnt)

if __name__=="__main__":
    N = int(input())
    solve()


Fixed submission:
N = int(input())
ls = [0]*(N+2)
 
for i in range(1,151):
    for j in range(1,151):
        for k in range(1,151):
            t = i*i + j*j + k*k + i*j + j*k + k*i 
            if t <= N :
                ls[t] += 1
 
for p in range(1,N+1):
    print(ls[p])

Buggy python submission (verdict: Time Limit Exceeded):

def solve():
    for n in range(1,N+1):
        cnt = 0
        for x in range(1,int(n**0.5)+1):
            for y in range(1,x+1):
                for z in range(1,x+1):
                    if x**2+y**2+z**2+x*y+y*z+z*x==n:
                        if x==y==z:
                            cnt += 1
                        else:
                            cnt += 3
                            x += 1
        print(cnt)

if __name__=="__main__":
    N = int(input())
    solve()


Fixed submission:
N = int(input())
ls = [0]*(N+2)
 
for i in range(1,151):
    for j in range(1,151):
        for k in range(1,151):
            t = i*i + j*j + k*k + i*j + j*k + k*i 
            if t <= N :
                ls[t] += 1
 
for p in range(1,N+1):
    print(ls[p])