Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
a,b,c,k=map(int,input().split())
if a>=k:
  ans=k
elif a+b>=k:
  ans=a
else:
  ans=a-(k-(a+b))
print(ans)

Fixed submission:
s=input()
t=input()
if s==t[0:len(t)-1]:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
a,b,c,k=map(int,input().split())
if a>=k:
  ans-k
elif a+b>=k:
  ans=a
else:
  ans=a-(k-(a+b))
print(ans)

Fixed submission:
a,b,c,k=map(int,input().split())
if a>=k:
  ans=k
elif a+b>=k:
  ans=a
else:
  ans=a-(k-(a+b))
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
x=int(input())
for i in range(x+1):
  for j in range(-abs(i)-1,x+1):
    a=i
    b=j
    if a**5-b**5==x:
      break
  else:
    continue
  break
print(a,b)


Fixed submission:
x=int(input())
for a in range(150):
  for b in range(-150,150):
    if a**5-b**5==x:
      print(a,b)
      break
  else:
    continue
  break

Buggy python submission (verdict: Time Limit Exceeded):
x=int(input())
for i in range(x+1):
  for j in range(-abs(i)-1,x+1):
    a=i
    b=j
    if a**5-b**5==x:
      break
  else:
    continue
  break
print(a,b)

Fixed submission:
x=int(input())
for a in range(150):
  for b in range(-150,150):
    if a**5-b**5==x:
      print(a,b)
      break
  else:
    continue
  break
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))
cnt=0
for i in range(n-1):
  for j in range(i,n):
    if j-i==a[i]+a[j]:
      cnt+=1
print(cnt)

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

check = {}
ans = 0

for i in range(N):
    x = i - A[i]
    y = A[i] + i
    ans += check.get(x, 0)
    check.setdefault(y, 0)
    check[y] += 1

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=[0]+list(map(int,input().split()))
cnt=0
for i in range(1,n):
  for j in range(i+1,n+1):
    if j-i==a[i]+a[j]:
      cnt+=1
print(cnt)


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

check = {}
ans = 0

for i in range(N):
    x = i - A[i]
    y = A[i] + i
    ans += check.get(x, 0)
    check.setdefault(y, 0)
    check[y] += 1

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=[0]+list(map(int,input().split()))
cnt=0
for i in range(1,n):
  for j in range(i+1,n+1):
    if abs(i-j)==a[i]+a[j]:
      cnt+=1
print(cnt)

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

check = {}
ans = 0

for i in range(N):
    x = i - A[i]
    y = A[i] + i
    ans += check.get(x, 0)
    check.setdefault(y, 0)
    check[y] += 1

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=[0]+list(map(int,input().split()))
cnt=0
for i in range(1,n):
  for j in range(i+1,n+1):
    if abs(i-j)==a[i]+a[j]:
      cnt+=1
print(cnt)

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

check = {}
ans = 0

for i in range(N):
    x = i - A[i]
    y = A[i] + i
    ans += check.get(x, 0)
    check.setdefault(y, 0)
    check[y] += 1

print(ans)
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
for i in range(1,n+1):
    ans=a.count(i)
    print(ans)

Fixed submission:
import math
r=int(input())
ans=math.pi*r*2
print(ans)
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=[-1,-1]+list(map(int,input().split()))
cnt=[0]*(n+1)
for i in range(2,n+1):
    cnt[a[i]+=1
    
for i in range(1,n+1):
    print(cnt[i])

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
cnt=[0]*n
for i in range(0,n-1):
    cnt[a[i]-1]+=1
for i in range(0,n):
    print(cnt[i])

Buggy python submission (verdict: Runtime Error):
n=int(input())
a=[-1,-1]+list(map(int,input().split()))
cnt=[0]*(n+1)
for i in range(2,n+1):
    cnt[a(i)]+=1
    
for i in range(1,n+1):
    print(cnt[i])

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
cnt=[0]*n
for i in range(0,n-1):
    cnt[a[i]-1]+=1
for i in range(0,n):
    print(cnt[i])

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))
for i in range(1,n+1):
    ans=a.count(i)
    print(ans)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
cnt=[0]*n
for i in range(0,n-1):
    cnt[a[i]-1]+=1
for i in range(0,n):
    print(cnt[i])

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))
for i in range(1,n+1):
    ans=a.count(i)
    print(ans)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
