Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
A ,P = int(input()).split()

P = P + 3 * A
k = P//2
print(k)


Fixed submission:
A, P =map(int, input().split())
pie = (A * 3 + P)//2
print(pie)

Buggy python submission (verdict: Runtime Error):
A = int(input('A'))
P = int(input('P'))

P = P + 3 * A
k = P//2
print(k)


Fixed submission:
A, P =map(int, input().split())
pie = (A * 3 + P)//2
print(pie)
Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
S = input()
S[K - 1] = S[k - 1].lower()
print(S)

Fixed submission:
N, K=map(int, input().split())
S= input()
T=''
for i in range (N):
    if i ==K-1:
        T += S[i].lower()
    else:
        T += S[i]
print(T)
Buggy python submission (verdict: Runtime Error):
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
f=int(input())
if e - a > k :
    print(':(')
else :
    print('Yey!')


Fixed submission:

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if e-a > k:
  print(":(")
else:
  print("Yay!")

Buggy python submission (verdict: Runtime Error):
a, b, c, d, e, k= map(int, input().split())
if e - a > k:
    print(':(')
else:
    print('Yey!')

Fixed submission:

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if e-a > k:
  print(":(")
else:
  print("Yay!")
Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
print(max(a+b,a-b,a*b))

Fixed submission:
a,b = [int(x) for x in input().split()]
print(max(a+b,a-b,a*b))
Buggy python submission (verdict: Runtime Error):
print(input()*input()/2)

