Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
n = int(input())
a, b = map(int, input().split())
# print("a:{}, b:{}, c:{}".format(n, a, b))
data = sorted(list([n,a,b]), reverse=True)
count_A = 0
count_B = 0

for i, d in enumerate(data):
    if i%2 == 0:
        count_A += d
    else:
        count_B += d
        
print(count_A - count_B)

Fixed submission:
N = int(input())

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

data = sorted(L, reverse=True)
count_A = 0
count_B = 0

for i, d in enumerate(data):
    if i%2 == 0:
        count_A += d
    else:
        count_B += d
        
print(count_A - count_B)

Buggy python submission (verdict: Runtime Error):
N = int(input())
n, a, b = map(int, input().split())
# print("a:{}, b:{}, c:{}".format(n, a, b))
data = sorted(list([n,a,b]), reverse=True)
count_A = 0
count_B = 0

for i, d in enumerate(data):
    if i%2 == 0:
        count_A += d
    else:
        count_B += d
        
print(count_A - count_B)

Fixed submission:
N = int(input())

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

data = sorted(L, reverse=True)
count_A = 0
count_B = 0

for i, d in enumerate(data):
    if i%2 == 0:
        count_A += d
    else:
        count_B += d
        
print(count_A - count_B)

Buggy python submission (verdict: Runtime Error):
n, a, b = map(int, input().split())
# print("a:{}, b:{}, c:{}".format(n, a, b))
data = sorted(list([n,a,b]), reverse=True)
count_A = 0
count_B = 0

for i, d in enumerate(data):
    if i%2 == 0:
        count_A += d
    else:
        count_B += d
        
print(count_A - count_B)

Fixed submission:
N = int(input())

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

data = sorted(L, reverse=True)
count_A = 0
count_B = 0

for i, d in enumerate(data):
    if i%2 == 0:
        count_A += d
    else:
        count_B += d
        
print(count_A - count_B)
Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())
# A = sorted(list(map(int, input().split())),reverse=True)
A = list(map(int, input().split()))

uniq_items = []
for i in set(A):
    uniq_items.append(A.count(i))

uniq_items = sorted(uniq_items,reverse=True)

if len(uniq_items) <= K:
    print(0)
else:
    print(sum(uniq_items[K:]))


Fixed submission:
from collections import Counter
N, K = map(int, input().split())
A = list(map(int, input().split()))

print(sum(sorted(Counter(A).values(),reverse=True)[K:]))

Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())
# A = sorted(list(map(int, input().split())),reverse=True)
A = list(map(int, input().split()))

uniq_items = []
for i in set(A):
    uniq_items.append(A.count(i))
    uniq_items = sorted(uniq_items,reverse=True)

if len(uniq_items) <= K:
    print(0)
else:
    print(sum(uniq_items[K:]))

Fixed submission:
from collections import Counter
N, K = map(int, input().split())
A = list(map(int, input().split()))

print(sum(sorted(Counter(A).values(),reverse=True)[K:]))

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

uniq_items = []
for i in set(A):
    uniq_items.append(A.count(i))

if len(uniq_items) <= K:
    print("0")
else:
#     print(uniq_items)
#     print(sorted(uniq_items,reverse=True))
    print(sum(sorted(uniq_items,reverse=True)[K:]))

Fixed submission:
from collections import Counter
N, K = map(int, input().split())
A = list(map(int, input().split()))

print(sum(sorted(Counter(A).values(),reverse=True)[K:]))

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

uniq_items = []
for i in set(A):
    uniq_items.append(A.count(i))

print(sum(sorted(uniq_items,reverse=True)[K:]))

Fixed submission:
from collections import Counter
N, K = map(int, input().split())
A = list(map(int, input().split()))

print(sum(sorted(Counter(A).values(),reverse=True)[K:]))
Buggy python submission (verdict: Runtime Error):
A, B, C, D, E, F = map(int, input().split())

density = 0
max_density = 0
ans = []
for a in range(31):
    if a*A*100> F:
        break
    for b in range(31):
        if a==0 and b==0:
            break
        if a*A*100+b*B*100>F:
            break
        for c in range(101):
            for d in range(101):
                if a*A*100+b*B*100*c*C+d*D>F:
                    break
