Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
import math
a,b=map(int,input().split())
print((a*b)//math.gcd(a,b))

Fixed submission:
m,n=map(int,input().split())
def gcd(a,b):
	while(b):
		a,b=b,a%b; 
	return a;
def lcm(a,b):
	return(a*b)//gcd(a,b);
print(lcm(m,n))
Buggy python submission (verdict: Runtime Error):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

a = ni()
b = ni()

if a >= 9 or b >= 9:
    print(":(")
else:
    print("Yay!")


Fixed submission:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

a,b = na()

if a >= 9 or b >= 9:
    print(":(")
else:
    print("Yay!")
Buggy python submission (verdict: Time Limit Exceeded):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

n = ni()
a = na()
ans = 0
while True:
    dtwo = 0
    for i in range(n):
        if a[i] % 2 == 0 and dtwo == 0:
            a[i]//=2
            dtwo = 1
        else:
            a[i]*=3
    if dtwo == 0:
        break
    ans += 1
print(ans)


Fixed submission:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

n = ni()
a = na()
# ans = 0
# while True:
#     dtwo = 0
#     for i in range(n):
#         if a[i] % 2 == 0 and dtwo == 0:
#             a[i]//=2
#             dtwo = 1
#         else:
#             a[i]*=3
#     if dtwo == 0:
#         break
#     ans += 1
# print(ans)
ans = 0
for i in range(n):
    tmp = a[i]
    while True:
        if tmp%2 == 0:
            ans += 1
        else:
            break
        tmp = tmp / 2
print(ans)
Buggy python submission (verdict: Runtime Error):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()

s = ns()
k = ni()
ans = []

for i in range(len(s)):
    for j in range(1,len(s)+1):
        if j - i > 5:
            break
        ans.append(s[i:j])

ans = list(set(ans))
ans.remove("")
ans.sort()
print(ans[k-1])


Fixed submission:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()

s = ns()
k = ni()
ans = []

for i in range(len(s)):
    ans.append(s[i])
    if i < len(s)-1:
        t = i+2
        while True:
            ans.append(s[i:t])
            if t == len(s):
                break
            t += 1
            if t - i > 5:
                break

ans = list(set(ans))
ans.sort()
print(ans[k-1])

Buggy python submission (verdict: Time Limit Exceeded):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()

s = ns()
k = ni()
ans = []

for j in range(len(s)):
    ans.append(s[j])
    if j < len(s)-1:
        t = j+2
        while True:
            ans.append(s[j:t])
            if t == len(s):
                break
            t += 1
l = list(set(ans))
l.sort()
print(l[k-1])


Fixed submission:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()

s = ns()
k = ni()
ans = []

for i in range(len(s)):
    ans.append(s[i])
    if i < len(s)-1:
        t = i+2
        while True:
            ans.append(s[i:t])
            if t == len(s):
                break
            t += 1
            if t - i > 5:
                break

ans = list(set(ans))
ans.sort()
print(ans[k-1])
Buggy python submission (verdict: Time Limit Exceeded):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()

a,b,k = na()
f = [i for i in range(a,b+1)]
if (b-a+1) // 2 >= k:
    ans = list(range(a,a+k)) + list(range(b-k+1,b+1))
else:
    ans = list(range(a,b+1))
for i in ans:
    print(i)


Fixed submission:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()

a,b,k = na()
if (b-a+1) // 2 >= k:
    ans = list(range(a,a+k)) + list(range(b-k+1,b+1))
else:
    ans = list(range(a,b+1))
for i in ans:
    print(i)

Buggy python submission (verdict: Time Limit Exceeded):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()

a,b,k = na()
f = [i for i in range(a,b+1)]
ans = f[:k]
ans_d = f[-k:]
ans += ans_d
for i in sorted(set(ans), key=ans.index):
    print(i)


Fixed submission:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()

a,b,k = na()
if (b-a+1) // 2 >= k:
    ans = list(range(a,a+k)) + list(range(b-k+1,b+1))
else:
    ans = list(range(a,b+1))
for i in ans:
    print(i)

Buggy python submission (verdict: Time Limit Exceeded):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()

a,b,k = na()
f = [i for i in range(a,b+1)]
ans = []
ans += f[:k]
ans_d = []
ans_d += f[::-1][:k]
ans += ans_d
for i in sorted(set(ans)):
    print(i)


Fixed submission:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()

a,b,k = na()
if (b-a+1) // 2 >= k:
    ans = list(range(a,a+k)) + list(range(b-k+1,b+1))
else:
    ans = list(range(a,b+1))
for i in ans:
    print(i)
Buggy python submission (verdict: Runtime Error):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

n = ni()
red = []
for _ in range(n):
    red.append(na())
blue = []
for _ in range(n):
    blue.append(na())

red_1 = sorted(red)
blue_1 = sorted(blue)
ans_1 = 0

for i in red_1:
    for j in blue_1:
        if i[0] < j[0] and i[1] < j[1]:
            ans_1 += 1
            blue_1.remove(j)
            break

red.sort()
blue.sort()
red_2 = sorted(red, key=lambda x:sum(x))
blue_2 = sorted(blue, key=lambda x:sum(x))
ans_2 = 0

for i in red_2:
    for j in blue_2:
        if i[0] < j[0] and i[1] < j[1]:
            ans_2 += 1
            blue_2.remove(j)
            break
red_3 = sorted(red, key=lambda x:x[1])
blue_3 = sorted(red, key=lambda x:x[1])
red_3 = sorted(red_3, key=lambda x:sum(x))
blue_3 = sorted(blue_3, key=lambda x:sum(x))
ans_4
for i in red_3:
    for j in blue_3:
        if i[0] < j[0] and i[1] < j[1]:
            ans_4 += 1
            blue_3.remove(j)
            break

from operator import itemgetter
red.sort(key=itemgetter(1))
blue.sort(key=itemgetter(1))
ans_3 = 0

for i in red:
    for j in blue:
        if i[0] < j[0] and i[1] < j[1]:
            ans_3 += 1
            blue.remove(j)
            break

ans = []
ans.append(ans_1)
ans.append(ans_2)
ans.append(ans_3)
ans.append(ans_4)
print(max(ans))


Fixed submission:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

n = ni()
red = []
for _ in range(n):
    red.append(na())
blue = []
for _ in range(n):
    blue.append(na())

red.sort()
blue.sort()
ans = 0

tmp = []
for i in blue:
    for j in red:
        if i[0] > j[0] and i[1] > j[1]:
            tmp.append(j)
    if tmp != []:
        max_red = max(tmp, key=lambda x:x[1])
        ans += 1
        red.remove(max_red)
        tmp = []
    else:
        pass

print(ans)
Buggy python submission (verdict: Runtime Error):
def is_9(arr):
    s = []
    for i in range(len(arr)):
        if arr[i] != '9':
            return False
        s.append(arr[i])
    return sum(s)


n = list(input())
fd = int(n.pop(0))
if is_9(n):
    print(fd + int(is_9(n)))
print(fd - 1 + int(9 * len(n)))


Fixed submission:
def is_9(arr):
    s = []
    for i in range(len(arr)):
        if arr[i] != '9':
            return False
        s.append(arr[i])
    return True


n = list(input())
fd = int(n.pop(0))
if is_9(n):
    print(fd + int(9 * len(n)))
else:
    print(fd - 1 + int(9 * len(n)))
Buggy python submission (verdict: Time Limit Exceeded):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()

n = ni()
a = na()
a_lis = list(set(a))
count = 0
ans = [0]*len(a_lis)
for i in range(len(a_lis)):
    count = a.count(a_lis[i])
    if count > a_lis[i]:
        ans[i] = count - a_lis[i]
    elif count < a_lis[i]:
        ans[i] = count

if sum(ans) < n:
    print(sum(ans))
else:
    print(n)


Fixed submission:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()

n = ni()
a = na()

dic = {}

for num in a:
    if num in dic:
        dic[num] += 1
    else:
        dic[num] = 1

ans = 0
for key,value in dic.items():
    if key > value:
        ans += value
    else:
        ans += (value - key)

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

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()

x,y = na()
hx = {"A":1, "B":2, "C":3, "D":4, "E":5, "F":6}

if hx[x] > hx[y]:
    print(">")
elif hx[x] < hx[y]:
    print("<")
else:
    print("=")


Fixed submission:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()

x,y = ns().split()
hx = {"A":1, "B":2, "C":3, "D":4, "E":5, "F":6}

if hx[x] > hx[y]:
    print(">")
elif hx[x] < hx[y]:
    print("<")
else:
    print("=")
Buggy python submission (verdict: Runtime Error):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()

n = ni()
a = [ni() for _ in range(n)]

if n == 1:
    print(1)
else:
    a.sort()
    count = 1
    ans = 0
    for i in range(1,n):
        if i == n-1:
            if a[i-1] == a[i]:
                count += 1
            count % 2 != 0:
                ans += 1
        else:
            if a[i-1] == a[i]:
                count += 1
            else:
                if count % 2 != 0:
                    ans += 1
                count = 1
    print(ans)


Fixed submission:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()

n = ni()
s = set()
for i in range(n):
    x = ni()
    if x in s:
        s.remove(x)
    else:
        s.add(x)
print(len(s))

Buggy python submission (verdict: Time Limit Exceeded):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()

n = ni()
a = [ni() for _ in range(n)]

a.sort()
count = 0
ans = 0
for i in a:
    count = a.count(i)
    if count % 2 != 0:
        ans += 1
print(ans)


Fixed submission:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()

n = ni()
s = set()
for i in range(n):
    x = ni()
    if x in s:
        s.remove(x)
    else:
        s.add(x)
print(len(s))

Buggy python submission (verdict: Time Limit Exceeded):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()

n = ni()
a = [ni() for _ in range(n)]

a.sort()
b = 0
count = 0
ans = 0
for i in a:
    if b != i:
        count = a.count(i)
        if count % 2 != 0:
            ans += 1
        else:
            pass
    else:
        pass
    b = i

print(ans)


Fixed submission:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()

n = ni()
s = set()
for i in range(n):
    x = ni()
    if x in s:
        s.remove(x)
    else:
        s.add(x)
print(len(s))

Buggy python submission (verdict: Time Limit Exceeded):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()

n = ni()
a = [ni() for _ in range(n)]

s = []
for i in a:
    flag = 1
    for j in s:
        if j == i:
            s.remove(i)
            flag = 0
            break
    if flag:
        s.append(i)

print(len(s))


Fixed submission:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()

n = ni()
s = set()
for i in range(n):
    x = ni()
    if x in s:
        s.remove(x)
    else:
        s.add(x)
print(len(s))
Buggy python submission (verdict: Time Limit Exceeded):
import sys

n,m = list(map(int, sys.stdin.readline().split()))
ab = [[0, 0]]*m
for i in range(m):
    ab[i] = list(map(int, sys.stdin.readline().split()))

tmp = []
for i in ab:
    if i[0] == 1:
        tmp.append(i[1])

tmp_n = []
for i in ab:
    if i[1] == n:
        tmp_n.append(i[0])

flag = False
for i in tmp:
    if i in tmp_n:
        flag = True
        break

if flag:
    print("POSSIBLE")
else:
    print("IMPOSSIBLE")


Fixed submission:
import sys

n,m = map(int, sys.stdin.readline().split())

mid1 = set()
mid2 = set()
for _ in range(m):
    a,b, = map(int, input().split())
    if a == 1:
        mid1.add(b)
    elif b == n:
        mid2.add(a)
result = bool(mid1 & mid2)
if result:
    print("POSSIBLE")
else:
    print("IMPOSSIBLE")
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))