Fixed submission:
a,b,c = map(int, input().split())
print(a*b//2)
Buggy python submission (verdict: Runtime Error):
a =str(input()).split(" ")
h = int(a[0])
w = int(a[1])
maps= []

for i in range(h):
    maps.append(list(input()))
   
for i in range(h - 1 ):
    for j in range(w:
        if maps[i][j] == "#":
            if j - 1 > 0 and maps[i][j - 1] == "#":
                continue
            elif j + 1 < w and maps[i][j + 1] == "#" :
                continue
            elif i + 1 < h and maps[i + 1][j] == "#" :
                continue
            elif i - 1 > 0 and maps[i - 1][j] == "#":
                continue
            else:
                print("No")
                exit()
        else:
            pass
print("Yes")

Fixed submission:
a =str(input()).split(" ")
h = int(a[0])
w = int(a[1])
maps= []

for i in range(h):
    maps.append(list(input()))

for i in range(h):
    for j in range(w):
        if maps[i][j] == "#":
            if j - 1 >= 0 and maps[i][j - 1] == "#":
                continue
            elif j + 1 < w and maps[i][j + 1] == "#" :
                continue
            elif i + 1 < h and maps[i + 1][j] == "#" :
                continue
            elif i - 1 >= 0 and maps[i - 1][j] == "#":
                continue
            else:
                print("No")
                exit()
        else:
            pass
print("Yes")

Buggy python submission (verdict: Runtime Error):
a =str(input()).split(" ")
h = int(a[0])
w = int(a[1])
maps= []

for i in range(h):
    maps.append(list(input()))
   
for i in range(h-1):
    for j in range(w):
        if maps[i][j] == "#":
            if maps[i][j - 1] == "#" and j - 1 > 0:
                continue
            elif maps[i][j + 1] == "#" and j + 1 < w:
                continue
            elif maps[i + 1][j] == "#" and i + 1 < h:
                continue
            elif maps[i - 1][j] == "#" and i - 1 > 0:
                continue
            else:
                print("No")
                exit()
        else:
            pass

print("Yes")


Fixed submission:
a =str(input()).split(" ")
h = int(a[0])
w = int(a[1])
maps= []

for i in range(h):
    maps.append(list(input()))

for i in range(h):
    for j in range(w):
        if maps[i][j] == "#":
            if j - 1 >= 0 and maps[i][j - 1] == "#":
                continue
            elif j + 1 < w and maps[i][j + 1] == "#" :
                continue
            elif i + 1 < h and maps[i + 1][j] == "#" :
                continue
            elif i - 1 >= 0 and maps[i - 1][j] == "#":
                continue
            else:
                print("No")
                exit()
        else:
            pass
print("Yes")
Buggy python submission (verdict: Runtime Error):
a,b,c,x,y = map(int, input().split())
only = a * x + b * y 
ans = only
for i in range(1,x + 1):
    current = 0
    current = c * i * 2
    if y - i >= 0:
        current = current + a * ( x - i ) + b * (y - i)
    else:
        current = current + a * ( x - i )
    if ans > current:
        ans = currents
for i in range(1,y + 1):
    current = 0
    current = c * i * 2
    if x - i >= 0:
        current = current + a * ( x - i ) + b * ( y - i )
    else:
        current = current + b * ( y - i )
    if ans > current:
        ans = current
print(ans)

Fixed submission:
a,b,c,x,y = map(int, input().split())
only = a * x + b * y 
ans = only
for i in range(1,x + 1):
    current = 0
    current = c * i * 2
    if y - i >= 0:
        current = current + a * ( x - i ) + b * (y - i)
    else:
        current = current + a * ( x - i )
    if ans > current:
        ans = current
for i in range(1,y + 1):
    current = 0
    current = c * i * 2
    if x - i >= 0:
        current = current + a * ( x - i ) + b * ( y - i )
    else:
        current = current + b * ( y - i )
    if ans > current:
        ans = current
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = str(input())

dp = [[0] * (n+1) for _ in range(n+1)]
ans = 0

for i in range(n):
    for j in range(i,n):
        if s[i] == s[j]:
            dp[i+1][j+1] = dp[i][j] + 1
            ans = max(ans, min(j-i, dp[i+1][j+1]))

print(ans)


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

dp = [[0] * (n+1) for _ in range(n+1)]
ans = 0

for i in range(n):
    for j in range(i,n):
        if s[i] == s[j]:
            dp[i+1][j+1] = dp[i][j] + 1
            ans = max(ans, min(j-i, dp[i+1][j+1]))

print(ans)
Buggy python submission (verdict: Runtime Error):
N, K, Q = [int(x) for x in input().split(' ')]
points = [0 for x in range(N)]

for q in range(Q):
  index = int(input())-1
  points[index] += 1

for n in range(N):
  print('Yes' if (Q-points[n]) < K else 'No')

Fixed submission:
d = {'Sunny':1, 'Cloudy':2, 'Rainy':0}
l = ['Sunny', 'Cloudy', 'Rainy']

input_s = input()

output_s = l[d[input_s]]

print(output_s)
Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np

N, M = [int(x) for x in input().split(' ')]

price = [int(x) for x in input().split(' ')]
  
for m in range(M):
  index = np.argmax(price)
  price[index] = price[index]/2.

price = [int(x) for x in price]
print(sum(price))

Fixed submission:
from heapq import heappush, heappop
import numpy as np

N, M = [int(x) for x in input().split()]

price = [int(x) for x in input().split()] 
hq_price = []
for p in price:
  heappush(hq_price, -p)

for m in range(M):
  max_tmp = heappop(hq_price)
  heappush(hq_price, max_tmp/2.)

price = [int(-x) for x in hq_price]
print(sum(price))
Buggy python submission (verdict: Runtime Error):
N = int(input(N))
print(N**3)

Fixed submission:
N = int(input())
print(N**3)
Buggy python submission (verdict: Runtime Error):
forecast = input()
actual = input()
count = 0

for i in range(len(forecast)):
  if forcast[i] == actual[i]:
    count += 1
print(count)

Fixed submission:
forecast = input()
actual = input()
count = 0
 
for i in range(len(forecast)):
  if forecast[i] == actual[i]:
    count += 1
print(count)

Buggy python submission (verdict: Runtime Error):
forecast = input()
actual = input()
count = 0

for i in range(len(forecast)):
  if forcast[i] = actual[i]:
    count += 1
print(count)

Fixed submission:
forecast = input()
actual = input()
count = 0
 
for i in range(len(forecast)):
  if forecast[i] == actual[i]:
    count += 1
print(count)
Buggy python submission (verdict: Runtime Error):
cap, current, rem = input.split()
cap, current, rem = int(cap), int(current), int(rem)

while current < cap and rem > 0:
  current += 1
  rem -= 1
print(rem)

Fixed submission:
cap, current, rem = input().split()
cap, current, rem = int(cap), int(current), int(rem)
 
while current < cap and rem > 0:
  current += 1
  rem -= 1
print(rem)
Buggy python submission (verdict: Runtime Error):
length, width = int(input()).split()
x, y = int(input()).split()

print((length-x) * (width-y))

Fixed submission:
length, width = input().split()
length, width = int(length),int(width)
x, y = input().split()
x,y = int(x),int(y)
 
print((length-x) * (width-y))
Buggy python submission (verdict: Runtime Error):
s=input()

i=0
flug=0
for x in range(1,len(s)+1):
    if(x%2==1):
        if(s[x] =='L'):
            flug=1
            break
    else:
        if(s[x] =='R'):
            flug=1
            break

if(flug==1):
    print("No")
else:
    print("Yes")

Fixed submission:
s=input()

i=0
flug=0
for x in range(1,len(s)+1):
    if(x%2==1):
        if(s[x-1] =='L'):
            flug=1
            break
    else:
        if(s[x-1] =='R'):
            flug=1
            break

if(flug==1):
    print("No")
else:
    print("Yes")
Buggy python submission (verdict: Runtime Error):
N,K,Q = list(map(int, input().split()))

a=[]
nScore=[]
for x in range(Q):
    a.append(input())

for x in range(N):
    nScore.append(K)

for x in range(Q):
    ＃print("----Scores-----")
    
    for y in range(N)#
        if(y+1 !=int(a[x])):
            nScore[y]-=1
            #print("{}: {}".format(y,str(nScore[y])))
        else:
            #print("{}: {} Scored".format(y,str(nScore[y])))

for x in range(N):
    if(nScore[x]<=0):
        print("No")
    else:
        print("Yes")




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



a=[]
nScore=[]

for x in range(N):
    nScore.append(0)

for x in range(Q):
    nScore[int(input())-1]+=1

# if(K>Q):
#     for x in range(N):
#         print("Yes")

for x in range(N):
    if K-Q+nScore[x]>0:
        print("Yes")
    else:
        print("No")
Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np

N,M = list(map(int, input().split()))


a=list(map(int, input().split()))

npA = np.array([])
for x in a:
    npA=np.append(npA, x)

# for x in range(N):
#     print(a[x])
for x in range(M):
    a[np.argmax(a)] //= 2

total = 0
for x in range(N):
    total+=a[x]

print(total)




Fixed submission:
import math
import heapq
N,M = list(map(int, input().split()))
a=list(map(int, input().split()))

npA = []
for x in a:
    heapq.heappush(npA, -x)

# for x in range(N):
#     print(a[x])
npA.sort()


for x in range(M):
    # temp=heapq.heappop(npA)
    # print("{}//2={}".format(temp,math.ceil(temp/2)))
    heapq.heappush(npA, math.ceil(heapq.heappop(npA)/2))#get the max value!!
    

total = 0
for x in range(N):
    # temp = heapq.heappop(npA)
    # print(temp)
    total+=heapq.heappop(npA)

print(-total)

Buggy python submission (verdict: Time Limit Exceeded):
N,M = list(map(int, input().split()))

a=list(map(int, input().split()))

for x in range(M):
    a[a.index(max(a))] //= 2

total = 0
for x in range(N):
    total+=a[x]

print(total)




Fixed submission:
import math
import heapq
N,M = list(map(int, input().split()))
a=list(map(int, input().split()))

npA = []
for x in a:
    heapq.heappush(npA, -x)

# for x in range(N):
#     print(a[x])
npA.sort()


for x in range(M):
    # temp=heapq.heappop(npA)
    # print("{}//2={}".format(temp,math.ceil(temp/2)))
    heapq.heappush(npA, math.ceil(heapq.heappop(npA)/2))#get the max value!!
    

total = 0
for x in range(N):
    # temp = heapq.heappop(npA)
    # print(temp)
    total+=heapq.heappop(npA)

print(-total)

Buggy python submission (verdict: Time Limit Exceeded):
N,M = list(map(int, input().split()))

a=list(map(int, input().split()))
use=list(range(N))
# for x in range(N):
#     print(l[x])

for x in range(M):
    use[a.index(max(a))]+=1
    a[a.index(max(a))] //= 2

total = 0
for x in range(N):
    total+=a[x]

print(total)




Fixed submission:
import math
import heapq
N,M = list(map(int, input().split()))
a=list(map(int, input().split()))

npA = []
for x in a:
    heapq.heappush(npA, -x)

# for x in range(N):
#     print(a[x])
npA.sort()


for x in range(M):
    # temp=heapq.heappop(npA)
    # print("{}//2={}".format(temp,math.ceil(temp/2)))
    heapq.heappush(npA, math.ceil(heapq.heappop(npA)/2))#get the max value!!
    

total = 0
for x in range(N):
    # temp = heapq.heappop(npA)
    # print(temp)
    total+=heapq.heappop(npA)

print(-total)
Buggy python submission (verdict: Runtime Error):
i=True
while i:
  
  N,K=map(int,input().split())
  
  if N > K:
  
  	wide = N - K
  
  elif N = K:
    
    wide = 0
    
  else:
    
    wide = 1
    
print(wide)

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

if N > K and K !=1:
	wide = N - K
elif N == K or K==1:
  	wide = 0
else:
    wide = 0
    
print(wide)

Buggy python submission (verdict: Runtime Error):
i=True

while i:
  
  N,K=map(int,input().split())
  
  if N > K:
  
  	wide = N - K
  
  elif N = K:
    
    wide = 0
    
  else:
    
    wide = 1
    
  print(wide)

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

if N > K and K !=1:
	wide = N - K
elif N == K or K==1:
  	wide = 0
else:
    wide = 0
    
print(wide)

Buggy python submission (verdict: Runtime Error):
N,K=map(int,input().split())

if N > K:
  
  wide = N - K
  
elif N = K:
  
  wide = 0
  
else:
  wide = 1
  
print(wide)

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

if N > K and K !=1:
	wide = N - K
elif N == K or K==1:
  	wide = 0
else:
    wide = 0
    
print(wide)
Buggy python submission (verdict: Time Limit Exceeded):
N, K, Q = map(int, input().split())

A = [K] * N
answer_list = []

for q in range(Q):
    answer_list.append(int(input()))

for answer in answer_list:
    for n in range(N):
        if n != answer - 1:
            A[n] -= 1

for n in range(N):
    if A[n] > 0:
        print("Yes")
    else:
        print("No")

Fixed submission:
import collections

N, K, Q = map(int, input().split())

if K > Q:
    for n in range(N):
        print("Yes")
else:
    A = [K] * N
    answer_list = []

    for q in range(Q):
        answer_list.append(int(input()))

    answer_list_counts = collections.Counter(answer_list)

    is_clear = [False] * N
    for key in answer_list_counts:
        if K > Q - answer_list_counts[key]:
            is_clear[key - 1] = True


    for n in range(N):
        if is_clear[n]:
            print("Yes")
        else:
            print("No")

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

Fixed submission:
n,k,q = map(int,input().split())
a = {i: 0 for i in range(1,n+1)}
points = []

for i in range(1,q+1):
    x = int(input())
    if x in a:
        a[x] += 1
    else: 
        a[x] = 1

tot = sum(a.values())
tot = -tot

for i in range(1,n+1):
    if tot + a[i] + k > 0:
        print('Yes')
    else:
        print('No')
Buggy python submission (verdict: Time Limit Exceeded):
s=input()
i,b=0,0
while i<len(s):
  if (((s[i]=='R') & (i%2==0))|((s[i]=='L') & (i%2==1))):
    b=1
if(b):
  print('NO')
else:
  print('YES')
  

Fixed submission:
s=input()
i,b=0,0
while i<len(s):
	if (((s[i]=='R') & (i%2==1))|((s[i]=='L') & (i%2==0))):
		b=1
		break
	i+=1
if(b):
	print('No')
else:
	print('Yes')
Buggy python submission (verdict: Time Limit Exceeded):
n=input()
s=input()
best=0
for i in range(len(s)):
	for j in range(i):
		act=0
		while(s[i+act]==s[j+act]):
			act+=1
			if((j+act>=i)|(i+act>=len(s))):
				break
		if(act>best):
			best=act
		j+=1
	i+=1
print(best)

Fixed submission:
n=int(input());s=input()
ans=i=j=0
while j<n:
  t=s[i:j]
  if t in s[j:]:
    ans=max(ans,j-i)
    j+=1
  else:
    i+=1
print(ans)
Buggy python submission (verdict: Runtime Error):
s = input()
if s == 'Sunny':
  print('Cloudy')
elif s == 'Cloudy':
  print('Rainy')
elif s == 'Rainy'
  print('Sunny')

Fixed submission:
s = input()
if s == 'Sunny':
  print('Cloudy')
elif s == 'Cloudy':
  print('Rainy')
elif s == 'Rainy':
  print('Sunny')

Buggy python submission (verdict: Runtime Error):
def getweather(s):
  if s == 'Sunny':
    return 'Cloudy'
  elif s == 'Cloudy':
    return 'Rainy'
  elif s == 'Rainy'
    return 'Sunny'

s = input()
getweather(s)

Fixed submission:
s = input()
if s == 'Sunny':
  print('Cloudy')
elif s == 'Cloudy':
  print('Rainy')
elif s == 'Rainy':
  print('Sunny')
Buggy python submission (verdict: Runtime Error):
A,X =map(int,input().split())
if X < A :
  print(0)
elif:
  print(10)

Fixed submission:
X,A =map(int,input().split())
if X < A:
  print(0)
else:
  print(10)
Buggy python submission (verdict: Runtime Error):
A =input()
A =int( A )
P =input()
P =int( P )

X = ( A * 3 + P ) // 2 
print( X )

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



a=((P + A * 3) / 2)
print(int(a))

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

X = ( A * 3 + P ) // 2 
print ( X )

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



a=((P + A * 3) / 2)
print(int(a))

Buggy python submission (verdict: Runtime Error):
A = input()
A =int(A)
P = input()
P =int(P)
X = (A * 3 + P) // 2 
print(X)

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



a=((P + A * 3) / 2)
print(int(a))

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

print ( (A * 3 + P) // 2 )

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



a=((P + A * 3) / 2)
print(int(a))

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

X = (A * 3 + P) // 2 
print(X)

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



a=((P + A * 3) / 2)
print(int(a))

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

P = input()
P =int(P)

X = (A * 3 + P) // 2 
print(X)

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



a=((P + A * 3) / 2)
print(int(a))

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

P = input()
P =int(P)

X = (A * 3 + P) // 2 
print(X)

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



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

if a == 7 or a == 5 or a == 3:
  print(YES)
else:
  print(NO)

Fixed submission:
a =input()
a =int(a)

if a == 7 or a == 5 or a == 3:
  print('YES')
else:
  print('NO')

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

if a = 7 or a = 5 or a = 3:
  print(YES)
else:
  print(NO)

Fixed submission:
a =input()
a =int(a)

if a == 7 or a == 5 or a == 3:
  print('YES')
else:
  print('NO')
Buggy python submission (verdict: Runtime Error):
import math

a,b,c,d = input().split(' ')

a = int(a)
b = int(b)
c = int(c)
d = int(d)

hoge = (c * d) // math.gcd(c, d)

counter = 0

counter = counter + ((b // c) + (b // d) - (b // hoge))
counter = counter - (((a - 1) // c) + ((a - 1) // d) - ((a - 1) // hoge))

print(b - a + 1 - counter)


Fixed submission:
# 最大公約数
def gcd(a, b):
    while b != 0:
        a, b = b, a % b
    return a


# 最小公倍数
def lcm(a, b):
    return a * b // gcd(a, b)

a,b,c,d = input().split(' ')

a = int(a)
b = int(b)
c = int(c)
d = int(d)

hoge = lcm(c,d)

counter = 0

counter = counter + ((b // c) + (b // d) - (b // hoge))
counter = counter - (((a - 1) // c) + ((a - 1) // d) - ((a - 1) // hoge))

print(b - a + 1 - counter)

Buggy python submission (verdict: Runtime Error):
import math

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

a,b,c,d = input().split(' ')

a = int(a)
b = int(b)
c = int(c)
d = int(d)

saisyo_kobaisu = lcm(c, d)

counter = 0

counter = counter + ((b // c) + (b // d) - (b // saisyo_kobaisu))
counter = counter - (((a - 1) // c) + ((a - 1) // d) - ((a - 1) // saisyo_kobaisu))

print(b - a + 1 - counter)


Fixed submission:
# 最大公約数
def gcd(a, b):
    while b != 0:
        a, b = b, a % b
    return a


# 最小公倍数
def lcm(a, b):
    return a * b // gcd(a, b)

a,b,c,d = input().split(' ')

a = int(a)
b = int(b)
c = int(c)
d = int(d)

hoge = lcm(c,d)

counter = 0

counter = counter + ((b // c) + (b // d) - (b // hoge))
counter = counter - (((a - 1) // c) + ((a - 1) // d) - ((a - 1) // hoge))

print(b - a + 1 - counter)

Buggy python submission (verdict: Time Limit Exceeded):
a,b,c,d = input().split(' ')
a = int(a)
b = int(b)
c = int(c)
d = int(d)

counter = 0

for i in range(a, b + 1):
    if i % c == 0 or i % d == 0:
        counter += 1

print(b + 1 - a - counter)


Fixed submission:
# 最大公約数
def gcd(a, b):
    while b != 0:
        a, b = b, a % b
    return a


# 最小公倍数
def lcm(a, b):
    return a * b // gcd(a, b)

a,b,c,d = input().split(' ')

a = int(a)
b = int(b)
c = int(c)
d = int(d)

hoge = lcm(c,d)

counter = 0

counter = counter + ((b // c) + (b // d) - (b // hoge))
counter = counter - (((a - 1) // c) + ((a - 1) // d) - ((a - 1) // hoge))

print(b - a + 1 - counter)
Buggy python submission (verdict: Runtime Error):
s = input()
 
wea = ["Sunny", "Cloudy", "Rainy"]
 
print("{}".format(wea[wea.index(s) + 1 % 3]))

Fixed submission:
s = input()
 
wea = ["Sunny", "Cloudy", "Rainy"]
 
print("{}".format(wea[(wea.index(s) + 1) % 3]))

Buggy python submission (verdict: Runtime Error):
s = input()
 
wea = ["Sunny", "Cloudy", "Rainy"]
 
print("{}".format(wea[wea.index(s) + 1 % 3])

Fixed submission:
s = input()
 
wea = ["Sunny", "Cloudy", "Rainy"]
 
print("{}".format(wea[(wea.index(s) + 1) % 3]))

Buggy python submission (verdict: Runtime Error):
s = input()
 
wea = ["Sunny", "Cloudy", "Rainy"]
 
print("{}".format( wea[(wea.index(s) + 1) % 3)] )

Fixed submission:
s = input()
 
wea = ["Sunny", "Cloudy", "Rainy"]
 
print("{}".format(wea[(wea.index(s) + 1) % 3]))

Buggy python submission (verdict: Runtime Error):
s=input()
l=(ensoleillé, nuageux, pluvieux)
if s in l:
    for i in len (l):
        if l(i)==s:
            print(l(i+1))
else :
    print ('autre')

Fixed submission:
s=input()
l=('Sunny','Cloudy', 'Rainy','Sunny')
for i in range (len(l)-1):
    if l[i]==s:
        print(l[i+1])

Buggy python submission (verdict: Runtime Error):
input()
if S == "Sunny":
    print("Cloudy")
elif S == "Cloudy":
    print("Rainy")
else:
    print("Sunny")

Fixed submission:
S=input()
if S == "Sunny":
    print("Cloudy")
elif S == "Cloudy":
    print("Rainy")
else:
    print("Sunny")
Buggy python submission (verdict: Runtime Error):
S = input()

def func(S):
    if S == '':
        return True
    a, b, c, d = False, False, False, False
    if S[0:5] == 'dream':
        a = func(S[5:])
        if S[5:7] == 'er':
            b =  func(S[7:])
    elif S[0:5] == 'erase':
        c = func(S[5:])
        if S[5] == 'r':
            d = func(S[6:])
    else:
        return False
    return a or b or c or d

print('YES' if func(S) else 'NO')


Fixed submission:
import sys
sys.setrecursionlimit(10 ** 6)

S = input()

def func(i):
    if i >= len(S):
        return True
    if S[i:i+5] == 'dream':
        if func(i + 5): return True
        if S[i+5:i+7] == 'er':
            if func(i + 7): return True
        return False
    if S[i:i+5] == 'erase':
        if func(i + 5): return True
        if S[i+5] == 'r':
            if func(i + 6): return True
        return False

print('YES' if func(0) else 'NO')
Buggy python submission (verdict: Runtime Error):
words = list(input())

for index, word in enumerate(words):
    isEven = index % 2 == 0
    if (isEven and word == "L") or ((not isEven) and word == "R") :
        continue
    else:
        print("NO")
        exit(-1)

print("YES")

Fixed submission:
import re

s = input()

pattern = re.compile(r'^([^L][^R])*[^L]?$')
is_easy_to_dance = pattern.match(s)

print("Yes") if is_easy_to_dance else print("No")