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

if a>=3200:
    output=s
else :
    output="red"

print(output)


Fixed submission:
a=int(input().split()[0])
s=input()

if a>=3200:
    output=s
else :
    output="red"

print(output)
Buggy python submission (verdict: Runtime Error):
N=input()
N=int(N.split()[0])

if 1<=N,N<=9:
    output=N
elif 10<=N,N<=99:
    output=9
elif 100<=N,N<=999:
    output=N-99+9
elif 1000<=N,N<=9999:
    output=900+9
elif 10000<=N,N<=99999:
    output=N-9999+900+9
else:
    output=90000+900+9
print(output)

Fixed submission:
N=input()
N=N.split()
N=int(N[0])

if 1<=N and N<=9:
    output=N
elif 10<=N and N<=99:
    output=9
elif 100<=N and N<=999:
    output=N-99+9
elif 1000<=N and N<=9999:
    output=900+9
elif 10000<=N and N<=99999:
    output=N-9999+900+9
else:
    output=90000+900+9
print(output)

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

if 1<=N,N<=9:
    output=N
elif 10<=N,N<=99:
    output=9
elif 100<=N,N<=999:
    output=N-99+9
elif 1000<=N,N<=9999:
    output=900+9
elif 10000<=N,N<=99999:
    output=N-9999+900+9
else:
    output=90000+900+9
print(output)

Fixed submission:
N=input()
N=N.split()
N=int(N[0])

if 1<=N and N<=9:
    output=N
elif 10<=N and N<=99:
    output=9
elif 100<=N and N<=999:
    output=N-99+9
elif 1000<=N and N<=9999:
    output=900+9
elif 10000<=N and N<=99999:
    output=N-9999+900+9
else:
    output=90000+900+9
print(output)

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

if 1<N,N<9:
    output=N
elif 10<N,N<99:
    output=9
elif 100<N,N<999:
    output=N-100+9
elif 1000<N,N<9999:
    output=909
elif 10000<N,N<99999:
    output=N-10000+900+9
else:
    output=90909
print(output)

Fixed submission:
N=input()
N=N.split()
N=int(N[0])

if 1<=N and N<=9:
    output=N
elif 10<=N and N<=99:
    output=9
elif 100<=N and N<=999:
    output=N-99+9
elif 1000<=N and N<=9999:
    output=900+9
elif 10000<=N and N<=99999:
    output=N-9999+900+9
else:
    output=90000+900+9
print(output)
Buggy python submission (verdict: Runtime Error):
N=input()
p=input()
N=int(N.split()[0])
p=p.split()
p=[int(p) for p in p]
numlist=sorted(p)

if numlist==p:
        output="YES"
else: 
    dist=0    
    for s,t in zip(numlist,p):
        if s!=t:
                dist=dist+1
        else:
#                dist=dist+0
            pass
    if dist=2:
        output="YES"
    else :
        output="NO"        
print(output)

Fixed submission:
N=input()
p=input()
N=int(N.split()[0])
p=p.split()
p=[int(p) for p in p]
numlist=sorted(p)

if numlist==p:
        output="YES"
else: 
    dist=0    
    for s,t in zip(numlist,p):
        if s!=t:
                dist=dist+1
        else:
#                dist=dist+0
            pass
    if dist==2:
        output="YES"
    else :
        output="NO"        
print(output)
Buggy python submission (verdict: Runtime Error):
input_data=input()
N,D=map(int,input_data.split())
X=[] 
for n in range(N) :
    X_data=input() 
    X.append(list(map(int,X_data.split())))

output=0

for i in range(N):
    for j in range(N):
        if i>j:
            dist=0
            for y, z in zip(X[i],X[j]):
                dist=dist+(y-z)**2
            if int(dist**(1/2))==dist**(1/2):
                output=output+1
            else:
                output=output+0
        else: pass
print(output)

Fixed submission:
input_data=input()
input_data=input_data.split()
a=int(input_data[0])
b=int(input_data[1])
c=int(input_data[2])

if a*b<c:
    output=a*b
    
else :
    output=c

print(output)

Buggy python submission (verdict: Runtime Error):
input_data=input()

a=int(input_data[0])
b=int(input_data[2])
c=int(input_data[4])

if a*b<c:
    output=a*b
    
else :
    output=c