s = sum(a)
ans = float('inf')
for i in range(1, n):
    if abs(s-sum(a[:i])*2) < ans:
        ans = abs(s-sum(a[:i])*2)

print(ans)


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

tmp = 0
sum_list = [0]
for i in range(n):
    tmp += a[i]
    sum_list.append(tmp)

diff = float('inf')
for i in range(1,n):
    diff = min(diff, abs(sum_list[-1]-2*sum_list[i]))

print(diff)

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

s = sum(a)
ans = float('inf')
for i in range(1, n):
    x = sum(a[:i])
    y = s - x
    if abs(x-y) < ans:
        ans = abs(x-y)

print(ans)


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

tmp = 0
sum_list = [0]
for i in range(n):
    tmp += a[i]
    sum_list.append(tmp)

diff = float('inf')
for i in range(1,n):
    diff = min(diff, abs(sum_list[-1]-2*sum_list[i]))

print(diff)
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = []
for _ in range(n):
    a.append(int(input()))

if a[0] == 2:
    print(0)
else:
    count = 0
    flag = False
    i = a[0]
    for _ in range(n):
        count += 1
        if a[i-1] == 2:
            flag = True
            break
        i = a[i-1]

if flag:
    print(count+1)
else:
    print(-1)


Fixed submission:
n = int(input())
a = []
for _ in range(n):
    a.append(int(input()))

