Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
# import bisect
# import heapq
# from copy import deepcopy
# from collections import deque
# from collections import Counter
# from itertools import accumulate
# from itertools import permutations
# import numpy as np
# import math
mod = 10**9 + 7

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

ans = 0
for i in range(n):
    a[i] = bin(a[i])[2:].zfill(60)

for i in range(60):
    count = 0
    for j in range(n):
        count += 1 if a[j][i] == '1' else 0

    ans += (pow(2, 59-i, mod) * count * (n-count)) % mod

print(ans % mod)

Fixed submission:
# import bisect
# import heapq
# from copy import deepcopy
# from collections import deque
# from collections import Counter
# from itertools import accumulate
# from itertools import permutations
# import numpy as np
# import math
mod = 10**9 + 7

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

ans = 0
for i in range(n):
    a[i] = bin(a[i])[2:].zfill(60)

for i in range(60):
    count = 0
    for j in range(n):
        count += 1 if a[j][i] == '1' else 0

    ans += (pow(2, 59-i, mod) * count * (n-count)) % mod

print(ans % mod)

Buggy python submission (verdict: Time Limit Exceeded):
# import bisect
# import heapq
# from copy import deepcopy
# from collections import deque
# from collections import Counter
# from itertools import accumulate
# from itertools import permutations
# import numpy as np
# import math
mod = 10**9 + 7

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

s = 0
for i in range(n-1):
    for j in range(i+1,n):
        s += a[i]^a[j]
        s %= mod
print(s)

Fixed submission:
# import bisect
# import heapq
# from copy import deepcopy
# from collections import deque
# from collections import Counter
# from itertools import accumulate
# from itertools import permutations
# import numpy as np
# import math
mod = 10**9 + 7

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

ans = 0
for i in range(n):
    a[i] = bin(a[i])[2:].zfill(60)

for i in range(60):
    count = 0
    for j in range(n):
        count += 1 if a[j][i] == '1' else 0

    ans += (pow(2, 59-i, mod) * count * (n-count)) % mod

print(ans % mod)
Buggy python submission (verdict: Runtime Error):
n = int(input())
# s = input()
c = []
hen = [[] for _ in range(n)]
for i in range(n-1):
    a,b = map(int,input().split())
    hen[a-1].append(b-1); hen[b-1].append(a-1)
    c.append([a-1,b-1])

k = 0
for i in range(n):
    k = max(k,len(hen[i]))
print(k)

child = [[] for _ in range(n)]
for [a,b] in c:
    color = 1
    while (color in child[a]) or (color in child[b]):
        color += 1

    child[a].append(color)
    child[b].append(color)
    print(color)



Fixed submission:
# import bisect
# import heapq
# from copy import deepcopy
# from collections import deque
# from collections import Counter
# from itertools import accumulate
# from itertools import permutations
# import numpy as np
# import math
mod = 10**9 + 7

# n = int(input())
# a = list(map(int, input().split()))
s = input()
l = ['SUN','MON','TUE','WED','THU','FRI','SAT']
if s == l[0]: print(7)
elif s == l[1]: print(6)
elif s == l[2]: print(5)
elif s == l[3]: print(4)
elif s == l[4]: print(3)
elif s ==l[5]: print(2)
elif s == l[6]: print(1)
Buggy python submission (verdict: Runtime Error):
# import bisect
# import heapq
# from copy import deepcopy
# from collections import deque
# from collections import Counter
# from itertools import accumulate
# from itertools import permutations
# import numpy as np
# import math
mod = 10**9 + 7

# n = int(input())
# a = list(map(int, input().split()))
n = int(input())
s = input()
ans = []
for i in range(s):
    ans.append(chr((ord(i)-ord('A')+n)%26 + ord('A')))

print(''.join(ans))

Fixed submission:
# import bisect
# import heapq
# from copy import deepcopy
# from collections import deque
# from collections import Counter
# from itertools import accumulate
# from itertools import permutations
# import numpy as np
# import math
# mod = 10**9 + 7

# n = int(input())
# a = list(map(int, input().split()))
n = int(input())
s = input()
ans = []
for i in s:
    ans.append(chr((ord(i)-ord('A')+n)%26 + ord('A')))

