Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
A = list(map(int, input().split()))

A.sort(reverse=True)

if A[m] >= (sum(A) / (4 * m)):
    print("Yes")
else:
    print("No")

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

A.sort(reverse=True)

if A[m-1] >= (sum(A)/(4*m)):
    print("Yes")
else:
    print("No")

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

A.sort(reverse=True)

if A[m+1] >= (sum(A) // (4 * m)):
    print("Yes")
else:
    print("No")

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

A.sort(reverse=True)

if A[m-1] >= (sum(A)/(4*m)):
    print("Yes")
else:
    print("No")

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

A.sort(reverse=True)

if A[m] >= (sum(A) // (4 * m)):
    print("Yes")
else:
    print("No")

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

A.sort(reverse=True)

if A[m-1] >= (sum(A)/(4*m)):
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
a = list(map(int, input().split())
a += list(map(int, input().split())
a += list(map(int, input().split())
A = []
N = int(input())
b = list(int(input()) for i in range(N))

for i in range(9):
    if a[i] in b[i]:
        A[i] = "maru"

if A[0] == A[1] == A[2] or A[3] == A[4] == A[5] or A[6] == A[7] == A[8] or A[2] == A[4] == A[6]:
    print("yes")
elif A[0] == A[3] == A[6] or A[1] == A[4] == A[7] or A[2] == A[5] == A[8]:
    print("yes")
else:
    print("no")  

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

if N == 1:
    print(N)
elif N%2 == 0:
    print(math.floor(N/2))
else:
    print(math.floor(N/2)+ 1)
Buggy python submission (verdict: Runtime Error):
n, k =map(int, input().split())

def base10to(n, k):
    if (int(n/k)):
        return base10to(int(n/k), k) + str(n%k)
    return str(n%k)

a = base10to(n, k)
print(len(a))


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

if n < 10:
    a = 100 * (10 - n)
    b = r + a
    if b >=0:
        print(b)
    else:
        print(0)
else:
    print(r)
Buggy python submission (verdict: Runtime Error):
n = int(input())
x = list(map(int, input().split()))

for i in range(n):
    a = list((x[n]-n)**2) 

print(sum(a))

Fixed submission:
n = int(input())
x = list(map(int, input().split()))
p = round(sum(x) / len(x))
a = 0

for i in range(n):
    a += ((x[i]-p)**2)
print((a))
Buggy python submission (verdict: Runtime Error):
N, Y = map(int, input().split())

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

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

for x in range(N+1):
    for y in range(N-x+1):
        if 10000*x + 5000*y + 1000*(N-x-y)==Y:
            print("{} {} {}".format(x, y,(N-x-y)))
            exit()
print("-1 "+"-1 "+"-1")
Buggy python submission (verdict: Runtime Error):
import itertools
s = input()
t = input()

ans = 0

A = itertools.combinations(list(range(len(t)+1)),2)
for i in A:
    part = t[i[0]:i[1]]
    if part in s:
        ans = len(part)
        
print(len(t) - ans)

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

if t * s >= d:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
import itertools
s = input()
t = input()

A = itertools.combinations(list(range(len(t)+1)),2)
for i in A:
    part = t[i[0]:i[1]]
    if part in s:
        ans = len(part)
        
print(len(t) - ans)


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

count = len(t)

for i in range(len(s) - len(t) + 1):
    str_ = s[i:i + len(t)]
    temp = 0
    for i in range(len(str_)):
        #print(str_[i])
        if str_[i] != t[i]:
            temp += 1
    count = min(count, temp)    
        
print(count)

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

A = itertools.combinations(list(range(len(t)+1)),2)
for i in A:
    part = t[i[0]:i[1]]
    if part in s:
        ans = len(part)
        
print(len(t) - ans)

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

count = len(t)

for i in range(len(s) - len(t) + 1):
    str_ = s[i:i + len(t)]
    temp = 0
    for i in range(len(str_)):
        #print(str_[i])
        if str_[i] != t[i]:
            temp += 1
    count = min(count, temp)    
        
print(count)

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

A = itertools.combinations(list(range(len(t)+1)),2)
for i in A:
    part = t[i[0]:i[1]]
    print(part)
    if part in s:
        ans = len(part)
        
print(len(t) - ans)


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

count = len(t)

for i in range(len(s) - len(t) + 1):
    str_ = s[i:i + len(t)]
    temp = 0
    for i in range(len(str_)):
        #print(str_[i])
        if str_[i] != t[i]:
            temp += 1
    count = min(count, temp)    
        
print(count)

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

A = itertools.combinations(list(range(len(t)+1)),2)
for i in A:
    part = t[i[0]:i[1]]
    print(part)
    if part in s:
        ans = len(part)
        
print(len(t) - ans)

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

count = len(t)

for i in range(len(s) - len(t) + 1):
    str_ = s[i:i + len(t)]
    temp = 0
    for i in range(len(str_)):
        #print(str_[i])
        if str_[i] != t[i]:
            temp += 1
    count = min(count, temp)    
        
print(count)
Buggy python submission (verdict: Runtime Error):
n, x, t = map(int, input())

if n % t == 0:
  ans = (n // x) * t
else:
  ans = (n // x + 1) * t

print(ans)

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

if n % x == 0:
  ans = (n // x) * t
else:
  ans = (n // x + 1) * t

print(ans)
Buggy python submission (verdict: Runtime Error):
n, d = map(int, input().split())

A = []

for i in range(n):
  A_i = list(map(int, input().split()))
  A.append(A_i)
  
ans = 0

for j in A:
  if A[0] ** 2 + A[1] ** 2 <= d **2 :
    ans += 1

print(ans)

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

A = []

for i in range(n):
  A_i = list(map(int, input().split()))
  A.append(A_i)
  
ans = 0

for j in A:
  if (j[0] ** 2 + j[1] ** 2) <= d **2 :
    ans += 1

print(ans)
Buggy python submission (verdict: Runtime Error):
N = list(map(int,input()))
k = int(input())

for i in range(k):
  if N[1] <= N[0]:
    N[1] = N[1] * 2
  elif N[2] <= N[0]:
    N[2] = N[2] * 2
  
if N[1] >= N[0] and N[2] >= N[0]:
  print("Yes")
else:
  print("No")

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

for i in range(k):
  if N[1] <= N[0]:
    N[1] = N[1] * 2
  elif N[2] <= N[1]:
    N[2] = N[2] * 2
  
if N[1] > N[0] and N[2] > N[1]:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Time Limit Exceeded):
import functools
import operator

n, k = map(int, input().split())
A = list(map(int, input().split()))

old_score = 1
new_score = 1

for i in range(n - k + 1): #iはスタート地点
    old_score = new_score
    new_score = 1
    
    list_ = A[i: i + k] #Aのj番目の要素をかける
    new_score = functools.reduce(operator.mul, list_)

    if i != 0 and old_score < new_score:
        print("Yes")
    elif i != 0 and old_score >= new_score:    
        print("No")

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

for i in range(n - k): #iはスタート地点
    old = A[i] #Aのj番目の要素をかける
    new = A[i + k]
    
    if old < new:
        print("Yes")
    else:
        print("No")

Buggy python submission (verdict: Runtime Error):
import functools
import operator

n, k = map(int, input().split())
A = list(map(int, input().split()))

old_score = 1
new_score = 1

for i in range(n - k + 1): #iはスタート地点
    old_score = new_score
    new_score = 1
    
    list_ = A[i, i + k] #Aのj番目の要素をかける
    new_score = functools.reduce(operator.mul, list_)

    if i != 0 and old_score < new_score:
        print("Yes")
    elif i != 0 and old_score >= new_score:    
        print("No")

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

for i in range(n - k): #iはスタート地点
    old = A[i] #Aのj番目の要素をかける
    new = A[i + k]
    
    if old < new:
        print("Yes")
    else:
        print("No")

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

old_score = 1
new_score = 1

for i in range(n - k + 1): #iはスタート地点
    old_score = new_score
    new_score = 1
    for j in range(i, i + k): #Aのj番目の要素をかける
        new_score = new_score * A[j]

    if i != 0 and old_score < new_score:
        print("Yes")
    elif i != 0 and old_score >= new_score:    
        print("No")

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

for i in range(n - k): #iはスタート地点
    old = A[i] #Aのj番目の要素をかける
    new = A[i + k]
    
    if old < new:
        print("Yes")
    else:
        print("No")

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

score = [1] * (n - k + 1)

for i in range(n - k + 1): #iはスタート地点
  for j in range(i, i + k): #Aのj番目の要素をかける
    score[i] = score[i] * A[j]
  
for i in range(len(score) - 1):
  if score[i] < score[i + 1]:
    print("Yes")
  else:
    print("No")

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

for i in range(n - k): #iはスタート地点
    old = A[i] #Aのj番目の要素をかける
    new = A[i + k]
    
    if old < new:
        print("Yes")
    else:
        print("No")
Buggy python submission (verdict: Runtime Error):
n = int(input())
A = list(map(int, input().split()))

ans = 1
for i in A:
  ans = ans * i
  if ans > 10 ** 18:
	  print("-1")
      break
  else:
    continue
else:
  print(ans)

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

ans = 1
if 0 in A:
  print("0")
else:
  for i in A:
    ans = ans * i
    if ans > 10 ** 18:
      print("-1")
      break
    else:
      continue
  else:
    print(ans)

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

ans = 1
for i in A:
  ans = ans * i
  
if ans > 10 ** 18:
  print("-1")
else:
  print(ans)

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

ans = 1
if 0 in A:
  print("0")
else:
  for i in A:
    ans = ans * i
    if ans > 10 ** 18:
      print("-1")
      break
    else:
      continue
  else:
    print(ans)
Buggy python submission (verdict: Runtime Error):
from decimal import Decimal
a, b = map(Decimal, input().split())

print(math.floor(a * b))

Fixed submission:
from decimal import Decimal
import math
a, b = map(Decimal, input().split())

print(math.floor(a * b))

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

print(int(a * b))

Fixed submission:
from decimal import Decimal
import math
a, b = map(Decimal, input().split())

print(math.floor(a * b))
Buggy python submission (verdict: Time Limit Exceeded):
import itertools
A = input()

ans = []
for i in range(len(A)):
    if A[i] == "?":
        ans.append(i)
        
count = len(ans)

ans_list = []
for i in range(count + 1): #i個をpで置き換える。
    if i >= 1: #iが1よりも大きいときだけ考える。
        rep_list = list(itertools.combinations(ans,i))
        
        for j in range(len(rep_list)):
            for k in rep_list[j]: #k番目をPに置き換える。
                new = new[:k] + "P"  + new[k + 1:]
                #print(rep_list,k)
            new = new.replace("?" , "D")    
            ans_list.append(new)
            new = A
    else:
        new = A.replace("?", "D")
        ans_list.append(new)
        new = A

list_ = []
ans = 0

for moji in ans_list:
    for j in range(len(moji)):
        if moji[j : j + 2] == "PD":
            ans += 1
        if moji[j] == "D":
            ans += 1
    list_.append(ans)
    ans = 0    
    
print(ans_list[list_.index(max(list_))])

Fixed submission:
A = input()

moji = A.replace("?", "D")

print(moji)
Buggy python submission (verdict: Runtime Error):
n = int(input());
a = n % 10

if a == 2 or a ==4 or a == 5 or 7 a == 9:
  print("hon")
elif a ==0 or a == 1 or a == 6 or a == 8:
  print("pon")
else:
  print("bon")
  

Fixed submission:
n = int(input());
a = n % 10

if a == 2 or a ==4 or a == 5 or a == 7 or a == 9:
  print("hon")
elif a ==0 or a == 1 or a == 6 or a == 8:
  print("pon")
else:
  print("bon")
Buggy python submission (verdict: Runtime Error):
import math

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

kaku = math.pi / 360 * abs(60 * h - 11 * M)

#yogen
ans = a ** 2 + b ** 2 - 2 * math.cos(kaku) * a * b

print(ans ** (1 /2))



Fixed submission:
import math

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

kaku = math.pi / 360 * abs(60 * h - 11 * m)

#yogen
ans = a ** 2 + b ** 2 - 2 * math.cos(kaku) * a * b

print(ans ** (1 / 2))
Buggy python submission (verdict: Runtime Error):
a, b, c, k = map(int, input().split());

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

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

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

Buggy python submission (verdict: Runtime Error):
a, b, c, k = map(int, input().split());

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

print(num)
  
  


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

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

Buggy python submission (verdict: Time Limit Exceeded):
a, b, c, k = map(int, input().split());
num = 0;

while a > 0 and k > 0:
    num += 1;
    a -= 1;
    k -= 1;
  
while b > 0 and k > 0:
    b -= 1;
    k -= 1;
    
while c > 0 and k > 0:
    num -= 1;
    c -= 1;
    k -= 1;

print(num)

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

if a > k:
  print(k)
else:
  num = a; 
  
  if k >= a + b:
      num -= k - (a + b);
  print(num)
Buggy python submission (verdict: Runtime Error):
import collections

n = int(input());
A = list(map(int, input().split()));

ans = [0] * n;

c = collections.Counter(A)
key = list(c.keys());
value = list(c.values());

for i in key:
  ans[i-1] = value[i-1];
  
for a in ans:
  print(a);

Fixed submission:
import collections

n = int(input());
A = list(map(int, input().split()));

ans = [0] * n;

c = collections.Counter(A)
key = list(c.keys());
value = list(c.values());

for i in range(len(key)):
    ans[key[i]-1] = value[i];
  
for a in ans:
  print(a);

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

coun = [0] * n;

for i in range(n):
  num = A.count(i+1);
  coun[i] = num;

for j in coun:
  print(j);

Fixed submission:
import collections

n = int(input());
A = list(map(int, input().split()));

ans = [0] * n;

c = collections.Counter(A)
key = list(c.keys());
value = list(c.values());

for i in range(len(key)):
    ans[key[i]-1] = value[i];
  
for a in ans:
  print(a);

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

coun = [];

for i in range(n):
  num = A.count(i+1);
  coun.append(num);

for j in coun:
  print(j);
  

Fixed submission:
import collections

n = int(input());
A = list(map(int, input().split()));

ans = [0] * n;

c = collections.Counter(A)
key = list(c.keys());
value = list(c.values());

for i in range(len(key)):
    ans[key[i]-1] = value[i];
  
for a in ans:
  print(a);
Buggy python submission (verdict: Runtime Error):
N = input();
sum = 0;

for i in range(N):
  num = i + 1;
  if num % 3 != 0 and num % 5 !=0:
    sum += num;
  else:
    pass;

print(num)
   
    

Fixed submission:
N = int(input());
sum = 0;

for i in range(N):
  num = i + 1;
  if num % 3 != 0 and num % 5 !=0:
    sum += num;
  else:
    pass;

print(sum)
Buggy python submission (verdict: Runtime Error):
from math import gcd
 
K = int(input());
gcd = 0;

for a in range(1,K+1):
  for b in range(1,K+1):
    for c in range(1,K+1):
      gcd += gcd(gcd(a,b),c);

print(gcd)


Fixed submission:
from math import gcd
 
K = int(input());
sum = 0;

for a in range(1,K+1):
  for b in range(1,K+1):
    for c in range(1,K+1):
      sum += gcd(gcd(a,b),c);

print(sum)

Buggy python submission (verdict: Time Limit Exceeded):
import math
 
K = int(input());
gcd = 0;

for a in range(1,K+1):
  for b in range(1,K+1):
    for c in range(1,K+1):
      gcd += math.gcd(math.gcd(a,b),c);

print(gcd)


Fixed submission:
from math import gcd
 
K = int(input());
sum = 0;

for a in range(1,K+1):
  for b in range(1,K+1):
    for c in range(1,K+1):
      sum += gcd(gcd(a,b),c);

print(sum)

Buggy python submission (verdict: Time Limit Exceeded):
import math
 
K = int(input());
gcd = 0;
gcd1 = 0;
  
for a in range(1,K+1):
  for b in range(1,K+1):
    for c in range(1,K+1):
      gcd1 = math.gcd(a,b);
      gcd += math.gcd(gcd1,c);

print(gcd)


Fixed submission:
from math import gcd
 
K = int(input());
sum = 0;

for a in range(1,K+1):
  for b in range(1,K+1):
    for c in range(1,K+1):
      sum += gcd(gcd(a,b),c);

print(sum)

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

K = int(input());
gcd = 0;
gcd1 = 0;

for a in range(K):
  aa = a + 1 ;
  
  for b in range(K):
    bb = b + 1;
    
    for c in range(K):
      cc = c + 1;
      gcd1 = math.gcd(aa,bb);
      gcd += math.gcd(gcd1,cc);
      
print(gcd)

Fixed submission:
from math import gcd
 
K = int(input());
sum = 0;

for a in range(1,K+1):
  for b in range(1,K+1):
    for c in range(1,K+1):
      sum += gcd(gcd(a,b),c);

print(sum)

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

K = int(input());
gcd = 0;
gcd1 = 0;
gcd2 = 0;

for a in range(K):
  aa = a + 1 ;
  
  for b in range(K):
    bb = b + 1;
    
    for c in range(K):
      cc = c + 1;
      gcd1 = math.gcd(aa,bb);
      gcd2 = math.gcd(bb,cc);
      gcd += math.gcd(gcd1,gcd2);
      
print(gcd)
 
  


Fixed submission:
from math import gcd
 
K = int(input());
sum = 0;

for a in range(1,K+1):
  for b in range(1,K+1):
    for c in range(1,K+1):
      sum += gcd(gcd(a,b),c);

print(sum)

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

K = int(input());
gcd = o;

for a in range(K):
  aa = a + 1 ;
  
  for b in range(K):
    bb = b + 1;
    
    for c in range(K):
      cc = c + 1;
      gcd += math.gcd(aa,bb,cc);
        
print(gcd)
 
  

Fixed submission:
from math import gcd
 
K = int(input());
sum = 0;

for a in range(1,K+1):
  for b in range(1,K+1):
    for c in range(1,K+1):
      sum += gcd(gcd(a,b),c);

print(sum)
Buggy python submission (verdict: Runtime Error):
S = input();
 
if S[2]==S[3] and S[4]==S[5]:
  print("Yes");
else:
  print("No");


Fixed submission:
N,M = (int(a) for a in input().split());
A = input();

A = A.split();


B = [int(s) for s in A];

sum = sum(B)

line = sum/4/M
point = 0;
length = len(B);

for i in range(length):
    if B[i] >= line:
        point += 1;
    else:
        pass;
    
if point >= M:
    print("Yes");
else:
    print("No");
Buggy python submission (verdict: Runtime Error):
S = input();
 
if S[2]==S[3] & S[4]==S[5]:
  print("Yes");
else:
  print("No");

Fixed submission:
S = input();
 
if S[2]==S[3] and S[4]==S[5]:
  print("Yes");
else:
  print("No");

Buggy python submission (verdict: Runtime Error):
S = input();
 
if S[3]==S[4] & S[5]==S[6]:
  print("Yes");
else:
  print("No");

Fixed submission:
S = input();
 
if S[2]==S[3] and S[4]==S[5]:
  print("Yes");
else:
  print("No");

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

if S[3]==S[4] & S[5]==S[6]:
  print("Yes");
else
  print("No");

Fixed submission:
S = input();
 
if S[2]==S[3] and S[4]==S[5]:
  print("Yes");
else:
  print("No");
Buggy python submission (verdict: Runtime Error):
l = int(input());

ans = (l / 3) ^ 3;

print(ans);


Fixed submission:
l = int(input());

ans = (l / 3) ** 3;

print(ans);

Buggy python submission (verdict: Runtime Error):
l = input();

ans = (l / 3) ^ 3;

print(ans);


Fixed submission:
l = int(input());

ans = (l / 3) ** 3;

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

for x in range(1,101):
  tax_8 = int(x * 0.08);
  tax_10= int(x * 0.1);
  if tax_8 == a and tax_10 == b:
  	ans = x;
    break;
  elif x == 101:
    ans = -1;
  else:
    pass;
  
print(ans);
  

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

for x in range(1,1001):
  tax_8 = int(x * 0.08);
  tax_10= int(x * 0.1);
  if tax_8 == a and tax_10 == b:
    ans = x;
    break;
  elif x == 100:
    ans = -1;
  else:
    pass;
  
print(ans);
Buggy python submission (verdict: Runtime Error):
import collections

n = int(input());
S = [];

for i in range(n):
  S.append(input());

c = collections.Counter(S)
dic2 = sorted(dic.items())

num = c.most_common()[0][1];
ans = [];

for a,b in c.most_common():
    if b == num:
      ans.append(a);
      continue;
    
    else:
      break;

dic2 = sorted(ans);

for i in ans:
  print(i);

Fixed submission:
import collections

n = int(input());
S = [];

for i in range(n):
  S.append(input());

c = collections.Counter(S)

num = c.most_common()[0][1];
ans = [];

for a,b in c.most_common():
    if b == num:
      ans.append(a);
      continue;
    
    else:
      break;

ans = sorted(ans);

for i in ans:
  print(i);

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

n = int(input());
S = [];

for i in range(n):
  S.append(input());

c = collections.Counter(S)

num = c.most_common()[0][1];
ans = [];

for i in range(len(c)):
  if c.most_common()[i][1] == num:
    ans.append(c.most_common()[i][0]);
    continue;
    
  else:
    break;
    
for a in len(ans):
  print(ans[a]);


Fixed submission:
import collections

n = int(input());
S = [];

for i in range(n):
  S.append(input());

c = collections.Counter(S)

num = c.most_common()[0][1];
ans = [];

for a,b in c.most_common():
    if b == num:
      ans.append(a);
      continue;
    
    else:
      break;

ans = sorted(ans);

for i in ans:
  print(i);

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

n = int(input());
S = [];

for i in range(n):
  S.append(input());

c = collections.Counter(S)

num = c.most_common()[0][1];
ans = [];

for i in range(len(c)):
  if c.most_common()[i][1] == num:
    ans.append(c.most_common()[i][0]);
    continue;
    
  else:
    break;
    
for a in len(ans):
  print(ans[a]);

Fixed submission:
import collections

n = int(input());
S = [];

for i in range(n):
  S.append(input());

c = collections.Counter(S)

num = c.most_common()[0][1];
ans = [];

for a,b in c.most_common():
    if b == num:
      ans.append(a);
      continue;
    
    else:
      break;

ans = sorted(ans);

for i in ans:
  print(i);
Buggy python submission (verdict: Runtime Error):
h, a = input().split;
h = int(h);
a = int(a);

if h % a == 0:
  ans = int(h // a);
else:
  ans = int(h // a + 1);
  
print(ans);

Fixed submission:
h, a = input().split();
h = int(h);
a = int(a);

if h % a == 0:
  ans = int(h // a);
else:
  ans = int(h // a + 1);
  
print(ans);
Buggy python submission (verdict: Runtime Error):
h, n = input().split;
h = int(h);
n = int(n);

A = list(map(int, input().split()));

if sum(A) > h:
  print("No");
else:
  print("Yes");

Fixed submission:
h, n = input().split();
h = int(h);
n = int(n);

A = list(map(int, input().split()));

if sum(A) >= h:
  print("Yes");
else:
  print("No");
Buggy python submission (verdict: Runtime Error):
n ,k = input().split();
n = int(n);
k = int(k);

H = list(map(int, input().split()));

#HPが多い敵を上からk体だけ減らす。
yowa = H.sort(reverse=True)[k+1:];

ans = sum(yowa);

print(ans);

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

H = list(map(int, input().split()));

#HPが多い敵を上からk体だけ減らす。
H.sort(reverse=True);
yowa = H[k:];

ans = sum(yowa);

print(ans);