Buggy python submission (verdict: Time Limit Exceeded):
#coding: UTF-8
import math
N = int(input())
#print(N)

ans = [0]*N

for i in range(1,N+1):
  if i <=5:
    ans[i-1] = 0
    continue
  cnt = 0
  m = int(math.sqrt(i))
  #print(i,m)
  #平方根までやれば十分
  for x in range(1,m+1):
    if x >= int(math.sqrt(i/6))+1:
      break
    for y in range(x,m+1):
      if y >= int(math.sqrt(i/2))+1:
        break
      if i - x**2 -y**2 -x*y < 1+x+y:
        break
      for z in range(y,m+1):
        a = (x+y+z)**2 -x*y -y*z - z*x
        if a < i:
          continue
        if a == i:
          if x==y==z:
            cnt += 1
            break
          elif x==y or y==z:
            cnt += 3
            break
          else:
            cnt += 6
            break
        else: break
  ans[i-1] = cnt
print('\n'.join(map(str, ans)))

Fixed submission:
#coding: UTF-8
import math
N = int(input())
#print(N)

ans = [0]*10001

for x in range(1,101):
  for y in range(1,101):
    for z in range(1,101):
      a = x**2+y**2+z**2+x*y+y*z+z*x
      if a <=10000:
        ans[a] += 1
    
for i in range(1,N+1):
  print(ans[i])

Buggy python submission (verdict: Time Limit Exceeded):
#coding: UTF-8
import math
N = int(input())
#print(N)

ans = [0]*N

for i in range(1,N+1):
  if i <=5:
    ans[i-1] = 0
    continue
  cnt = 0
  m = int(math.sqrt(i))
  #平方根までやれば十分
  for x in range(1,m):
    if i - x**2 <= 4:
      break
    for y in range(x,m):
      if i - x**2 -y**2 <= 3:
        break
      for z in range(y,m):
        a = (x+y+z)**2 -x*y -y*z - z*x
        if a == i:
          if x==y==z:
            cnt += 1
            break
          elif x==y or y==z:
            cnt += 3
            break
          else:
            cnt += 6
            break
        elif a > i: break
  ans[i-1] = cnt
print('\n'.join(map(str, ans)))

Fixed submission:
#coding: UTF-8
import math
N = int(input())
#print(N)

ans = [0]*10001

for x in range(1,101):
  for y in range(1,101):
    for z in range(1,101):
      a = x**2+y**2+z**2+x*y+y*z+z*x
      if a <=10000:
        ans[a] += 1
    
for i in range(1,N+1):
  print(ans[i])

Buggy python submission (verdict: Runtime Error):
#coding: UTF-8
import math
N = int(input())
#print(N)

ans = [0]*N

for i in range(1,N+1):
  if i <=5:
    ans[i] = 0
    continue
  cnt = 0
  m = int(math.sqrt(i))
  #平方根までやればよい
  for x in range(1,m):
    if i - x**2 <= 4:
      continue
    for y in range(x,m):
      if i - x**2 -y**2 <= 3:
        continue
      for z in range(y,m):
        a = (x+y+z)**2 -x*y -y*z - z*x
        if a == i:
          if x==y==z:
            cnt += 1
          elif x==y or y==z:
            cnt += 3
          else:
            cnt += 6
  ans[i-1] = cnt
print('\n'.join(map(str, ans)))

Fixed submission:
#coding: UTF-8
import math
N = int(input())
#print(N)

ans = [0]*10001

for x in range(1,101):
  for y in range(1,101):
    for z in range(1,101):
      a = x**2+y**2+z**2+x*y+y*z+z*x
      if a <=10000:
        ans[a] += 1
    
for i in range(1,N+1):
  print(ans[i])

Buggy python submission (verdict: Time Limit Exceeded):
#coding: UTF-8
import math
N = int(input())
#print(N)



for i in range(1,N+1):
  if i <=5:
    print(0)
    continue
  cnt = 0
  m = int(math.sqrt(i))
  #平方根までやればよい
  for x in range(1,m):
    if i - x**2 <= 4:
      continue
    for y in range(x,m):
      if i - x**2 -y**2 <= 3:
        continue
      for z in range(y,m):
        a = (x+y+z)**2 -x*y -y*z - z*x
        if a == i:
          if x==y==z:
            cnt += 1
          elif x==y or y==z:
            cnt += 3
          else:
            cnt += 6
  print(cnt)

Fixed submission:
#coding: UTF-8
import math
N = int(input())
#print(N)

ans = [0]*10001

for x in range(1,101):
  for y in range(1,101):
    for z in range(1,101):
      a = x**2+y**2+z**2+x*y+y*z+z*x
      if a <=10000:
        ans[a] += 1
    
for i in range(1,N+1):
  print(ans[i])

Buggy python submission (verdict: Time Limit Exceeded):
#coding: UTF-8
import math
N = int(input())
#print(N)



for i in range(1,N+1):
  if i <=5:
    print(0)
    continue
  cnt = 0
  m = int(math.sqrt(i))
  #平方根までやればよい
  for x in range(1,m):
    for y in range(x,m):
      for z in range(y,m):
        a = (x+y+z)**2 -x*y -y*z - z*x
        if a == i:
          if x==y==z:
            cnt += 1
          elif x==y or y==z:
            cnt += 3
          else:
            cnt += 6
  print(cnt)

Fixed submission:
#coding: UTF-8
import math
N = int(input())
#print(N)

ans = [0]*10001

for x in range(1,101):
  for y in range(1,101):
    for z in range(1,101):
      a = x**2+y**2+z**2+x*y+y*z+z*x
      if a <=10000:
        ans[a] += 1
    
for i in range(1,N+1):
  print(ans[i])

Buggy python submission (verdict: Time Limit Exceeded):
#coding: UTF-8
import math
N = int(input())
#print(N)

for i in range(1,N+1):
  if i <=5:
    print(0)
    continue
  cnt = 0
  m = int(math.sqrt(i))
  #平方根までやればよい
  for x in range(1,m):
    for y in range(1,m):
      for z in range(1,m):
        a = (x+y+z)**2 -x*y -y*z - z*x
        if a == i:
          cnt += 1
  print(cnt)

Fixed submission:
#coding: UTF-8
import math
N = int(input())
#print(N)

ans = [0]*10001

for x in range(1,101):
  for y in range(1,101):
    for z in range(1,101):
      a = x**2+y**2+z**2+x*y+y*z+z*x
      if a <=10000:
        ans[a] += 1
    
for i in range(1,N+1):
  print(ans[i])