Harryxun/GPT-100-sft-dataset huggingface dataset:
Problem p02713 (python)

Fixed submission:
import math
K = int(input())
ans = 0

#i<j<k
for i in range(1, K-1):
    for j in range(i+1, K):
        for k in range(j+1, K+1):
            gcd_ij_1 = math.gcd(i, j)
            gcd_ijk_1 = math.gcd(gcd_ij_1, k)
            ans = ans + gcd_ijk_1 * 6

for l in range(1, K):
    for m in range(l+1, K+1):
        gcd_lm_1 = math.gcd(l,m)
        ans = ans + gcd_lm_1 * 6

for n in range(1, K+1):
    ans = ans + n

print(ans)

Buggy submission (verdict: Runtime Error):
import math

K = int(sys.stdin.readline())
ans = 0

for i in range(1, K+1):
    for j in range(1, K+1):
        for k in range(1, K+1):
            math_gcd_jk = math.gcd(j, k)
            math_gcd_ijk = math.gcd(math_gcd_jk, i)
            ans = ans + math_gcd_ijk

print(ans)
Problem p02717 (python)

Fixed submission:
import sys
a, b, c = map(int, sys.stdin.readline().split())

print(c, a, b)

Buggy submission (verdict: Runtime Error):
import sys
a, b, c = int(sys.stdin.readline().split())

print(c, a, b)
Problem p02576 (python)