if a[0] == 2:
    print(1)
else:
    count = 0
    i = a[0]
    flag = False
    for _ in range(n):
        count += 1
        if a[i-1] == 2:
            flag = True
            break
        i = a[i-1]
    if flag:
        print(count+1)
    else:
        print(-1)
Buggy python submission (verdict: Runtime Error):
a,b = map(int, input())
if a + b >= 10:
    print("error")
else:
    print(a+b)


Fixed submission:
a,b = map(int, input().split())
if a + b >= 10:
    print("error")
else:
    print(a+b)
Buggy python submission (verdict: Runtime Error):
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int sum = 0;
        int min = Integer.MAX_VALUE;
        for (int i = 0; i < N; i++) {
            int s = sc.nextInt();
            sum += s;
            if (s % 10 != 0 && s < min) {
                min = s;
            }
        }

        if (sum % 10 != 0) {
            System.out.println(sum);
        } else {
            sum -= min;
            if (sum < 0) {
                System.out.println(0);
            } else {
                System.out.println(sum);
            }
        }
    }
}


Fixed submission:
n = int(input())
s = [0]*n
for i in range(n):
    s[i] = int(input())

max = sum(s)

if max % 10 == 0:
    s.sort()
    min = 0
    for i in s:
        if i % 10 != 0:
            min = i
            break
    if min == 0:
        print(0)
    else:
        print(max-min)
