Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
n = int(input())
list = []
i = 0
for k in range(n):
    d = int(input())
    if d in list:
        pass
    else:
        list.append(d)
print(len(list))


Fixed submission:
str = input()
print(str[:3] + "8" + str[4:])
Buggy python submission (verdict: Runtime Error):
a, b, c, d = map(int, input().split())
l = a + b
r = c + d
if l == r:
    print(Balanced)
elif l < r:
    print(Right)
else:
    print(Left)


Fixed submission:
a, b, c, d = map(int, input().split())
l = a + b
r = c + d
if l == r:
    print("Balanced")
elif l < r:
    print("Right")
else:
    print("Left")
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
#put a_i into list
list_a_i = list(sorted(map(int, input().split())))
remove = 0
while len(list_a_i) >=1:
    #count number of list_a_i[1]
    x = list_a_i.count(list_a_i[0])
    if x > list_a_i[0]:
        remove += x - list_a_i[0]
    elif x < list_a_i[0]:
        remove += x
    for i in range(x):
        list_a_i.remove(int(list_a_i[0]))
print(remove)


Fixed submission:
N = int(input())
a = list(map(int, input().split()))
dic = {}
for elem in a:
    if elem not in dic:
        dic[elem] = 1
    else:
        dic[elem] += 1

ans = 0
for k in dic.keys():
    if dic[k] > k:
        ans += dic[k] - k
    elif dic[k] < k:
        ans += dic[k]

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
#put a_i into list
list_a_i = list(sorted(map(int, input().split())))
remove = 0
while len(list_a_i) >=1:
    x = 0
    #count number of list_a_i[1]
    for j in range(len(list_a_i)):
        if list_a_i[0] == list_a_i[j]:
            x += 1
    if x > list_a_i[0]:
        remove += x - list_a_i[0]
    elif x < list_a_i[0]:
        remove += x
    for i in range(x):
        list_a_i.remove(int(list_a_i[0]))
print(remove)


Fixed submission:
N = int(input())
a = list(map(int, input().split()))
dic = {}
for elem in a:
    if elem not in dic:
        dic[elem] = 1
    else:
        dic[elem] += 1

ans = 0
for k in dic.keys():
    if dic[k] > k:
        ans += dic[k] - k
    elif dic[k] < k:
        ans += dic[k]

print(ans)
Buggy python submission (verdict: Runtime Error):
a = list(map(int,input().split()))
ans = "No"
 
if a[0] == a[1]:
  a[0] != a[2]:
   	ans = "Yes"
else:
  a[0] == a[2]:
    ans = "Yes"
    
print(ans)

Fixed submission:
a = list(map(int,input().split()))
ans = "No"

if a[0] == a[1]:
  if a[0] != a[2]:
   	ans = "Yes"
else:
  if a[0] == a[2] or a[1] == a[2]:
    ans = "Yes"
    
print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
S,T = input().split()
a =""

for i in range(N):
  a += S[i] + T[i]
  
print(a)

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

if A == 1:
    if B == 2:
        print(3)
    if B == 3:
        print(2)

if A == 2:
    if B == 1:
        print(3)
    if B == 3:
        print(1)

if A == 3:
    if B == 1:
        print(2)
    if B == 2:
        print(1)

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

if A = 1:
    if B = 2:
        print(3)
    else if B = 3:
        print(2)

if A = 2:
    if B = 1:
        print(3)
    if B = 3:
        print(1)

if A = 3:
    if B = 1:
        print(2)
    if B = 2:
        print(1)

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

if A == 1:
    if B == 2:
        print(3)
    if B == 3:
        print(2)

if A == 2:
    if B == 1:
        print(3)
    if B == 3:
        print(1)

if A == 3:
    if B == 1:
        print(2)
    if B == 2:
        print(1)
Buggy python submission (verdict: Runtime Error):
#値の入力
A1 = int(input())
A2 = int(input())
A3 = int(input())

#値が範囲内か
if(1 > A1 or A1 > 13):
    print("もう一度入力して下さい")
    A1 = int(input("A1:"))
if(1 >A2 or A2 > 13):
    print("もう一度入力して下さい")
    A2 = int(input("A2:"))
if(1 > A3 or A3 > 13):
    print("もう一度入力して下さい")
    A3 = int(input("A3:"))

#判定
if(A1+ A2+ A3 >= 22):
    print("bust")
else:
    print("win")