Fixed submission:
n, x, t = map(int, input().split())
if n%x==0:
  print((n//x)*t)
else:
  print( ((n//x)+1)*t )

Buggy submission (verdict: Runtime Error):
n, x, t = map(int(i) for in input().split())
if n%x==0:
  print(n/x*t)
else:
  print( (int(n/x)+1)*t )

Buggy submission (verdict: Runtime Error):
n, x, t = map(int, input().split())
if n%x==0:
  print(n/x*t)
else:
  print(((int(n/x)+1)*t)

Buggy submission (verdict: Runtime Error):
n, x, t = map(int, input().split())
if n%x == 0:
  print(n*t/x)
else:
  print(((int(n/x)+1)*t)

Buggy submission (verdict: Runtime Error):
n, x, t = map(int, input().split())
if n%x==0:
  print(n*t/x)
else:
  print(((int(n/x)+1)*t)

Buggy submission (verdict: Runtime Error):
n, x, t = map(int, input().split())
if n%x==0:
  print(n*t/x)
else:
  print(((math.floot(n/x))+1)*t)

Buggy submission (verdict: Runtime Error):
n, x, t = map(int, input().plist())
if n%x==0:
  print(n*t/x)
else:
  print(((math.floot(n/x))+1)*t)

Buggy submission (verdict: Runtime Error):
n, x, t = map(int, input().plist())
if n%x==0:
  print(((math.floot(n/x))+1)*t)
else print(n*t/x)

Buggy submission (verdict: Runtime Error):
n, x, t = map(int, input().plist())
print(((math.floot(n/x))+1)*t)
Problem p02582 (python)

Fixed submission:
s = input()
count = 0
for i in range(3):
  if s[i] == 'R':
    count+=1
if count <= 1 or count == 3:
  print(count)
elif s[1] != 'R':
  print(count-1)
else:
  print(count)

Buggy submission (verdict: Runtime Error):
s = input()
count = 0
for i in range(3):
  if s[i] == 'R':
    count++
if count <= 1 || count == 3:
  print(count)
elif s[1] != 'S':
  print(count-1)
else:
  print(count)
Problem p02612 (python)

Fixed submission:
n = int(input())
mod = n%1000
print(1000-mod if mod !=0 else 0)

Buggy submission (verdict: Runtime Error):

print(1000-int(input())%1000 if int(input())%1000 !=0 else 0)
Problem p02639 (python)

Fixed submission:
x = list(map(int,input().split()))
i = 0
while (x[i] != 0):
  i+=1
print(i+1)

Buggy submission (verdict: Runtime Error):
x = map(int,input().split())
i = 0
while (x[i] != 0):
  i+=1
print(i)
Problem p02583 (python)

Fixed submission:
import numpy as np
input()
x = list(map(int, input().split()))
x.sort()
x=np.array(x)
ans=0
for i in x[:-2]:
    y = x[x>i]
    for j in y:
        z = y[y>j]
        for k in z:
            if i+j>k:
                ans+=1
print(ans)

Buggy submission (verdict: Runtime Error):
input()
x = list(map(int, input().split()))
x.sort()
x=np.array(x)
ans=0
for i in x[:-2]:
    y = x[x>i]
    for j in y:
        z = y[y>j]
        for k in z:
            if i+j>k:
                ans+=1
print(ans)
Problem p02608 (python)

Fixed submission:
n = int(input())
ans = [0 for _ in range(10001)]

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

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

Buggy submission (verdict: Runtime Error):
n = int(input())
ans = [0 for _ in range(10050)]

for x in range(1,100+1):
    for y in range(1,100+1):
        for z in range(1,100+1):
            tmp=x**2+y**2+z**2+x*y+y*z+z*x
            ans[v]+=1

for i in range(n):
    print(ans[i+1])
Problem p02684 (python)

Fixed submission:
n, k = map(int, input().split())
A = list(map(int, input().split()))
D = [0] * (n+1)
now = 1
for i in range(1, k+1):
    tmp = A[now-1]
    if not D[tmp]:
        now = tmp
        D[now] += i
    else:
        pre = D[tmp]
        loop = i - D[tmp]
        if loop>1:
            now=D.index((k - pre) % loop + pre)
        else:
            now=tmp
        break
print(now)

Buggy submission (verdict: Runtime Error):
n, k = list(map(int,input().split()))
a = list(map(int,input().split()))

now=1
count=0

cities = [1]+[0]*(n)

for i in range(1,k+1):
    tmp=a[now-1]
    if tmp in cities[:i]:
        init_city=cities.index(tmp)
        if init_city>k:
            print(cities[k])
        else:
            print(cities[init_city:i][(k-init_city)%(i-init_city)])
        break
    else:
        cities[i]=tmp
        now=tmp
else:
    print(tmp_city[init_city+1])

Buggy submission (verdict: Runtime Error):
n, k = list(map(int,input().split()))
# a = list(map(int,input().split()))
# 循環を調べる
tmp_city=[]
c=0
count=0
init_city=0

while (1):
    count+=1
    tmp=a[c]
    if k==count:
        tmp_city.append(tmp)
        tmp_city=[1]+tmp_city
        break
    if tmp == 1:
        init_city=0
        tmp_city=[1]+tmp_city
        break
    if tmp in tmp_city:
        init_city=tmp_city.index(tmp)+1
        tmp_city=[1]+tmp_city
        break
    tmp_city.append(tmp)
    c=tmp-1
if k==count:
    print(tmp_city[-1])
else:
    print(tmp_city[init_city:][(k-(init_city))%len(tmp_city[init_city:])])
Problem p02690 (python)

Fixed submission:
import numpy as np
x = int(input())
tmp_list=[]
c=0
tmp_2=0
while(1):
    tmp_1=c**5
    if (tmp_1 - tmp_2)<=x:
        tmp_list+=[tmp_1]
    else:
        break
    tmp_2=tmp_1
    c+=1
 
def せいがわ(target:list,x) -> list:
    for i in np.flipud(target):
        for j in target:
            tmp=i+j
            if tmp==x:
                return [int(i**(1/5)),int(j**(1/5))*-1]
            if tmp>x:
                break
    return 0
 
def ふがわ(target:list,x) -> list:
    for i in np.flipud(target):
        for j in target:
            tmp=i-j
            if tmp==x:
                return [int(i**(1/5)),int(j**(1/5))]
            if tmp<x:
                break
    return 0
  
ans=ふがわ(tmp_list,x)
if ans==0:
    ans=せいがわ(tmp_list,x)
print(ans[0],ans[1])

Buggy submission (verdict: Runtime Error):
import numpy as np
x = int(input())
tmp_list=[]
c=0
tmp_2=0
while(1):
    tmp_1=c**5
    if (tmp_1 - tmp_2)<x:
        tmp_list+=[tmp_1]
    else:
        break
    tmp_2=tmp_1
    c+=1

def せいがわ(target:list,x) -> list:
    for i in np.flipud(target):
        for j in target:
            tmp=i+j
            if tmp==x:
                return [int(i**(1/5)),int(j**(1/5))*-1]
            if tmp>x:
                break
    return 0

def ふがわ(target:list,x) -> list:
    for i in np.flipud(target):
        for j in target:
            tmp=i-j
            if tmp==x:
                return [int(i**(1/5)),int(j**(1/5))]
            if tmp<x:
                break
    return 0
  
ans=ふがわ(tmp_list,x)
if ans==0:
    ans=せいがわ(tmp_list,x)
print(ans[0],ans[1])

Buggy submission (verdict: Runtime Error):
import numpy as np

x=int(input())

tmp_list=[]
c=0
tmp_2=0
while(1):
    tmp_1=c**5
    if (tmp_1 - tmp_2)<x:
        tmp_list+=[tmp_1]
    else:
        break
    tmp_2=tmp_1
    c+=1

tmp_list = np.array(tmp_list)

# 生側
target = tmp_list
for i in np.flipud(target):
    for j in target:
        if x==i+j:
            print(int(i**-5),int(j**(1/5)*(-1)))
            break
# ふがわ
for i in np.flipud(target):
    for j in target:
        if x==i-j:
            print(int(i**(1/5)),int(j**(1/5)))
            break
Problem p02760 (python)

Fixed submission:
import numpy as np
 
xy = [list(map(int, input().split())) for _ in range(3)]
n = int(input())
num = [list(map(int, input().split())) for _ in range(n)] 
result = [[0,0,0],[0,0,0],[0,0,0]]
 
def input_b(xy:list, num:int, result:list):
    for i in range(3):
        if num in xy[i]:
            for j in range(3):
                if num==xy[i][j]:
                    result[i][j]=1
    return result
  
def check_result(result:list):
    for i in range(3):
        if 3 == np.array(result[i]).sum():
            return "Yes" 
    if 3 in np.array(result[0]) + np.array(result[1]) + np.array(result[2]):
        return "Yes"
    if 3 == result[0][0] + result[1][1] + result[2][2]:
        return"Yes"
    if 3 == result[0][2] + result[1][1] + result[2][0]:
        return"Yes"
    return "No"
 
for k in num:
    result=input_b(xy,k[0],result)
 
print(check_result(result))

Buggy submission (verdict: Runtime Error):
import numpy as np

xy = [list(map(int, input().split())) for _ in range(3)]
n = int(input())
num = [list(map(int, input().split())) for _ in range(n)]

def input_b(xy:list, num:int, result:list):
    for i in range(3):
        if num in xy[i]:
            for j in range(3):
                if num==xy[i][j]:
                    result[i][j]=1
    return result
  
def check_result(result:list):

    # 縦判定
    for i in range(3):
        if 3 == np.array(result[0]).sum():
            return "Yes" 

    if 3 in np.array(result[0]) + np.array(result[1]) + np.array(result[2]):
        return "Yes"

    if 3 == result[0][0] + result[1][1] + result[2][2]:
        return"Yes"
    
    return "No"

for i in num:
    result=input_b(xy,i[0],result)

print(check_result(result))
Problem p02765 (python)

Fixed submission:
n,ans = str(input()).split()
if int(n)<10:
    ans = int(ans) + (100*(10-int(n)))
print(int(ans))

Buggy submission (verdict: Runtime Error):
n,ans = str(input()).split()
if int(n)<10:
    ans = int(ans) - (100*(10-int(n)))
if ans<0:
    ans=0
print(int(ans))
Problem p03455 (python)

Fixed submission:
a,b = map(int,str(input()).split())
 
if (a%2==0) or (b%2==0):
    print("Even")
else:
    print("Odd")

Buggy submission (verdict: Runtime Error):
a,b = map(int,str(input()).split())

if (a%2==0) or (b%2==0):
	print("Even)
else:
    print("Odd")
Problem p02536 (python)

Fixed submission:
import collections
n, m = map(int, input().split())
linked = collections.defaultdict(list)
i2group = dict()

gid = n + 1
def get_root(i):
  if i not in linked:
    return i
  j = get_root(linked[i])
  linked[i] = j
  return j

def get_groups():
  return [get_root(i) for i in range(1, n + 1)]

for i in range(m):
  a, b = map(int, input().split())
  ra, rb = get_root(a), get_root(b)
  if ra == rb: continue
  linked[ra] = gid
  linked[rb] = gid
  gid += 1

g = get_groups()
print(len(set(g)) - 1)
exit()

n_connected = 0
n_group = 0
for s in linked.values():
  s = s[0]
  if s:
    n_group += 1
    n_connected += len(s)
    s.clear()
print((n - n_connected) + (n_group - 1))

Buggy submission (verdict: Runtime Error):
import collections
n, m = map(int, input().split())
linked = collections.defaultdict(set)
for i in range(1, n + 1):
  linked[i].add(i)

for i in range(m):
  a, b = map(int, input().split())
  if len(linked[a]) > len(linked[b]):
     tmp = a
     a = b
     b = tmp
  linked[a].add(linked[b])
  tmp =linked[a]

  for t in linked[b]:
    linked[t] = tmp

n_connected = 0
n_group = 0
for s in linked.values():
  if s:
    n_group += 1
    n_connected += len(s)
    s.clear()
print((n - n_connected) + (n_group - 1))
Problem p02761 (python)

Fixed submission:
import sys
N, M = map(int, input().split())


sc = dict()
for i in range(M):
  s, c = map(int, input().split())
  if s in sc and sc[s] != c:
    print(-1)
    break
  sc[s] = c
else:
  if N == 1:
    i1 = sc.get(1, -1)
    i2 = -1
    i3 = -1
  elif N == 2:
    i1 = sc.get(2, -1)
    i2 = sc.get(1, -1)
    i3 = -1
  elif N == 3:
    i1 = sc.get(3, -1)
    i2 = sc.get(2, -1)
    i3 = sc.get(1, -1)

  for k in range(0, int(10 ** N)):
    k, k1 = divmod(k, 10)
    k, k2 = divmod(k, 10)
    k, k3 = divmod(k, 10)
    if k == 0 and N == 1 and (i1 == -1 or i1 == 0):
      print(0)
      break
    if (
      (N == 1 and k2 == 0 and k3 == 0 and k1) or
      (N == 2 and k3 == 0 and k2) or
      (N == 3 and k3)
    ):
      if (
        (i1 == -1 or k1 == i1) and
        (i2 == -1 or k2 == i2) and
        (i3 == -1 or k3 == i3)
      ):
        print(int(k3 * 100 + k2 * 10 + k1))
        break
  else:
    print(-1)

Buggy submission (verdict: Runtime Error):
import sys                                                        
N, M = map(int, input().split())                                  
                                                                  
                                                                  
sc = dict()                                                       
for i in range(M):                                                
  s, c = map(int, input().split())                                
  if s in sc and sc[s] != c:                                      
    print(-1)                                                     
    break                                                         
  sc[s] = c                                                       
else:                                                             
  i1 = sc.get(3, -1)                                              
  i2 = sc.get(2, -1)                                              
  i3 = sc.get(1, -1)                                              
  for k3 in range(10):                                            
    if i3 != -1 and i3 != k3:                                     
      continue                                                    
    for k2 in range(10):                                          
      if i2 != -1 and i2 != k2:                                   
        continue                                                  
      for k1 in range(10):                                        
        if i1 != -1 and i1 != k1:                                 
          continue                                                
        if (                                                      
            (N == 3 and k3) or                                    
            (N == 2 and not k3 and k2) or                         
            (N == 1 and not k3 and not k2 and k1)                 
          ):                                                      
          print(int(k3 * 100 + k2 * 10 + k1))                     
          sys.exit(1)                                             
  print(-1)
Problem p03323 (python)

Fixed submission:
print(
  "Yay!"
  if all(map(
    lambda x: x <= 8,      
    map(int, input().split())
  ))
  else ":("
)

Buggy submission (verdict: Runtime Error):
print(
  "Yay!"
  if all(lambda x: x <= 8,      
         map(int, input().split())
        )
  else ":("
)
Problem p02576 (python)

Fixed submission:
N,X,T=list(map(int,input().split()))

result=N//X*T

if N%X!=0:
    result+=T

print(result)

Buggy submission (verdict: Runtime Error):
N,X,T=list(map(int,input().split()))

result=N//X*T

if N%X!=0:
    result+=T

print(result)N,X,T=list(map(int,input().split()))

result=N//X*T

if N%X!=0:
    result+=T

print(result)
Problem p02641 (python)

Fixed submission:
import numpy as np

X,N=list(map(int,input().split()))
Pn=list(map(int,input().split()))


possible=[]

for i in range(min(Pn)-1,max(Pn)+2) if N!=0 else [X]:
    if i not in Pn:
        possible.append(i)

idx = np.abs(np.asarray(possible) - X).argmin()

print(possible[idx])

Buggy submission (verdict: Runtime Error):
import numpy as np

X,N=list(map(int,input().split()))
Pn=list(map(int,input().split()))


possible=[]

for i in range(1,101):
    if i not in Pn:
        possible.append(i)

idx = np.abs(np.asarray(possible) - X).argmin()

print(possible[idx])
Problem p02683 (python)

Fixed submission:
import itertools
import numpy as np
N,M,X=map(int,input().split())

CA=[list(map(int, input().split())) for i in range(int(N))]
CA_low_cost=float('inf')
for i in range(N):
    CA_comb=list(itertools.combinations(CA,N-i))
    for comb in CA_comb:
        comb_ls=np.array(comb)
        comb_sum=np.sum(comb_ls,axis=0)
        if list(filter(lambda x:x<X ,comb_sum[1:]))==[]:
            if CA_low_cost>comb_sum[0]:
                CA_low_cost=comb_sum[0]
if CA_low_cost==float('inf'):
    print(-1)
else:
    print(CA_low_cost)

Buggy submission (verdict: Runtime Error):
import itertools
import numpy as np
N,M,X=map(int,input().split())

CA=[list(map(int, input().split())) for i in range(int(N))]
CA_low_cost=float('inf')
for i in range(N):
    CA_comb=list(itertools.combinations(CA,N-i))
    for comb in CA_comb:
        comb_ls=np.array(comb)
        comb_sum=np.sum(comb_ls,axis=0)
        if list(filter(lambda x:x<X ,comb_sum[1:]))==[]:
            if CA_low_cost>comb_sum[0]:
                CA_low_cost=comb_sum[0]
if CA_low_cost==float('inf'):
    print(-1)
else:
    print(CA_low_cost)
Problem p03633 (python)

Fixed submission:
import math
from functools import reduce

def lcm_base(x, y):
    return (x * y) // math.gcd(x, y)

def lcm_list(list):
    return reduce(lcm_base, list, 1)

N = int(input())
T = [int(input()) for i in range(N)]

print(lcm_list(T))

Buggy submission (verdict: Runtime Error):
def gcd(a, b):
    if b == 0:
        return a
    else:
        return gcd(b, a % b)

def lcm(a, b):
    g = gcd(a,b)
    return a / g * b

N = int(input())
T = [int(input()) for i in range(N)]
ans = 1
for i in range(len(T)):
    ans = lcm(ans, T[i])

print(int(ans))

Buggy submission (verdict: Runtime Error):
def gcd(a, b):
    if b == 0:
        return a
    else:
        return gcd(b, a % b)

def lcm(a, b):
    g = gcd(a,b)
    return a * b / g

N = int(input())
T = [int(input()) for i in range(N)]
ans = 1
for i in range(len(T)):
    ans = lcm(ans, T[i])

print(int(ans))

Buggy submission (verdict: Runtime Error):
def gcd(a, b):
    if b == 0:
        return a
    else:
        return gcd(b, a % b)

def lcm(a, b):
    g = gcd(a,b)
    return a * b / g

N = int(input())
T = [int(input()) for i in range(N)]
ans = T[0]
for i in range(1, len(T)):
    ans = lcm(ans, T[i])

print(int(ans))
Problem p02621 (python)

Fixed submission:
a=input()
a=int(a)
print(int(a+a**2+a**3))

Buggy submission (verdict: Runtime Error):
a=input()
print(int(a+a**2+a**3))

Buggy submission (verdict: Runtime Error):
a=input()
print(a+a**2+a**3)
Problem p02639 (python)

Fixed submission:
a=input()
a=a.split(" ")
c=0
for i in a:
    c+=1
    if i==str(0):
        break
print(c)

Buggy submission (verdict: Runtime Error):
a=int(input())
a=a.split(" ")
c=0
for i in a:
    c+=1
    if i==0:
        break
print(c)
Problem p02705 (python)

Fixed submission:
R=int(input())
print(2*R*3.1415926)

Buggy submission (verdict: Runtime Error):
N=int(input())
A= list(map(int,input().split()))
B=[0 for _ in range(N)]
for a in A:
    B[a-1]+=1
for b in B:
    print(b)
Problem p02755 (python)

Fixed submission:
import math
A,B=map(int,input().split())
eight=[]
i=0
ten=[]
for a in range(1,1001):
    if math.floor(a*0.08)==A:
        eight.append(a)
    if math.floor(a*0.1)==B:
        ten.append(a)

for a in eight:
    if a in ten:
        print(a)
        i=1
        break
if i==0:
    print("-1")

Buggy submission (verdict: Runtime Error):
import math
A,B=map(int,input().split())
eight=[]
i=0
ten=[]
for a in range(1,1001):
    if math.floor(a*0.08)==A:
        eight.append(a)
    if math.floor(a*0.1)==B:
        ten.append(a)

for a in eight:
    if a in ten:
        print(a)
        i=1
        break
if i=0:
    print("-1")
Problem p02760 (python)

Fixed submission:
A=[]
i=0
for l in range(3):
    A.append(list(map(int,input().split())))
N=int(input())
B = [int(input()) for i in range(N)]
for C in B:
    for a in range(3):
        for b in range(3):
            if C==A[a][b]:
                A[a][b]=-1

for a in range(3):
    for b in range(3):
        if A[0][b]==A[1][b]==A[2][b]==-1:
            print("Yes")
            i=1
            break
        elif A[a][0]==A[a][1]==A[a][2]==-1:
            print("Yes")
            i=1
            break
        elif A[1][1]==A[2][2]==A[0][0]==-1:
            print("Yes")
            i=1
            break
        elif A[0][2]==A[1][1]==A[2][0]==-1:
            print("Yes")
            i=1
            break
    if i==1:
        break
if i==0:
    print("No")

Buggy submission (verdict: Runtime Error):
A=[]
i=0
for l in range(3):
    A.append(list(map(int,input().split())))
N=int(input())
B = [int(input()) for i in range(N)]
for C in B:
    for a in range(3):
        for b in range(3):
            if C==A[a][b]:
                A[a][b]=-1

for a in range(3):
    for b in range(3):
        if A[a][b]==A[-a-1][b]==A[-a-2][b]==-1:
            print("Yes")
            i=1
            break
        elif A[a][b]==A[a][-b-1]==A[a][-b-2]==-1:
            print("Yes")
            i=1
            break
        elif A[1][1]==A[2][2]==A[0][0]==-1:
            print("Yes")
            i=1
            break
        elif A[0][2]==A[1][1]==A[2][0]==-1:
            print("Yes")
            i=1
            break
    if i==1:
        break
if i==0:
    print("No")
Problem p02608 (python)

Fixed submission:
n = int(input())
a = [0]*(n+1)
for i in range(1, 102):
    for j in range(1, 102):
        for k in range(1, 102):
            if (i*i + j*j + k*k + i*j + j*k + i*k) <= n:
                a[i*i + j*j + k*k + i*j + j*k + i*k] +=1
                
for x in a[1:]:
    print(x)

Buggy submission (verdict: Runtime Error):
N = int(input())
 
ans = [0 for _ in range(10050)]
for x in range(1,int(N**0.5)):
  for y in range(1,int(N**0.5)):
    for z in range(1,int(N**0.5)):
      n = x**2 + y**2 + z**2 + x*y + y*z + z*x
      ans[n] += 1

for i in range(N):
  print(ans[i+1])

Buggy submission (verdict: Runtime Error):
N = int(input())
 
ans = [0 for _ in range(10050)]
for x in range(1,int(N**0.5)):
  for y in range(1,int(N**0.5)):
    for z in range(1,int(N**0.5)):
      n = x**2 + y**2 + z**2 + x*y + y*z + z*x;
      ans[n] += 1

for i in range(N):
  print(ans[i+1])

Buggy submission (verdict: Runtime Error):
N = int(input())
 
ans = [0 for _ in range(10050)]
for x in range(1,int(N**0.5)):
    for y in range(1,int(N**0.5)):
        for z in range(1,int(N**0.5)):
            n = x**2 + y**2 + z**2 + x*y + y*z + z*x
            ans[n] += 1
 
for i in range(N):
    print(ans[i+1])

Buggy submission (verdict: Runtime Error):
N = int(input())

ans = [0 for _ in range(10050)]
for x in range(1,int(N**0.5)):
    for y in range(1,int(N**0.5)):
        for z in range(1,int(N**0.5)):
            n = x**2 + y**2 + z**2 + x*y + y*z + z*x;
            ans[n] += 1

for i in range(N):
    print(ans[i+1])

Buggy submission (verdict: Runtime Error):
N = int(input())

ans = [0 for _ in range(10050)]
for x in range(1,int(N**0.5)):
    for y in range(1,int(N**0.5)):
        for z in range(1,int(N**0.5)):
            n = x**2 + y**2 + z**2 + x*y + y*z + z*x
            ans[n] += 1

for i in range(N):
    print(ans[i+1])

Buggy submission (verdict: Runtime Error):
N = int(input())

ans = [0 for _ in range(10050)]
for x in range(1,int(N**0.5)+1):
    for y in range(1,int(N**0.5)+1):
        for z in range(1,int(N**0.5)+1):
            n = x**2 + y**2 + z**2 + x*y + y*z + z*x
            ans[n] += 1

for i in range(N):
    print(ans[i+1])