Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
n = int(input())
s = []
for i in range(n):
    s.append(input())
    
dic = {}
for i in range(len(s)):
    if s[i] not in dic:
        dic[s[i]]=s.count(s[i])
    
ans = sorted([k for k, v in dic.items() if v == max(dic.values())])

for i in range(len(ans)):
    print(ans[i])

Fixed submission:
a = input()
b = eval(a.replace(" ","^"))
print((a.count(str(b))==1)*"Yes" or "No")

Buggy python submission (verdict: Runtime Error):
n = int(input())
s = []
for i in range(n):
    s.append(input())
    
dic = {}
for i in range(len(s)):
    if s[i] not in dic:
        dic[s[i]]=s.count(s[i])
    
ans = sorted([k for k, v in dic.items() if v == max(dic.values())])

for i in range(len(ans)):
    print(ans[i])

Fixed submission:
a = input()
b = eval(a.replace(" ","^"))
print((a.count(str(b))==1)*"Yes" or "No")
Buggy python submission (verdict: Runtime Error):
import collections
n = int(input())
s = []
for i in range(n):
    s.append(input())
    
dic = collections.Counter(s)
dic = dic.most_common()

ans = [dic[0][0]]

for i in range(n):
    if dic[i][1] == dic[i+1][1]:
        ans.append(dic[i+1][0])
    else:
        break
        
ans = sorted(ans)

for i in range(len(ans)):
    print(ans[i])

Fixed submission:
import collections
n = int(input())
s = []
for i in range(n):
    s.append(input())
    
dic = collections.Counter(s)
dic = dic.most_common()

ans = [dic[0][0]]

for i in range(len(dic)-1):
    if dic[i][1] == dic[i+1][1]:
        ans.append(dic[i+1][0])
    else:
        break
        
ans = sorted(ans)

for i in range(len(ans)):
    print(ans[i])

Buggy python submission (verdict: Time Limit Exceeded):
import collections
n = int(input())
s = []
for i in range(n):
    s.append(input())
    
dic = collections.Counter(s)
    
ans = sorted([k for k, v in dic.items() if v == max(dic.values())])

for i in range(len(ans)):
    print(ans[i])

Fixed submission:
import collections
n = int(input())
s = []
for i in range(n):
    s.append(input())
    
dic = collections.Counter(s)
dic = dic.most_common()

ans = [dic[0][0]]

for i in range(len(dic)-1):
    if dic[i][1] == dic[i+1][1]:
        ans.append(dic[i+1][0])
    else:
        break
        
ans = sorted(ans)

for i in range(len(ans)):
    print(ans[i])

Buggy python submission (verdict: Runtime Error):
n = int(input())
s = list(open(0))
    
dic = {}
for i in range(len(s)):
    if s[i] not in dic:
        dic[s[i]]=s.count(s[i])
    
ans = sorted([k for k, v in dic.items() if v == max(dic.values())])

for i in range(len(ans)):
    print(ans[i])

Fixed submission:
import collections
n = int(input())
s = []
for i in range(n):
    s.append(input())
    
dic = collections.Counter(s)
dic = dic.most_common()

ans = [dic[0][0]]

for i in range(len(dic)-1):
    if dic[i][1] == dic[i+1][1]:
        ans.append(dic[i+1][0])
    else:
        break
        
ans = sorted(ans)

for i in range(len(ans)):
    print(ans[i])

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = []
for i in range(n):
    s.append(input())
    
dic = {}
for i in range(len(s)):
    if s[i] not in dic:
        dic[s[i]]=s.count(s[i])
    
ans = sorted([k for k, v in dic.items() if v == max(dic.values())])

for i in range(len(ans)):
    print(ans[i])

Fixed submission:
import collections
n = int(input())
s = []
for i in range(n):
    s.append(input())
    
dic = collections.Counter(s)
dic = dic.most_common()

ans = [dic[0][0]]

for i in range(len(dic)-1):
    if dic[i][1] == dic[i+1][1]:
        ans.append(dic[i+1][0])
    else:
        break
        
ans = sorted(ans)

for i in range(len(ans)):
    print(ans[i])
Buggy python submission (verdict: Time Limit Exceeded):
n,k = map(int,input().split())
a = list(map(int,input().split()))

b=0

for i in range(n-k+1):
    if b < sum(a[i:i+k]):
        b = sum(a[i:i+k])
    
print((k+b)/2)

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