#                 print(a*A*100 + b*B*100 + c*C + d*D)
                if ( a*A*100 + b*B*100 + c*C + d*D <= F ) and ( 100*(c*C+d*D)/(a*A*100 + b*B*100 + c*C + d*D) <= 100*E/(100+E) ):
                    density = 100*(c*C+d*D)/(a*A*100 + b*B*100 + c*C + d*D)
#                     print(density)
#                     print("{} {}".format(a*A*100+b*B*100, c*C+d*D))
                    if max_density < density:
#                         print(max_density)
                        max_density = density
                        ans.append("{} {}".format(a*A*100+b*B*100+c*C+d*D, c*C+d*D))
print(ans[-1])

Fixed submission:
A, B, C, D, E, F = map(int, input().split())

density = 0
max_density = 0
ans = []
for a in range(31):
    if a*A*100> F:
        break
    for b in range(31):
        if a==0 and b==0:
            continue
        if a*A*100+b*B*100>F:
            break
        for c in range(101):
            for d in range(101):
                density = 100*(c*C+d*D)/(a*A*100 + b*B*100 + c*C + d*D)
#                 if c==0 and d==0 and max_density <= density:
#                     ans.append("{} {}".format(a*A*100+b*B*100+c*C+d*D, c*C+d*D))
                if a*A*100+b*B*100*c*C+d*D>F:
                    break
#                 print(a*A*100 + b*B*100 + c*C + d*D)
                if ( a*A*100 + b*B*100 + c*C + d*D <= F ) and ( 100*(c*C+d*D)/(a*A*100 + b*B*100 + c*C + d*D) <= 100*E/(100+E) ):
#                     print(density)
#                     print("{} {}".format(a*A*100+b*B*100, c*C+d*D))
                    if max_density <= density:
#                         print(max_density)
                        max_density = density
                        ans.append("{} {}".format(a*A*100+b*B*100+c*C+d*D, c*C+d*D))


print(ans[-1])
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())

ans = 0
L = []
for i in range(N):
    L.append(int(input()))

l = set(L)

for j in l:
    if L.count(j)%2 == 1:
        ans += 1
print(ans)

Fixed submission:
N = int(input())

ans = 0
L = []
ans_L = {}

for i in range(N):
    L.append(int(input()))

for j in L:
    if not j in ans_L.keys():
        ans_L[j] = 0
    
    if ans_L[j]==0:
        ans_L[j] += 1
    elif ans_L[j]== 1:
        ans_L[j] -= 1

print(sum(ans_L.values()))
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int, input().split()))

max_count = 0
for i in range(10**5+1):
    count = 0
    for j in range(-1,2):
        count += A.count(i+j)
    max_count = max(count, max_count)
print(max_count)

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

max_count = 0

L = [0]*10**5
for i in A:
    L[i] += 1

for i in range(10**5+1):
    count = 0
    for j in range(-1,2):
        if i+j >= 0 and i+j < 10**5:
            count += L[i+j]
    max_count = max(count, max_count)
print(max_count)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())

A = list(map(int, input().split()))
max_count = 0
lower = min(A)-1
upper = max(A)+1
for i in range(lower,upper+1):
    count = 0
    for j in range(N):
        for k in range(-1,2,1):
            if A[j] + k == i:
                count += 1
    max_count = max(count, max_count)
    
print(max_count)

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

max_count = 0

L = [0]*10**5
for i in A:
    L[i] += 1

for i in range(10**5+1):
    count = 0
    for j in range(-1,2):
        if i+j >= 0 and i+j < 10**5:
            count += L[i+j]
    max_count = max(count, max_count)
print(max_count)
Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
N = int(input())
S = list(map(int, input().split()))

mod_count = 0
pre_fugou = 1 ## 前の符号がなんであったか　1ならplus　0ならマイナス

for i in range(N):
    if i==0 and S[i]==0:
        S[i] += 1
        mod_count += 1
        pre_fugou = 1
    elif i==0 and S[i]>0:
        pre_fugou = 1
    elif i==0 and S[i]<0:
        pre_fugou = 0
    else:
        if pre_fugou == 1:
            while True:
                if sum(S[:i+1]) > -1:
                    S[i] -= 1
                    mod_count += 1
                    pre_fugou = 0
                else:
                    pre_fugou = 0
                    break
        elif pre_fugou == 0:
            while True:
                if sum(S[:i+1]) < 1:
                    S[i] += 1
                    mod_count += 1
                    pre_fugou = 1
                else:
                    pre_fugou = 1
                    break