Fixed submission:
#値の入力
A1, A2, A3 = map(int, input(). split()) 

#値が範囲内か
if 1 > A1 or A1 > 13:
    print("もう一度入力して下さい")
    A1 = int(input("A1:"))
if 1 >A2 or A2 > 13:
    print("もう一度入力して下さい")
    A2 = int(input("A2:"))
if 1 > A3 or A3 > 13:
    print("もう一度入力して下さい")
    A3 = int(input("A3:"))

#判定
if(A1+ A2+ A3 >= 22):
    print("bust")
else:
    print("win")

Buggy python submission (verdict: Runtime Error):
#値の入力
A1 = int(input("A1:"))
A2 = int(input("A2:"))
A3 = int(input("A3:"))

#値が範囲内か
if(1 > A1 or A1 > 13):
    print("もう一度入力して下さい")
    A1 = int(input("A1:"))
if(1 >A2 or A2 > 13):
    print("もう一度入力して下さい")
    A2 = int(input("A2:"))
if(1 > A3 or A3 > 13):
    print("もう一度入力して下さい")
    A3 = int(input("A3:"))

#判定
if(A1+ A2+ A3 >= 22):
    print("bust")
else:
    print("win")


Fixed submission:
#値の入力
A1, A2, A3 = map(int, input(). split()) 

#値が範囲内か
if 1 > A1 or A1 > 13:
    print("もう一度入力して下さい")
    A1 = int(input("A1:"))
if 1 >A2 or A2 > 13:
    print("もう一度入力して下さい")
    A2 = int(input("A2:"))
if 1 > A3 or A3 > 13:
    print("もう一度入力して下さい")
    A3 = int(input("A3:"))

#判定
if(A1+ A2+ A3 >= 22):
    print("bust")
else:
    print("win")

Buggy python submission (verdict: Runtime Error):
#値の入力
A1 = int(input("A1:"))
A2 = int(input("A2:"))
A3 = int(input("A3:"))

#値が範囲内か
if(1 > A1 or A1 > 13):
    print("もう一度入力して下さい")
    A1 = int(input("A1:"))
if(1 >A2 or A2 > 13):
    print("もう一度入力して下さい")
    A2 = int(input("A2:"))
if(1 > A3 or A3 > 13):
    print("もう一度入力して下さい")
    A3 = int(input("A3:"))

#判定
if(A1+ A2+ A3 >= 22):
    print("bust")
else:
    print("win")


Fixed submission:
#値の入力
A1, A2, A3 = map(int, input(). split()) 

#値が範囲内か
if 1 > A1 or A1 > 13:
    print("もう一度入力して下さい")
    A1 = int(input("A1:"))
if 1 >A2 or A2 > 13:
    print("もう一度入力して下さい")
    A2 = int(input("A2:"))
if 1 > A3 or A3 > 13:
    print("もう一度入力して下さい")
    A3 = int(input("A3:"))

#判定
if(A1+ A2+ A3 >= 22):
    print("bust")
else:
    print("win")

Buggy python submission (verdict: Runtime Error):
#値の入力
A1 = int(input("A1:"))
A2 = int(input("A2:"))
A3 = int(input("A3:"))

#入力値の判定
if(1 > A1 or A1 > 13):
    print("もう一度入力して下さい")
    A1 = int(input("A1:"))
if(1 >A2 or A2 > 13):
    print("もう一度入力して下さい")
    A2 = int(input("A2:"))
if(1 > A3 or A3 > 13):
    print("もう一度入力して下さい")
    A3 = int(input("A3:"))

#判定
if(A1+ A2+ A3 >= 22):
    print("bust")
else:
    print("win")


Fixed submission:
#値の入力
A1, A2, A3 = map(int, input(). split()) 

#値が範囲内か
if 1 > A1 or A1 > 13:
    print("もう一度入力して下さい")
    A1 = int(input("A1:"))
if 1 >A2 or A2 > 13:
    print("もう一度入力して下さい")
    A2 = int(input("A2:"))
if 1 > A3 or A3 > 13:
    print("もう一度入力して下さい")
    A3 = int(input("A3:"))

#判定
if(A1+ A2+ A3 >= 22):
    print("bust")
else:
    print("win")
Buggy python submission (verdict: Runtime Error):
n = int(input())
print(math.ceil(n/2))

Fixed submission:
N = int(input())