ans = sum(a[:k])
b = ans

for i in range(n-k):
    b = b - a[i] + a[i+k]
    if ans < b:
        ans = b       
    
print((k+ans)/2)

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

b=[]

for i in range(n-k+1):
    b.append(sum(a[i:i+k]))
    
print((k+max(b))/2)

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

ans = sum(a[:k])
b = ans

for i in range(n-k):
    b = b - a[i] + a[i+k]
    if ans < b:
        ans = b       
    
print((k+ans)/2)
Buggy python submission (verdict: Runtime Error):
h,n = map(int,input().split())
a = sum(map(int,input().split()))
print(["Yes","No"][h>a])

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

if h % a == 0:
    print(h//a)
else:
    print(h//a+1)
Buggy python submission (verdict: Runtime Error):
h,n = map(int,input().split())
a = eval(input().replace(" ","+"))
print(["Yes","No"][h>a])

Fixed submission:
h,_ = map(int,input().split())
a = sum(map(int,input().split()))
print((h>a)*"No" or "Yes")
Buggy python submission (verdict: Runtime Error):
n,m = map(int,input().split())
PS = [list(input().split()) for i in range(m)]
AC = []
WA = 0

for i in range(m):
    if PS[i][1] == "AC":
        p = PS[i][0]
        if p not in AC:
            WA += PS[:i+1].count([p,"WA"])
            AC.append(p)

print(len(AC),WA)

Fixed submission:
print(chr(ord(input())+1))
Buggy python submission (verdict: Time Limit Exceeded):
n,m = map(int,input().split())
PS = [list(input().split()) for i in range(m)]
AC = []
WA = 0

for i in range(m):
    if PS[i][1] == "AC":
        p = PS[i][0]
        if p not in AC:
            WA += PS[:i+1].count([p,"WA"])
            AC.append(p)

print(len(AC),WA)

Fixed submission:
n,m = map(int,input().split())
AC = [0] * n
WA = [0] * n
penalty = 0

for i in range(m):
    p,s = input().split()
    p = int(p) - 1
    
    if s == "WA":
        WA[p] += 1
    else:
        if AC[p] == 0:
            AC[p] = 1
            penalty += WA[p]
            
print(sum(AC),penalty)

Buggy python submission (verdict: Time Limit Exceeded):
n,m = map(int,input().split())
PS = [list(input().split()) for i in range(m)]
AC = []
WA = 0

for i in range(m):
    if PS[i][1] == "AC":
        p = PS[i][0]
        if p not in AC:
            WA += PS[:i+1].count([p,"WA"])
            AC.append(p)

print(len(AC),WA)

Fixed submission:
n,m = map(int,input().split())
AC = [0] * n
WA = [0] * n
penalty = 0

for i in range(m):
    p,s = input().split()
    p = int(p) - 1
    
    if s == "WA":
        WA[p] += 1
    else:
        if AC[p] == 0:
            AC[p] = 1
            penalty += WA[p]
            
print(sum(AC),penalty)
Buggy python submission (verdict: Runtime Error):
N , K = map(int , input().split())
R , S , P = map(int , input().split())
T = input()

dic = {"r":"p" , "s":"r" , "p":"s"}
ANS = []

for i in range(N):
    ANS.append(dic[T[i]])
    
ans = "".join(ANS)

VANISH = []
    
for i in range(N-K):
    if ans[i] == ans[i+K]:
        VANISH.append(ans[i])
        
if N - (2*K) > 0:
    for i in range(N - (2*K)):
        if ans[i] == ans[i+(2*K)]:
            VANISH.remove(ans[i])
            
vanish = "".join(VANISH)
        
point = ((ans.count("r")-vanish.count("r"))*R + (ans.count("s")-vanish.count("s"))*S + (ans.count("p")-vanish.count("p"))*P)

print(point)

Fixed submission:
S , T = input().split()

print(T + S)
Buggy python submission (verdict: Runtime Error):
N , K = map(int , input().split())
R , S , P = map(int , input().split())
T = input()

dic = {"r":"p" , "s":"r" , "p":"s"}
ANS = []

for i in range(N):
    ANS.append(dic[T[i]])
    
ans = "".join(ANS)

VANISH = []
    
for i in range(N-K):
    if ans[i] == ans[i+K]:
        VANISH.append(ans[i])
        
if N - (2*K) > 0:
    for i in range(N - (2*K)):
        if ans[i] == ans[i+(2*K)]:
            VANISH.remove(ans[i])
            
vanish = "".join(VANISH)
        
point = ((ans.count("r")-vanish.count("r"))*R + (ans.count("s")-vanish.count("s"))*S + (ans.count("p")-vanish.count("p"))*P)

print(point)

Fixed submission:
N , K = map(int , input().split())
R , S , P = map(int , input().split())
T = input()

dic = {"r":"p" , "s":"r" , "p":"s"}
ANS = []

for i in range(N):
    ANS.append(dic[T[i]])
    
ans = "".join(ANS)

for i in range(K , N):
    if ans[i] == ans[i-K]:
        ans = ans[:i] + "X" + ans[i+1:]
        
point = ans.count("r")*R + ans.count("s")*S + ans.count("p")*P

print(point)

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

dic = {"r":"p" , "s":"r" , "p":"s"}
ANS = []

for i in range(N):
    ANS.append(dic[T[i]])
    
ans = "".join(ANS)

VANISH = []
    
for i in range(N-K):
    if ans[i] == ans[i+K]:
        VANISH.append(ans[i])

print(VANISH)
        
if N - (2*K) > 0:
    for i in range(N - (2*K)):
        if ans[i] == ans[i+(2*K)]:
            VANISH.remove(ans[i])
            
print(VANISH)
            
vanish = "".join(VANISH)
        
point = ((ans.count("r")-vanish.count("r"))*R + (ans.count("s")-vanish.count("s"))*S + (ans.count("p")-vanish.count("p"))*P)

print(point)

Fixed submission:
N , K = map(int , input().split())
R , S , P = map(int , input().split())
T = input()

dic = {"r":"p" , "s":"r" , "p":"s"}
ANS = []

for i in range(N):
    ANS.append(dic[T[i]])
    
ans = "".join(ANS)

for i in range(K , N):
    if ans[i] == ans[i-K]:
        ans = ans[:i] + "X" + ans[i+1:]
        
point = ans.count("r")*R + ans.count("s")*S + ans.count("p")*P

print(point)
Buggy python submission (verdict: Runtime Error):
import math
A , B = map(int , input().split())
print(A * B // math.gcd(A , B))


Fixed submission:
import fractions
A , B = map(int , input().split())
print(A * B // fractions.gcd(A , B))
Buggy python submission (verdict: Runtime Error):
a1 , a2 , a3 = map(int , input.split())
  
A = a1+a2+a3
 
if A >= 22:
  print("bust")
  
else:


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

if sum(card) >= 22:
    print("bust")
else:
    print("win")
Buggy python submission (verdict: Runtime Error):
A = ["SUN","MON","TUE","WED","THU","ERI","SAT"]
print(7-A.index(input()))

Fixed submission:
S = input()

youbi = ["SUN","MON","TUE","WED","THU","FRI","SAT"]

day = 7

for i in range(7):
    if youbi[i] == S:
        break
        
    day += -1
    
print(day)
Buggy python submission (verdict: Runtime Error):
X , Y = map(int , input().split())

if X > Y:
    ma = X
    mi = Y
else:
    ma = Y
    mi = X

for i in range(mi):
    a = X - 3*i
    b = Y - 3*i
    if a == 2 * b or b == 2 * a:
        import math
        pattern = math.factorial(2*i + ((ma - 3*i)//2)) // (i * (i + ((ma - 3*i)//2)))
        print(pattern % (10**9 + 7))
        break
        
if a != 2 * b and b != 2 * a:
    print(0)

Fixed submission:
r = int(input())

print(r**2)
Buggy python submission (verdict: Runtime Error):
S = input()
T = input()

result = 0
for i in range(0,3):
    if S[i] == T[i]:
        result += 1

print (result)

Fixed submission:
A , B = map ( int , input ( )  . split( ) )
 
if ( A<= 9 and B <= 9) :
    print ( A * B )
else:
    print ( -1 )

Buggy python submission (verdict: Runtime Error):
A , B = map ( int , input ( )  . split( ) )
 
if (A  <= 9 and B <= 9 ):
print ( A * B )
 
else:
print ( -1 )

Fixed submission:
A , B = map ( int , input ( )  . split( ) )
 
if ( A<= 9 and B <= 9) :
    print ( A * B )
else:
    print ( -1 )

Buggy python submission (verdict: Runtime Error):
A , B = map ( int , input ( )  . split( ) )
 
if (A , B) <= 9 :
print ( A * B )
 
else:
print ( -1 )

Fixed submission:
A , B = map ( int , input ( )  . split( ) )
 
if ( A<= 9 and B <= 9) :
    print ( A * B )
else:
    print ( -1 )

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

if A , B <= 9 :
print ( A * B )

else:
print ( -1 )
  

Fixed submission:
A , B = map ( int , input ( )  . split( ) )
 
if ( A<= 9 and B <= 9) :
    print ( A * B )
else:
    print ( -1 )

Buggy python submission (verdict: Runtime Error):
if ( ( 1 <= A <= 9 ) and( ( A % 1 == 0 ) or ( A % 2 == 0 ) or ( A % 3 == 0 ) or ( A % 5 == 0 ) or ( A % 7 == 0 ) ) ) and ( ( 1 <= B <= 9 ) and( ( B % 1 == 0 ) or ( B % 2 == 0 ) or ( B % 3 == 0 ) or ( B % 5 == 0 ) or ( B % 7 == 0 ) ) ):
    print(A*B)
else:
    print ( -1 )

Fixed submission:
A , B = map ( int , input ( )  . split( ) )
 
if ( A<= 9 and B <= 9) :
    print ( A * B )
else:
    print ( -1 )
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())

divisor = []
for i in range(1 , N+1):
    if N % i == 0:
        divisor.append(i)

distance = []
for j in range(int(len(divisor))-1):
    M = (N / int(divisor[j])) + int(divisor[j])
    distance.append(M)

import math

if int(len(divisor)) == 2:
    print(N-1)
else:
    print(math.floor(min(distance))-2)

Fixed submission:
import math

N = int(input())

divisor = []
for i in range(1 , math.floor(N**(1/2))+1):
    if N % i == 0:
        divisor.append(i)

distance = []
for j in range(int(len(divisor))):
    M = (N / int(divisor[j])) + int(divisor[j])
    distance.append(M)

if int(len(divisor)) == 1:
    print(N-1)
else:
    print(math.floor(min(distance))-2)
Buggy python submission (verdict: Runtime Error):
N = int(input())
deliciaus = list(map(int , input().split()))

heal = 0

for i in range(N):
    for j in range(i+1 , N):
        heal += deliciaus[i] * deliciaus[j]
    
print(heal)

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

if a <= 2*b:
    print(0)
if a > 2*b:
    print(a - 2*b)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
L = sorted(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):
            a = L[i]
            b = L[j]
            c = L[k]
            
            if c < a + b:
                ans += 1
            else:
                break
            
print(ans)

Fixed submission:
import bisect
#二分探索をするライブラリ

n = int(input())
L = sorted(map(int,input().split()))
ans = 0

# c <= b <= a とする

for i in range(n-2):
    for j in range(i+1,n-1):
        a = L[n-1-i]
        b = L[n-1-j]
        
        if a-b < b:
            ans += (n-1-j) - bisect.bisect_left(L,a-b+1)
        
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
L = sorted(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):
            a = L[i]
            b = L[j]
            c = L[k]
            
            if a < b + c:
                if b < c + a:
                    if c < a + b:
                        ans += 1
                    else:
                        break
                else:
                    break
            else:
                break
            
print(ans)


Fixed submission:
import bisect
#二分探索をするライブラリ

n = int(input())
L = sorted(map(int,input().split()))
ans = 0

# c <= b <= a とする

for i in range(n-2):
    for j in range(i+1,n-1):
        a = L[n-1-i]
        b = L[n-1-j]
        
        if a-b < b:
            ans += (n-1-j) - bisect.bisect_left(L,a-b+1)
        
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
L = sorted(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):
            a = L[i]
            b = L[j]
            c = L[k]
            
            if a < b + c:
                if b < c + a:
                    if c < a + b:
                        ans += 1
                    else:
                        break
                else:
                    break
            else:
                break
            
print(ans)

Fixed submission:
import bisect
#二分探索をするライブラリ

n = int(input())
L = sorted(map(int,input().split()))
ans = 0

# c <= b <= a とする

for i in range(n-2):
    for j in range(i+1,n-1):
        a = L[n-1-i]
        b = L[n-1-j]
        
        if a-b < b:
            ans += (n-1-j) - bisect.bisect_left(L,a-b+1)
        
print(ans)
Buggy python submission (verdict: Runtime Error):
n = int(input())

if n == 1:
    print(1/a)
elif n % 2 == 0:
    print(1/2)
else:
    print(((n+1)/2)/n)

Fixed submission:
a = int(input())

if a == 1:
    print(1/a)
elif a % 2 == 0:
    print(1/2)
else:
    print(((a+1)/2)/a)

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

if n == 1:
    print(1/a)
elif n % 2 == 0:
    print(1/2)
else:
    print(((a+1)/2)/a)

Fixed submission:
a = int(input())

if a == 1:
    print(1/a)
elif a % 2 == 0:
    print(1/2)
else:
    print(((a+1)/2)/a)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
A = list(map(int,input().split()))
ans = []

for i in range(1,n+1):
    ans.append(A.index(i)+1)
    
print(*ans)

Fixed submission:
n = int(input())
A = list(map(int,input().split()))
ANS = []

for i in range(n):
    ANS.append([A[i],i+1])
    
ANS = sorted(ANS)

for i in range(n):
    print(ANS[i][1],end = " ")
Buggy python submission (verdict: Runtime Error):
weather = input()

if weather = Sunny:
    print(Cloudy)
elif weather = Cloudy:
    print(Rainy)
else:
    print(Sunny)

Fixed submission:
weather = input()

if weather == "Sunny":
    print("Cloudy")
elif weather == "Cloudy":
    print("Rainy")
else:
    print("Sunny")
Buggy python submission (verdict: Time Limit Exceeded):
n,m = map(int,input().split())
a = sorted(map(int,input().split()))

for i in range(m):
    a[-1] //= 2
    
    if 1 < len(a) and a[-2] > a[-1]:
        a = sorted(a)
    
print(sum(a))

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

import heapq
a = list(map(lambda x:x*(-1),a))
heapq.heapify(a)

for i in range(m):
    b = heapq.heappop(a)
    heapq.heappush(a,-(-b//2))
    
print(sum(a)*(-1))

Buggy python submission (verdict: Runtime Error):
n,m = map(int,input().split())
a = sorted(map(int,input().split()))

for i in range(m):
    a[-1] //= 2
    
    if a[-2] > a[-1]:
        a = sorted(a)
    
print(sum(a))

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

import heapq
a = list(map(lambda x:x*(-1),a))
heapq.heapify(a)

for i in range(m):
    b = heapq.heappop(a)
    heapq.heappush(a,-(-b//2))
    
print(sum(a)*(-1))

Buggy python submission (verdict: Time Limit Exceeded):
n,m = map(int,input().split())
a = sorted(map(int,input().split()))

for i in range(m):
    a[-1] //= 2
    a = sorted(a)
    
print(sum(a))


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

import heapq
a = list(map(lambda x:x*(-1),a))
heapq.heapify(a)

for i in range(m):
    b = heapq.heappop(a)
    heapq.heappush(a,-(-b//2))
    
print(sum(a)*(-1))

Buggy python submission (verdict: Time Limit Exceeded):
n,m = map(int,input().split())
a = sorted(map(int,input().split()))

for i in range(m):
    a[-1] //= 2
    a = sorted(a)
    
print(sum(a))

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

import heapq
a = list(map(lambda x:x*(-1),a))
heapq.heapify(a)

for i in range(m):
    b = heapq.heappop(a)
    heapq.heappush(a,-(-b//2))
    
print(sum(a)*(-1))
Buggy python submission (verdict: Runtime Error):
A , B = map(int , input().split())

plug = 1
tap = 0

for i in range():
    if plug >= B:
        break
    else:
        prug += A - 1
        tap += 1

print(tap)

Fixed submission:
S = input()
T = input()

result = 0
for i in range(0,3):
    if S[i] == T[i]:
        result += 1

print (result)

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

plug = 1
tap = 0

for i in range(20):
    if plug >= B:
        break
    else:
        prug += A - 1 and tap += 1

print(tap)

Fixed submission:
S = input()
T = input()

result = 0
for i in range(0,3):
    if S[i] == T[i]:
        result += 1

print (result)
Buggy python submission (verdict: Runtime Error):
A , B = map(int , input().split())

plug = 1
tap = 0

for i in range():
    if plug >= B:
        break
    else:
        prug += A - 1 and tap += 1

print(tap)

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

plug = 1
tap = 0

for i in range(20):
    if plug >= B:
        break
    else:
        plug += A - 1
        tap += 1

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

rist = [ A+B , A-B , A*B]

print(max(rist))

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

rist = [ A+B , A-B , A*B]

print(max(rist))

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

rist = [ A+B , A-B , A*B]

print(max(rist))

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

rist = [ A+B , A-B , A*B]

print(max(rist))

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

rist = [ A+B , A-B , A*B]

rist.sort()
print(rist[3])

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

rist = [ A+B , A-B , A*B]

print(max(rist))

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

rist = [ A+B , A-B , A*B]

rist.sort()

print(rist[3])

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

rist = [ A+B , A-B , A*B]

print(max(rist))
Buggy python submission (verdict: Runtime Error):
n,m = map(int,input().split())
a = []

for i in range(m):
    a.append(int(input()))

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

if 1 not in a:
    dp[1] = 1
    
for i in range(2,n+1):
    if i not in a:
        dp[i] = dp[i-1] + dp[i-2]
        dp[i] %= 1000000007
        
print(dp[n])


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

if P >= Q and P >= R:
    print(Q + R)
elif Q >= P and Q >= R:
    print(P + R)
else:
    print(P + Q)
Buggy python submission (verdict: Time Limit Exceeded):
n,m = map(int,input().split())
a = []

for i in range(m):
    a.append(int(input()))

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

if 1 not in a:
    dp[1] = 1
    
for i in range(2,n+1):
    if i not in a:
        dp[i] = dp[i-1] + dp[i-2]
        dp[i] %= 1000000007
        
print(dp[n])

Fixed submission:
N, M = map(int, input().split())
a = set([int(input()) for _ in range(M)])
INF = 1000000007

dp = [0] * (N + 1)
dp[0] = 1
if 1 not in a:
	dp[1] = 1
else:
	dp[1] = 0
for i in range(2, N + 1):
	if i in a:
		continue
	dp[i] = dp[i - 1] + dp[i - 2]
	dp[i] %= INF

print(dp[N])

Buggy python submission (verdict: Time Limit Exceeded):
n,m = map(int,input().split())
a = []

for i in range(m):
    a.append(int(input()))

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

if 1 not in a:
    dp[1] = 1
    
for i in range(2,n+1):
    if i not in a:
        dp[i] = dp[i-1] + dp[i-2]
        dp[i] %= 1000000007
        
print(dp[n])

Fixed submission:
N, M = map(int, input().split())
a = set([int(input()) for _ in range(M)])
INF = 1000000007

dp = [0] * (N + 1)
dp[0] = 1
if 1 not in a:
	dp[1] = 1
else:
	dp[1] = 0
for i in range(2, N + 1):
	if i in a:
		continue
	dp[i] = dp[i - 1] + dp[i - 2]
	dp[i] %= INF

print(dp[N])

Buggy python submission (verdict: Runtime Error):
n,m = map(int,input().split())
a = [int(input()) for _ in range(m)]

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

if a[0] != 1:
    dp[1] = 1
    
for i in range(2,n+1):
    if i not in a:
        dp[i] = dp[i-1] + dp[i-2]
        dp[i] %= 1000000007
        
print(dp[n])

Fixed submission:
N, M = map(int, input().split())
a = set([int(input()) for _ in range(M)])
INF = 1000000007

dp = [0] * (N + 1)
dp[0] = 1
if 1 not in a:
	dp[1] = 1
else:
	dp[1] = 0
for i in range(2, N + 1):
	if i in a:
		continue
	dp[i] = dp[i - 1] + dp[i - 2]
	dp[i] %= INF

print(dp[N])
Buggy python submission (verdict: Runtime Error):
A , B = map(int , input().split())

if A >= 13 :
    print(B)
elif A <= 5 :
    print(0)
elif : 5 < A < 13
    print( B/2 )

Fixed submission:
import math

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

if A >= 13 :
    print(B)
elif A <= 5 :
    print(0)
else :
    print( math.floor(B/2) )
Buggy python submission (verdict: Runtime Error):
n,k = map(int,input().split())
print(input().replace(s[k-1],s[k-1].lower()))

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

print(S[0:K-1] + S[K-1].lower() + S[K:N])

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

if 0 < S // 100 <= 12 and 0 < S % 100<= 12:
    print("AMBIGUOUS")
elif 0 < S // 100 <= 12:
    print("MMYY")
elif 0 < S % 100 <= 12:
    print("YYMM")
else :
    print("NA")

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

print(S[0:K-1] + S[K-1].lower() + S[K:N])