print(mod_count)

Fixed submission:
N = int(input())
a = list(map(int, input().split()))
num = float('inf')
for k in [0, 1]:
    s = 0
    tmp = 0
    for i in range(N):
        s += a[i]
        if i % 2 == k:
            if s <= 0:
                tmp += abs(s) + 1
                s = 1
        else:
            if s >= 0:
                tmp += abs(s) + 1
                s = -1
    num = min(tmp, num)

print(num)
Buggy python submission (verdict: Time Limit Exceeded):
N, C, K = map(int, input().split())
users = []
for i in range(N):
    users.append(int(input()))

users = sorted(users, reverse=False)

ans = 0
pos = 0
start = 0

while True:
    count = 0

    if pos == N:
        break
        
    start = users[pos]
#     print("start:{}".format(start))
    for i in range(C):
        if pos+i < N and users[pos+i] <= start+K:
            count += 1
    pos += count
#     print("pos:{}".format(pos))
    ans += 1
#     print("ans:{}".format(ans))

print(ans)

Fixed submission:
N, C, K = map(int, input().split())
users = []
for i in range(N):
    users.append(int(input()))

users = sorted(users, reverse=False)

ans = 0
pos = 0
start = 0

while True:
    count = 0

    if pos == N:
        break
        
    start = users[pos]
#     print("start:{}".format(start))
    for i in range(C):
        if pos+i < N and users[pos+i] <= start+K:
            count += 1
        else:
            break
    pos += count
#     print("pos:{}".format(pos))
    ans += 1
#     print("ans:{}".format(ans))

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
mod = 10**9+7
ans = 1
for i in range(1,N+1):
    ans *= i
ans %= mod
print(ans)

Fixed submission:
N = int(input())
mod = 10**9+7
ans = 1
for i in range(1,N+1):
    ans *= i
    ans %= mod
# ans %= mod
print(ans)
Buggy python submission (verdict: Runtime Error):
W, H, N = map(int, input().split())

right = W
left = 0
top = H
bottom = 0

for i in range(N):
    x, y, a = map(int, input().split())
    if a == 1 and left <= x:
        left = x
    elif a == 2 and right >= x:
        right = x
    elif a == 3 and bottom <= y:
        bottom = y
    elif a == 4 and top >= y:
        top = y

if (top-bottom)*(right-left) > 0 and (top-bottom)>0 and (rightt-left)>0:
    print((top-bottom)*(right-left))
else:
    print(0)


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

right = W
left = 0
top = H
bottom = 0

for i in range(N):
    x, y, a = map(int, input().split())
    if a == 1 and left <= x:
        left = x
    elif a == 2 and right >= x:
        right = x
    elif a == 3 and bottom <= y:
        bottom = y
    elif a == 4 and top >= y:
        top = y

if (top-bottom)*(right-left) > 0 and (top-bottom)>0 and (right-left)>0:
    print((top-bottom)*(right-left))
else:
    print(0)
Buggy python submission (verdict: Runtime Error):
H, A = map(int, input().split())
 
if A > H:
  print(1)
  
else:
  if H % A = 0:
    answer = H // A
  else:
    answer = H // A + 1
  
  print(answer)

Fixed submission:
H, A = map(int, input().split())
 
if A > H:
  print(1)
  
else:
  if H % A == 0:
    answer = H // A
  else:
    answer = H // A + 1
  
  print(answer)
Buggy python submission (verdict: Runtime Error):
print(int(input()**2))

Fixed submission:
print(int(input())**2)

Buggy python submission (verdict: Runtime Error):
print(input()**2)

Fixed submission:
print(int(input())**2)
Buggy python submission (verdict: Runtime Error):
Source Code 

Copy
Copy
N = input()
S = str(input())
 
if N + 2 // 2 == 1:
  print('No')
 
else:
  f = int((N/2)-1)
  b = int(N/2)
  front = S[:f]
  back = S[b:]
  if front == back:
    print('Yes')
  else:
    print('No')

Fixed submission:
N = int(input())
S = str(input())
 
if N + 2 // 2 == 1:
    print('No')
 
