Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
s=input()
cnt=0

if len(s)%2==0:
  for i in range(len(s)/2):
    if s[i]!=s[len(s)-1-i]:
      cnt+=1
      
else:
  for i in range((len(s)+1)/2):
    if s[i]!=s[len(s)-1-i]:
      cnt+=1
print(cnt)

Fixed submission:
s = input()
 
cnt = 0
b = int(len(s))
 
for a in range(int(b/2)):
    if s[a] != s[(b-a-1)]:
       cnt = cnt +1
print(cnt)

Buggy python submission (verdict: Runtime Error):
s=input()
cnt=0

if len(s)%2==0:
  for i in range(len(s)/2):
    if s[i]!=s[len(s)-i]:
      cnt+=1
else:
  for i in range((len(s)+1)/2):
    if s[i]!=s[len(s)-i]:
      cnt+=1
print(cnt)

Fixed submission:
s = input()
 
cnt = 0
b = int(len(s))
 
for a in range(int(b/2)):
    if s[a] != s[(b-a-1)]:
       cnt = cnt +1
print(cnt)

Buggy python submission (verdict: Runtime Error):
s=input()
cnt=0
if len(s)%2==0:
  for i in range(len(s)//2):
    if s[i]!=s[len(s)-i]:
      cnt+=1
else:
  for i in range((len(s)+1)//2):
    if s[i]!=s[len(s)-i]:
      cnt+=1
print(cnt)

Fixed submission:
s = input()
 
cnt = 0
b = int(len(s))
 
for a in range(int(b/2)):
    if s[a] != s[(b-a-1)]:
       cnt = cnt +1
print(cnt)
Buggy python submission (verdict: Runtime Error):
s=input()
l=[SUN,MON,TUE,WED,THU,FRI,SAT]
print(7-l.index(s))

Fixed submission:
s=input()
if s=='SUN':
  print('7')
elif s=='MON':
  print('6')
elif s=='TUE':
  print('5')
elif s=='WED':
  print('4')
elif s=='THU':
  print('3')
elif s=='FRI':
  print('2')
else:
  print('1')
Buggy python submission (verdict: Runtime Error):
r = map(int, input())
print(r**2)

Fixed submission:
r = int(input())
s = 1
for i in range(2):
  s = s * r
print(s)
Buggy python submission (verdict: Runtime Error):
A = int(input())
B = int(input())
if (A - 2 * B) >= 0:
  print (A - 2 * B)
else:
  print('0')

Fixed submission:
a, b=map(int, input().split())
if a-2*b>=0:
  print(a-2*b)
else:
  print(0)

Buggy python submission (verdict: Runtime Error):
if (A - 2 * B) >= 0:
  print (A - 2 * B)
else:
  print('0')

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


Fixed submission:
n=int(input())
s=input()
d=list(s)
cnt=0
for i in range(n-1):
  if s[i] != s[i+1]:
    cnt+=1
print(1+cnt)

Buggy python submission (verdict: Runtime Error):
n=int(input)
s=input()
d=list(s)
cnt=0
for i in range(n-1):
  if s[i] != s[i+1]:
    cnt+=1
  else:
    continue
    
print(cnt+1)



Fixed submission:
n=int(input())
s=input()
d=list(s)
cnt=0
for i in range(n-1):
  if s[i] != s[i+1]:
    cnt+=1
print(1+cnt)

Buggy python submission (verdict: Runtime Error):
n=int(input)
s=input()
d=list(s)
cnt=0
for i in range(n-1):
  if s[i] != s[i+1]:
    cnt+=1
print(cnt+1)




Fixed submission:
n=int(input())
s=input()
d=list(s)
cnt=0
for i in range(n-1):
  if s[i] != s[i+1]:
    cnt+=1
print(1+cnt)

Buggy python submission (verdict: Runtime Error):
n=int(input)
s=input()
cnt=0
for i in range(n-1):
  if s[i] != s[i+1]:
    cnt+=1
print(cnt+1)

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

Fixed submission:
n=int(input())
a=list(map(int, input().split()))
 
ans=[0]*n
for i, a in enumerate(a):
    ans[a-1]=(i+1)
 
print(*ans)
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
c=[i for i in range(1,a+1) if a%i==0]
d=[i for i in range(1,b+1) if b%i==0]
e=[i for i in c if i in d]
for i in range(1,len(e)-1):
    for j in range(i+1,len(e)):
        if e[j]%e[i]==0:
            e[j]=0
            break
e=list(set(e))
print(len(e)-1)

Fixed submission:
import fractions
a,b=map(int,input().split())
g=fractions.gcd(a,b)
ans=1
i=2
while i*i<=g:
    if g%i==0:
        ans+=1
        while g%i==0:
            g//=i
    i+=1
if g>1:
    ans+=1
print(ans)
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split())
b=list(map(int,input().split())
c=list(map(int,input().split())
   
s=0
bb=sum(b)
for i in range(n-1):
       if a[i]+1==a[i+1]:
               s+=c[a[i]-1]
s+=bb
print(s)

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

Fixed submission:
s = input()
t = input()
cnt = 0
for i in range(3):
  if s[i] == t[i]:
  	cnt += 1
print(cnt)

Buggy python submission (verdict: Runtime Error):
s=input()
t=input()
cnt=0
for i in range(3):
  if s[i]==t[i]:
  cnt +=1
print(cnt)

Fixed submission:
s = input()
t = input()
cnt = 0
for i in range(3):
  if s[i] == t[i]:
  	cnt += 1
print(cnt)

Buggy python submission (verdict: Runtime Error):
s=input()
t=input()
cnt=0
for i in range(3)
if s[i]==t[i]:
  cnt +=1
print(cnt)

Fixed submission:
s = input()
t = input()
cnt = 0
for i in range(3):
  if s[i] == t[i]:
  	cnt += 1
print(cnt)

Buggy python submission (verdict: Runtime Error):
s, t=map(input().split())
cnt=0
for i in range(3)
if s[i]==t[i]:
  cnt +=1
print(cnt)

Fixed submission:
s = input()
t = input()
cnt = 0
for i in range(3):
  if s[i] == t[i]:
  	cnt += 1
print(cnt)

Buggy python submission (verdict: Runtime Error):
s, t=map(int, input().split())
cnt=0
for i in range(0, 3)
if s[i]==t[i]:
  cnt +=1
print(cnt)

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

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

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

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

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

Fixed submission:
n=int(input())
h=list(map(int,input().split()))
cnt=0
a=0
for i in range(n-1):
    if h[i]>=h[i+1]:
        a+=1
    else:
        a=0
    cnt=max(cnt,a)
print(cnt)
Buggy python submission (verdict: Runtime Error):
a=int(input())
b=int(input())
if a+b>=a-b and a+b>=a*b:
  print(a+b)
elif a-b>=a+b and a-b>=a*b:
  print(a-b)
else:
  print(a*b)

Fixed submission:
A,B = map(int,input().split())
print(max(A+B,A-B,A*B))

Buggy python submission (verdict: Runtime Error):
a=int(input())
b=int(input())
print(max[a+b, a-b, a*b])

Fixed submission:
A,B = map(int,input().split())
print(max(A+B,A-B,A*B))

Buggy python submission (verdict: Runtime Error):
a, b=map(int, input().split())
print(max[a+b, a-b, a*b])

Fixed submission:
A,B = map(int,input().split())
print(max(A+B,A-B,A*B))
Buggy python submission (verdict: Runtime Error):
n=int(input())
cnt=0
for i in range(1,n+1):
  if len(i)%2==1:
    cnt+=1
print(cnt)

Fixed submission:
n=int(input())
cnt=0
for i in range(1,n+1):
  if len(str(i))%2==1:
    cnt+=1
print(cnt)
Buggy python submission (verdict: Runtime Error):
if A >=13:
  print(B)
elif A >= 6:
  print(B/2)
else:
  print(0)

Fixed submission:
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):
n, m=map(int, input().split())
l, r=list(map(int, input().split()))
l.sort()
r.sort()
if max(l) < min(r):
  print(0)
else:
  print(min(r) - max(l) + 1)

Fixed submission:
n,m=map(int,input().split())
left=0
right=10**5
for i in range(m):
  l,r=map(int,input().split())
  left=max(left,l)
  right=min(right,r)
print(right-left+1 if right-left+1>0 else 0)
Buggy python submission (verdict: Runtime Error):
a, b, t=map(int.input().split())
print(b*(t//a))

Fixed submission:
a, b, t=map(int, input().split())
print(b*(t//a))
Buggy python submission (verdict: Runtime Error):
v = list(map(int, input().split()))
c = list(map(int, input().split()))
n = int(input())
s = 0
for i in range(n):
  if v[i] - c[i] > 0:
    s += v[i] - c[i]
  else:
    continue
print(s)



Fixed submission:
n = int(input())
v = list(map(int, input().split()))
c = list(map(int, input().split()))

s = 0
for i in range(n):
  if v[i] - c[i] >= 0:
    s += v[i] - c[i]
  else:
    continue
print(s)

Buggy python submission (verdict: Runtime Error):
v=list(map(int, input().split()))
c=list(map(int, input().split()))
n=int(input())
s=0
for i in range(n):
  if v[i]-c[i]>0:
    s=s+v[i]-c[i]
  else:
    continue
print(s)

Fixed submission:
n = int(input())
v = list(map(int, input().split()))
c = list(map(int, input().split()))

s = 0
for i in range(n):
  if v[i] - c[i] >= 0:
    s += v[i] - c[i]
  else:
    continue
print(s)

Buggy python submission (verdict: Runtime Error):
v, c=list(map(int, input().split()))
n=int(input())
s=0
for i in range(n):
  if v[i]-c[i]>0:
    s=s+v[i]-c[i]
  else:
    continue
print(s)

Fixed submission:
n = int(input())
v = list(map(int, input().split()))
c = list(map(int, input().split()))

s = 0
for i in range(n):
  if v[i] - c[i] >= 0:
    s += v[i] - c[i]
  else:
    continue
print(s)

Buggy python submission (verdict: Runtime Error):
v, c=list(map(int, input().split()))
n=int(input())
s=0
for i in range(n):
  if v[i]-c[i]>0:
    s=s+v[i]-c[i]
print(s)

Fixed submission:
n = int(input())
v = list(map(int, input().split()))
c = list(map(int, input().split()))

s = 0
for i in range(n):
  if v[i] - c[i] >= 0:
    s += v[i] - c[i]
  else:
    continue
print(s)

Buggy python submission (verdict: Runtime Error):
v, c=list(map(int, input().split()))
n=len(v)
n=len(c)
s=0
for i in range(n):
  if v[i]-c[i]>0:
    s=s+v[i]-c[i]
print(s)

Fixed submission:
n = int(input())
v = list(map(int, input().split()))
c = list(map(int, input().split()))

s = 0
for i in range(n):
  if v[i] - c[i] >= 0:
    s += v[i] - c[i]
  else:
    continue
print(s)
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
for i in range(n-1):
	if -a[i]-a[i+1]>=a[i]+a[i+1]:
      a[i]=-a[i]
      a[i+1]=-a[i+1]
print(sum(a))

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
fu=0
for i in range(n):
    if a[i]<0:
        fu+=1
        a[i]*=-1
if fu%2==0:
    print(sum(a))
else:
    print(sum(a)-2*min(a))
Buggy python submission (verdict: Runtime Error):
s=int(input())
t=s[::2]
u=s[1::2]
a=t.count(0)
b=u.count(0)
if a>=b:
  print(len(t)-a+b)
else:
  print(len(t)-b+a)

Fixed submission:
s=input()
a=s[0]
cnt=0
for i in s[1:]:
    if i==a:
        cnt+=1
        if i=="0":
            a="1"
        else:
            a="0"
    else:
        a=i
print(cnt)
Buggy python submission (verdict: Runtime Error):
h, w, H, W=map(int, input().split())
print(h*W+w*H-w*h)

Fixed submission:
h, w=map(int, input().split())
H, W=map(int, input().split())

print((H-h)*(W-w))
Buggy python submission (verdict: Runtime Error):
a,b,k=map(int,input().split())
l=[]
for i in range(1,min(a,b)):
  if a%i==0 and b%i==0:
    l.append(i)
print(l[len(l)-k])
              

Fixed submission:
a,b,k=map(int,input().split())
l=[]
for i in range(1,min(a,b)+1):
  if a%i==0 and b%i==0:
    l.append(i)
print(l[len(l)-k])

Buggy python submission (verdict: Runtime Error):
a,b,k=map(int,input().split())
l=[]
for i in range(1,a):
  if a%i==0 and b%i==0:
    l.append(i)
print(l[k-1])


Fixed submission:
a,b,k=map(int,input().split())
l=[]
for i in range(1,min(a,b)+1):
  if a%i==0 and b%i==0:
    l.append(i)
print(l[len(l)-k])
Buggy python submission (verdict: Runtime Error):
a, b=int(input())
if b%a==0:
  print(a+b)
else:
  print(b-a)

Fixed submission:
a, b=map(int, input().split())
if b%a==0:
  print(a+b)
else:
  print(b-a)
Buggy python submission (verdict: Runtime Error):
s=input()
a=753
for i in range(len(s)-2):
  a=min(a, abs(753-int(s[i:i+3])))
print(a)

s=input()
like=753
ans=753
for i in range(len(s)-2):
    ans=min(ans,abs(like-int(s[i:i+3])))
print(ans)

Fixed submission:
s=input()
a=753
for i in range(len(s)-2):
  a=min(a, abs(753-int(s[i:i+3])))
print(a)

Buggy python submission (verdict: Runtime Error):
s=input()
for i in range(len(s)-2):
  a=int('s[i]'+'s[i+1]'+'s[i+2]')
print(abs(min(a-753)))

Fixed submission:
s=input()
a=753
for i in range(len(s)-2):
  a=min(a, abs(753-int(s[i:i+3])))
print(a)
Buggy python submission (verdict: Runtime Error):
n=int(input())
t, a=map(int, input().split())
h=[int(i) for i input().split()]
temp=[abs(a-(t-k*0.006)) for k in h]
print(temp.index(min(temp))+1)


Fixed submission:
n=int(input())
t, a=map(int, input().split())
h=list(int(i) for i in input().split())
temp=[abs(a-(t-k*0.006)) for k in h]
print(temp.index(min(temp))+1)

Buggy python submission (verdict: Runtime Error):
n=int(input())
t, a=map(int, input().split())
h=list(int(i) for i input().split())
temp=[abs(a-(t-k*0.006)) for k in h]
print(temp.index(min(temp))+1)




Fixed submission:
n=int(input())
t, a=map(int, input().split())
h=list(int(i) for i in input().split())
temp=[abs(a-(t-k*0.006)) for k in h]
print(temp.index(min(temp))+1)

Buggy python submission (verdict: Runtime Error):
n=int(input())
t, a=map(int, input().split())
h=list(int(i) for i input().split())
temp=[abs(a-(t-k*0.006)) for k in h]
print(temp.index(min(temp))+1)



Fixed submission:
n=int(input())
t, a=map(int, input().split())
h=list(int(i) for i in input().split())
temp=[abs(a-(t-k*0.006)) for k in h]
print(temp.index(min(temp))+1)

Buggy python submission (verdict: Runtime Error):
n=int(input())
t, a=map(int, input().split())
h=list(int(i) for i input().split())
temp=[abs(a-(t-k*0.006)) for k in h]
print(temp.index(min(temp))+1)



Fixed submission:
n=int(input())
t, a=map(int, input().split())
h=list(int(i) for i in input().split())
temp=[abs(a-(t-k*0.006)) for k in h]
print(temp.index(min(temp))+1)

Buggy python submission (verdict: Runtime Error):
n=int(input())
t, a=map(int, input().split())
h=[int(i) for i input.split()]
temp=[abs(a-(t-k*0.006)) for k in h]
print(temp.index(min(temp))+1)



Fixed submission:
n=int(input())
t, a=map(int, input().split())
h=list(int(i) for i in input().split())
temp=[abs(a-(t-k*0.006)) for k in h]
print(temp.index(min(temp))+1)

Buggy python submission (verdict: Runtime Error):
n=int(input())
t, a=map(int, input().split())
h=[int(i) for i input.split()]
temp=[abs(a-(t-k*0.006)) for k in h]
print(temp.index(min(temp))+1)

n = int(input())
t, a = map(int, input().split())
h = [int(i) for i in input().split()]
difference = [abs(a - (t - i * 0.006)) for i in h]
print(difference.index(min(difference)) + 1)

Fixed submission:
n=int(input())
t, a=map(int, input().split())
h=list(int(i) for i in input().split())
temp=[abs(a-(t-k*0.006)) for k in h]
print(temp.index(min(temp))+1)

Buggy python submission (verdict: Runtime Error):
n=int(input())
t, a=map(int, input().split())
h=list(int(i) for i input.split())
temp=[abs(a-(t-(k*0.006))) for k in h]
print(temp.index(min(temp))+1)



Fixed submission:
n=int(input())
t, a=map(int, input().split())
h=list(int(i) for i in input().split())
temp=[abs(a-(t-k*0.006)) for k in h]
print(temp.index(min(temp))+1)
Buggy python submission (verdict: Runtime Error):
n=int(input())
if n==1:
  print('Hello World')
else:
  a, b=map(int, input().split())
  print(a+b)

Fixed submission:
n=int(input())
if n==1:
  print('Hello World')
else:
  a=int(input())
  b=int(input())
  print(a+b)

Buggy python submission (verdict: Runtime Error):
n=int(input())
if n==1:
  print('Hello World')
else:
  a, b=map(inr, input().split())
  print(a+b)

Fixed submission:
n=int(input())
if n==1:
  print('Hello World')
else:
  a=int(input())
  b=int(input())
  print(a+b)
Buggy python submission (verdict: Runtime Error):
k=int(input())
if k%2==0:
  print(n**2/4)
else:
  print((n**2-1)/4)

Fixed submission:
k=int(input())
if k%2==0:
  print(k**2//4)
else:
  print((k**2-1)//4)

Buggy python submission (verdict: Runtime Error):
k=int(input())
if k%2==0:
  print(n**2//4)
else:
  print((n**2-1)//4)

Fixed submission:
k=int(input())
if k%2==0:
  print(k**2//4)
else:
  print((k**2-1)//4)

Buggy python submission (verdict: Runtime Error):
k=int(input())
if k%2==0:
  print((n//2)**2)
else:
  print((n**2-1)//4)

Fixed submission:
k=int(input())
if k%2==0:
  print(k**2//4)
else:
  print((k**2-1)//4)
Buggy python submission (verdict: Runtime Error):
X, L = [int(input()) for i in range(2)]
li = sorted([input() for i in range(X)])
ans = ''

for i in li:
    ans += i

print(ans)

Fixed submission:
X, L = list(map(int,input().split()))
li = sorted([input() for i in range(X)])
ans = ''

for i in li:
    ans += i

print(ans)

Buggy python submission (verdict: Runtime Error):
X, L = [int(input()) for i in range(2)]
li = sorted([input() for i in range(X)])
ans = ''

for i in li:
    ans += i

print(ans)

Fixed submission:
X, L = list(map(int,input().split()))
li = sorted([input() for i in range(X)])
ans = ''

for i in li:
    ans += i

print(ans)
Buggy python submission (verdict: Runtime Error):
"""
出典:https://atcoder.jp/contests/abc005/tasks/abc005_3
"""
def main():
  N = int(input())
  red_l = [list(map(int,input().split())) for _ in range(N)]
  blue_l = [list(map(int,input().split())) for _ in range(N)]
  red_l=sorted(red_l,key=lambda x:-x[1]s)
  blue_l=sorted(blue_l,key=lambda x:x[0])

  count=0
  for r in red_l:
    for b in blue_l:
      if r[0]<b[0] and r[1]<b[1]:
        count +=1
        blue_l.remove(b)
        break
  print(count)

if __name__=="__main__":
  main()

Fixed submission:
"""
出典:https://atcoder.jp/contests/abc005/tasks/abc005_3
"""
def main():
  N = int(input())
  red_l = [list(map(int,input().split())) for _ in range(N)]
  blue_l = [list(map(int,input().split())) for _ in range(N)]
  red_l=sorted(red_l,key=lambda x:-x[1])
  blue_l=sorted(blue_l,key=lambda x:x[0])

  count=0
  for r in red_l:
    for b in blue_l:
      if r[0]<b[0] and r[1]<b[1]:
        count +=1
        blue_l.remove(b)
        break
  print(count)

if __name__=="__main__":
  main()
Buggy python submission (verdict: Runtime Error):
a, b = input().split()
c = int(a+b)
d = math.sqrt(c)
if d%1 == 0:
  print("Yes"):
  else:
    print("No"):

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

Buggy python submission (verdict: Runtime Error):
a, b = map(int, input.split())
if (a*b) % 2:
    print("Odd")
else:
    print("Even")

Fixed submission:
a, b = map(int, input().split())
if (a*b) % 2:
    print("Odd")
else:
    print("Even")
Buggy python submission (verdict: Runtime Error):
a, b = input().split()
c = int(a+b)
d = math.sqrt(c)
if d%1 == 0:
  print("Yes")
else:
  print("No")

Fixed submission:
import math
a, b = input().split()
c = a+b
c = int(c)
d = math.sqrt(c)
if d%1 == 0:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
n = input()
a = list(map(int, input().split()))
# n = 3
# a = [10, 11, 12]
ans =0
product =1
for i in a:
    product = product *i
while product%2 ==0:
        product = product/2
        ans = ans + 1
print(ans)

Fixed submission:
a = input()
a=a.replace("0","" )
print(len(a))
Buggy python submission (verdict: Time Limit Exceeded):
k, s = input().split()
k, s = int(k), int(s)
ans = 0
for x in range(0, k+1):
  for y in range(0, k+1):
    for z in range(0, k+1):
      if x+y+z==s:
        ans += 1
        break
print(ans)

Fixed submission:
k, s = input().split()
k, s = int(k), int(s)
ans = 0
for x in range(0, k+1):
  for y in range(0, k+1):
      if -1<s-x-y<k+1:
        ans += 1
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
k, s = input().split()
k, s = int(k), int(s)
ans = 0
for x in range(0, k+1):
  for y in range(0, k+1):
    for z in range(0, k+1):
      if x+y+z==s:
        ans += 1
        continue
print(ans)

Fixed submission:
k, s = input().split()
k, s = int(k), int(s)
ans = 0
for x in range(0, k+1):
  for y in range(0, k+1):
      if -1<s-x-y<k+1:
        ans += 1
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
k, s = input().split()
k, s = int(k), int(s)
ans = 0
for x in range(0, k+1):
  for y in range(0, k+1):
    for z in range(0, k+1):
      if x+y+z==s:
        ans += 1
print(ans)

Fixed submission:
k, s = input().split()
k, s = int(k), int(s)
ans = 0
for x in range(0, k+1):
  for y in range(0, k+1):
      if -1<s-x-y<k+1:
        ans += 1
print(ans)
Buggy python submission (verdict: Runtime Error):
s = input()
wordList =[ "eraser", "erase","dreamer", "dream"]
ansList = []
def ansFunc(s1, ansList):
    #ansCount = 0
    for w in wordList:
        #print(s1, w)
        if s1.startswith(w):
            s2 = s1.replace(w, "",1)
            if s2 == '':
                print("YES")
                ansList.append(1)
            else:
                ansFunc(s2, ansList)
ansFunc(s, ansList)
if len(ansList) ==0:
    print("NO")

Fixed submission:
s=input().replace("eraser","").replace("erase","").replace("dreamer","").replace("dream","")
if s:
    print("NO")
else:
    print("YES")

Buggy python submission (verdict: Runtime Error):
s = input()
wordList =[ "eraser", "erase","dreamer", "dream"]
ansList = []
def ansFunc(s1, ansList):
    #ansCount = 0
    for w in wordList:
        #print(s1, w)
        if s1.startswith(w):
            s2 = s1.replace(w, "",1)
            if s2 == '':
                print("YES")
                ansList.append(1)
            else:
                ansFunc(s2, ansList)
ansFunc(s, ansList)
if len(ansList) ==0:
    print("NO")

Fixed submission:
s=input().replace("eraser","").replace("erase","").replace("dreamer","").replace("dream","")
if s:
    print("NO")
else:
    print("YES")

Buggy python submission (verdict: Runtime Error):
s = input()
wordList = ['dream', 'dreamer', 'erase', 'eraser']
ansCount = 0
def ansFunc(s1, ansCount):
    for w in wordList:
        #print(s1, w)
        if s1.startswith(w):
            s2 = s1.replace(w, "")
            if s2 == '':
                print("YES")
                ansCount += 1
                return ansCount
            else:
                ansCount = ansFunc(s2, ansCount)
ansCount=ansFunc(s, ansCount)
#print("NO")

Fixed submission:
s=input().replace("eraser","").replace("erase","").replace("dreamer","").replace("dream","")
if s:
    print("NO")
else:
    print("YES")

Buggy python submission (verdict: Runtime Error):
s = input()
wordList = ['dream', 'dreamer', 'erase', 'eraser']
ansCount = 0
def ansFunc(s1):
    for w in wordList:
        if s1.startswith(w):
            s1 = s1.replace(w, "")
            print(s1)
            if s1 == '':
                print("seikou")
                ansCount += 1
            else:
                ansFunc(s1)
ansFlg = ansFunc(s)
if ansFlg != 0:
    print("YES")
else:
    print("NO")

Fixed submission:
s=input().replace("eraser","").replace("erase","").replace("dreamer","").replace("dream","")
if s:
    print("NO")
else:
    print("YES")
Buggy python submission (verdict: Runtime Error):
n,x = (int(x) for x in input().split())
l=list(map(int,input().split()))
k=0
d=0

while d<=x:
   if len(l)<=k:
    break
   else:
    d=d+l[k]
    k=k+1
if d<x:
  print(k+1)
else:print(k)

Fixed submission:
a,b = (int(x) for x in input().split())
if a < b:
  print(0)
else: print(10)