Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
N,M=map(int,input().split())
S=input()
T=input()

def gcd(a, b):
	while b:
		a, b = b, a % b
	return a

def lcm(a, b):
	return a * b // gcd (a, b)


G = int(lcm(N,M))

answer = G

temp_S =['0']*G
temp_T =['0']*G

for i in range(N):
    temp_S[i*int(G/N)] = S[i]

for j in range(M):
    temp_T[j*int(G/M)] = T[j]

for k in range(G):
    if temp_S[k] != temp_T[k] and temp_S[k] != '0' and temp_T[k] != '0':
        answer =-1

print(answer)

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

def gcd(a, b):
	while b:
		a, b = b, a % b
	return int(a)

def lcm(a, b):
	return int(a * b // gcd (a, b))
answer =lcm(N,M)

G =gcd(N,M)

for k in range(G):
    if S[int(k*N/G)] !=  T[int(k*M/G)]:
        answer =-1

print(answer)
Buggy python submission (verdict: Runtime Error):
A=int(input())
if A > 999:
  print("ABC" + A)
else :
  print("ABD" + A)


Fixed submission:
A=int(input())
if A > 999:
  print("ABD" )#+ str(A-1000))
else :
  print("ABC")# + str(A))
Buggy python submission (verdict: Time Limit Exceeded):
h, n = input().split()
h = int(h)
n = int(n)
attack = list(map(int, input().split()))
while  n > 0:
    m_attack = max(attack)
    if h - m_attack <= 0:
        h = h - m_attack
        print("Yes")
        break
    else:   
        h = h - m_attack
        attack.remove(m_attack)
        n = n-1
if h > 0:
    print("No")

Fixed submission:
h, n = input().split()
h = int(h)
n = int(n)
attack = sorted(list(map(int, input().split())), reverse=True)
while  n > 0:
    m_attack = attack[0]
    if h - m_attack <= 0:
        h = h - m_attack
        print("Yes")
        break
    else:   
        h = h - m_attack
        attack.remove(m_attack)
        n = n-1
if h > 0:
    print("No")

Buggy python submission (verdict: Time Limit Exceeded):
import math
h, n = input().split()
h = int(h)
n = int(n)
attack = list(map(int, input().split()))
while  n > 0:
    m_attack = max(attack)
    if h - m_attack <= 0:
        h = h-m_attack
        print("Yes")
        break
    else:   
        h = h - m_attack
        attack.remove(m_attack)
        n = n-1
if h > 0:
    print("No")

Fixed submission:
h, n = input().split()
h = int(h)
n = int(n)
attack = sorted(list(map(int, input().split())), reverse=True)
while  n > 0:
    m_attack = attack[0]
    if h - m_attack <= 0:
        h = h - m_attack
        print("Yes")
        break
    else:   
        h = h - m_attack
        attack.remove(m_attack)
        n = n-1
if h > 0:
    print("No")
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
Ps = list(map(int, input().split()))

ans = 0
for i,p in enumerate(Ps):
  if p==min(Ps[:i+1]):
    ans += 1
  if p==1:
    break
    
print(ans)

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

ans = 0
min_val = Ps[0]
for i,p in enumerate(Ps):
  if p<=min_val:
    ans += 1
    min_val = p
print(ans)

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

ans = 0
for i,p in enumerate(Ps):
  if p==min(Ps[:i+1]):
    ans += 1
    
print(ans)

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

ans = 0
min_val = Ps[0]
for i,p in enumerate(Ps):
  if p<=min_val:
    ans += 1
    min_val = p
print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
T,A = map(int, input().split())
Hs = input().split()
for i in range(N):
  Hs[i] = int(Hs[i])
Hs = np.array(Hs)

Ts = T - Hs*0.006

Ts_A = np.abs(Ts - A)

print(np.argmin(Ts_A))

Fixed submission:
import numpy as np
N = int(input())
T,A = map(int, input().split())
Hs = input().split()
for i in range(N):
  Hs[i] = int(Hs[i])
Hs = np.array(Hs)

Ts = T - Hs*0.006

Ts_A = np.abs(Ts - A)

print(np.argmin(Ts_A)+1)
Buggy python submission (verdict: Runtime Error):
s = input()
t = input()

length = min(len(s),len(t))

sorted_s = sorted(s)
soreted_t = sorted(t)[::-1]

flag = True
for i in range(length):
  if sorted_s[i] == sorted_t[i]:
    pass
  elif sorted_s[i] < sorted_t[i]:
    print('Yes')
    flag = False
    break
  else:
    print('No')
    flag = False
    break

if flag:
  if len(s) < len(t):
    print('Yse')
  else:
    print('No')


Fixed submission:
s = input()
t = input()

length = min(len(s),len(t))

sorted_s = sorted(s)
sorted_t = sorted(t)[::-1]

flag = True
for i in range(length):
  if sorted_s[i] == sorted_t[i]:
    pass
  elif sorted_s[i] < sorted_t[i]:
    print('Yes')
    flag = False
    break
  else:
    print('No')
    flag = False
    break

if flag:
  if len(s) < len(t):
    print('Yes')
  else:
    print('No')

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

length = min(len(s),len(t))

sorted_s = sorted(s)
soreted_t = sorted(t)[::-1]

for i in range(length):
  if sorted_s[i] == sorted_t[i]:
    pass
  elif sorted_s[i] < sorted_t[i]:
    print('Yes')
    break
  else:
    print('No')
    break

if len(s) < len(t):
  print('Yse')
else:
  print('No')

Fixed submission:
s = input()
t = input()

length = min(len(s),len(t))

sorted_s = sorted(s)
sorted_t = sorted(t)[::-1]

flag = True
for i in range(length):
  if sorted_s[i] == sorted_t[i]:
    pass
  elif sorted_s[i] < sorted_t[i]:
    print('Yes')
    flag = False
    break
  else:
    print('No')
    flag = False
    break

if flag:
  if len(s) < len(t):
    print('Yes')
  else:
    print('No')
Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
N,K = map(int, input().split())
As = input().split()
for i in range(N):
  As[i] = int(As[i])
As = np.array(As)

As_uni = np.unique(As)
K2 = len(As_uni)

if K2 <= K:
  ans = 0
else:
  for i,a in enumerate(As_uni):
    As_uni[i] = (As==a).sum()
  As_uni = np.sort(As_uni)
  ans = As_uni[:K2-K].sum()
  
print(int(ans))

Fixed submission:
import numpy as np
import collections

N,K = map(int, input().split())
As = input().split()
for i in range(N):
  As[i] = int(As[i])
As = np.array(As)

As_c = collections.Counter(As)

ans = 0
counter = 0
for a in sorted(As_c.values()):
  if counter < len(As_c) - K:
    ans += a 
    counter += 1
  else:
    break
print(int(ans))

Buggy python submission (verdict: Runtime Error):
import numpy as np
N,K = map(int, input().split())
As = input().split()
for i in range(N):
  As[i] = int(As[i])
As = np.array(As)

As_uni = np.unique(As)

if len(As_uni) <= K:
  ans = 0
else:
  for i,a in enumerate(As_uni):
    As_uni[i] = (As==a).sum()
  As_uni = np.sort(As_uni)
  ans = As_uni[:K2-K].sum()
  
print(int(ans))

Fixed submission:
import numpy as np
import collections

N,K = map(int, input().split())
As = input().split()
for i in range(N):
  As[i] = int(As[i])
As = np.array(As)

As_c = collections.Counter(As)

ans = 0
counter = 0
for a in sorted(As_c.values()):
  if counter < len(As_c) - K:
    ans += a 
    counter += 1
  else:
    break
print(int(ans))

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
N,K = map(int, input().split())
As = input().split()
for i in range(N):
  As[i] = int(As[i])
As = np.array(As)

As_uni = np.unique(As)
for i,a in enumerate(As_uni):
  As_uni[i] = (As==a).sum()
As_uni = np.sort(As_uni)

K2 = len(As_uni)

if K2 > K:
  ans = As_uni[:K2-K].sum()
else:
  ans = 0
  
print(int(ans))

Fixed submission:
import numpy as np
import collections

N,K = map(int, input().split())
As = input().split()
for i in range(N):
  As[i] = int(As[i])
As = np.array(As)

As_c = collections.Counter(As)

ans = 0
counter = 0
for a in sorted(As_c.values()):
  if counter < len(As_c) - K:
    ans += a 
    counter += 1
  else:
    break
print(int(ans))

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
N,K = map(int, input().split())
As = input().split()
for i in range(N):
  As[i] = int(As[i])
  
As = np.array(As)

As_uni = np.unique(As)

As_uni_count = np.zeros_like(As_uni)
for i,a in enumerate(As_uni):
  As_uni_count[i] = (As==a).sum()
  
As_uni_count = np.sort(As_uni_count)

K2 = len(As_uni)

if K2 > K:
  ans = As_uni_count[:K2-K].sum()
else:
  ans = 0
  
print(int(ans))

Fixed submission:
import numpy as np
import collections

N,K = map(int, input().split())
As = input().split()
for i in range(N):
  As[i] = int(As[i])
As = np.array(As)

As_c = collections.Counter(As)

ans = 0
counter = 0
for a in sorted(As_c.values()):
  if counter < len(As_c) - K:
    ans += a 
    counter += 1
  else:
    break
print(int(ans))
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
As = [int(input()) for i in range(N)]

data = {}

for a in As:
  if a in data.keys():
    data[a] += 1
    data[a] = data[a]%2
  else:
    data[a] = 1

ans = sum(list(data.values()))

print(ans)

Fixed submission:
from collections import Counter

N = int(input())
As = [int(input()) for i in range(N)]

c = Counter(As)
c = sorted(c.items(), key=lambda x:x[0])
A_unique, A_counts = zip(*c)

ans = 0
for a in A_counts:
    if a%2!=0:
        ans += 1
print(ans)
Buggy python submission (verdict: Runtime Error):
S = input()

S = np.unique(sorted(S))

ans = 'None'
for ch in 'abcdefghijklmnopqrstuvwxyz':
  if ch in S:
    pass
  else:
    ans = ch
    break
print(ans)

Fixed submission:
import numpy as np

S = input()

S = np.unique(sorted(S))

ans = 'None'
for ch in 'abcdefghijklmnopqrstuvwxyz':
  if ch in S:
    pass
  else:
    ans = ch
    break
print(ans)
Buggy python submission (verdict: Runtime Error):
import numpy as np

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

ls = input().split()
ls_arr = np.array(N)
for i in range(N):
  ls_arr[i] = int(ls[i])

ls_arr = np.sort(ls_arr)[::-1]

ans = int(ls_arr[:K].sum())

print(ans)

Fixed submission:
import numpy as np

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

ls = input().split()
ls_arr = np.zeros(N)
for i in range(N):
  ls_arr[i] = int(ls[i])

ls_arr = np.sort(ls_arr)[::-1]

ans = int(ls_arr[:K].sum())

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

a_s = input().split()

for i in ragne(3*N):
  a_s[i] = int(a_s[i])
  
a_s = sorted(a_s)

a_1 = a_s[:N]
a_2 = a_s[N:]

ans = sum(a_2[0::2])

print(ans)


Fixed submission:
N = int(input())

a_s = input().split()

for i in range(3*N):
  a_s[i] = int(a_s[i])
  
a_s = sorted(a_s)

a_1 = a_s[:N]
a_2 = a_s[N:]

ans = sum(a_2[0::2])

print(ans)

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

a_s = input().split()

for i in ragne(3*N):
  a_s[i] = int(a_s[i])
  
a_s = sorted(a_s)

a_1 = a_s[:N]
a_2 = a_s[N:]

ans = sum(a_2[0::2])

print(ans)

Fixed submission:
N = int(input())

a_s = input().split()

for i in range(3*N):
  a_s[i] = int(a_s[i])
  
a_s = sorted(a_s)

a_1 = a_s[:N]
a_2 = a_s[N:]

ans = sum(a_2[0::2])

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

N = int(input())

ans = 1e+99
for a in range(1,N+1):
  if N % a == 0:
    b = N // a
  else:
    continue
  d_a = 1 + int(np.log10(a))
  d_b = 1 + int(np.log10(b))
  F = max(d_a, d_b)
  if F < ans:
    ans = F
print(ans)

Fixed submission:
import numpy as np
import math 

N = int(input())

ans = 1e+99
for a in range(1,math.floor(np.sqrt(N))+1):
  if N % a == 0:
    b = N // a
  else:
    continue
  d_a = 1 + int(np.log10(a))
  d_b = 1 + int(np.log10(b))
  F = max(d_a, d_b)
  if F < ans:
    ans = F
print(ans)
Buggy python submission (verdict: Runtime Error):
import numpy as np

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

x_s,y_s,a_s = [],[],[]
for i in range(N):
	x,y,a = map(int, input().split())
    x_s.append(x)
    y_s.append(y)
    a_s.append(a)
    
x_s = np.array(x_s)
y_s = np.array(y_s)
a_s = np.array(a_s)

if (a_s==1).sum()>=1:
  x_min = x_s[a_s==1].max()
else:
  x_min = 0
  
if (a_s==2).sum()>=1:
  x_max = x_s[a_s==2].min()
else:
  x_max = W
  
if (a_s==3).sum()>=1:
  y_min = y_s[a_s==3].max()
else:
  y_min = 0
  
if (a_s==4).sum()>=1:
  y_max = y_s[a_s==4].min()
else:
  y_max = H
  
if (x_min>=x_max)|(y_min>=y_max):
  ans = 0
else:
  ans = (x_max-x_min)*(y_max-y_min)
  
print(int(ans))


Fixed submission:
import numpy as np

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

x_s,y_s,a_s = [],[],[]
for i in range(N):
  x,y,a = map(int, input().split())
  x_s.append(x)
  y_s.append(y)
  a_s.append(a)
    
x_s = np.array(x_s)
y_s = np.array(y_s)
a_s = np.array(a_s)

if (a_s==1).sum()>=1:
  x_min = x_s[a_s==1].max()
else:
  x_min = 0
  
if (a_s==2).sum()>=1:
  x_max = x_s[a_s==2].min()
else:
  x_max = W
  
if (a_s==3).sum()>=1:
  y_min = y_s[a_s==3].max()
else:
  y_min = 0
  
if (a_s==4).sum()>=1:
  y_max = y_s[a_s==4].min()
else:
  y_max = H
  
if (x_min>=x_max)|(y_min>=y_max):
  ans = 0
else:
  ans = (x_max-x_min)*(y_max-y_min)
  
print(int(ans))

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

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

x_s,y_s,a_s = [],[],[]
for i in range(N):
	x,y,a = map(int, input().split())
    x_s.append(x)
    y_s.append(y)
    a_s.append(a)
    
x_s = np.array(x_s)
y_s = np.array(y_s)
a_s = np.array(a_s)

x_min = x_s[a_s==1].max()
x_max = x_s[a_s==2].min()
y_min = y_s[a_s==3].max()
y_max = y_s[a_s==4].min()

if (x_min>=x_max)|(y_min>=y_max):
  ans = 0
else:
  ans = (x_max-x_min)*(y_max-y_min)
  
print(int(ans))


Fixed submission:
import numpy as np

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

x_s,y_s,a_s = [],[],[]
for i in range(N):
  x,y,a = map(int, input().split())
  x_s.append(x)
  y_s.append(y)
  a_s.append(a)
    
x_s = np.array(x_s)
y_s = np.array(y_s)
a_s = np.array(a_s)

if (a_s==1).sum()>=1:
  x_min = x_s[a_s==1].max()
else:
  x_min = 0
  
if (a_s==2).sum()>=1:
  x_max = x_s[a_s==2].min()
else:
  x_max = W
  
if (a_s==3).sum()>=1:
  y_min = y_s[a_s==3].max()
else:
  y_min = 0
  
if (a_s==4).sum()>=1:
  y_max = y_s[a_s==4].min()
else:
  y_max = H
  
if (x_min>=x_max)|(y_min>=y_max):
  ans = 0
else:
  ans = (x_max-x_min)*(y_max-y_min)
  
print(int(ans))
Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
cleared = []
ac_counter = 0
wa_counter = 0
for i in range(m):
    p, s = input().split()
    p = int(p)
    if not p in cleared:
        if s == 'AC':
            ac_counter += 1
            cleared.append(p)
        else:
            wa_counter += 1
print('{} {}'.format(ac_counter, wa_counter))

Fixed submission:
a = input()
print(chr(ord(a)+1))

Buggy python submission (verdict: Runtime Error):
a = input()
print(chr(ord(a)+1)

Fixed submission:
a = input()
print(chr(ord(a)+1))
Buggy python submission (verdict: Runtime Error):
import math

a, b = map(int, input().split())
answer = a*b//math.gcd(a, b)
print(answer)

Fixed submission:
import fractions

a, b = map(int, input().split())
answer = a*b//fractions.gcd(a, b)
print(answer)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
if n%2 == 1:
    print(0)
else:
    num = 1
    counter = 0
    for i in range(2, n, 2):
        num *= i
    for j in range(1, n):
        if num%pow(10, j) == 0:
            counter+=1
        else:
            break
    print(counter)


Fixed submission:
n = int(input())
if n%2 == 1:
    print(0)
else:
    counter = 0
    for i in range(1, n):
        num = n/pow(5, i)
        if num >= 1:
            counter += (n//pow(5, i))//2
        else:
            break
    print(counter)
Buggy python submission (verdict: Time Limit Exceeded):
import copy
n = int(input())
a = []
for i in range(n):
    a.append(int(input()))
for i in range(n):
    tmp = copy.copy(a)
    tmp[i] = 0
    print(max(tmp))

Fixed submission:
import copy
n = int(input())
a = []
for i in range(n):
    a.append(int(input()))
tmp = copy.copy(a)
tmp.sort()
max_num = tmp[-1]
min_num = tmp[-2]
for i in range(n):
    if a[i] == max_num:
        print(min_num)
    else:
        print(max_num)
Buggy python submission (verdict: Runtime Error):
import sys
 
n=int(input())
h=input().split()
count=0
max=int(h[0])
for i in range(n):
  if int(h[i])>=max:
    max=int(h[1])
    count+=1
print(count)

Fixed submission:
import sys
 
n=int(input())
h=input().split()
count=0
max=int(h[0])
for i in range(n):
  if int(h[i])>=max:
    max=int(h[i])
    count+=1
print(count)

Buggy python submission (verdict: Runtime Error):
import sys
 
n=int(input())
h=[]
count=0
for i in range(n):
  h.append(int(input()))
  max=h[0]
  if h[i-1]>=max:
    max=h[i-1]
    count+=1
print(count)

Fixed submission:
import sys
 
n=int(input())
h=input().split()
count=0
max=int(h[0])
for i in range(n):
  if int(h[i])>=max:
    max=int(h[i])
    count+=1
print(count)

Buggy python submission (verdict: Runtime Error):
import sys
 
n=int(input())
h=[]
count=0
for i in range(n):
  h.append(int(input()))
  max=h[0]
  if h[i-1]>=max:
    max=h[i-1]
    count+=1
print(count)

Fixed submission:
import sys
 
n=int(input())
h=input().split()
count=0
max=int(h[0])
for i in range(n):
  if int(h[i])>=max:
    max=int(h[i])
    count+=1
print(count)

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

n=int(input())
h=list()
count=1
for i in range(n):
  h.append(int(input()));
  if i==1:
    max=h[i-1]
  else:
    if h[i-1]>=max:
      max=h[i-1]
      count++
print(count)
          

Fixed submission:
import sys
 
n=int(input())
h=input().split()
count=0
max=int(h[0])
for i in range(n):
  if int(h[i])>=max:
    max=int(h[i])
    count+=1
print(count)

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

n=input()
h=list()
count=1
for i in range(n):
  h.append(input());
  if i==1:
    max=h[i]
  else:
    if h[i]>=max:
      max=h[i]
      count++
print(count)
      

Fixed submission:
import sys
 
n=int(input())
h=input().split()
count=0
max=int(h[0])
for i in range(n):
  if int(h[i])>=max:
    max=int(h[i])
    count+=1
print(count)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
P = list(map(int, input().split()))

# print(N, l)
# Pi < Pj
result = []
r = False
for i in range(1, N+1):
    count = 0
    for j in range(0, i):
        if P[i - 1] <= P[j]:
            count += 1
        else:
            break
    if count >= i:
        result.append(i)

print(len(set(result)))


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

result = 0
m = P[0]
for i in range(N):
    if P[i] <= m:
        result += 1
        m = P[i]
print(result)

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

# print(N, l)
# Pi < Pj
result = []
r = False
for i in range(1, N+1):
    count = 0
    for j in range(0, i):
        if P[i - 1] <= P[j]:
            count += 1
    if count >= i:
        result.append(i)

print(len(set(result)))


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

result = 0
m = P[0]
for i in range(N):
    if P[i] <= m:
        result += 1
        m = P[i]
print(result)
Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())

l = [list(input().split()) for _ in range(M)]

answers = {}
wrongs = {}

for a in l:
    if a[1] == "AC":
        answers[a[0]] = a[1]
    elif a[1] == "WA":
        if not a[0] in wrongs:
            wrongs[a[0]] = 1
        elif a[0] in wrongs:
            wrongs[a[0]] = wrongs[a[0]] + 1

# 集計
wc = 0
for k, v in wrongs.items():
    if k in answers.keys():
        wc += 1
result = [len(answers.keys()), wc]

print(result[0], result[1])



Fixed submission:
C = input()
letters = "abcdefghijklmnopqrstuvwxyz"
list_letters = list(letters)
print(list_letters[letters.find(C)+1])

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

l = [list(input().split()) for _ in range(M)]

answers = {}
wrongs = {}

for a in l:
    if a[1] == "AC":
        answers[a[0]] = a[1]
    elif a[1] == "WA":
        if not a[0] in answers:
            if a[0] in wrongs:
                wrongs[a[0]] = wrongs[a[0]] + 1
            else:
                wrongs[a[0]] = 1


# 集計
result = [len(answers.keys()), sum(wrongs.values())]

print(result[0], result[1])



Fixed submission:
C = input()
letters = "abcdefghijklmnopqrstuvwxyz"
list_letters = list(letters)
print(list_letters[letters.find(C)+1])

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

total = sum(tests)

for i in range(K):
    if (total + i) / N >= M:
        print(i)
        exit(0)
print(-1)


Fixed submission:
C = input()
letters = "abcdefghijklmnopqrstuvwxyz"
list_letters = list(letters)
print(list_letters[letters.find(C)+1])
Buggy python submission (verdict: Runtime Error):
N, X = map(int, input().split())

if X > N * 500:
  return Yes
return No

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

if X <= N * 500:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
s, t = input.split()

print("".join([t,s]))

Fixed submission:
s, t = input().split()

print("".join([t,s]))
Buggy python submission (verdict: Runtime Error):
A, B = map(int, input().split())

import fractions

print(int(A * B / fractions.gcd(A, B)))


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

r = list(filter(lambda x: x != A and x != B, [1, 2, 3]))
print(r[0])

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

import fraction

print(int(A * B / fraction.gcd(A, B)))


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

r = list(filter(lambda x: x != A and x != B, [1, 2, 3]))
print(r[0])

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

A, B = input().split()

print(int(A), int(B))
print(int(int(A) * int(B) / math.gcd(A, B)))


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

r = list(filter(lambda x: x != A and x != B, [1, 2, 3]))
print(r[0])

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

print(A, B)
#print(int(A * B / math.gcd(A, B)))


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

r = list(filter(lambda x: x != A and x != B, [1, 2, 3]))
print(r[0])

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

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

print(A, B)
#print(int(A * B / math.gcd(A, B)))


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

r = list(filter(lambda x: x != A and x != B, [1, 2, 3]))
print(r[0])
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):
a, b = input().split()

if int(a) - int(b) * 2 > 0:
	print(int(a) - int(b) * 2)
else
	print(0)

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

if int(a) - int(b) * 2 > 0:
    print(int(a) - int(b) * 2)
else:
    print(0)
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))