else:
    f = int(N/2)
    b = int(N/2)
    front = S[:f]
    back = S[b:]
    if front == back:
        print('Yes')
    else:
        print('No')
    
#print(front)
#print(back)

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

if N + 2 // 2 == 1:
  print('No')

else:
  f = int(N/2)
  b = int(N/2)
  front = S[:f]
  back = S[b:]
  if front == back:
    print('Yes')
  else:
    print('No')
    

Fixed submission:
N = int(input())
S = str(input())
 
if N + 2 // 2 == 1:
    print('No')
 
else:
    f = int(N/2)
    b = int(N/2)
    front = S[:f]
    back = S[b:]
    if front == back:
        print('Yes')
    else:
        print('No')
    
#print(front)
#print(back)
Buggy python submission (verdict: Runtime Error):
N = int(input())
 
xy = []
for _ in range (N):
  x, y = map(int, input().split())
  xy = xy.append([x, y])
 
nu = 0
for i in range (N):
  for j in range (i,N):
    nu += ((xy[i][0] - xy[j][0])**2 + (xy[i][1] - xy[j][1])**2)**0.5
    
answer = nu * (2/N)
 
print(answer)

Fixed submission:
N = int(input())
 
xy = []
for _ in range (N):
  x, y = map(int, input().split())
  xy.append([x, y])
 
nu = 0
for i in range (N):
  for j in range (i,N):
    nu += ((xy[i][0] - xy[j][0])**2 + (xy[i][1] - xy[j][1])**2)**0.5
    
answer = nu * (2/N)
 
print(answer)

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

xy = []
for _ in range N:
  x, y = map(int, input().split())
  xy = xy.append([x, y])

nu = 0
for i in range (N):
  for j in range (i,N):
    nu += ((xy[i][0] - xy[j][0])**2 + (xy[i][1] - xy[j][1])**2)**0.5
    
answer = nu * (2/N)

print(answer)

Fixed submission:
N = int(input())
 
xy = []
for _ in range (N):
  x, y = map(int, input().split())
  xy.append([x, y])
 
nu = 0
for i in range (N):
  for j in range (i,N):
    nu += ((xy[i][0] - xy[j][0])**2 + (xy[i][1] - xy[j][1])**2)**0.5
    
answer = nu * (2/N)
 
print(answer)

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

xy = []
for _ in range N:
  x, y = map(int, input().split())
  xy = xy.append([x, y])

nu = 0
for i in range N:
  for j in range (i:N):
    nu += ((xy[i][0] - xy[j][0])**2 + (xy[i][1] - xy[j][1])**2)**0.5
    
answer = nu * (2/N)

print(answer)

Fixed submission:
N = int(input())
 
xy = []
for _ in range (N):
  x, y = map(int, input().split())
  xy.append([x, y])
 
nu = 0
for i in range (N):
  for j in range (i,N):
    nu += ((xy[i][0] - xy[j][0])**2 + (xy[i][1] - xy[j][1])**2)**0.5
    
answer = nu * (2/N)
 
print(answer)
Buggy python submission (verdict: Runtime Error):
N = int(input())
odd = 0
if i%2==1 for i in range (1, N+1):
  odd += 1