print(output)

Fixed submission:
input_data=input()
input_data=input_data.split()
a=int(input_data[0])
b=int(input_data[1])
c=int(input_data[2])

if a*b<c:
    output=a*b
    
else :
    output=c

print(output)
Buggy python submission (verdict: Runtime Error):
n=input()
p=input()

n=int(n[0])
p=p.split()
p=[int(p) for p in p]

output=0
for i in range(n-2):
    if p[i]<p[i+1] and p[i+1]<p[i+2]:
        output=output+1
    elif p[i+2]<p[i+1] and p[i+1]<p[i]:
        output=output+1
    else:
        output=output+0
    
print(output)

Fixed submission:
input_data=input()
 
a=input_data[0]
b=input_data[1]
c=input_data[2]
d=input_data[3]
 
if a==b :
    if c==d and a!=c :
            output="Yes"
    else :
        output="No"
    
else :
        if a==c and b==d :
            output="Yes"
    
        elif a==d and b==c :
            output="Yes"
        
        else :
            output="No"
           
print(output)

Buggy python submission (verdict: Runtime Error):
n=input()
ps=input()

n=int(n[0])
ps=ps.split()
ps=[int(ps) for ps in ps]

output=0
for i in range(n-2):
    if ps[i]<ps[i+1] and ps[i+1]<ps[i+2]:
        output=output+1
    elif ps[i+2]<ps[i+1] and ps[i+1]<ps[i]:
        output=output+1
    else:output=output+0
    
print(output)

Fixed submission:
input_data=input()
 
a=input_data[0]
b=input_data[1]
c=input_data[2]
d=input_data[3]
 
if a==b :
    if c==d and a!=c :
            output="Yes"
    else :
        output="No"
    
else :
        if a==c and b==d :
            output="Yes"
    
        elif a==d and b==c :
            output="Yes"
        
        else :
            output="No"
           
print(output)

Buggy python submission (verdict: Runtime Error):
input_datainput()

a=input_data[0]
b=input_data[1]
c=input_data[2]
d=input_data[3]

if a==b :
    if c==d and a!=c :
            output="yes"
    
else :
        if a==c and b==d :
            output="yes"
    
        elif a==d and b==c :
            output="yes"
        
        else :
            output="no"
        
print(output)

Fixed submission:
input_data=input()
 
a=input_data[0]
b=input_data[1]
c=input_data[2]
d=input_data[3]
 
if a==b :
    if c==d and a!=c :
            output="Yes"
    else :
        output="No"
    
else :
        if a==c and b==d :
            output="Yes"
    
        elif a==d and b==c :
            output="Yes"
        
        else :
            output="No"
           
print(output)
Buggy python submission (verdict: Runtime Error):
n=input()
ps=input()

n=int(n[0])
ps=ps.split()
ps=[int(ps) for ps in ps]

output=0
for i-1 in range(n-2):
    if ps[i-1]<ps[i] and ps[i]<ps[i+1]:
        output=output+1
    elif ps[i+1]<ps[i] and ps[1]<ps[i-1]:
        output=output+1
    else:output=output+0
    
print(output)

Fixed submission:
n=input()
ps=input()

ps=ps.split()
ps=[int(k) for k in ps]

output=0

for m in range(int(n)-2): 
    if ps[m]<ps[m+1] and ps[m+1]<ps[m+2]:
        output=output+1
    elif ps[m]>ps[m+1] and ps[m+1]>ps[m+2]:
        output=output+1
    else:
        output=output+0

print(output)
Buggy python submission (verdict: Runtime Error):
N,X=list(map(int,input().split()))
L=list(map(int,input().split()))
D=0
for i in range(1,N+2):
    D+=L[i-1]
    if D>X:
        break
    else:
        pass
print(i)

Fixed submission:
N,X=list(map(int,input().split()))
L=list(map(int,input().split()))
D=0
i=0
for i in range(1,N+1):
    D+=L[i-1]
    if D>X:
        break       
    elif i==N and D<=X:
        i=N+1
        pass
    else:
        pass
print(i)
Buggy python submission (verdict: Runtime Error):
input_data=input()

P=int(input_data[0])

Q=int(input_data[2])

R=int(input_data[4])

X=max([P,Q,R])

print(P+Q+R-X)