else:
    print(max)
Buggy python submission (verdict: Time Limit Exceeded):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

k,s = na()
ans = 0
for x in range(k+1):
    for y in range(k+1):
        z = s - (x+y)
        if x+y+z == s and z >= 0 and z <= k:
            ans += 1
print(ans)


Fixed submission:
import sys

stdin = sys.stdin
na = lambda: list(map(int, stdin.readline().split()))

k,s = na()
ans = 0
for x in range(k+1):
    for y in range(k+1):
        z = s - (x+y)
        if z >= 0 and z <= k:
            ans += 1
print(ans)
Buggy python submission (verdict: Runtime Error):
a, b, x = map(int, input().split())
fb = b // x
if a == 0:
    fb += 1
    fa = 0
else:
    fa = (a-1) // x
print(fb-fa)


Fixed submission:
n = input().split()
b = []
for i in n:
    b.append(i[0])
b = ','.join(b)
b = b.replace(',','')
print(b)

Buggy python submission (verdict: Runtime Error):
a, b, x = map(int, input().split())
fb = b // x
if a == 0:
    fa = 0
else:
    fa = (a-1) // x
print(fb-fa)


Fixed submission:
n = input().split()
b = []
for i in n:
    b.append(i[0])
b = ','.join(b)
b = b.replace(',','')
print(b)
Buggy python submission (verdict: Runtime Error):
S = input()
ans = True
for i in range(0,len(S),2):
  if S[i] != "h" or S[i+1] != "i":
    ans = False
    break
if ans:
  print("Yes")
else:
  print("No")
 

Fixed submission:
S = input()
ans = True
for i in range(0,len(S)-1,2):
  if S[i] != "h" or S[i+1] != "i":
    ans = False
    break
if not ans or len(S)%2 == 1:
  print("No")
else:
  print("Yes")

Buggy python submission (verdict: Runtime Error):
A,B,M = [int(x) for x in input().split()]
A_list = [int(x) for x in input().split()]
B_list = [int(y) for y in input().split()]
discount = []
min = 10000000
for _ in range(M):
  case = [int(x) for x in input().split()]
  discount.append(case)

min_a = sorted(A_list)[0]
min_b = sorted(B_list)[0]

for i in range(M):
  temp = A_list[discount[i][0]-1] + B_list[discount[i][1]-1] - discount[i][2]
  if temp < min:
    min = temp
    
if min_a + min_b > min:
  print(min)
else:
  print(min_a + min_b)

Fixed submission:
S = input()
ans = True
for i in range(0,len(S)-1,2):
  if S[i] != "h" or S[i+1] != "i":
    ans = False
    break
if not ans or len(S)%2 == 1:
  print("No")
else:
  print("Yes")

Buggy python submission (verdict: Runtime Error):
S = input()
ans = True
for i in range(0,len(S),2):
  if S[i] != "h" or S[i+1] != "i":
    ans = False
    break

if ans:
  print("Yes")
else:
  print("No")
 


Fixed submission:
S = input()
ans = True
for i in range(0,len(S)-1,2):
  if S[i] != "h" or S[i+1] != "i":
    ans = False
    break
if not ans or len(S)%2 == 1:
  print("No")
else:
  print("Yes")

Buggy python submission (verdict: Runtime Error):
S = input()
ans = True
for i in range(0,len(S),2):
  if S[i] != "h" or S[i+1] != "i":
    ans = False
    break

if ans:
  print("Yes")
else:
  print("No")
 


Fixed submission:
S = input()
ans = True
for i in range(0,len(S)-1,2):
  if S[i] != "h" or S[i+1] != "i":
    ans = False
    break
if not ans or len(S)%2 == 1:
  print("No")
else:
  print("Yes")