# print(N, A_LIST, B_LIST, C_LIST)

result = 0

for i in range(N):
    result += B[A[i] - 1]
    if i > 0 and A[i] - 1 == A[i-1]:
        result += C[A[i-1]-1]

print(result)
# 5+8+9+24+15+13


Fixed submission:
N = int(input())
print(N ** 3)
Buggy python submission (verdict: Time Limit Exceeded):
N,K=map(int,input().split())
H=list(map(int,input().split()))
H.sort(reverse=True)
if len(H)<=K:
    a=0
else:
    for i in range(K):
        H.pop(0)
    a=sum(H)
print(a)

Fixed submission:
N,K=map(int,input().split())
H=list(map(int,input().split()))
H.sort(reverse=True)
if len(H)<=K:
    a=0
else:
    a=sum(H[K:])
print(a)
Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
p = []
s = []
pen= [0] * (n+1)
result=[False] * (n+1)
cnt = 0
for i in range(m):
    p1, s1 = input().split()
    p1 = int(p1)
    p.append(p1)
    s.append(s1)

    if s1 == "AC" and not result[p1]:
        result[p1] = True
        cnt += 1
    if s1 == "WA" and not result[p1]:
        pen[p1] += 1
print(f"{cnt} {sum(pen)}")


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

pen= [0] * (n+1)
result=[False] * (n+1)
cnt = 0
pen_sum = 0
for i in range(m):
    p1, s1 = input().split()
    p1 = int(p1)
    if s1 == "AC" and not result[p1]:
        result[p1] = True
        cnt += 1
        pen_sum += pen[p1]
    if s1 == "WA" and not result[p1]:
        pen[p1] += 1

print("{} {}".format(cnt, pen_sum))