Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
n = int(input())
A = []
B = []
for _ in range(n):
    v1, v2 = list(map(int, input().split(' ')))
    A.append(v1)
    B.append(v2)

A.sort()
B.sort()

if n % 2:
    print(B[n//2] - A[n//1] + 1)
else:
    print((B[n//2]+B[n//2-1]) - (A[n//2]+A[n//2-1]) + 1)

Fixed submission:
n = int(input())
A = []
B = []
for _ in range(n):
    v1, v2 = list(map(int, input().split(' ')))
    A.append(v1)
    B.append(v2)

A.sort()
B.sort()

if n % 2:
    print(B[n//2] - A[n//2] + 1)
else:
    print((B[n//2]+B[n//2-1]) - (A[n//2]+A[n//2-1]) + 1)
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
##################################
# University of Wisconsin-Madison
# Author: Yaqi Zhang
##################################

# standard library
import sys
from functools import lru_cache

N = int(input())
INF = 10**18
nums = list(map(int, input().split()))
@lru_cache(None)
def dp(idx, n):
    if idx >= N:
        return -INF
    if N - idx + 2 < 2 * n:
        return -INF
    if n == 0:
        return 0
    elif n == 1:
        return max(nums[idx:])
    return max(nums[idx] + dp(idx + 2, n - 1), dp(idx + 1, n))
print(dp(0, N // 2))


Fixed submission:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
##################################
# University of Wisconsin-Madison
# Author: Yaqi Zhang
##################################

# standard library
import sys
sys.setrecursionlimit(10**9)

from functools import lru_cache

def main():
    N = int(input())
    INF = 10**18
    nums = list(map(int, input().split()))
    @lru_cache(None)
    def dp(idx, n):
        if idx >= N:
            return -INF
        if N - idx + 2 < 2 * n:
            return -INF
        if n == 0:
            return 0
        elif n == 1:
            return max(nums[idx:])
        return max(nums[idx] + dp(idx + 2, n - 1), dp(idx + 1, n))
    print(dp(0, N // 2))


if __name__ == "__main__":
    main()

Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
##################################
# University of Wisconsin-Madison
# Author: Yaqi Zhang
##################################

# standard library
import sys
from functools import lru_cache

def main():
    N = int(input())
    INF = 10**18
    nums = list(map(int, input().split()))
    @lru_cache(None)
    def dp(idx, n):
        if idx >= N:
            return -INF
        if N - idx + 2 < 2 * n:
            return -INF
        if n == 0:
            return 0
        elif n == 1:
            return max(nums[idx:])
        return max(nums[idx] + dp(idx + 2, n - 1), dp(idx + 1, n))
    print(dp(0, N // 2))



if __name__ == "__main__":
    main()


Fixed submission:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
##################################
# University of Wisconsin-Madison
# Author: Yaqi Zhang
##################################

# standard library
import sys
sys.setrecursionlimit(10**9)

from functools import lru_cache

def main():
    N = int(input())
    INF = 10**18
    nums = list(map(int, input().split()))
    @lru_cache(None)
    def dp(idx, n):
        if idx >= N:
            return -INF
        if N - idx + 2 < 2 * n:
            return -INF
        if n == 0:
            return 0
        elif n == 1:
            return max(nums[idx:])
        return max(nums[idx] + dp(idx + 2, n - 1), dp(idx + 1, n))
    print(dp(0, N // 2))


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
T, A = map(int, raw_input().split())
H_list = map(int, raw_input().split())

average_diff = sys.float_info.max
min_i = None

for i, H in enumerate(H_list):
    tempature_diff = abs(A - (T - H*0.006))
    if tempature_diff < average_diff:
        average_diff = tempature_diff
        min_i = i
print min_i + 1


Fixed submission:
import sys

N = int(raw_input())
T, A = map(int, raw_input().split())
H_list = map(int, raw_input().split())

average_diff = sys.float_info.max
min_i = None

for i, H in enumerate(H_list):
    tempature_diff = abs(A - (T - H*0.006))
    if tempature_diff < average_diff:
        average_diff = tempature_diff
        min_i = i
print min_i + 1
Buggy python submission (verdict: Time Limit Exceeded):
N = int(raw_input())
X_list = map(int, raw_input().split())

a = (N/2)-1

for i in range(N):
    tmp_x = X_list[:i] + X_list[i+1:]
    tmp_x.sort()
    print tmp_x[a]


Fixed submission:
N = int(raw_input())
X_list = map(int, raw_input().split())

sorted_x = sorted(X_list)

small = sorted_x[N/2-1]
big = sorted_x[N/2]

for x in X_list:
    if x < big:
        print big
    else:
        print small
Buggy python submission (verdict: Time Limit Exceeded):
def main():
    K, S = map(int, raw_input().split())

    count = 0

    # X
    for i in range(K+1):
        # Y
        for j in range(K+1):
            # Z
            for k in range(K+1)[::-1]:
                if i + j + k == S:
                    count += 1
                if i + j + k < S:
                    break

    print count

main()

Fixed submission:
def main():
    K, S = map(int, raw_input().split())

    count = 0

    # X
    for i in range(K+1):
        # Y
        for j in range(K+1):
            if i + j > S:
                break
            if S-i-j > K:
                continue
            count += 1

    print count

main()
Buggy python submission (verdict: Runtime Error):
a,b = map(int(input()).split())
print(a*b)

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

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

Fixed submission:
a,b = map(int,input().split())
print(a*b)
Buggy python submission (verdict: Runtime Error):
K = int(input())
S = input()
if K >= len(S):
  print(S)
else:
  S = S[:K]+'...'
  print(S)


Fixed submission:
N = int(input())
a = N%10
if a in [2,4,5,7,9]:
	print('hon')
elif a in [0,1,6,8]:
	print('pon')
elif a == 3:
	print('bon')

Buggy python submission (verdict: Runtime Error):
N = int(input())
N &= 10
if N in [2,4,5,7,9]:
	print('hon')
elif N in [0,1,6,8]:
	print('pon')
else N == 3:
	print('bon')


Fixed submission:
N = int(input())
a = N%10
if a in [2,4,5,7,9]:
	print('hon')
elif a in [0,1,6,8]:
	print('pon')
elif a == 3:
	print('bon')

Buggy python submission (verdict: Runtime Error):
N = int(input())
N &= 10
if N in [2,4,5,7,9]:
	print('hon')
elif N in [0,1,6,8]:
	print('pon')
else N == 3
	print('bon')

Fixed submission:
N = int(input())
a = N%10
if a in [2,4,5,7,9]:
	print('hon')
elif a in [0,1,6,8]:
	print('pon')
elif a == 3:
	print('bon')
Buggy python submission (verdict: Runtime Error):
a,b,c,k = map(int,input().split())

if a+b>=k:
  print(a)
else:
  print(a-(k-a-b))


Fixed submission:
s = input()
t = input()
if s == t[:-1]:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
K = int(input())
a,b = map(int,input().split())
for i in range(a,b+1):
  if i%K == 0:
  print('OK')
  else:
  print('No')
  return

Fixed submission:
K = int(input())
a,b = map(int,input().split())
c = 'NG'
for i in range(a,b+1):
  if i % K == 0:
    c = 'OK'
    break
print(c)

Buggy python submission (verdict: Runtime Error):
K = int(input())
a,b = map(int,input().split())
for i in range(a,b+1):
  if i%K == 0:
  print('OK')
  else:
  print('No')

Fixed submission:
K = int(input())
a,b = map(int,input().split())
c = 'NG'
for i in range(a,b+1):
  if i % K == 0:
    c = 'OK'
    break
print(c)

Buggy python submission (verdict: Runtime Error):
K = int(input())
a,b = map(int,input().split())
for i in range(a,b+1):
  if i%K == 0:
  print('OK')
else:
  print('No')


Fixed submission:
K = int(input())
a,b = map(int,input().split())
c = 'NG'
for i in range(a,b+1):
  if i % K == 0:
    c = 'OK'
    break
print(c)

Buggy python submission (verdict: Runtime Error):
K = int(input())
a,b = map(int,input().split())
for i in range(a,b+1)
if i%K == 0
  print('OK')
else:
  print('No')


Fixed submission:
K = int(input())
a,b = map(int,input().split())
c = 'NG'
for i in range(a,b+1):
  if i % K == 0:
    c = 'OK'
    break
print(c)

Buggy python submission (verdict: Runtime Error):
K = int(input())
A,B = map(int,input().split())
for i in range(a,b+1)
if i%K == 0
  print('OK')
else:
  print('No')

Fixed submission:
K = int(input())
a,b = map(int,input().split())
c = 'NG'
for i in range(a,b+1):
  if i % K == 0:
    c = 'OK'
    break
print(c)
Buggy python submission (verdict: Runtime Error):
a,b= map(int,imput().split())
c = 'unsafe'
if a>b:
  c = 'safe'
print(c)

Fixed submission:
S,W = map(int,input().split())
if S > W:
  print('safe')
else:
  print('unsafe')
Buggy python submission (verdict: Runtime Error):
n = input()
if 7 in n :
  print('Yes')
else :
  print('No')


Fixed submission:
n = input()
if '7' in n :
  print('Yes')
else :
  print('No')

Buggy python submission (verdict: Runtime Error):
N = input()
a = N[0]
b = N[1]
c = N[2]
d = 'No'
for i in (a,b,c):
  if i % 7 == 0:
    d ='Yes'
    break
print(d)

Fixed submission:
n = input()
if '7' in n :
  print('Yes')
else :
  print('No')
Buggy python submission (verdict: Runtime Error):
N = input()
if N[3] == N[4] and N[5] == N[6]:
  print('Yes')
else:
  print('No')

Fixed submission:
N = input()
if N[2] == N[3] and N[4] == N[5]:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
N = input()
if N in A and N in B:
  print('Yes')
else:
  print('No')

Fixed submission:
N = input()
if 'A' in N  and 'B' in N:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
c = input()
if c == ('a','i','u','e','o')
	print('vowel')
else :
	print('consonant')

Fixed submission:
c = input()
if c in['a','i','u','e','o']:
	print('vowel')
else:
  	print('consonant')

Buggy python submission (verdict: Runtime Error):
c = input()
if c==a,i,u,e,o
print(vowel)
else
	print(consonant)

Fixed submission:
c = input()
if c in['a','i','u','e','o']:
	print('vowel')
else:
  	print('consonant')
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))
ans = 1
for i in a:
    ans *= i
print(ans if not ans > 10**18 else -1)


Fixed submission:
n = int(input())
a = list(map(int, input().split()))
if 0 in a:
    print(0)
else:
    ans = 1
    for i in a:
        ans *= i
        if ans > 10**18:
            ans = -1
            break
    print(ans)
Buggy python submission (verdict: Runtime Error):
import sys
readline = sys.stdin.buffer.readline
t = readline()
print(t.replace('?','D')

Fixed submission:
t = input()
print(t.replace('?', 'D'))
Buggy python submission (verdict: Time Limit Exceeded):

a, b, c, k = map(int, input().split())

ans = 0

while True:
    flg = True

    for i in range(a):
        ans += 1
        k -= 1
        if k == 0:
            flg = False
            break

    if not flg:
        break

    for i in range(b):
        k -= 1
        if k == 0:
            flg = False
            break

    if not flg:
        break

    for i in range(c):
        ans += -1
        k -= 1
        if k == 0:
            flg = False
            break

    if not flg:
        break

print(ans)


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

if k <= a:
    print(k)
elif k <= a + b:
    print(a)
else:
    print(a - (k - a - b))
Buggy python submission (verdict: Runtime Error):
rc = list(map(int, input().split()))

digit = 1
while src[1] ** digit - 1 < src[0]:
    digit += 1

print(digit)

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

digit = 1
while src[1] ** digit - 1 < src[0]:
    digit += 1

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

max_val = 0

index = 0
while(index < len(H) - 1):
    index_boolean = index
    tmp = 0
    while (index_boolean < len(H) - 1):
        if (H[index + 1] <= H[index]):
            tmp += 1
            index += 1
            index_boolean += 1
        else:
            index_boolean = len(H)

    if (tmp > max_val):
        max_val = tmp

print(max_val)

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

max_val = 0

index = 0
while(index < len(H) - 1):
    index_boolean = index
    tmp = 0
    while (index_boolean < len(H) - 1):
        if (H[index + 1] <= H[index]):
            tmp += 1
            index += 1
            index_boolean += 1
        else:
            index_boolean = len(H)
            index += 1

    if (tmp > max_val):
        max_val = tmp

print(max_val)

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

max_val = 0
for n in range(len(H) - 1):
    index = n

    tmp = 0
    while (index < len(H) - 1):
        if (H[index + 1] <= H[index]):
            tmp += 1
            index += 1
        else:
            index = len(H)

    if (tmp > max_val):
        max_val = tmp

print(max_val)

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

max_val = 0

index = 0
while(index < len(H) - 1):
    index_boolean = index
    tmp = 0
    while (index_boolean < len(H) - 1):
        if (H[index + 1] <= H[index]):
            tmp += 1
            index += 1
            index_boolean += 1
        else:
            index_boolean = len(H)
            index += 1

    if (tmp > max_val):
        max_val = tmp

print(max_val)
Buggy python submission (verdict: Runtime Error):
N = int(input(""))
A = list(map(int, input("").split()))

limit = 1000000000000000000

result = 1
for i in A:
  if result >= limit:
    result = -1
  	break
  result = result * i

print(result)

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

limit = 1000000000000000000

result = 1
if 0 not in A:
  for i in A:
    result = result * i
    if result > limit:
      result = -1
      break
else:
  result = 0

print(result)

Buggy python submission (verdict: Runtime Error):
    N = int(input(""))
    A = list(map(int, input("").split()))
     
    limit = 1000000000000000000
     
    result = 1
    for i in A:
      if result >= limit:
        result = -1
        break
      result = result * i
     
    print(result)

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

limit = 1000000000000000000

result = 1
if 0 not in A:
  for i in A:
    result = result * i
    if result > limit:
      result = -1
      break
else:
  result = 0

print(result)

Buggy python submission (verdict: Time Limit Exceeded):
limit = 1000000000000000000

N = int(input(""))
A = list(map(int, input("").split()))

result = 1
for n in A:
  result = result * n

if result < 0 or result > limit:
  result = -1

print(result)

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

limit = 1000000000000000000

result = 1
if 0 not in A:
  for i in A:
    result = result * i
    if result > limit:
      result = -1
      break
else:
  result = 0

print(result)

Buggy python submission (verdict: Time Limit Exceeded):
limit = 1E18

N = int(input(""))
A = list(map(int, input("").split()))

result = 1
for n in A:
  result = result * n

if result > limit:
  print(-1)
else:
  print(result)

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

limit = 1000000000000000000

result = 1
if 0 not in A:
  for i in A:
    result = result * i
    if result > limit:
      result = -1
      break
else:
  result = 0

print(result)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
A=list(map(int,input().split()))
res=1
for a in A:
    res*=a
    if res>10**18:
        res=-1
    
print(res if res>=0 else -1)

Fixed submission:
n=int(input())
A=list(map(int,input().split()))
res=1
for a in A:
    res*=a
    if res>10**18:
        res=-1
        break
print(0 if 0 in A else res)
Buggy python submission (verdict: Runtime Error):
a,b=input().split()
a=int(a)
b=int(float(b*100))
print(a*b//100)

Fixed submission:
a,b=input().split()
a=int(a)
b=b.replace(".","")
b=int(b)
print(a*b//100)
Buggy python submission (verdict: Time Limit Exceeded):
import math
k=int(input())
res=0
for a in range(1,k+1):
    for b in range(1,k+1):
        for c in range(1,k+1):
            res+=math.gcd(math.gcd(a,b),c)
print(res)

Fixed submission:
import math
k=int(input())
res=0
A=[]
for a in range(1,k+1):
    for b in range(1,k+1):
        A.append(math.gcd(a,b))
for a in A:
    for c in range(1,k+1):
        res+=math.gcd(a,c)
print(res)
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
S=input()
r=b=g=0
for s in S:
    if s=='R':
        r+=1
    elif s=='B':
        b+=1
    else:
        g+=1
out=0
for i in range(N):
    for j in range(N):
        if 0<=i+j<N and 0<=i-j<N and S[i]!=S[i+j] and S[i]!=S[i-j] and S[i+j]!=S[i-j]:
            out+=1
print(r*b*g-out)

Fixed submission:
N=int(input())
S=input()
r=b=g=0
for s in S:
    if s=='R':
        r+=1
    elif s=='B':
        b+=1
    else:
        g+=1
out=0
for i in range(1,N):
    for j in range(min(i+1,N-i)):
        if S[i]!=S[i+j] and S[i]!=S[i-j] and S[i+j]!=S[i-j]:
            out+=1
print(r*b*g-out)
Buggy python submission (verdict: Runtime Error):
N = int(input())
S = input()
res = 0
for i in range(10):
    if str(i) in S:
        T = S[S.index(str(i))+1:]
        for j in range(10):
        if str(j) in T:
            U = T[T.index(str(j))+1:]
            for k in range(10):
                if str(k) in U:
                res += 1         
print(res)

Fixed submission:
N = int(input())
S = input()
 
res = 0
for i in range(10):
    if str(i) in S:
        T = S[S.index(str(i))+1:]
        
        for j in range(10):
            if str(j) in T:
                U = T[T.index(str(j))+1:]
                
                for k in range(10):
                    if str(k) in U:
                        res += 1
                
print(res)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
S = input()
counts = 0
for i in range(1000):
    I = [i//100,i//10%10,i%10]
    ok = 0
    for j in range(N):
        if int(S[j])==I[ok]:
            ok+=1
        if ok == 3:
            break
    if ok==3:
        counts+=1
print(counts)

Fixed submission:
N = int(input())
S = input()
 
res = 0
for i in range(10):
    if str(i) in S:
        T = S[S.index(str(i))+1:]
        
        for j in range(10):
            if str(j) in T:
                U = T[T.index(str(j))+1:]
                
                for k in range(10):
                    if str(k) in U:
                        res += 1
                
print(res)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
S = input()
counts = 0
for i in range(1000):
    I = [i//100,i//10%10,i%10]
    ok = 0
    for j in range(N):
        if int(S[j])==I[ok]:
            ok+=1
        if ok == 3:
            break
    if ok==3:
        counts+=1
print(counts)

Fixed submission:
N = int(input())
S = input()
 
res = 0
for i in range(10):
    if str(i) in S:
        T = S[S.index(str(i))+1:]
        
        for j in range(10):
            if str(j) in T:
                U = T[T.index(str(j))+1:]
                
                for k in range(10):
                    if str(k) in U:
                        res += 1
                
print(res)
Buggy python submission (verdict: Runtime Error):
n,x=map(int,input().split())
L=list(map(int,input().split()))
D=[0]*(N+1)
o=True
for i in range(n):
    D[i+1]=D[i]+L[i]
for i in range(len(D)):
    if D[i]>x:
        print(i)
        o=False
        break
if o:
    print(n+1)

Fixed submission:
n,x=map(int,input().split())
L=list(map(int,input().split()))
D=[0]*(n+1)
o=True
for i in range(n):
    D[i+1]=D[i]+L[i]
for i in range(len(D)):
    if D[i]>x:
        print(i)
        o=False
        break
if o:
    print(n+1)
Buggy python submission (verdict: Time Limit Exceeded):
K,S = map(int,input().split())
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 = map(int,input().split())
ans=0
for x in range(0,K+1):
    for y in range(0,K+1):
        if 0<=S-x-y<=K:
            ans+=1
print(ans)
Buggy python submission (verdict: Runtime Error):
n = int(input())
A = list(map(int,input().split()))
ok = True
if n%2==1:
    a=sorted(A)
    for i in range(len(a)):
        if i%2==0:
            if a[i]!=i:
                ok = False
        else:
            if a[i]!=i+1:
                ok = False
else:
    a=sorted(A)
    for i in range(len(a)):
        if i%2==1:
            if a[i]!=i:
                ok = False
        else:
            if a[i]!=i+1:
                ok = False
if ok:
    print(2**(n//2))%1000000007
else:
    print(0)

Fixed submission:
n = int(input())
A = list(map(int,input().split()))
ok = True
if n%2==1:
    a=sorted(A)
    for i in range(len(a)):
        if i%2==0:
            if a[i]!=i:
                ok = False
        else:
            if a[i]!=i+1:
                ok = False
else:
    a=sorted(A)
    for i in range(len(a)):
        if i%2==1:
            if a[i]!=i:
                ok = False
        else:
            if a[i]!=i+1:
                ok = False
if ok:
    print(2**(n//2)%1000000007)
else:
    print(0)
Buggy python submission (verdict: Runtime Error):
w,h,n = map(int,input().split())
ww=hh = 0
for _ in [0]*N:
    x,y,a = map(int,input().split())
    if a == 1:
        ww = max(ww,x)
    elif a == 2:
        w = min(w,x)
    elif a == 3:
        hh = max(hh,y)
    else:
        h = min(h,y)
print((w-ww)*(h-hh)*(w>ww)*(h>hh))

Fixed submission:
w,h,n = map(int,input().split())
ww=hh=0
for _ in [0]*n:
    x,y,a = map(int,input().split())
    if a == 1:
        ww = max(ww,x)
    elif a == 2:
        w = min(w,x)
    elif a == 3:
        hh = max(hh,y)
    else:
        h = min(h,y)
print((w-ww)*(h-hh)*(w>ww)*(h>hh))
Buggy python submission (verdict: Time Limit Exceeded):
import time
time.sleep(3)

Fixed submission:
from itertools import combinations

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

def nCr(n, r):
    """
    Calculate the number of combination (nCr = nPr/r!).
    The parameters need to meet the condition of n >= r >= 0.
    It returns 1 if r == 0, which means there is one pattern
    to choice 0 items out of the number of n.
    """

    # 10C7 = 10C3
    r = min(r, n-r)

    # Calculate the numerator.
    numerator = 1
    for i in range(n, n-r, -1):
        numerator *= i

    # Calculate the denominator. Should use math.factorial?
    denominator = 1
    for i in range(r, 1, -1):
        denominator *= i

    return numerator // denominator

if N <= 1 and M <= 1:
    print(0)
elif N <= 1 and not M <= 1:
    print(nCr(M,2))
elif not N <= 1 and M <= 1:
    print(nCr(N,2))
else:
    print(nCr(N, 2) + nCr(M,2))
Buggy python submission (verdict: Runtime Error):
a

Fixed submission:
S = input()

zikkou= [0,2]

isto = True

for n in zikkou:
    if S.count("A") == 3 or S.count("B") == 3:
        isto = False


if isto:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
_S, _T = input().split()
A, B = list(map(lambda x:int(x)), input().split())
U = input()


if U == A:
    is_type_A = True
else:
    is_type_A = False

if is_type_A:
    print(A - 1, B)
else:
    print(A, B-1)

Fixed submission:
S, T = input().split()
A, B = input().split()
U = str(input())
S = str(S)
T = str(T)
A = int(A)
B = int(B)


if S == U:
    print(A-1,B)
elif T == U:
    print(A,B-1)
Buggy python submission (verdict: Runtime Error):
H,W=input().split(" ")
print(str(math.ceil(H / W)))

Fixed submission:
import math
s = list(map(int, input().split()))
print(str(math.ceil(s[0] / s[1])))
Buggy python submission (verdict: Runtime Error):
N = input()
S = input()
ABCCount  = 0

for n in range(int(N)-2):
    if S[n] == "A" and S[n+1] == "B" and S[n+2] == "C":
        ABCCount = ABCCount + 1

print(ABCCount)

Fixed submission:
K, X = input().split()

total = int(K) * 500

if total >= int(X):
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
K, X = input().split()

if 500 * int(K) >= X:
  print("YES")
else:
  print("NO")

Fixed submission:
K, X = input().split()

total = int(K) * 500

if total >= int(X):
  print("Yes")
else:
  print("No")