print(''.join(ans))
Buggy python submission (verdict: Runtime Error):
# import bisect
# import heapq
# from copy import deepcopy
# from collections import deque
# from collections import Counter
# from itertools import accumulate
# from itertools import permutations
# import numpy as np
import math
# mod = 10**9 + 7

# n = int(input())
# a = list(map(int, input().split()))
n = int(input())


if n > 81:
    print('No')
    exit()

else:
    for i in range(2,10):
        if n % i == 0 and 1<= n // i <=9:
            print('Yes')
            exit()

print('No')
    

Fixed submission:
# import bisect
# import heapq
# from copy import deepcopy
# from collections import deque
# from collections import Counter
# from itertools import accumulate
# from itertools import permutations
# import numpy as np
# import math
# mod = 10**9 + 7

# n = int(input())
# a = list(map(int, input().split()))
# n = int(input())
a,b = map(int,input().split())
ans = -1
if 1<=a<=9 and 1<=b<=9:
    ans = a*b

print(ans)
Buggy python submission (verdict: Runtime Error):
# import bisect
# import heapq
# from copy import deepcopy
# from collections import deque
# from collections import Counter
# from itertools import accumulate
# from itertools import permutations
# import numpy as np
import math
# mod = 10**9 + 7

# n = int(input())
# a = list(map(int, input().split()))
n = int(input())

def prime(n):
    p = True
    for i in range(2,math.sqrt(n) + 1):
        if n % i == 0 :
            p = False
            break

    return p

print('Yes' if n<=81 and not prime(n) else 'No')

Fixed submission:
# import bisect
# import heapq
# from copy import deepcopy
# from collections import deque
# from collections import Counter
# from itertools import accumulate
# from itertools import permutations
# import numpy as np
import math
# mod = 10**9 + 7

# n = int(input())
# a = list(map(int, input().split()))
n = int(input())


if n > 81:
    print('No')
    exit()