cnt=[0]*n
for i in range(0,n-1):
    cnt[a[i]-1]+=1
for i in range(0,n):
    print(cnt[i])
Buggy python submission (verdict: Runtime Error):
n=int(input())
s=input()

r_cnt=s.count("R")
g_cnt=s.count("G")
b_cnt=s.count("B")

ans=r_cnt*g_cnt*b*cnt

for i in range(n):
    for d in range(n):
        j=i+d
        k=j+d
        if s[i]!=s[j] and s[j]!=s[k] and s[k]!=s[i]:
            ans-=1

print(ans)

Fixed submission:
N=input()
if '7' in N:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
n=int(input())
s=input()

r_cnt=s.count("R")
g_cnt=s.count("G")
b_cnt=s.count("B")

ans=r_cnt*g_cnt*b_cnt

for i in range(n):
    for d in range(n):
        j=i+d
        k=j+d
        if s[i]!=s[j] and s[j]!=s[k] and s[k]!=s[i]:
            ans-=1

print(ans)

Fixed submission:
n=int(input())
s=input()

r_cnt=s.count("R")
g_cnt=s.count("G")
b_cnt=s.count("B")

ans=r_cnt*g_cnt*b_cnt

for i in range(n):
    for d in range(n):
        j=i+d
        k=j+d
        if k>=n:
            break
        if s[i]!=s[j] and s[j]!=s[k] and s[k]!=s[i]:
            ans-=1