Fixed submission:
input_data=input()

X=input_data.split()

P=int(X[0])

Q=int(X[1])

R=int(X[2])

S=max([P,Q,R])

print(P+Q+R-S)
Buggy python submission (verdict: Runtime Error):
# coding:utf-8

import random
r = random.randrange(1, 69)
s = raw_input(r)  # 获取输入数据字符串S
print s

s = raw_input()


if s == "Sunny":
    print "Cloudy"
elif s == "Cloudy":
    print "Rainy"
elif s == "Rainy":
    print "Sunny"

arr = ["Sunny", "Cloudy", "Rainy"]
n = arr.index(s

Fixed submission:
# coding:utf-8

s = raw_input()  # 获取输入数据字符串S

if s == "Sunny":
    print "Cloudy"
elif s == "Cloudy":
    print "Rainy"
elif s == "Rainy":
    print "Sunny"
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())
 
ans = max([a - 2*b, 0])
 
	
for num in range(100000000):

print(ans)

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

ans = max([a - 2*b, 0])

print(ans)

Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())

ans = max(a - 2*b, 0)

print(ans)


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

ans = max([a - 2*b, 0])

print(ans)

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

Fixed submission:
A, B = map(int, raw_input().split())
if A >= 2 * B:
  print(A - 2 * B)
else:
  print(0)

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

Fixed submission:
A, B = map(int, raw_input().split())
if A >= 2 * B:
  print(A - 2 * B)
else:
  print(0)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
li = list(map(int,input().split()))
ans = 0

for i in range(n):
    for j in range(i + 1, n):
        for k in range(j + 1, n):
            if li[i]<li[j]+li[k] and li[j]<li[k]+li[i] and li[k]<li[i]+li[j]:
                ans += 1

print(ans)

Fixed submission:
from bisect import bisect_right

N = int(input())
L = list(map(int,input().split()))
L.sort()
ans = 0
for i in range(N):
    for j in range(i):
        m = L[i]-L[j]
        k = bisect_right(L,m)
        n = max(0, j-k)
        ans += n

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n, k, q = map(int,input().split())
A = [int(input()) for i in range(q)]
B = [k] * n

for i in A:
    B[i-1] = B[i-1] + 1
    for j in range(n):
        B[j] = B[j] - 1


for k in range(n):
    if B[k] > 0:
        print('Yes')
    else:
        print('No')

Fixed submission:
n, k, q = map(int,input().split())
A = [int(input()) for i in range(q)]
B = [k] * n

for i in A:
    B[i-1] = B[i-1] + 1



for k in range(n):
    if B[k]-q > 0:
        print('Yes')
    else:
        print('No')
Buggy python submission (verdict: Runtime Error):
import itertools
N = input()
S = input()

count = 0

gr = itertools.groupby(S)
for key, group in gr:
    # print(list(group))
    count += 1
print(count)


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

Buggy python submission (verdict: Runtime Error):
a = map(int, input().split())
b = a[0] - 2*a[1]
if b >= 0:
  print(b)
else:
  print(0)


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

Buggy python submission (verdict: Runtime Error):
a = input()
a = a.split()
b = a[0] - 2*a[1]
if b >= 0:
  print(b)
else:
  print(0)

Fixed submission:
a = list(map(int, input().split()))
b = a[0] - 2*a[1]
if b >= 0:
  print(b)
else:
  print(0)
Buggy python submission (verdict: Runtime Error):
import itertools
N = input()
S = input()

count = 0

gr = itertools.groupby(s)
for key, group in gr:
    # print(list(group))
    count += 1
print(count)

Fixed submission:
import itertools
N = input()
S = input()

count = 0

gr = itertools.groupby(S)
for key, group in gr:
    # print(list(group))
    count += 1
print(count)
Buggy python submission (verdict: Runtime Error):
n = int(input())
lst = []

for i in range(n):
  item = int(input())
  lst.append(item)

goods = sorted(lst, reverse=True)
goods[0] = goods[0] // 2

print(sum(goods))


Fixed submission:
d = int(input())
eve  = 25 - d

print("Christmas" + " Eve" * eve)

Buggy python submission (verdict: Runtime Error):
n = int(input())
lst = []

for i in range(n):
  item = int(input())
  goods.append(item)