else:
    for i in range(1,10):
        if n % i == 0 and 1<= (n // i) <=9:
            print('Yes')
            exit()

print('No')
Buggy python submission (verdict: Runtime Error):
from sys import stdin
import bisect
        
N = int(stdin.readline().rstrip())
L = [int(x) for x in stdin.readline().rstrip().split()]
L.sort()
 
ans = 0
for a in range(len(L)-2):
    for b in range(a + 1, len(L)-1):
        c = bisect.bisect_left(L, L[a] + L[b])

        ans += c - 1 - b
print(ans)

Fixed submission:
# import bisect
# import heapq
# from copy import deepcopy
# from collections import deque
# from collections import Counter
# from itertools import accumulate
# from itertools import permutations
# import numpy as np
import math
# mod = 10**9 + 7

# n = int(input())
# a = list(map(int, input().split()))
# n = int(input())z
a,b = map(int,input().split())


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

Buggy python submission (verdict: Runtime Error):
from sys import stdin
import bisect
        
N = int(stdin.readline().rstrip())
L = [int(x) for x in stdin.readline().rstrip().split()]
L.sort()
 
ans = 0
for a in range(len(L)-2):
    for b in range(a + 1, len(L)-1):
        c = bisect.bisect_left(L, L[a] + L[b])

        	ans += c - 1 - b
print(ans)

Fixed submission:
# import bisect
# import heapq
# from copy import deepcopy
# from collections import deque
# from collections import Counter
# from itertools import accumulate
# from itertools import permutations
# import numpy as np
import math
# mod = 10**9 + 7

# n = int(input())
# a = list(map(int, input().split()))
# n = int(input())z
a,b = map(int,input().split())


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

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

ls.sort()

dis = 0
for i in range(0, n-2):
    for j in range(i+1, n-1):
        for k in range(j+1, n):
            if ls[i] + ls[j] <= ls[k]: dis += 1

ans = (n*(n-1)*(n-2) // 6) - dis
print(ans)

Fixed submission:
# import bisect
# import heapq
# from copy import deepcopy
# from collections import deque
# from collections import Counter
# from itertools import accumulate
# from itertools import permutations
# import numpy as np
import math
# mod = 10**9 + 7

# n = int(input())
# a = list(map(int, input().split()))
# n = int(input())z
a,b = map(int,input().split())


print(a-2*b if a-2*b>=0 else 0)
Buggy python submission (verdict: Runtime Error):
from sys import stdin
import bisect
        
N = int(stdin.readline().rstrip())
L = [int(x) for x in stdin.readline().rstrip().split()]
L.sort()
 
ans = 0
for a in range(len(L)-2):
    for b in range(a + 1, len(L)-1):
        c = bisect.bisect_left(L, L[a] + L[b])
        	ans += c - 1 - b
 
print(ans)

Fixed submission:
from sys import stdin
import bisect
n = int(input())
ls = list(map(int,input().split()))
ls.sort()
 
ans = 0
for a in range(n-2):
    for b in range(a + 1, n-1):
        c = bisect.bisect_left(ls, ls[a] + ls[b])
 
        ans += c - 1 - b
print(ans)

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

ls.sort()

dis = 0
for i in range(0, n-2):
    for j in range(i+1, n-1):
        for k in range(j+1, n):
            if ls[i] + ls[j] <= ls[k]: 
                dis += 1

ans = n*(n-1)*(n-2)//6-dis
print(ans)

Fixed submission:
from sys import stdin
import bisect
n = int(input())
ls = list(map(int,input().split()))
ls.sort()
 
ans = 0
for a in range(n-2):
    for b in range(a + 1, n-1):
        c = bisect.bisect_left(ls, ls[a] + ls[b])
 
        ans += c - 1 - b
print(ans)
Buggy python submission (verdict: Runtime Error):
import math 
import bisect
import heapq
from collections import deque

n = int(input())
h = map(int,input().split())

l = [0] * n
l[0] = 0
for i in range(1,n):
    l[i] = l[i-1] + 1 if h[i-1] >= h[i] else 0

print(max(l))


Fixed submission:
import math 
import bisect
import heapq
from collections import deque

n = int(input())
h = list(map(int,input().split()))

l = [0] * n
l[0] = 0
for i in range(1,n):
    l[i] = l[i-1] + 1 if h[i-1] >= h[i] else 0

print(max(l))

Buggy python submission (verdict: Runtime Error):
import math 
import bisect
import heapq
from collections import deque

n = int(input())
h = map(int,input().split())

l = [0] * n
l[0] = 0
for i in range(1,n):
    l[i] = l[i-1] + 1 if h[i-1] >= h[i] else 0

print(max(l))

Fixed submission:
import math 
import bisect
import heapq
from collections import deque

n = int(input())
h = list(map(int,input().split()))

l = [0] * n
l[0] = 0
for i in range(1,n):
    l[i] = l[i-1] + 1 if h[i-1] >= h[i] else 0

print(max(l))
Buggy python submission (verdict: Runtime Error):
import math 
import bisect
import heapq
from collections import deque

n = int(input())
print(n(n-1) //2)

Fixed submission:
import math 
import bisect
import heapq
from collections import deque

n = int(input())
print(n*(n-1) // 2)
Buggy python submission (verdict: Runtime Error):
import math 
import bisect
import heapq
from operator import mul
from collections import deque

n, q = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(n-1)]
px = [list(map(int, input().split())) for _ in range(q)]



def dfs(start):
    if start == 1:
        return [True] * n
    task = deque([])
    seen = [False] * n

    task.appendleft(start)
    seen[start-1] = True

    while task:
        task.popleft()
        for i in range(len(ab)):
            if ab[i][0] == start and seen[ab[i][1]-1] == False:
                next = ab[i][1]
                seen[next-1] = True
                task.appendleft(next)


    return seen


ans = [0]*n

for i in range(q):
    for j in range(n):
        ans[j] += px[i][1] if dfs(px[i][0])[j] else 0
for i in range(len(ans))
print(ans[i])



Fixed submission:
import math 
import bisect
import heapq
from operator import mul
from collections import deque

n, q = map(int, input().split())
g=[[] for _ in range(n)]

for i in range(n-1):
    a,b=map(int,input().split())
    g[a-1].append(b-1)
    g[b - 1].append(a - 1)
c = [0] * n

for j in range(q):
    p, x = map(int, input().split())
    c[p - 1] += x

seen = [0] * n
seen[0] = 1
next = deque([0])


while next:
    v = next.popleft()
    cost = c[v]

    for nv in g[v]:

        if seen[nv]:
            continue
        seen[nv] = 1
        next.append(nv)
        c[nv] += cost

print(*c)
Buggy python submission (verdict: Runtime Error):
n,m = map(int, input().split())
x = list(map(int, input().split()))
x.sort()

dis=[]
if n>m: 
    print(0)
else:
    for i in range(m-1):
        dis[i] = x[i+1] - x[i]

    dis.sort() 

    print(sum(dis[:m-n]))

Fixed submission:
n, m = map(int, input().split())
x = list(map(int, input().split()))
x.sort()
d = [x[i] - x[i-1] for i in range(1, m)]
d.sort()
print(sum(d[:m-n]) if m >= n else 0)

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

dis=[]
if n>m: 
    print(0)
else:
    for i in range(len(x)-1):
        dis[i] = x[i+1] - x[i]

    dis.sort()

    print(sum(dis[:m-n]))

Fixed submission:
n, m = map(int, input().split())
x = list(map(int, input().split()))
x.sort()
d = [x[i] - x[i-1] for i in range(1, m)]
d.sort()
print(sum(d[:m-n]) if m >= n else 0)

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

dis=[]
res=0
if n>m: 
    print(0)
else:
    for i in range(len(x)-1):
        dis[i] = x[i+1] - x[i]

    dis.sort()

    for j in range(n-1):
        res += dis[j]

    print(sum(dis) - res)

Fixed submission:
n, m = map(int, input().split())
x = list(map(int, input().split()))
x.sort()
d = [x[i] - x[i-1] for i in range(1, m)]
d.sort()
print(sum(d[:m-n]) if m >= n else 0)

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

dis=[]
res=0
if n>m: 
    print(0)
else:
    for i in range(len(x)-1):
        dis[i] = x[i+1] - x[i]

    dis.sort()

    for j in range(n-1):
        res += y[j]

    print(sum(dis) - res)

Fixed submission:
n, m = map(int, input().split())
x = list(map(int, input().split()))
x.sort()
d = [x[i] - x[i-1] for i in range(1, m)]
d.sort()
print(sum(d[:m-n]) if m >= n else 0)

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

dis=[]
res=0
if n>m: ans=0
else:
    for i in range(len(x)-1):
        dis[i] = x[i+1] - x[i]

    y.sort()

    for j in range(n-1):
        res += y[j]

    return sum(y) - res

Fixed submission:
n, m = map(int, input().split())
x = list(map(int, input().split()))
x.sort()
d = [x[i] - x[i-1] for i in range(1, m)]
d.sort()
print(sum(d[:m-n]) if m >= n else 0)

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

dis=[]
ans=0
if n>m: ans=0
else:
    for i in range(len(x)-1):
        dis[i] = x[i+1] - x[i]

    y.reverse()

    for j in range(n-1):
        ans += y[j]

    return ans

Fixed submission:
n, m = map(int, input().split())
x = list(map(int, input().split()))
x.sort()
d = [x[i] - x[i-1] for i in range(1, m)]
d.sort()
print(sum(d[:m-n]) if m >= n else 0)
Buggy python submission (verdict: Runtime Error):
import math
import bisect
import heapq
from collections import deque

n = int(input())

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

d = [math.inf] * n
d[0] = 0
d[1] = abs(h[0] - h[1])

for i in range(2,n):
    d[i] = min(d[i-1] + abs(h[i-1]-h[i]), d[i-2] + abs(h[i-2]-h[i]))

print(d[n-1])


Fixed submission:
import math
import bisect
import heapq
from collections import deque

n = int(input())

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

d = [float('inf')] * n
d[0] = 0
d[1] = abs(h[0] - h[1])

for i in range(2,n):
    d[i] = min(d[i-1] + abs(h[i-1]-h[i]), d[i-2] + abs(h[i-2]-h[i]))

print(d[n-1])

Buggy python submission (verdict: Runtime Error):
import math
import bisect
import heapq
from fractions import gcd #math in python 3.7
from collections import deque

n = int(input())

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

d = [math.inf] * n
d[0] = 0
d[1] = abs(h[0] - h[1])

for i in range(2,n):
    d[i] = min(d[i-1] + abs(h[i-1]-h[i]), d[i-2] + abs(h[i-2]-h[i]))

print(d[n-1])


Fixed submission:
import math
import bisect
import heapq
from collections import deque

n = int(input())

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

d = [float('inf')] * n
d[0] = 0
d[1] = abs(h[0] - h[1])

for i in range(2,n):
    d[i] = min(d[i-1] + abs(h[i-1]-h[i]), d[i-2] + abs(h[i-2]-h[i]))

print(d[n-1])
Buggy python submission (verdict: Time Limit Exceeded):
import itertools

n, m, q = map(int,input().split())

tr = [[0]*n for _ in range(n)]

for i in range(m):
    l, r = map((lambda x:int(x)-1), input().split())
    tr[l][r] += 1

for i in range(n):
    tr[i] = list(itertools.accumulate(tr[i]))

for i in range(q):
    p, q = map((lambda x:int(x)-1), input().split())
    ans = 0
    for j in tr[p:q+1]:
        ans += (j[q] - j[p-1]) if p>0 else j[q]

    print(ans)



Fixed submission:
import itertools

n, m, q = map(int,input().split())

tr = [[0]*n for _ in range(n)]

for i in range(m):
    l, r = map((lambda x:int(x)-1), input().split())
    tr[l][r] += 1

for i in range(n):
    tr[i] = list(itertools.accumulate(tr[i]))

for i in range(q):
    p, q = map((lambda x:int(x)-1), input().split())
    ans = 0
    for j in tr[p:q+1]:
        ans += (j[q] - j[p-1]) if p>0 else j[q]

    print(ans)
Buggy python submission (verdict: Runtime Error):
n = int(intput())
a = []
for i in range(n):
  a.append(input())
print('AC x ' + str(a.count('AC')))
print('WA x ' + str(a.count('WA')))
print('TLE x ' + str(a.count('TLE')))
print('RE x ' + str(a.count('RE')))

Fixed submission:
n = int(input())
a = []
for i in range(n):
  a.append(input())
print('AC x ' + str(a.count('AC')))
print('WA x ' + str(a.count('WA')))
print('TLE x ' + str(a.count('TLE')))
print('RE x ' + str(a.count('RE')))
Buggy python submission (verdict: Runtime Error):
n, k = map(int, input().split())
p = list(map(int, input().split()))
p = p.sort()
print(sum(p[:k]))

Fixed submission:
n, k = map(int, input().split())
p = list(map(int, input().split()))
p.sort()
print(sum(p[:k]))
Buggy python submission (verdict: Runtime Error):
print(int(input())*int(input()))

Fixed submission:
a, b = map(int, input().split())
print(a*b)
Buggy python submission (verdict: Runtime Error):
n, k= map(int, input().split())
x = [0]*n
for i in range(k):
  z = int(input())
  if z == 1:
    x[z-1] +=1
  else:
    a = list(map(int, input().split()))
    for j in a:
      x[j-1] +=1
print(x.count(0))

Fixed submission:
n, k= map(int, input().split())
x = [0]*n
for i in range(k):
  z = int(input())
  if z == 1:
    x[int(input())-1] +=1
  else:
    a = list(map(int, input().split()))
    for j in a:
      x[j-1] +=1
print(x.count(0))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
l = list(map(int, input().split()))
ls = set(l)
c = [0] *n
for i in range(1,n+1):
  if i in ls:
    c[i-1] = l.count(i)
for i in range(n):
  print(c[i])

Fixed submission:
n = int(input())
l = list(map(int, input().split()))
ans =[0]*n
for i in l:
  ans[i-1] +=1
for i in ans:
  print(i)

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

for i in range(1,n+1):
  if i in ls:
    print(l.count(i))
  else:
    print(0)

Fixed submission:
n = int(input())
l = list(map(int, input().split()))
ans =[0]*n
for i in l:
  ans[i-1] +=1
for i in ans:
  print(i)

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

for i in range(1,n+1):
  if i not in l:
    print(0)
  else:
    print(l.count(i))

Fixed submission:
n = int(input())
l = list(map(int, input().split()))
ans =[0]*n
for i in l:
  ans[i-1] +=1
for i in ans:
  print(i)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
l = list(map(int, input().split()))
for i in range(n):
	print(l.count(i+1))

Fixed submission:
n = int(input())
l = list(map(int, input().split()))
ans =[0]*n
for i in l:
  ans[i-1] +=1
for i in ans:
  print(i)
Buggy python submission (verdict: Runtime Error):
a = input()
if a.count(7)>=1:
  print('Yes')
else:
  print('No')

Fixed submission:
a = input()
if a[0]=='7' or a[1] == '7' or a[2] == '7':
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
print(c a b)

Fixed submission:
a, b, c = map(int, input().split())
print(c, a, b)
Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
l = list(map(int, input().split()))
l.sorted()
if min(l[m-1]) < 1/(4*m):
  print('No')
else:
  print('Yes')

Fixed submission:
n, m = map(int, input().split())
l = list(map(int, input().split()))
l.sort()
l.reverse()
a = sum(l)
for i in range(m):
  if l[i]/a < 1/(4*m):
    print('No')
    exit()
print('Yes')
Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())
while n !=0 and n >= k:
  n = abs(n-k)
if n <= abs(n-k):
  print(n)
else:
  print(abs(n-k))

Fixed submission:
n, k = map(int, input().split())
n = n%k
if n <= abs(n-k):
  print(n)
else:
  print(abs(n-k))
Buggy python submission (verdict: Runtime Error):
N, a, b = map(int, input().split())
x = (N//(a+b)) *a
l='b'*a
l+='r'*b
y = l[0:int(N%(a+b))]
print(x + y.count('b'))

Fixed submission:
N, a, b =map(int, input().split())
count=N//(a+b)
ans= count * a + min(N % (a + b), a)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N, a, b = map(int, input().split())
x = (N//(a+b)) *a
l=[]
for i in range(a):
  l.append('b')
for i in range(b):
  l.append('r')
y = l[0:int(N%(a+b))]
print(x + y.count('b'))

Fixed submission:
N, a, b =map(int, input().split())
count=N//(a+b)
ans= count * a + min(N % (a + b), a)
print(ans)
Buggy python submission (verdict: Runtime Error):
from collections import Counter
 
N = int(input())
S = [input() for x in range(N)]
E = Counter(S)
c = max(E.values())
s = [s for s, g in b.items() if g == c]
s.sort()
print('\n'.join(s))

Fixed submission:
N = int(input())
S = []
for i in range(N):
    S.append(input())
T = {}
for i in range(N):
  if S[i] in T:
    T[S[i]] += 1
  else:
    T.setdefault(S[i],1)
A = max(T.values())

keys = [k for k, v in T.items() if v == A]
U =sorted(keys)

for i in range(len(U)):
  print(U[i])

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

N = int(input())
S = [input() for x in range(N)]
E = Counter(a)
c = max(E.values())
s = [s for s, g in b.items() if g == c]
s.sort()
print('\n'.join(s))

Fixed submission:
N = int(input())
S = []
for i in range(N):
    S.append(input())
T = {}
for i in range(N):
  if S[i] in T:
    T[S[i]] += 1
  else:
    T.setdefault(S[i],1)
A = max(T.values())

keys = [k for k, v in T.items() if v == A]
U =sorted(keys)

for i in range(len(U)):
  print(U[i])
Buggy python submission (verdict: Runtime Error):
h, a = map(int, input().split())
h1 = h
x = 0
while h1 <= 0:
  h1 -= a
  x++
print(x)

Fixed submission:
h, a = map(int, input().split())
x = 0
while h > 0:
  h -= a
  x += 1

else:
  print(x)
Buggy python submission (verdict: Runtime Error):
N = int(input())
M = int(input())

if N == M:
  print('Yes')
else:
  print('No')


Fixed submission:
N, M = input().split()

if N == M:
  print('Yes')
else:
  print('No')

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

if N == M:
  print('Yes')
else:
  print('No')

Fixed submission:
N, M = input().split()

if N == M:
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
if N == M:
  print('Yes')
else:
  print('No')

Fixed submission:
N, M = input().split()

if N == M:
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
If N ==M:
  print('Yes')
else print('No')

Fixed submission:
N, M = input().split()

if N == M:
  print('Yes')
else:
  print('No')