print(ans)
Buggy python submission (verdict: Runtime Error):
X=int(input())
print(X//500*1000+X%500//5*5)

Fixed submission:
s=input()
if s[2]==s[3] and s[4]==s[5]:
  ans="Yes"
else:
  ans="No"
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline

a,b,m=map(int,input().split())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
x=[list(map(int,input().split())) for _ in range(m)]
aa=[]

for i in range(m):
  aa.append(a[x[i][0]-1]+b[x[i][1]-1]-x[i][2])
  aa.append(min(a)+min(b))

print(min(aa))

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

a,b,m=map(int,input().split())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
x=[list(map(int,input().split())) for _ in range(m)]

ans=min(a)+min(b)
for i in range(m):
  ans=min(ans,(a[x[i][0]-1]+b[x[i][1]-1]-x[i][2]))

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
a,b,m=map(int,input().split())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
x=[list(map(int,input().split())) for _ in range(m)]
aa=[]

for i in range(m):
  aa.append(a[x[i][0]-1]+b[x[i][1]-1]-x[i][2])
  aa.append(min(a)+min(b))

print(min(aa))

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

a,b,m=map(int,input().split())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
x=[list(map(int,input().split())) for _ in range(m)]

ans=min(a)+min(b)
for i in range(m):
  ans=min(ans,(a[x[i][0]-1]+b[x[i][1]-1]-x[i][2]))

print(ans)
Buggy python submission (verdict: Runtime Error):
h,n=map(int,input().split())
a=list(map(int,input().split())
damage=sum(a)
if damage>=h:
    print("Yes")
else:
    print("No")

Fixed submission:
h,n=map(int,input().split())
a=list(map(int,input().split()))
damage=sum(a)
if damage>=h:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
from sympy import nextprime
from sympy import isprime
x=int(input())
if isprime(x)==1:
    print(x)
else:
    print(nextprime(x))

Fixed submission:
X=int(input())
while True:
    for x in range(2,X):
        if X%x==0:
            break
    else:
        print(X)
        break
    X+=1
Buggy python submission (verdict: Runtime Error):
n=int(input())
s=input()
for i in s:
    i=chr()
ans="".join(s)
print(ans)

Fixed submission:
n=int(input())
s=input()
ans=[]
for i in s:
    ans.append(chr((ord(i)-65+n)%26+65))
ans="".join(ans)
print(ans)
Buggy python submission (verdict: Runtime Error):
n=int(input())
if n%2==0:
    print(0.5)
elif:n=1
    print(1)
else:
    print(n/(n+1)/2)

Fixed submission:
n=int(input())
if n==1:
    print(1)
elif n%2==0:
    print(0.5)
else:
    print((n+1)/2/n)
Buggy python submission (verdict: Runtime Error):
n=int(input())
base=0
for i in range(n):
    h=int(input())
    if base>h:
        ans="No"
        break
    base=max(base,h-1)
else:
    ans="Yes"
print(ans)

Fixed submission:
n=int(input())
h=list(map(int,input().split()))
base=0
for i in h:
    if base>i:
        ans="No"
        break
    base=max(base,i-1)
else:
    ans="Yes"
print(ans)
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
if (a+b)%2=1:
    print("IMPOSSIBLE")
else:
    print((a+b)/2)

Fixed submission:
a,b=map(int,input().split())
if (a+b)%2==1:
    print("IMPOSSIBLE")
else:
    print(int((a+b)/2))
Buggy python submission (verdict: Runtime Error):
import math
n=int(input())
l=[int(input()) for i in range(n)]
ans=math.ceil(n/len(l))+4
print(ans)

Fixed submission:
import math
n=int(input())
l=[int(input()) for i in range(5)]
ans=math.ceil(n/min(l))+4
print(ans)
Buggy python submission (verdict: Runtime Error):
n=int(input())
ans=0
for i in range(n):
    x,u=input().split()
    if u="BTC":
        ans+=380000*float(x)
    else:
        ans+=int(x)
print(ans)

Fixed submission:
n=int(input())
ans=0
for i in range(n):
    x,u=input().split()
    if u=="BTC":
        ans+=380000*float(x)
    else:
        ans+=int(x)
print(ans)

Buggy python submission (verdict: Runtime Error):
n=int(input())
ans=0
for i in range(n):
    x,u=int(input().split())
    if u="BTC":
        ans+=380000*x
    else:
        ans+=x
print(ans)

Fixed submission:
n=int(input())
ans=0
for i in range(n):
    x,u=input().split()
    if u=="BTC":
        ans+=380000*float(x)
    else:
        ans+=int(x)
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
x=int(input())
c=1
for b in range(1,x):
    for p in range(2,x):
        if b**p<=x:c=max(c,b**p)
print(c)

Fixed submission:
x=int(input())
c=1
for b in range(1,x):
    for p in range(2,x):
        if b**p<=x:c=max(c,b**p)
        else:break
print(c)
Buggy python submission (verdict: Runtime Error):
a,b,c.d=(int(input()) for i in range(4))
ans=min(a,b)+min(c,d)
print(ans)

Fixed submission:
a,b,c,d=(int(input()) for i in range(4))
ans=min(a,b)+min(c,d)
print(ans)
Buggy python submission (verdict: Runtime Error):
n=int(input())
s=list(input() for i in range(n))
m=int(input())
t=list(input() for j in range(m))
l=list(set(n))
ans=(max(0,s.count(l[k])-t.count(l[k])) for k in range(len(l)))

Fixed submission:
n=int(input())
s=list(input() for i in range(n))
m=int(input())
t=list(input() for j in range(m))
l=list(set(s))
ans=max(0,max(s.count(l[k])-t.count(l[k]) for k in range(len(l))))
print(ans)
Buggy python submission (verdict: Runtime Error):
s'=sorted(input())
t'=sorted(input())
if s'<t':
    ans="Yes"
else:
    ans="No"
print(ans)

Fixed submission:
s=sorted(input())
t=sorted(input())[::-1]
if s<t:
    ans="Yes"
else:
    ans="No"
print(ans)
Buggy python submission (verdict: Runtime Error):
n=int(input())
x=800*N
y=200*(n//15)
ans=x-y
print(ans)

Fixed submission:
n=int(input())
x=800*n
y=200*(n//15)
ans=x-y
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
mod=10**9+7
ans=1
for i in range(1,n+1):
    ans*=i
ans%=mod
print(ans)

Fixed submission:
n=int(input())
mod=10**9+7
ans=1
for i in range(1,n+1):
    ans*=i
    ans%=mod
print(ans)
Buggy python submission (verdict: Runtime Error):
x,n = map(int,input().split())
a = list(map(int,input().split()))

lower = min(a)
upper = max(a)
mini = 10000005
res = -1
for i in range(lower-1,upper+2):
    if i not in a:
        if abs(x-i)<mini:
            mini = abs(x-i)
            res = i

print(res)


Fixed submission:
x,n = map(int,input().split())

if n==0:
    print(x)
else:
    a = list(map(int,input().split()))
    lower = min(a)
    upper = max(a)
    mini = 10000005
    res = -1
    for i in range(lower-1,upper+2):
        if i not in a:
            if abs(x-i)<mini:
                mini = abs(x-i)
                res = i

    print(res)
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int,input().split()))
print(sum(a)-n)


Fixed submission:
a = list(map(int,input().split()))

a.sort()

print((a[2]-a[1])+(a[1]-a[0]))
Buggy python submission (verdict: Runtime Error):
n = input()
s = input()
print(s.count('ABC))

Fixed submission:
n = input()
s = input()
print(s.count('ABC'))
Buggy python submission (verdict: Runtime Error):
N = int(input())
list = list(input())
n = 0
if N % 2 != 0:
	print("No")
else:
    for i in range(N//2):
	    if not list[i] == list[i+ N//2]:
            print("No")
            break
        n += 1
    if n == N//2 - 1:
        print("Yes")


Fixed submission:
N = int(input())
list = list(input())
n = 0
if N % 2 != 0:
	print("No")
else:
    for i in range(N//2):
        if not list[i] == list[i+ N//2]:
            print("No")
            break
        n += 1
    if n == N//2:
        print("Yes")
Buggy python submission (verdict: Time Limit Exceeded):
def point(m, list):
    for i in range(len(list)):
        if i+1 == m:
            pass
        else:
            list[i] -= 1
N, K, Q = map(int, input().split())
list = [int(input()) for i in range(Q)]
p_list = []
for i in range(N):
    p_list.append(K)
for i in list:
    point(i, p_list)
for i in p_list:
    if i > 0:
        print("Yes")
    else:
        print("No")

Fixed submission:
N, K, Q = map(int, input().split())
list = [int(input()) for i in range(Q)]
p_list = []
for i in range(N):
    p_list.append(0)
for i in list:
    p_list[i-1] += 1
for i in p_list:
    if K - (Q - i) > 0:
        print("Yes")
    else:
        print("No")
Buggy python submission (verdict: Runtime Error):
N = int(input())
H_list = input().split()
A_list = []
H_list.reverse()
k = 0
for i in range(N-1):
    if H_list[i] <= H_list[i + 1]:
        k += 1
    else:
        A_list.append(k)
        k = 0 
print(max(A_list))

Fixed submission:
N = int(input())
H_list = list(map(int, input().split()))
A_list = []
H_list.reverse()
k = 0
if N == 1:
    print(0)
else:
    for i in range(N-1):
        if H_list[i] <= H_list[i + 1]:
            k += 1
            A_list.append(k)
        else:
            k = 0
            A_list.append(k)
    if len(A_list) == 0:
        print(k)
    else:
        print(max(A_list))
Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
if a >= 13:
	print(b)
elif a >= 6:
	print(b / 2)
else:
	print(0)


Fixed submission:
# coding: utf-8
# Your code here!
a, b = map(int, input().split())
if a >= 13:
	print(b)
elif a >= 6:
	print(b // 2)
else:
	print(0)

Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
if a >= 13:
    print(b)
elif a >= 6:
    print(b / 2)
else:
    print(0)

Fixed submission:
# coding: utf-8
# Your code here!
a, b = map(int, input().split())
if a >= 13:
	print(b)
elif a >= 6:
	print(b // 2)
else:
	print(0)
Buggy python submission (verdict: Runtime Error):
s = input()
if "a" in s ans "b" in s and "c" in s:
  print("Yes")
else:
  print("No")

Fixed submission:
s = input()
if "a" in s and "b" in s and "c" in s:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Time Limit Exceeded):
def main():
    n,k = map(int,input().split())
    while 1:
        check = abs(n-k)
        if n < check:
            break
        else:
            n = check
    print(n)
if __name__ == '__main__':
    main()


Fixed submission:
def main():
    n,k = map(int,input().split())
    div = n//k
    A = abs(n-k*div)
    B = abs(n-k*(div+1))
    if A < B:
        x = A
    else:
        x = B
    print(x)
if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
line = list(input())
win = list.count("o")
lose = line.len()-win
match = 15-line.len()
if win + match > 7:
  print("YES")
else:
  print("NO")

Fixed submission:
line = list(input())
win = line.count("o")
match = 15-len(line)
if win + match > 7:
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Time Limit Exceeded):
def check(P):
    for i in range(len(P)-1):
        if P[i] != P[i+1]:
            return i
    return "Non"
P = list(input())
t = check(P)
pop = 0
while t != "Non":
    P.pop(t)
    P.pop(t)
    pop+=1
    t = check(P)
print(pop*2)


Fixed submission:
def check(P):
    for i in range(len(P)-1):
        if P[i] != P[i+1]:
            return i
    return "Non"
def min_2(a,b):
    if a < b:
        return a
    else:
        return b
P = list(input())
c0 = P.count("0")
c1 = P.count("1")
print(min_2(c0,c1)*2)
#t = check(P)
#pop = 0
#while t != "Non":
#    P.pop(t)
#    P.pop(t)
#    pop+=1
#    t = check(P)
#print(pop*2)
Buggy python submission (verdict: Runtime Error):
T = int(input())
X = int(input())
print(T/X)


Fixed submission:
T,X = map(int,input().split())
print(T/X)

Buggy python submission (verdict: Runtime Error):
T = int(input())
X = int(input())
print(T/X)


Fixed submission:
T,X = map(int,input().split())
print(T/X)
Buggy python submission (verdict: Runtime Error):
s = input()
w = input().split()
for i in range(int(s)):
  sum += int(w[i])
average = sum / int(s)
for i in range(int(s)):
    if abs(int(w[i]) - average) < limit:
        limit = abs(int(w[i]) - average)
print(limit)


Fixed submission:
# coding: utf-8
# Your code here!

s = input()
w = input().split()
sum = 0
for i in range(int(s)):
    sum += int(w[i])
average = sum / int(s)
limit = 100
index = 0
for i in range(int(s)):
    if abs(int(w[i]) - average) < limit:
        limit = abs(int(w[i]) - average)
        index = i
print(index)
Buggy python submission (verdict: Runtime Error):
s = input().split()
w = int(s[1])/2
print(int((s[0])+w)

Fixed submission:
s = input().split()
N = int(s[0])
W = int(s[1])/2
print(int(N+W))

Buggy python submission (verdict: Runtime Error):
s = input().split()
print(int((s[0])+(int(s[1]))/2))

Fixed submission:
s = input().split()
N = int(s[0])
W = int(s[1])/2
print(int(N+W))

Buggy python submission (verdict: Runtime Error):
s = input().split()
print(int((s[0])+int(s[1]))/2)

Fixed submission:
s = input().split()
N = int(s[0])
W = int(s[1])/2
print(int(N+W))
Buggy python submission (verdict: Runtime Error):
AllInput = input("Enter Distance,Time Taken and Speed Separated by Space")
Para = AllInput.split()

if ((float(Para[0])/float(Para[1])) <= float(Para[2]):
    print("Yes")
else:
    print("NO")

Fixed submission:

D,T,S= map(int,input().split())

if (S*T) >= D:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Time Limit Exceeded):
n,*a=map(int,open(0).read().split())
count=0
for i in range(1,n):
    if i==1:
        if a[0]>a[1]:
            count+=a[0]-a[1]
    else:
        if max(a[:i])>a[i]:
            count+=max(a[:i])-a[i]
print(count)

Fixed submission:
n,*a=map(int,open(0).read().split())
count,max_n=0,a[0]
for i in range(1,n):
    if max_n>a[i]:
        count+=max_n-a[i]
    else:
        max_n=max(max_n,a[i])
print(count)
Buggy python submission (verdict: Time Limit Exceeded):
n,k,*a=map(int,open(0).read().split())
multiple=1
for i in range(k):
    multiple*=a[i]
for j in range(n-k):
    if a[j+k]>a[j]:
        print('Yes')
    else:
        print('No')
    multiple=multiple*a[j+k]/a[j]

Fixed submission:
n,k,*a=map(int,open(0).read().split())
multiple=1
#for i in range(k):
#    multiple*=a[i]
for j in range(n-k):
    if a[j+k]>a[j]:
        print('Yes')
    else:
        print('No')
#    multiple=multiple*a[j+k]/a[j]

Buggy python submission (verdict: Time Limit Exceeded):
n,k,*a=map(int,open(0).read().split())
multiple=1
for i in range(k):
    multiple*=a[i]
for j in range(n-k):
    if multiple*a[j+k]/a[j]>multiple:
        print('Yes')
    else:
        print('No')
    multiple=multiple*a[j+k]/a[j]

Fixed submission:
n,k,*a=map(int,open(0).read().split())
multiple=1
#for i in range(k):
#    multiple*=a[i]
for j in range(n-k):
    if a[j+k]>a[j]:
        print('Yes')
    else:
        print('No')
#    multiple=multiple*a[j+k]/a[j]

Buggy python submission (verdict: Time Limit Exceeded):
n,k,*a=map(int,open(0).read().split())
for i in range(n-k):
    if sum(a[i+1:k+i+1])>sum(a[i:k+i]):
        print('Yes')
    else:
        print('No')

Fixed submission:
n,k,*a=map(int,open(0).read().split())
multiple=1
#for i in range(k):
#    multiple*=a[i]
for j in range(n-k):
    if a[j+k]>a[j]:
        print('Yes')
    else:
        print('No')
#    multiple=multiple*a[j+k]/a[j]
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
import math

def comb(x):
    if x<6:
        return 0
    count=0
    for i in range(1,int(math.sqrt(x-2))):
        if i**2+2*i>x-3:
            break
        for j in range(i,int(math.sqrt(x-2))):
            if i**2+j**2+(i+1)*(j+1)>x+1:
                break
#            if 3*(i**2+j**2)+2*i*j-4*x>0:
#                break
            k=(-i-j+math.sqrt((i+j)**2-4*(i**2+j**2+i*j-x)))/2
            if k<j:
                break
            elif k.is_integer() and k>0:
                if len(set([i,j,k]))==3:
                    count+=6
                elif len(set([i,j,k]))==2:
                    count+=3
                else:
                    count+=1
    
                
            """
            for k in range(j,int(math.sqrt(x-2))):
                if i**2+j**2+k**2+i*j+j*k+k*i>x:
                    break
                if i**2+j**2+k**2+i*j+j*k+k*i==x:
                    if len(set([i,j,k]))==3:
                        count+=6
                    elif len(set([i,j,k]))==2:
                        count+=3
                    else:
                        count+=1
            """
    return count

for i in range(1,n+1):
#    print(i,comb(i))
    print(comb(i))

Fixed submission:
n=int(input())
a=[0]*(10**5)
for i in range(1,101):
    for j in range(1,101):
        for k in range(1,101):
            a[i**2+j**2+k**2+i*j+j*k+k*i]+=1
for i in range(n):
    print(a[i+1])
Buggy python submission (verdict: Time Limit Exceeded):
n,m,k=map(int,input().split())
A=list(map(int,input().split()))
B=list(map(int,input().split()))

a=[0]
b=[0]

for i in range(n):
    a.append(a[i]+A[i])
for i in range(m):
    b.append(b[i]+B[i])
    
c=0

for i in range(n+1):
    for j in range(m+1):
        if a[i]+b[m-j]>k:
            continue
        else:
            c=max(i+m-j,c)
            continue
else:
    print(c)

Fixed submission:
n,m,k=map(int,input().split())
A=list(map(int,input().split()))
B=list(map(int,input().split()))

a=[0]
b=[0]

for i in range(n):
    a.append(a[i]+A[i])
for i in range(m):
    b.append(b[i]+B[i])
    
c=0
idx=m

for i in range(n+1):
    while 1:
        if idx<0:
            break
        if a[i]+b[idx]>k:
            idx-=1
            continue
        else:
            c=max(i+idx,c)
            break
else:
    print(c)

Buggy python submission (verdict: Time Limit Exceeded):
n,m,k=map(int,input().split())
A=list(map(int,input().split()))
B=list(map(int,input().split()))

a=[0]
b=[0]

for i in range(n):
    a.append(a[i]+A[i])
for i in range(m):
    b.append(b[i]+B[i])

c=0
for i in range(n+1):
    for j in range(m+1):
        if a[i]+b[j]>k:
            break
        else:
            c=max(c,i+j)
else:
    print(c)

Fixed submission:
n,m,k=map(int,input().split())
A=list(map(int,input().split()))
B=list(map(int,input().split()))

a=[0]
b=[0]

for i in range(n):
    a.append(a[i]+A[i])
for i in range(m):
    b.append(b[i]+B[i])
    
c=0
idx=m

for i in range(n+1):
    while 1:
        if idx<0:
            break
        if a[i]+b[idx]>k:
            idx-=1
            continue
        else:
            c=max(i+idx,c)
            break
else:
    print(c)
Buggy python submission (verdict: Runtime Error):
n=int(input())%10
if n=3:
  print('bon')
elif n in [0,1,6,8]:
  print('pon')
else:
  print('hon')

Fixed submission:
n=int(input())%10
if n==3:
  print('bon')
elif n in [0,1,6,8]:
  print('pon')
else:
  print('hon')