Buggy python submission (verdict: Time Limit Exceeded):
import math
n = int(input())

for i in range(1, n+1):
  count = 0
  upper = int(math.sqrt(i))
  lower = int(math.sqrt(i/6))
  for x in range(lower, upper):
    for y in range(lower, x+1):
      for z in range(lower, y+1):
        if x*x + y*y + z*z + x*y + y*z + z*x == i:
          if x == y and y == z and z == x:
          	count += 1
          else:
            count += 3
            
  print(count)

Fixed submission:
import sys
input = sys.stdin.readline

n = int(input())
dp = [0]*(n+1)

for x in range(1, 100):
  for y in range(1, 100):
    for z in range(1, 100):
      tmp = x*x + y*y + z*z + x*y + y*z + z*x
      if tmp <= n:
        dp[tmp] += 1

for i in range(1, n+1):
  print(dp[i])

Buggy python submission (verdict: Time Limit Exceeded):
import math
n = int(input())

for i in range(1, n+1):
  count = 0
  upper = int(math.sqrt(i))
  lower = int(math.sqrt(i/6))
  for x in range(lower, upper):
    for y in range(lower, x+1):
      for z in range(lower, y+1):
        if (x+y)**2 + (y+z)**2 + (z+x)**2 == 2*i:
          if x == y and y == z and z == x:
          	count += 1
          else:
            count += 3
            
  print(count)

Fixed submission:
import sys
input = sys.stdin.readline

n = int(input())
dp = [0]*(n+1)

for x in range(1, 100):
  for y in range(1, 100):
    for z in range(1, 100):
      tmp = x*x + y*y + z*z + x*y + y*z + z*x
      if tmp <= n:
        dp[tmp] += 1

for i in range(1, n+1):
  print(dp[i])

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

for i in range(1, n+1):
  count = 0
  for x in range(1, i):
    for y in range(1, x+1):
      for z in range(1, y+1):
        if (x+y)**2 + (y+z)**2 + (z+x)**2 == 2*i:
          if x == y and y == z and z == x:
          	count += 1
          else:
            count += 3
            
  print(count)

Fixed submission:
import sys
input = sys.stdin.readline

n = int(input())
dp = [0]*(n+1)

for x in range(1, 100):
  for y in range(1, 100):
    for z in range(1, 100):
      tmp = x*x + y*y + z*z + x*y + y*z + z*x
      if tmp <= n:
        dp[tmp] += 1

for i in range(1, n+1):
  print(dp[i])

Buggy python submission (verdict: Time Limit Exceeded):
import math
n = int(input())

for i in range(1, n+1):
  count = 0
  rout = int(math.sqrt(i))
  for x in range(1, rout+1):
    for y in range(1, x+1):
      for z in range(1, y+1):
        if (x+y)**2 + (y+z)**2 + (z+x)**2 == 2*i:
          if x == y and y == z and z == x:
          	count += 1
          else:
            count += 3
            
  print(count)

Fixed submission:
import sys
input = sys.stdin.readline

n = int(input())
dp = [0]*(n+1)

for x in range(1, 100):
  for y in range(1, 100):
    for z in range(1, 100):
      tmp = x*x + y*y + z*z + x*y + y*z + z*x
      if tmp <= n:
        dp[tmp] += 1

for i in range(1, n+1):
  print(dp[i])

Buggy python submission (verdict: Time Limit Exceeded):
import math
n = int(input())

for i in range(1, n+1):
  count = 0
  rout = int(math.sqrt(i))
  for x in range(1, rout+1):
    for y in range(1, x+1):
      for z in range(1, y+1):
        if (x+y)**2 + (y+z)**2 + (z+x)**2 == 2*i:
          if x == y and y == z and z == x:
          	count += 1
          else:
            count += 3
            
  print(count)

Fixed submission:
import sys
input = sys.stdin.readline

n = int(input())
dp = [0]*(n+1)

for x in range(1, 100):
  for y in range(1, 100):
    for z in range(1, 100):
      tmp = x*x + y*y + z*z + x*y + y*z + z*x
      if tmp <= n:
        dp[tmp] += 1

for i in range(1, n+1):
  print(dp[i])