Buggy python submission (verdict: Time Limit Exceeded):
import math
N=int(input())
for i in range(1,N+1):
    tmp=0
    tgt=int(math.sqrt(i/2)+1)
    for j in range(1,tgt):
        for k in range(j,tgt):
            for h in range(k,tgt):
                if h**2+j**2+k**2+h*j+j*k+k*h==i:
                    if j==k==h:
                        tmp+=1
                    elif j==k or k ==h:
                        tmp+=3
                    else:
                        tmp+=6
    print(tmp)

Fixed submission:
N=int(input())
a=[0]*10**4
for j in range(1,101):
    for k in range(1,101):
        for h in range(1,101):
            tmp=h**2+j**2+k**2+h*j+j*k+k*h
            if tmp<=10000:
                a[tmp-1]+=1
for i in range(N):
    print(a[i])

Buggy python submission (verdict: Time Limit Exceeded):
import math
N=int(input())
ans=list()
for i in range(1,N+1):
    tmp=0
    tgt=int(math.sqrt(i/2)+1)
    for j in range(1,tgt):
        for k in range(j,tgt):
            for h in range(k,tgt):
                if h**2+j**2+k**2+h*j+j*k+k*h==i:
                    if j==k==h:
                        tmp+=1
                    elif j==k or k ==h:
                        tmp+=3
                    else:
                        tmp+=6
    ans.append(tmp)
for i in ans:
    print(i)

Fixed submission:
N=int(input())
a=[0]*10**4
for j in range(1,101):
    for k in range(1,101):
        for h in range(1,101):
            tmp=h**2+j**2+k**2+h*j+j*k+k*h
            if tmp<=10000:
                a[tmp-1]+=1
for i in range(N):
    print(a[i])

Buggy python submission (verdict: Time Limit Exceeded):
import math
N=int(input())
ans=list()
for i in range(1,N+1):
    tmp=0
    tgt=int(math.sqrt(i/2)+1)
    ##print('a',tgt)
    for j in range(1,tgt):
        for k in range(j,tgt):
            for h in range(k,tgt):
                if h**2+j**2+k**2+h*j+j*k+k*h==i:
                    if j==k==h:
                        tmp+=1
                    elif j==k or k ==h:
                        tmp+=3
                    else:
                        tmp+=6
    ans.append(tmp)
for i in ans:
    print(i)

Fixed submission:
N=int(input())
a=[0]*10**4
for j in range(1,101):
    for k in range(1,101):
        for h in range(1,101):
            tmp=h**2+j**2+k**2+h*j+j*k+k*h
            if tmp<=10000:
                a[tmp-1]+=1
for i in range(N):
    print(a[i])

Buggy python submission (verdict: Time Limit Exceeded):
import math
N=int(input())
ans=list()
for i in range(1,N+1):
    tmp=0
    tgt=int(math.sqrt(i)+1)
    ##print('a',tgt)
    for j in range(1,tgt):
        for k in range(j,tgt):
            for h in range(k,tgt):
                if h**2+j**2+k**2+h*j+j*k+k*h==i:
                    if j==k==h:
                        tmp+=1
                    elif j==k or k ==h:
                        tmp+=3
                    else:
                        tmp+=6
    ans.append(tmp)
for i in ans:
    print(i)

Fixed submission:
N=int(input())
a=[0]*10**4
for j in range(1,101):
    for k in range(1,101):
        for h in range(1,101):
            tmp=h**2+j**2+k**2+h*j+j*k+k*h
            if tmp<=10000:
                a[tmp-1]+=1
for i in range(N):
    print(a[i])

Buggy python submission (verdict: Time Limit Exceeded):
import math
N=int(input())
ans=list()
for i in range(1,N+1):
    tmp=0
    tgt=int(math.sqrt(i)+1)
    ##print('a',tgt)
    for j in range(1,tgt):
        for k in range(j,tgt):
            for h in range(k,tgt):
                if h**2+j**2+k**2+h*j+j*k+k*h==i:
                    if j==k==h:
                        tmp+=1
                    elif j==k or k ==h:
                        tmp+=3
                    else:
                        tmp+=6
    ans.append(tmp)
for i in ans:
    print(i)

Fixed submission:
N=int(input())
a=[0]*10**4
for j in range(1,101):
    for k in range(1,101):
        for h in range(1,101):
            tmp=h**2+j**2+k**2+h*j+j*k+k*h
            if tmp<=10000:
                a[tmp-1]+=1
for i in range(N):
    print(a[i])