Buggy python submission (verdict: Runtime Error):
s = input()
q_number = int(input())
reverse_flag = 1
head = ""
tail = ""
for i in range(q_number):
  temp = input().split()
  if temp[0] == "1": 
    reverse_flag = reverse_flag * -1
  else:
    headstails = int(temp[1])*reverse_flag 
    if headstails == 1 or headstails == -2:
      head = temp[2] + head
    else:
      tail = tail + temp[2]
      
if reverse_flag == 1:
  print(head+s+tail)
else:
  print(tail[::-1]+s[::-1]+head[::-1])
        
       

Fixed submission:
a = input()
if "A" in a and "B" in a:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
s = input()
q_number = int(input())
reverse_flag = 1
for i in range(q_number):
  temp = input().split()
  if temp[0] == "1": 
    reverse_flag = reverse_flag * -1
  else:
    if int(temp[1])*reverse_flag == 1 or int(temp[1])*reverse_flag == -2:
      s = temp[2] + s
    else:
      s = s + temp[2]      
      
if reverse_flag == -1:
  s = s[::-1]
print(s)

Fixed submission:
a = input()
if "A" in a and "B" in a:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
s = input()
q_number = int(input())
 
queries = [input().split() for dummy in range(q_number)]
flag = 1
count = 0
for i in range(q_number):
  if queries[i][0] == "1": 
    flag = flag * -1
    count += 1
  else:
    if int(queries[i][1])*flag == 1 or -2:
      s = queries[i][2] + s
    else:
      s = s + queries[i][2]      

      
if flag == -1:
  s = s[::-1]

print(s)

Fixed submission:
a = input()
if "A" in a and "B" in a:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
p = []
s = []
for i in range(m):
  p_i, s_i = input().split()
  p.append(int(p_i))
  s.append(s_i)

list_correct = [0] * n
list_pena = [0] * n
for i in range(m):
  if s[i] == "AC":
    if list_correct[p[i]] == 0:
      list_correct[p[i]] = 1
  else:
    if list_correct[p[i]] == 0:
      list_pena[p[i]] = list_pena[p[i]] + 1
      
sum_correct = sum(list_correct)
combined = [x * y for (x, y) in zip(list_correct, list_pena)]
sum_pena = sum(combined)

print (sum_correct, sum_pena)

Fixed submission:
n, m = map(int, input().split())
p = []
s = []
for i in range(m):
  p_i, s_i = input().split()
  p.append(int(p_i))
  s.append(s_i)

list_correct = [0] * n
list_pena = [0] * n
for i in range(m):
  if s[i] == "AC":
    if list_correct[p[i]-1] == 0:
      list_correct[p[i]-1] = 1
  else:
    if list_correct[p[i]-1] == 0:
      list_pena[p[i]-1] = list_pena[p[i]-1] + 1
      
sum_correct = sum(list_correct)
combined = [x * y for (x, y) in zip(list_correct, list_pena)]
sum_pena = sum(combined)

print (sum_correct, sum_pena)
Buggy python submission (verdict: Runtime Error):
a = map(int, input())

probability = 0.0
if a%2 == 0:
	probability = 0.5
else:
	probability = 1.0/float(a)*(a/2 + 1)
  
print(probability)

Fixed submission:
a = int(input())

probability = 0.0
if a%2 == 0:
	probability = 0.5
else:
	probability = 1.0/float(a)*(int(a/2) + 1)
  
print(probability)

Buggy python submission (verdict: Runtime Error):
a = map(int, input())

probability = 0.0
if a%2 == 0:
  probability = 0.5
else:
  probability = 1.0/float(a)*(a/2 + 1)
  
print(probability)

Fixed submission:
a = int(input())

probability = 0.0
if a%2 == 0:
	probability = 0.5
else:
	probability = 1.0/float(a)*(int(a/2) + 1)
  
print(probability)

Buggy python submission (verdict: Runtime Error):
a = map(int, input())

probability = 0
if a%2 == 0:
  probability = 0 
else:
  probability = 1.0/float(a)*(a/2 + 1)
  
print(probability)

Fixed submission:
a = int(input())

probability = 0.0
if a%2 == 0:
	probability = 0.5
else:
	probability = 1.0/float(a)*(int(a/2) + 1)
  
print(probability)
Buggy python submission (verdict: Runtime Error):
n, k = map(int, input())
array = list(map(int, input()))

goukei = 0
for i in range(len(array)):
	if array[i] >= k:
		goukei += 1

print(goukei)

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

goukei = 0
for i in range(len(array)):
	if array[i] >= k:
		goukei += 1

print(goukei)