print(odd//N)

Fixed submission:
N = int(input())
odd = 0
for i in range (1, N+1):
    if i%2==1:
        odd += 1

print(odd/N)
Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
h = list(map(int, input().split()))
print(sum(1 if t >= K for t in h))

Fixed submission:
N, K = map(int, input().split())
H = list(map(int, input().split()))
num = 0
for i in H:
    if i >= K:
        num += 1

print(num)

Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
H = list(map(int, input().split())
num = 0
for i in H:
    if i >= K:
        num += 1

print(num)


Fixed submission:
N, K = map(int, input().split())
H = list(map(int, input().split()))
num = 0
for i in H:
    if i >= K:
        num += 1

print(num)

Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
H = list(map(int, input()split())
num = 0
for i in H:
    if i >= K:
        num += 1

print(num)

Fixed submission:
N, K = map(int, input().split())
H = list(map(int, input().split()))
num = 0
for i in H:
    if i >= K:
        num += 1

print(num)
Buggy python submission (verdict: Runtime Error):
a = str(input())
s = int(input())

if a<3200:
  print('red')
else:
  print(s)


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

if a<3200:
  print('red')
else:
  print(s)

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

if a<3200:
  print('red')
else:
  print(s)

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

if a<3200:
  print('red')
else:
  print(s)
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = sorted(map(int, input().split()))
print(A[::2]-A[1::2])

Fixed submission:
N = int(input())
A = sorted(map(int, input().split()), reverse=True)
print(sum(A[::2])-sum(A[1::2]))
Buggy python submission (verdict: Runtime Error):
A = int(input())
B = int(input())
C = int(input())
X = int(input())

count = 0
for a in range (A+1):
    for b in range (B+1):
        for c in range (C+1):
            if a*500 + b*100 + c*50 = X:
                count += 1
print(count) 

Fixed submission:
A = int(input())
B = int(input())
C = int(input())
X = int(input())

count = 0
for a in range (A+1):
    for b in range (B+1):
        for c in range (C+1):
            if a*500 + b*100 + c*50 == X:
                count += 1
print(count)
Buggy python submission (verdict: Runtime Error):
def main():
  print("aaa")
  a = list(input())
  a = [int(aa) for aa in a]
  a = sorted(a)
  if a==[5,7,7]:
    return "YES"
  else:
    return "NO"
  
  
if __name__ == "__main__":
  main()

Fixed submission:
def main():
  a = list(input().split())
  a = [int(aa) for aa in a]
  a = sorted(a)
  if a==[5,5,7]:
    print('YES')
  else:
    print('NO')
  
  
if __name__ == "__main__":
  main()

Buggy python submission (verdict: Runtime Error):
def main(a):
  print("aaa")
  
if __name__ == "__main__":
  main(a)

Fixed submission:
def main():
  a = list(input().split())
  a = [int(aa) for aa in a]
  a = sorted(a)
  if a==[5,5,7]:
    print('YES')
  else:
    print('NO')
  
  
if __name__ == "__main__":
  main()
Buggy python submission (verdict: Runtime Error):
s = input()
if s == "AAA" or s == "BBB":
  return True
else:
  return False

Fixed submission:
s = input()
if s == "AAA" or s == "BBB":
  print ("No")
else:
  print ("Yes")
Buggy python submission (verdict: Runtime Error):
n,a,b = map(int,input().split())
print(a*n//(a+b)+min(n%(a+b),a)

Fixed submission:
n,a,b = map(int,input().split())
print((n//(a+b))*a+min(n%(a+b),a))
Buggy python submission (verdict: Runtime Error):
nums= input().split()


for i in range(len(nums)):
    nums[i] = int(nums[i])
    
nums.sort()


if nums[1] == nums[2] and nums[0]<nums[1]:
    print(Yes)
elif nums[1] == nums[0] and nums[1]<nums[2]:
    print(Yes)
else:
    print(No)

Fixed submission:
nums= input().split()


for i in range(len(nums)):
    nums[i] = int(nums[i])
    
nums.sort()


if nums[1] == nums[2] and nums[0]<nums[1]:
    print("Yes")
elif nums[1] == nums[0] and nums[1]<nums[2]:
    print("Yes")
else:
    print("No")

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

nums.sort()


if nums[1] == nums[2] and nums[0]<nums[1]:
    print(True)
elif nums[1] == nums[0] and nums[1]<nums[2]:
    print(True)
else:
    print(False)


Fixed submission:
nums= input().split()


for i in range(len(nums)):
    nums[i] = int(nums[i])
    
nums.sort()


if nums[1] == nums[2] and nums[0]<nums[1]:
    print("Yes")
elif nums[1] == nums[0] and nums[1]<nums[2]:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
n= input().split()
n = int(n)
nums= input().split()
#map(int,input().split())
state = 1
for i in range(n):
    if nums[i] &1 == 0 :
        if nums[i]%3 ==0 or nums[i]%5 ==0:
            continue
        else:
            state= 0
            #print("DENIED")
            break
if state == 1:
    print("APPROVED")
else:
    print("DENIED")

Fixed submission:
n= input()
n = int(n)
nums= input().split()
#map(int,input().split())
state = 1
for i in range(n):
    if int(nums[i]) &1 == 0 :
        if int(nums[i])%3 ==0 or int(nums[i])%5 ==0:
            continue
        else:
            state= 0
            #print("DENIED")
            break
if state == 1:
    print("APPROVED")
else:
    print("DENIED")
Buggy python submission (verdict: Time Limit Exceeded):
N, X, Y = map(int, input().split(' '))

res = [0] * (N)

for i in range(N):
    for j in range(i+1, N):
        dist = min(abs(i - j), abs(i - X + 1) + 1 + abs(j - Y + 1), abs(i-Y+1) + 1 + abs(j-X+1))
        res[dist] += 1

for i in range(1, N):
    print(res[i])


Fixed submission:
N, X, Y = map(int, input().split(' '))

res = [0] * (N)

for i in range(N):
    for j in range(i+1, N):
        dist = min(abs(i - j), abs(i - X + 1) + 1 + abs(j - Y + 1))
        res[dist] += 1

for i in range(1, N):
    print(res[i])
Buggy python submission (verdict: Runtime Error):
x,y,z = map(int(input()))
print(str(z)+" " +str(x)+" "+str(y) )

Fixed submission:
x,y,z = map(int,input().split())
print(str(z)+" " +str(x)+" "+str(y) )
Buggy python submission (verdict: Time Limit Exceeded):
a, b = map(int, input().split())
table = list(map(int, input().split()))
table.sort(reverse=True)
if b < len(table):
    for x in range(0, b):
        table.pop(0)
    print(sum(table))
else:
    print(0)

Fixed submission:
a, b = map(int, input().split())
table = list(map(int, input().split()))
table.sort(reverse=True)
if b < len(table):
    del table[0:b]
    print(sum(table))
else:
    print(0)
Buggy python submission (verdict: Runtime Error):
import sys
n, m = map(int, input().split())
wa, ac = 0, 0
memo = []
hi = n
if n < m:
    hi = m
b = [0] * hi
table = [sys.stdin.readline().split() for x in range(m)]
for x in range(m):
    if table[x][1] == 'AC' and not table[x][0] in memo:
        memo.append(table[x][0])
        ac += 1
        wa += b[int(table[x][0])]
    elif table[x][1] == 'WA':
        b[int(table[x][0])] += 1
print(ac, wa)


Fixed submission:
a = input()


print(chr(ord(a) + 1))

Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
cnt = 0
wa = 0
ac = 0
sumi = []
b = {}
for x in range(m):
    a = input().split()
    if a[1] == 'WA':
        try:
            b[a[0]] += 1
        except KeyError:
            b[a[0]] = 1
    if a[1] == 'AC' and not a[0] in sumi:
        sumi.append(a[0])
        ac += 1
        try:
            wa += b[a[0]]
        except KeyError:
            continue
print(ac, wa)

Fixed submission:
a = input()


print(chr(ord(a) + 1))

Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
cnt = 0
wa = 0
ac = 0
sumi = []
b = {}
for x in range(m):
    a = input().split()
    if a[1] == 'WA' and not a[0] in sumi:
        try:
            b[a[0]] += 1
        except KeyError:
            b[a[0]] = 1
    elif a[1] == 'AC' and not a[0] in sumi:

        sumi.append(a[0])
        ac += 1
        try:
            wa += b[a[0]]
        except KeyError:
            continue
print(ac, wa)


Fixed submission:
a = input()


print(chr(ord(a) + 1))
Buggy python submission (verdict: Runtime Error):
n = int(input())
table = list(input())
cnt = 0
for x in range(n):
    if table[x] == 'A' and table[x + 1] == 'B' and table[x + 2] == 'C':
        cnt += 1
print(cnt)



Fixed submission:
n = int(input())
table = list(input())
cnt = 0
for x in range(n - 2):
    if table[x] == 'A' and table[x + 1] == 'B' and table[x + 2] == 'C':
        cnt += 1
print(cnt)
Buggy python submission (verdict: Runtime Error):
s = input()
n = int(input())

t = 0
for i in range(n):
  a = input().split()
  if int(a[0]) == 1:
    t += 1
    #s = s[::-1]
  else:
    if t % 2 == 1:
      s = s[::-1]
    t = 0
    if int(a[1]) == 1:
      s = a[2] + s
    if int(a[1]) == 2:
      s = s + a[2]
    
print(s)

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

flag = False
for i in range(1001):
  if math.floor(i*0.08) == a[0]:
    if math.floor(i*0.1) == a[1]:
      flag = True
      break

if flag:
  print(i)
else:
  print("-1")