print((N + 1) // 2)

Buggy python submission (verdict: Runtime Error):
print(math.ceil(n/2))

Fixed submission:
N = int(input())

print((N + 1) // 2)

Buggy python submission (verdict: Runtime Error):
n = int(input())
print(math.ceil(n/2))

Fixed submission:
N = int(input())

print((N + 1) // 2)

Buggy python submission (verdict: Runtime Error):
N = input()
print(round((N/2)+0.01))

Fixed submission:
N = int(input())
print(round((N/2)+0.01))

Buggy python submission (verdict: Runtime Error):
print(round((N/2)+0.01))

Fixed submission:
N = int(input())
print(round((N/2)+0.01))

Buggy python submission (verdict: Runtime Error):
print(round(N/2+0.01))


Fixed submission:
N = int(input())
print(round((N/2)+0.01))

Buggy python submission (verdict: Runtime Error):
print(N)


Fixed submission:
N = int(input())
print(round((N/2)+0.01))

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

print(math.floor(N / 2) + 1 if N % 2 else math.floor(N / 2))

Fixed submission:
import math

def func(N):
    ans = math.floor(N / 2) + 1 if N % 2 else math.floor(N / 2)
    return ans
  
  
N = int(input())

print(func(N))

Buggy python submission (verdict: Runtime Error):
n = int(input())
if n % 2 != 0:
  print(n/2+1)
 else:
  print(n/2)

Fixed submission:
n = int(input())
print((n+1)//2)

Buggy python submission (verdict: Runtime Error):
num=int(input())
i=0
while num=>2*int(i):
	i=i+1
print(i)

Fixed submission:
num=int(input())
a=int(num/2)
b=int(num%2)
if b==1:
	a=int(a)+1    
print(a)
Buggy python submission (verdict: Runtime Error):
s=input()
t=input()
a=0
while(s!=t):
	s =s[-1]+s[:-1]
	a+=1
    if a==len(s):
    	print("NO")
        break
if s==t:
	print("YES")
        

Fixed submission:
s = input(); t = input()
c = 0 #無限ループを防ぐためのカウンターを設置
     
while (s != t):
	s = s[-1] + s[:-1]
	c += 1
	if c == len(s):
		print('No')
		break
        
if s == t:
	print('Yes')
Buggy python submission (verdict: Runtime Error):
a,b,h = [int(input()) for i in range(3)
print((a + b)*h/2)

Fixed submission:
a,b,h = [int(input()) for i in range(3)]
print(int((a + b)*h/2))
Buggy python submission (verdict: Runtime Error):
    num = list(map(int,input().split()))
    a=0
    b=0
    for i in range(3):
    	if num[i]==5:
    		a+=1
    	if num[i]==7:
    		b+=1
    if a==2 and b==1:
    	print("YES")
    else:
    	print("NO")

Fixed submission:
word = list(map(int,input().split()))
#print(word) ['5', '5', '7']
a=0
b=0
for i in range(3):
    if word[i]==int(5):
        a=a+1
for i in range(3):
    if word[i]==int(7):
        b=b+1
if a==2 and b==1:
	print("YES")
else:
  	print("NO")

Buggy python submission (verdict: Runtime Error):
num = list(map(int,input().split()))
a=0
b=0
for i in range(3):
	if num[i]==5:
		a+=1
	if num[i]==7:
		b+=1
if a==2 and b==1:
	print(YES)
else:
	print(NO)

Fixed submission:
word = list(map(int,input().split()))
#print(word) ['5', '5', '7']
a=0
b=0
for i in range(3):
    if word[i]==int(5):
        a=a+1
for i in range(3):
    if word[i]==int(7):
        b=b+1
if a==2 and b==1:
	print("YES")
else:
  	print("NO")

Buggy python submission (verdict: Runtime Error):
word = list(input())
#print(word) ['5', '5', '7']
a=0
b=0
for i in range(3):
	if word[i]==5:
    	a=a+1
for i in range(3):
	if word[i]==7:
      	b=b+1
if a=2 and b=1:
	print("YES")
else:
  	print("NO")

Fixed submission:
word = list(map(int,input().split()))
#print(word) ['5', '5', '7']
a=0
b=0
for i in range(3):
    if word[i]==int(5):
        a=a+1
for i in range(3):
    if word[i]==int(7):
        b=b+1
if a==2 and b==1:
	print("YES")
else:
  	print("NO")
Buggy python submission (verdict: Runtime Error):
num = list(map(input().split()))
word = [input() for i in range(num[0])]
print(''.join(sorted(word)))

Fixed submission:
n = list(map(int,input().split()))
word = [input() for i in range(n[0])]
print(''.join(sorted(word)))

Buggy python submission (verdict: Runtime Error):
num = list(map(int,input().split()))
word = [input for i in range(n[0])]
print(''.join(sorted(num)))

Fixed submission:
n = list(map(int,input().split()))
word = [input() for i in range(n[0])]
print(''.join(sorted(word)))

Buggy python submission (verdict: Runtime Error):
n = list(map(int,input().split()))
word = [input() for i in range(n[1])]
print(''.join(sorted(word)))


Fixed submission:
n = list(map(int,input().split()))
word = [input() for i in range(n[0])]
print(''.join(sorted(word)))

Buggy python submission (verdict: Runtime Error):
n = list(map(int,input().split()))
word = [input() for i in range(n[1])]
print(word)
print(''.join(sorted(word)))


Fixed submission:
n = list(map(int,input().split()))
word = [input() for i in range(n[0])]
print(''.join(sorted(word)))
Buggy python submission (verdict: Runtime Error):
tmp = list(input())

N = int(tmp[0])
R = int(tmp[1])

if N < 10:
  print(100 * (10 - N) + R)
else:
  print(R)

Fixed submission:
tmp = list(input().split(" "))

N = int(tmp[0])
R = int(tmp[1])

if N < 10:
  print(100 * (10 - N) + R)
else:
  print(R)
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python

n, m = input().split(" ")
n = int(n)
m = int(m)
s_len = []
c_len = []
dig = 10**(n-1)

for i in range(m):
    tmp = input().split(" ")
    s_len.append(int(tmp[0]))
    c_len.append(int(tmp[1]))

c_t = 0
for i in c_len:
    c_t += int(i)

for i in range(dig-1, dig*10):
    flag = False
    for j,s in enumerate(s_len):
        if str(i)[s-1] != str(c_len[j]) and flag == False:
            flag = True
            break
    if flag==False:
        print(i)
        exit()

print("-1")

Fixed submission:
#!/usr/bin/env python

import math

n = int(input())
print(math.ceil(n/2))

Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python

def func():
    n,m = [int(i) for i in input().split(" ")]
    pibot = 10**(m-1)
    dic = {}

    for i in range(m):
        tmp = [int(i) for i in input().split(" ")]

        if tmp[0] not in dic.keys():
            dic[tmp[0]] = tmp[1]
        else:
            if dic[tmp[0]] != tmp[1]:
                print("-1")
                return

    a = [0] * m
    for key in dic.keys():
        a[key-1] = dic[key]

    tmp_s = ""
    for i in a:
        tmp_s += str(i)

    if int(tmp_s) < pibot:
        tmp_s = "-1"

    print(tmp_s)

if __name__ == "__main__":
    func()

Fixed submission:
#!/usr/bin/env python

import math

n = int(input())
print(math.ceil(n/2))
Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python
import math

l_s = []
c = 0
n = int(input())
for i in range(n):
    s = input()
    c += l_s.count(sorted(s))
    l_s.append(sorted(s))

print(c)

Fixed submission:
#!/usr/bin/env python
import math

l_s = set()
c = 0
n = int(input())
dup = {}

for i in range(n):
    st = sorted(input())
    s  = "".join(st)
    if s in l_s:
        if s in dup.keys():
            dup[s] += 1
        else:
            dup[s] = 1
        c += dup[s]
    l_s.add(s)

print(c)

Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python

l_s = []
c = 0
n = int(input())
for i in range(n):
    s = input()
    l_s.append(sorted(s))

for i in range(len(l_s)):
    c += l_s[i:].count(l_s[i])-1

print(c)

Fixed submission:
#!/usr/bin/env python
import math

l_s = set()
c = 0
n = int(input())
dup = {}

for i in range(n):
    st = sorted(input())
    s  = "".join(st)
    if s in l_s:
        if s in dup.keys():
            dup[s] += 1
        else:
            dup[s] = 1
        c += dup[s]
    l_s.add(s)

print(c)

Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python

l = []
n = int(input())
for i in range(n):
    s = input()
    l.append(s)

l_s = []
for i in range(n):
    l_s.append(sorted(l[i]))

c = 0
for i in range(len(l_s)):
    for j in range(i+1, len(l_s)):
        if l_s[i] == l_s[j]:
            c += 1
print(c)

Fixed submission:
#!/usr/bin/env python
import math

l_s = set()
c = 0
n = int(input())
dup = {}

for i in range(n):
    st = sorted(input())
    s  = "".join(st)
    if s in l_s:
        if s in dup.keys():
            dup[s] += 1
        else:
            dup[s] = 1
        c += dup[s]
    l_s.add(s)

print(c)
Buggy python submission (verdict: Runtime Error):
import numpy as np

N = int(input())
x = np.array(list(map(int, input().split())))
s = np.sum(np.square(x))

for i in range(1, 101):
    s = min(s, np.sum(np.square(x-i)))

print(s)

Fixed submission:
import numpy as np

N = int(input())
x = np.array(list(map(int, input().split())))
s = np.sum(np.square(x))

for i in range(1, 101):
    s = min(s, np.sum(np.square(x-i)))

print(s)
Buggy python submission (verdict: Runtime Error):
n = int(input())
s, t = input().split()

ans = str()
for i in range(n):
    ans += s[i]
    ans += t[i]

print(ans)

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

print(6-a-b)

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

print(6-a-b)



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

print(6-a-b)
Buggy python submission (verdict: Runtime Error):
s = input()
week = "SUN", "MON", "TUE", "WED", "TUE", "FRI", "SAT"

s = week.index(s)
print(7-s)




Fixed submission:
s = input()
week = "SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"

s = week.index(s)
print(7-s)
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())

if a<10 & b<10:
    print(a*b)
else:
    print(-1)



Fixed submission:
import math
r = int(input())

print(math.floor(r*r))
Buggy python submission (verdict: Runtime Error):
# My answer. (In doubt!!)
# K, X = map(int, input().split())
# for i in range(X-K+1, K+X):
#     print(i, end=" ")

# This is the most optimal code as Coder I believe.
K, X = map(int, input().split())
l = max(-1000000, x - k + 1)
r = min(1000000, x + k - 1)
for i in range(l, r + 1):
    print(i)

# The official answer is as below.
# https://img.atcoder.jp/abc137/editorial.pdf



Fixed submission:
K, X = map(int, input().split())
for i in range(X-K+1, K+X):
    print(i, end=" ")
Buggy python submission (verdict: Runtime Error):
N = int(input())
T, A = map(int, input().split())
h = list(map(int, input().split()))
t = [abs(T - i * 0.006 - A) for i in h]
print(h.index(min(t)) + 1)

Fixed submission:
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
z=[abs(t-x*0.006-a) for x in h]
print(z.index(min(z))+1)
Buggy python submission (verdict: Runtime Error):
N, Y = map(int, input().split())

for z in range(N+1):
    for y in range(N-x+1):
        if (Y-y-z)*10000 + y*5000 + z*1000 == Y:
            print((Y-y-z), y, z)
            exit()
else:
    print("-1 -1 -1")

Fixed submission:
N, Y = map(int, input().split())
ans = -1, -1, -1

for x in range(N+1):
    for y in range(N-x+1):
        z = N - x - y
        if z <= 2000 and \
                x*10000 + y*5000 + z*1000 == Y:
            ans = x, y, z
            break
    else:
        continue
    break

print(*ans)
Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
if a == c: print("yes")
else: print("No")



Fixed submission:
a, b, c = input()
if a == c:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
import numpy as np
N = int(input())
S = list(input())
Q = int(input())
Q_list = [input().split() for _ in range(Q)]
t_list = []
for q in Q_list:
  type = int(q[0])
  if(type==1):
    S[int(q[1])-1] = q[2]
  else:
    s, e = int(q[1]), int(q[2])
    t = 0
    str_list = []
    t = len(np.unique(S[s-1:e]))
    t_list.append(t)
[print(t) for t in t_list]

Fixed submission:
print((int(input())+1)//2)

Buggy python submission (verdict: Runtime Error):
return int(input())//2+1

Fixed submission:
print((int(input())+1)//2)
Buggy python submission (verdict: Runtime Error):
x = input()
if (x % 2 == 0):
  y = x // 2
else:
  y = x//2 + 1

print(y)

Fixed submission:
x = int(input())
if (x % 2 == 0):
  y = x // 2
else:
  y = x//2 + 1

print(y)

Buggy python submission (verdict: Runtime Error):
x = input()
y = x // 2
if(x % 2 != 0):
  y += 1
  
print(y)

Fixed submission:
x = int(input())
if (x % 2 == 0):
  y = x // 2
else:
  y = x//2 + 1

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

cnt = 0

for i in range(n):
    for j in range(n):
        if a[i] == a[j]:
            cnt += 1

if cnt == n:
    print("YES")
elif cnt > n:
    print("NO")

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

if len(set(a)) == len(a):
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())
p = list(map(int, input().split()))
ans = 0

for i in range(n - k + 1):
    ans = max(ans, sum(p[i:i+k]))
    
print(0.5 * (ans + k))


Fixed submission:
n, k = map(int, input().split())
p = list(map(int, input().split()))
s = [0 for _ in range(n + 1)]
ans = 0
for i in range(n):
    s[i+1] = p[i] + s[i]

for i in range(n - k + 1):
    ans = max(ans, s[i + k] - s[i])

print((ans + k) * 0.5)
Buggy python submission (verdict: Runtime Error):
n = int(input())
p = list(map(int, input().split()))

pmin = p[0]
ans = 0
for i in range(n):
    if p[i] <= pmin:
        ans += 1
    pmin = min(pmin, p[i])

print(ans

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

pmin = p[0]
ans = 0
for i in range(n):
    if p[i] <= pmin:
        ans += 1
        pmin = p[i]

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

ac = 0
wa = 0
prob = 0

for i in range(m):
    if p[i][0] != prob:
        if p[i][1] == "WA":
            wa += 1
        elif p[i][1] == "AC":
            ac += 1
            prob = p[i][0]
            
print(ac, wa

Fixed submission:
n, m = map(int, input().split())
ac = 0
wa = 0

ac_tf = [0] * n
wa_num = [0] * n

for i in range(m):
    p, s = input().split()
    p = int(p) - 1
    if s == "AC":
        if ac_tf[p] == 0:
            ac += 1
            wa += wa_num[p]
            ac_tf[p] = 1
    else:
        wa_num[p] += 1
            
print(ac, wa)
Buggy python submission (verdict: Runtime Error):
a, b, k = map(int, input().split())

if a < k :
	k = k - a
	a = 0	
	if b < k :
		b = 0
	else :
		b = b - k

else :
	a = a - k

print(a, b

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

if a <= k :
	k = k - a
	a = 0	
	if b < k :
		b = 0
	else :
		b = b - k

else :
	a = a - k

print(a, b)
Buggy python submission (verdict: Runtime Error):
import math

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

print(int(a * b / math.gcd(a, b)))

Fixed submission:
import fractions

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

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

ans = []

for i in range(n):
    s = a[i]
    ans[s-1] = i + 1
    
print(ans)

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

ans = [0] * n

for i in range(n):
    s = a[i]
    ans[s-1] = i + 1

print(*ans)

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

random.shuffle(a)

print(a)


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

ans = [0] * n

for i in range(n):
    s = a[i]
    ans[s-1] = i + 1

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

def prime_factorization(x):
    table = []
    i = 2
    while i * i <= x :
        if x % i == 0 :
          	n /= i
            table.append(i)
        i += 1

    if x > 1 :
        table.append(x)
    return table

v = set(prime_factorization(a))
w = set(prime_factorization(b))

print(len(v&w) + 1)


Fixed submission:
a,b = map(int,input().split())
 
def prime_decomposition(n):
  i = 2
  table = []
  while i * i <= n:
    while n % i == 0:   
      n /= i
      table.append(i)
    i += 1
  if n > 1:
    table.append(n)
  return table
  
s = set(prime_decomposition(a))
t = set(prime_decomposition(b))
 
print(len(s&t) + 1)
Buggy python submission (verdict: Time Limit Exceeded):
n, k, q = map(int, input().split())
a = [int(input()) for i in range(q)]

point = [k - q] * (n + 1)

for x in range(q):
    for y in range(n) :
        if y + 1 == a[x] :
            point[y] += 1

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

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

point = [k - q] * (n + 1)

for _ in range(q):
    point[int(input()) -1] += 1

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

Buggy python submission (verdict: Time Limit Exceeded):
# n人がkポイント持っていてq回正解が出る
n, k, q = map(int, input().split())
a = [int(input()) for i in range(q)]

point =[k for j in range(n)]

# q回続ける
# listのn番目の数字は-1しない

for x in range(q):
    for y in range(n) :
        if y + 1 != a[x] :
            point[y] += -1

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

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

point = [k - q] * (n + 1)

for _ in range(q):
    point[int(input()) -1] += 1

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