goods = sorted(lst, reverse=True)
goods[0] = goods[0] // 2

print(sum(goods))


Fixed submission:
d = int(input())
eve  = 25 - d

print("Christmas" + " Eve" * eve)

Buggy python submission (verdict: Runtime Error):
d = int(input())

print("Christmas" + " Eve" * (abs(25-d))

Fixed submission:
d = int(input())
eve  = 25 - d

print("Christmas" + " Eve" * eve)
Buggy python submission (verdict: Runtime Error):
n = int(input())
lst = []

for i in range(n):
  item = int(input())
  goods.append(item)

goods = sorted(lst, reverse=True)
goods[0] = goods[0] // 2

print(sum(goods))


Fixed submission:
n = int(input())
lst = []

for i in range(n):
  item = int(input())
  lst.append(item)

goods = sorted(lst, reverse=True)
goods[0] = goods[0] // 2

print(sum(goods))

Buggy python submission (verdict: Runtime Error):
n = int(input())
lst = []

for item in range(n):
  goods.append(item)

goods = sorted(lst, reverse=True)
goods[0] = goods[0] // 2

print(sum(goods))

Fixed submission:
n = int(input())
lst = []

for i in range(n):
  item = int(input())
  lst.append(item)

goods = sorted(lst, reverse=True)
goods[0] = goods[0] // 2

print(sum(goods))
Buggy python submission (verdict: Runtime Error):
n, k = map(int, input())

tree = [int(input()) for i in range(n)]
tree.sort()

res = (tree[i+k-1] - tree[i] for i in range(n-k+1))
print(min(res))

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

tree = [int(input()) for i in range(n)]
tree.sort()

res = (tree[i+k-1] - tree[i] for i in range(n-k+1))
print(min(res))

Buggy python submission (verdict: Runtime Error):
n, k = map(int, input())

tree = [int(input()) for i in range(n)]
tree.sort()

res = (tree(i+k-1) - tree(i) for i in range(n-k+1))
print(min(res))

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

tree = [int(input()) for i in range(n)]
tree.sort()

res = (tree[i+k-1] - tree[i] for i in range(n-k+1))
print(min(res))

Buggy python submission (verdict: Runtime Error):
n, k = map(int, input())

tree = [int(input()) for i in range(n)]
tree.sort()

res = (tree(i+k-1) - tree(i) for i range(n-k+1))
print(min(res))

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

tree = [int(input()) for i in range(n)]
tree.sort()

res = (tree[i+k-1] - tree[i] for i in range(n-k+1))
print(min(res))

Buggy python submission (verdict: Runtime Error):
n, k = map(int, input())

tree = [int(input()) for i in range(n)]
tree.sort()

res = (tree(i+k-1) - tree(i) for i range(n-k+11)
print(min(res))

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

tree = [int(input()) for i in range(n)]
tree.sort()

res = (tree[i+k-1] - tree[i] for i in range(n-k+1))
print(min(res))
Buggy python submission (verdict: Runtime Error):
S = input()
print(min((abs(753 - int(S[i:i+3])) for i in range(len(S)-2))))


Fixed submission:
x = int(input())

if x in (7, 5, 3):
  print("YES")
else:
  print("NO")
Buggy python submission (verdict: Runtime Error):
S = input()
print(min((abs(765 - int(S[i:i+2])) for i in range(S-2))))


Fixed submission:
S = input()
print(min((abs(753 - int(S[i:i+3])) for i in range(len(S)-2))))
Buggy python submission (verdict: Runtime Error):
N, A, B = map(int, input().split())
res = 0
for i in range(N+1):
    sum_of_digit(i)
    if A <= sum(map(int, (list(str(i))))) <= B:
        res += i
print(res)


Fixed submission:
N, A, B = map(int, input().split())
res = 0
for i in range(N+1):
    if A <= sum(map(int, (list(str(i))))) <= B:
        res += i
print(res)
Buggy python submission (verdict: Runtime Error):
def divide_count(n):
    cnt = 0
    while n % 2 == 0:
        n /= 2
        cnt += 1
    return cnt

n = int(input())
a = list(map(int, input().split()))
print(min(map(divide_count, a)))


Fixed submission:
if __name__ == '__main__':

    s = input()
    target = '1'
    count = 0

    for i in s:
        if i == target:
            count = count + 1

    print(count)
Buggy python submission (verdict: Runtime Error):
s = input()[::-1]
while True:
    end_flg = False
    if s[:5] == "maerd":
        s = s.replace("maerd", "", 1)
        end_flg = True
        print(s)
    elif s[:5] == "esare":
        s = s.replace("esare", "", 1)
        end_flg = True
    elif s[:7] == "remaerd":
        s = s.replace("remaerd", "", 1)
        end_flg = True
    elif s[:6] == "resare":
        s = s.replace("resare", "", 1)
        end_flg = True    

    if end_flg == False:
        break
        
if s == "":
    print("YES")
else:
    print("NO")

Fixed submission:
s = input()[::-1]
while True:
    end_flg = False
    if s[:5] == "maerd":
        s = s.replace("maerd", "", 1)
        end_flg = True
    elif s[:5] == "esare":
        s = s.replace("esare", "", 1)
        end_flg = True
    elif s[:7] == "remaerd":
        s = s.replace("remaerd", "", 1)
        end_flg = True
    elif s[:6] == "resare":
        s = s.replace("resare", "", 1)
        end_flg = True    

    if end_flg == False:
        break
        
if s == "":
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
s = input()[::-1]
s = s.replace("maerd", "", 1)

while True:
    end_flg = False
    if s[:5] == "maerd":
        s = s.replace("maerd", "", 1)
        end_flg = True
        print(s)
    elif s[:5] == "esare":
        s = s.replace("esare", "", 1)
        end_flg = True
    elif s[:7] == "remaerd":
        s = s.replace("remaerd", "", 1)
        end_flg = True
    elif s[:6] == "resare":
        s = s.replace("resare", "", 1)
        end_flg = True    

    if end_flg == False:
        break
        
if s == "":
    print("YES")
else:
    print("NO")

Fixed submission:
s = input()[::-1]
while True:
    end_flg = False
    if s[:5] == "maerd":
        s = s.replace("maerd", "", 1)
        end_flg = True
    elif s[:5] == "esare":
        s = s.replace("esare", "", 1)
        end_flg = True
    elif s[:7] == "remaerd":
        s = s.replace("remaerd", "", 1)
        end_flg = True
    elif s[:6] == "resare":
        s = s.replace("resare", "", 1)
        end_flg = True    

    if end_flg == False:
        break
        
if s == "":
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())
if (a*b) % 2 ==0:
    print(Even)
else:
    print(Odd)

Fixed submission:
a, b = map(int, input().split())
if (a*b) % 2 ==0:
    print("Even")
else:
    print("Odd")
Buggy python submission (verdict: Runtime Error):
print(input()[0:3]+'8'+input()[4:])

Fixed submission:
print('2018'+input()[4:])

Buggy python submission (verdict: Runtime Error):
print(input()[0:3]+'8'+input()[5:])

Fixed submission:
print('2018'+input()[4:])

Buggy python submission (verdict: Runtime Error):
n = input()
n[4] = '8'
print(n)

Fixed submission:
print('2018'+input()[4:])

Buggy python submission (verdict: Runtime Error):
n = input()
n[4] = 8
print(n)

Fixed submission:
print('2018'+input()[4:])

Buggy python submission (verdict: Runtime Error):
n = input()
n[0:4] = '2018'
print(n)

Fixed submission:
print('2018'+input()[4:])
Buggy python submission (verdict: Runtime Error):
a, b = input().split()
print(min(0, a - b * 2))

Fixed submission:
a, b = input().split()
print(max(0, int(a) - int(b) * 2))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
l = [int(li) for li in input().split()]

ret = 0
clc = {}

for i in range(0, n - 2):
  for j in range(i + 1, n - 1):
    for k in range(j + 1, n):

      key = tuple(sorted((l[i], l[j], l[k])))

      if not key in clc.keys():
        clc[key] = (key[0] < key[1] + key[2]) and \
                   (key[2] < key[0] + key[1]) and \
                   (key[1] < key[2] + key[0])

      ret += clc[key]

print(ret)


Fixed submission:
# a - b < c
# b - a < c
# a + b > c

import bisect

n = int(input())

l = sorted([int(li) for li in input().split()])
#print(l)

ret = 0

for i in reversed(range(0, n)):
  for j in reversed(range(0, i)):
    k = bisect.bisect_left(l, l[i] + l[j])
    k = n - k
    ret += (n - 1 - i) - k

print(ret)
Buggy python submission (verdict: Runtime Error):
N, K = map(int, raw_input())
hs = list(map(int, raw_input().split()))
print sum(1 for h in hs if h >= K)


Fixed submission:
N, K = map(int, raw_input().split())
hs = map(int, raw_input().split())
print sum(1 for h in hs if h >= K)
Buggy python submission (verdict: Runtime Error):
import math

A,B=map(int,input().split(' '))

answer=0

if A-2B<=0:
    answer=0
else :
    answer=A-2B

print(answer)
     

Fixed submission:
import math

A,B=map(int,input().split(' '))

answer=0

if A-2*B<=0:
    answer=0
else :
    answer=A-2*B

print(answer)
Buggy python submission (verdict: Runtime Error):
str1=input().split(' ')
N=int(str1[0])
K=int(str1[1])
str2=input().split(' ')
h=[]
result=0
for i in range(str2_len):
	h[i]=int(str[i])

for i in range(h_len):
	if h[i]>=K:
		result+=1

print(result)

Fixed submission:
import numpy

str1=input().split(' ')
N=int(str1[0])
K=int(str1[1])
str2=input().split(' ')
h=[0]*N
result=0
for i in range(N):
	h[i]=int(str2[i])

for i in range(N):
	if h[i]>=K:
		result+=1

print(result)
Buggy python submission (verdict: Runtime Error):
N = int(input())
num = list(map(str, input().split()))
num.sort(reverse=True)
print(sum(num[0::2])-sum(num[1::2]))


Fixed submission:
N = int(input())
num = list(map(int, input().split()))
num.sort(reverse=True)
print(sum(num[0::2])-sum(num[1::2]))

Buggy python submission (verdict: Runtime Error):
N = int(input())
num = list(map(str, input().split()))
num.sort(reverse=True)
print(sum(num[::2])-sum(num[1::2]))


Fixed submission:
N = int(input())
num = list(map(int, input().split()))
num.sort(reverse=True)
print(sum(num[0::2])-sum(num[1::2]))
Buggy python submission (verdict: Runtime Error):
N, A, B = map(int, input().split())
num
for i in range(N+1):
  if A <= sum(list(map(int, list(str(i))))) <= B:
    num += i
print(num)    


Fixed submission:
N, A, B = map(int, input().split())
num = 0
for i in range(N+1):
  if A <= sum(list(map(int, list(str(i))))) <= B:
    num += i
print(num)
Buggy python submission (verdict: Time Limit Exceeded):
s = input()
while len(s) >= 4:
  s.replace("eraser", "")
  s.replace("erase", "")
  s.replace("dreamer", "")
  s.replace("dream", "")
  if len(s) == 0:
    print('YES')
    exit()
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()
while len(s) >= 4:
  s.replace("eraser", "")
  s.replace("erase", "")
  s.replace("dreamer", "")
  s.replace("dream", "")
  if len(s) == 0:
    print('YES')
    return
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()
while len(s) <= 4:
  s.replace("eraser", "")
  s.replace("erase", "")
  s.replace("dreamer", "")
  s.replace("dream", "")
  if len(s) == 0:
    print('YES')
    return
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):
a = int(input())
b = input.split()
b = [int(elem) for elem in b]
sumation = 0
for i, elem in enumerate(b):
	for j, elem2 in enumerate(b[i:]):
      sumation += elem * elem2
print('{}'.format(sumation)

Fixed submission:
a = int(input())
b = input().split()
b = [int(elem) for elem in b]
total = 0
for i in range(len(b)-1):
  for j in range(i+1, len(b)):
    total += b[i] * b[j]
print('{}'.format(total))
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())
if a * b % 2 = 0:
  print('Even')
else:
  print('Odd')

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

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

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

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

Fixed submission:
a,b=map(int,input().split())
if a*b % 2 == 0:
  print('Even')
else:
  print('Odd')
Buggy python submission (verdict: Runtime Error):
res = A - 2 * B
if res <= 0: res = 0
print(res)

Fixed submission:
A, B = map(int, input().split())
res = A - 2*B
if res < 0: res = 0
print(res)