Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
import numpy as np
N,M=input().split(" ")
N=int(N)
M=int(M)
Alist=input().split(" ")
Alist = [float(A) for A in Alist]
Aarray=np.array(Alist)

for m in range(M):
    i=Aarray.argmax()
    Aarray[i]=Aarray[i]/2
    if Aarray[i]==0:
        break
    # print(Alist)
Aarray_i=Aarray.atype(np.int)

print(np.sum(Aarray))

Fixed submission:
from heapq import heappush,heappop
N,M=input().split(" ")
N=int(N)
M=int(M)
Alist=input().split(" ")
# Alist = [-float(A) for A in Alist]
hAqueue=[]
for A in Alist:
    heappush(hAqueue,-float(A))

for m in range(M):
    tmp=heappop(hAqueue)
    heappush(hAqueue,tmp/2)
Alist = [-int(A) for A in hAqueue]
print(sum(Alist))

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
N,M=input().split(" ")
N=int(N)
M=int(M)
Alist=input().split(" ")
Alist = [float(A) for A in Alist]


for m in range(M):
    i=Alist.index(max(Alist))
    Alist[i]=Alist[i]/2
    if Alist[i]==0:
        break
    # print(Alist)


Alist_i = [int(A) for A in Alist]

print(sum(Alist_i))

Fixed submission:
from heapq import heappush,heappop
N,M=input().split(" ")
N=int(N)
M=int(M)
Alist=input().split(" ")
# Alist = [-float(A) for A in Alist]
hAqueue=[]
for A in Alist:
    heappush(hAqueue,-float(A))

for m in range(M):
    tmp=heappop(hAqueue)
    heappush(hAqueue,tmp/2)
Alist = [-int(A) for A in hAqueue]
print(sum(Alist))

Buggy python submission (verdict: Time Limit Exceeded):
#import numpy as np
N,M=input().split(" ")
N=int(N)
M=int(M)
Alist=input().split(" ")
Alist = [float(A) for A in Alist]


for m in range(M):
    i=Alist.index(max(Alist))
    Alist[i]=Alist[i]/2
    # print(Alist)


Alist_i = [int(A) for A in Alist]

print(sum(Alist_i))

Fixed submission:
from heapq import heappush,heappop
N,M=input().split(" ")
N=int(N)
M=int(M)
Alist=input().split(" ")
# Alist = [-float(A) for A in Alist]
hAqueue=[]
for A in Alist:
    heappush(hAqueue,-float(A))

for m in range(M):
    tmp=heappop(hAqueue)
    heappush(hAqueue,tmp/2)
Alist = [-int(A) for A in hAqueue]
print(sum(Alist))

Buggy python submission (verdict: Time Limit Exceeded):
N,M=input().split(" ")
N=int(N)
M=int(M)
Alist=input().split(" ")
Alist = [float(A) for A in Alist]

for m in range(M):
    Alist.sort()
    Alist[-1]=Alist[-1]/2

Alist = [int(A) for A in Alist]
print(sum(Alist))

Fixed submission:
from heapq import heappush,heappop
N,M=input().split(" ")
N=int(N)
M=int(M)
Alist=input().split(" ")
# Alist = [-float(A) for A in Alist]
hAqueue=[]
for A in Alist:
    heappush(hAqueue,-float(A))

for m in range(M):
    tmp=heappop(hAqueue)
    heappush(hAqueue,tmp/2)
Alist = [-int(A) for A in hAqueue]
print(sum(Alist))
Buggy python submission (verdict: Runtime Error):
N = int(input())
S = input()

a = 0
for i in range(N):
  if S[i] == '.':
    a += 1

print(min(a, N-a))

Fixed submission:
A, B, C = ( int(i) for i in input().split() )

if A <= C <= B:
  print('Yes')
elif B <= C <= A:
  print('Yes')
else:
  print('No')

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

a = 0
b = 0

for i in range(N):
  if S[i] == '.':
    a += 1
  else:
    b += 1

print(min(a, b))

Fixed submission:
A, B, C = ( int(i) for i in input().split() )

if A <= C <= B:
  print('Yes')
elif B <= C <= A:
  print('Yes')
else:
  print('No')

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

a = 0
b = 0

for i in range(N):
  if S[i] == '.':
    a += 1
  else:
    b += 1

print(min(a, b))

Fixed submission:
A, B, C = ( int(i) for i in input().split() )

if A <= C <= B:
  print('Yes')
elif B <= C <= A:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
A, B = map(int, imput().split())

if B % A == 0:
  print(A+B)
else:
  print(B-A)

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

if B % A == 0:
  print(A+B)
else:
  print(B-A)

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

if A/B == 0:
  print(A+B)
else:
  print(B-A)

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

if B % A == 0:
  print(A+B)
else:
  print(B-A)

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

if B % A == 0:
  print(A+B)
else:
  print(A-B)

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

if B % A == 0:
  print(A+B)
else:
  print(B-A)

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

if A/B == 0:
  print(A+B)
else:
  print(A-B)

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

if B % A == 0:
  print(A+B)
else:
  print(B-A)
Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())
A_list = [[int(i) for i in input().split()] for i in range(N)] 

a = A_list[0].pop(0)
for i in range(1, N):
  a = set(a) & set(A_list[i].pop(0))

if len(a)==0:
  print(0)
else:
  print(a)

Fixed submission:
N, M = map(int, input().split())
A_list = [[int(i) for i in input().split()] for n in range(N)] 

A_list[0].pop(0)
a = A_list[0]
for i in range(1, N):
  A_list[i].pop(0)
  a = set(a) & set(A_list[i])

if len(a)==0:
  print(0)
else:
  print(len(a))
Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())
data = [[int(i) for i in input().split()] for m in range(M)]
  
corresp = {}
for n in range(1, N+1):
    data_n = []
    for i in range(M):
        if data[i][0] == n:
            data_n.append(data[i])
    sort_n = sorted(data_n, key=lambda data_n_i: data_n_i[1])
    for k in range(len(sort_n)):
        corresp.update({str(sort_n[k]):k+1})
    

for i in range(M):
    print('{0:012d}'.format(data[i][0]*100000+corresp[str(data[i])]))


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

print(X+(Y//2))

Buggy python submission (verdict: Runtime Error):

N, M = map(int, input().split())
data = [[int(i) for i in input().split()] for i in range(M)]
  
corresp = {}
for n in range(1, N+1):
    data_n = []
    for i in range(M):
        if data[i][0] == n:
            data_n.append(data[i])
    sort_n = sorted(data_n, key=lambda data_n_i: data_n_i[1])
    for k in range(len(sort_n)):
        corresp.update({str(sort_n[k]):k+1})
    

for i in range(M):
    print('{0:012d}'.format(data[i][0]*100000+corresp[str(data[i])]))


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

print(X+(Y//2))

Buggy python submission (verdict: Runtime Error):

N, M = map(int, input().split())
data = []
for m in range(M):
  data.append(list(map(int, input().split())))

corresp = {}
for n in range(1, N+1):
    data_n = []
    for i in range(M):
        if data[i][0] == n:
            data_n.append(data[i])
    sort_n = sorted(data_n, key=lambda data_n_i: data_n_i[1])
    for k in range(len(sort_n)):
        corresp.update({str(sort_n[k]):k+1})
    

for i in range(M):
    print('{0:012d}'.format(data[i][0]*100000+corresp[str(data[i])]))


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

print(X+(Y//2))

Buggy python submission (verdict: Runtime Error):

N, M = map(int, input().split())
data = []
for m in range(M):
  data.append(map(int, input().split()))
  
corresp = {}
for n in range(1, N+1):
    data_n = []
    for i in range(M):
        if data[i][0] == n:
            data_n.append(data[i])
    sort_n = sorted(data_n, key=lambda data_n_i: data_n_i[1])
    for k in range(len(sort_n)):
        corresp.update({str(sort_n[k]):k+1})
    

for i in range(M):
    print('{0:012d}'.format(data[i][0]*100000+corresp[str(data[i])]))


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

print(X+(Y//2))

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

print(X+Y/2)

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

print(X+(Y//2))
Buggy python submission (verdict: Runtime Error):
N = int(input())
T, A = map(int, input.split())
H = [map(int, input.split())]

num = 0
for i in range(N):
  deff = abs(T-H[i]*0.006-A)
  if deff < abs(T-H[num]*0.006-A):
    num = i

print(num+1)


Fixed submission:
N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))

num = 0
for i in range(N):
  deff = abs(T-H[i]*0.006-A)
  if deff < abs(T-H[num]*0.006-A):
    num = i

print(num+1)

Buggy python submission (verdict: Runtime Error):
N = int(input())
T, A = map(int, input.split())
H = list(map(int, input.split()))

num = 0
for i in range(N):
  deff = abs(T-H[i]*0.006-A)
  if deff < abs(T-H[num]*0.006-A):
    num = i

print(num)


Fixed submission:
N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))

num = 0
for i in range(N):
  deff = abs(T-H[i]*0.006-A)
  if deff < abs(T-H[num]*0.006-A):
    num = i

print(num+1)

Buggy python submission (verdict: Runtime Error):
N = input()
T, A = map(int, input.split())
H = list(map(int, input.split()))

num = 0
for i in range(0, N):
  deff = abs(T-H[i]*0.006-A)
  if deff < abs(T-H[num]*0.006-A):
    num = i

print(num)

Fixed submission:
N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))

num = 0
for i in range(N):
  deff = abs(T-H[i]*0.006-A)
  if deff < abs(T-H[num]*0.006-A):
    num = i

print(num+1)
Buggy python submission (verdict: Runtime Error):
x=input()
print(X[0],X[8],X[10])

Fixed submission:
X=input()
print(X[0]+X[8]+X[-7])
Buggy python submission (verdict: Runtime Error):
w=str(input())
if w.count("5")=2 and w.count("7")=1:
  print("YES")
else:
  print("NO")


Fixed submission:
w=str(input())
if w.count("5")==2 and w.count("7")==1:
  print("YES")
else:
  print("NO")
Buggy python submission (verdict: Runtime Error):
def main():
i=int(input())
print(i*i*i)

main()




Fixed submission:
def main():
  i=int(input())
  print(i*i*i)
  
main()

Buggy python submission (verdict: Runtime Error):
N=input(">>")
print N*N*N

Fixed submission:
def main():
  i=int(input())
  print(i*i*i)
  
main()
Buggy python submission (verdict: Runtime Error):
#入力
A = input()
B = input()

#A,B ＝　数値化　M,m　＝　初期化
A = int(A)
B = int(B)
m = 0

#K探し
m = ( A + B ) / 2

#K判定および表示
if m.is_integer():
    print( '%d' %m)
else :
    print('IMPOSSIBLE')


Fixed submission:
#入力
A = input().split()

#A,B ＝　数値化　M,m　＝　初期化
A[0] = int(A[0])
A[1] = int(A[1])
m = 0

#K探し
m = ( A[0] + A[1] ) / 2

#K判定
if m.is_integer():
    print( '%d' %m)
else :
    print('IMPOSSIBLE')
Buggy python submission (verdict: Time Limit Exceeded):
N, M = map(int, input().split())
A = list(map(int, input().split()))

for _ in range(M):
    A.sort(reverse=True)
    A[0] //= 2

print(sum(A))

Fixed submission:
import heapq

N, M = map(int, input().split())
A = list(-int(i) for i in input().split())

heapq.heapify(A)
 
for _ in range(M):
    temp = -heapq.heappop(A) // 2
    heapq.heappush(A, -temp)
 
print(-sum(A))
Buggy python submission (verdict: Runtime Error):
import heapq

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

table = [list(map(int, input().split())) for k in range(n)]
table.sort()

ans = 0
pay = []

for day in range(1, m+1):
    for t in table:
        if t[0] <= day:
            heapq.heappush(pay, -t[1])
            choice = t
        else:
            break
    if pay:
        ans -= heapq.heappop(pay)
        table.remove(choice)

print(ans)

Fixed submission:
import heapq

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

table = [list(map(int, input().split())) for _ in range(n)]
table.sort(reverse=True)

ans = 0
pay = []

for day in range(1, m+1):
    while table and table[-1][0] <= day:
        tmp = table.pop()
        heapq.heappush(pay, -tmp[1])
   
    if pay:
        ans -= heapq.heappop(pay)

print(ans)

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

table = [list(map(int, input().split())) for k in range(n)]
table.sort()

ans = 0

for day in range(1, m+1):
    
    choice = False
    pay = 0
    
    for t in table:
        if t[0] > day:
            break
        else:
            if pay < t[1]:
                pay = t[1]
                choice = t
                
    if choice:
        table.remove(choice)
        
    ans += pay
  
print(ans)

Fixed submission:
import heapq

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

table = [list(map(int, input().split())) for _ in range(n)]
table.sort(reverse=True)

ans = 0
pay = []

for day in range(1, m+1):
    while table and table[-1][0] <= day:
        tmp = table.pop()
        heapq.heappush(pay, -tmp[1])
   
    if pay:
        ans -= heapq.heappop(pay)

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

N = int(input())
H = list(map(int, input().split()))
D = [0, abs(H[1] - H[0])]
for i in range(2, N):
    D.append(min(abs(H[i] - H[i - 1]) + D[i - 1], abs(H[i] - H[i - 2]) + D[i - 2]))
print(D[-1])

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

S = input()
if S[0::2].find('L') == -1 and S[1::2].find('R') == -1:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
import math
#[N,K] = list(map(int,input().split()))
#A = list(map(int,input().split()))
#[A,B,C,D] = list(map(int,input().split()))
[A,B,C,D] = list(map(int,input().split()))
def lcm(x, y):
    return (x * y) // math.gcd(x, y)
x_c = (B//C) - ((A-1)//C)
x_d = (B//D) - ((A-1)//D)
x_cd = (B//lcm(C,D)) - ((A-1)//lcm(C,D))
ans = (B - A + 1) - (x_c + x_d -x_cd)
print(ans)

Fixed submission:
from fractions import gcd
#[N,K] = list(map(int,input().split()))
#A = list(map(int,input().split()))
#[A,B,C,D] = list(map(int,input().split()))
[A,B,C,D] = list(map(int,input().split()))
def lcm(x, y):
    return (x * y) // gcd(x, y)
x_c = (B//C) - ((A-1)//C)
x_d = (B//D) - ((A-1)//D)
x_cd = (B//lcm(C,D)) - ((A-1)//lcm(C,D))
ans = (B - A + 1) - (x_c + x_d -x_cd)
print(ans)
Buggy python submission (verdict: Runtime Error):
import collections
N = int(input())
xy = [tuple(map(int,input().split())) for i in range(N)]
xy.sort( key = lambda x: (x[0],x[1]))
l = []
for i in range(N):
    for j in range(i+1,N):
        (x_diff, y_diff) = [xy[i][0]-xy[j][0],xy[i][1]-xy[j][1]]
        l.append((x_diff, y_diff))
dic = collections.Counter(l)
val = dic.values()
print(N - max(val))

Fixed submission:
#[R,G,B,N] = list(map(int,input().split()))
import collections
N = int(input())
xy = [tuple(map(int,input().split())) for i in range(N)]
xy.sort( key = lambda x: (x[0],x[1]))
l = []
for i in range(N):
    for j in range(i+1,N):
        (x_diff, y_diff) = [xy[i][0]-xy[j][0],xy[i][1]-xy[j][1]]
        l.append((x_diff, y_diff))
dic = collections.Counter(l)
val = dic.values()
if len(val) == 0:
    print(1)
else:
    print(N - max(val))

Buggy python submission (verdict: Runtime Error):
#[R,G,B,N] = list(map(int,input().split()))
import collections
N = int(input())
xy = [tuple(map(int,input().split())) for i in range(N)]
xy.sort( key = lambda x: (x[0],x[1]))
l = []
for i in range(N):
    for j in range(i+1,N):
        (x_diff, y_diff) = [xy[i][0]-xy[j][0],xy[i][1]-xy[j][1]]
        l.append((x_diff, y_diff))
dic = collections.Counter(l)
val = dic.values()
print(N - max(val))

Fixed submission:
#[R,G,B,N] = list(map(int,input().split()))
import collections
N = int(input())
xy = [tuple(map(int,input().split())) for i in range(N)]
xy.sort( key = lambda x: (x[0],x[1]))
l = []
for i in range(N):
    for j in range(i+1,N):
        (x_diff, y_diff) = [xy[i][0]-xy[j][0],xy[i][1]-xy[j][1]]
        l.append((x_diff, y_diff))
dic = collections.Counter(l)
val = dic.values()
if len(val) == 0:
    print(1)
else:
    print(N - max(val))
Buggy python submission (verdict: Time Limit Exceeded):
[N,M] = list(map(int,input().split()))
a = [int(input()) for i in range(M)]
DP = [0]*(N+1)
DP[0] = 1
if 1 in a:
    DP[1] = 0
else:
    DP[1] = 1
for i in range(2,N+1):
    if i in a:
        DP[i] = 0
    else:
        DP[i] = DP[i-1] + DP[i-2]
print(DP[N]%(1000000007))

Fixed submission:
[N,M] = list(map(int,input().split()))
a = [int(input()) for i in range(M)]
DP = [-1]*(N+1)
DP[0] = 1
if 1 in a:
    DP[1] = 0
else:
    DP[1] = 1
for i in range(len(a)):
    DP[a[i]] = 0
for i in range(2,N+1):
    if DP[i] == -1:
        DP[i] = (DP[i-1] + DP[i-2])%1000000007
print(DP[N]%(1000000007))
Buggy python submission (verdict: Runtime Error):
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <cmath>
using namespace std;



int main(){
    //input    
    int A,B,T;
    cin >> A >> B >> T;
    int ans;
    ans = (T / A)*B;
    cout << ans << endl;
    

    return 0;
}

Fixed submission:
#[A,B,T] = [20,20,19]
[A,B,T] = list(map(int,input().split()))
print((T // A)*B)
Buggy python submission (verdict: Runtime Error):
N = int(input())
S = str(input())
K = int(input())
#N = 5
#S = "error"
S = list(S)
#K = 2
char = S[K]
for i in range(len(S)):
    if S[i] != char:
        S[i] = "*"
print(''.join(S))

Fixed submission:
N = int(input())
S = str(input())
K = int(input())
#N = 5
#S = "error"
S = list(S)
#K = 2
char = S[K-1]
for i in range(len(S)):
    if S[i] != char:
        S[i] = "*"
print(''.join(S))
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

#input
import numpy as np
[X,Y,Z,K] = list(map(int,input().split()))
A = list(map(int,input().split()))
B = list(map(int,input().split()))
C = list(map(int,input().split()))

D = []
A.sort(reverse=True)
B.sort(reverse=True)
C.sort(reverse=True)

#make list
for i in range(min(K,X)):
    for j in range(min((K//(i+1))+1,Y)):
        for k in range(min(((K//(i+1))+1)//(j+1),Z)):
                D.append(A[i]+B[j]+C[k])
D.sort(reverse=True)
for i in range(K):
    print(int(D[i]))

Fixed submission:
# -*- coding: utf-8 -*-

antena = [0]*5
for i in range(5):
    antena[i] = int(input())
    
k = int(input())
if max(antena) - min(antena) > k:
    print(":(")
else:
    print("Yay!")
Buggy python submission (verdict: Time Limit Exceeded):
[N, M] = list(map(int,input().split()))
A = [0]*N
B = [0]*N
for i in range(N):
    [A_tmp, B_tmp] = list(map(int,input().split()))
    A[i] = A_tmp
    B[i] = B_tmp

tmp = M
ans = 0
while (tmp > 0):
        idx_tmp = A.index(min(A))
        # break condition
        if B[idx_tmp] >= tmp:
            ans += tmp*A[idx_tmp]
            tmp = 0
        else:
            ans += A[idx_tmp]*B[idx_tmp]
            tmp = tmp - B[idx_tmp]
            A.pop(idx_tmp)
            B.pop(idx_tmp)

print(ans)

Fixed submission:
[N, M] = list(map(int,input().split()))
AB = [list(map(int, input().split())) for i in range(N)]

AB.sort(key=lambda x:x[0])
tmp = M
ans = 0

for i in range(N):
    #break
    if tmp <= AB[i][1]:
        ans += tmp * AB[i][0]
        break
    
    ans += AB[i][0] * AB[i][1]
    tmp = tmp - AB[i][1]


print(ans)
Buggy python submission (verdict: Runtime Error):
6 5
2 3
1 2
5 6
3 4
4 5

Fixed submission:
# -*- coding: utf-8 -*-

# -*- coding: utf-8 -*-


class UnionFind:
    def __init__(self, n):
        self.par = [i for i in range(n+1)]
        self.rank = [1]* (n+1)
        self.size = [1]* (n+1)
        
    # search parents of tree
    def find(self, x):
        if self.par[x] == x:
            return x
        else:
            self.par[x] = self.find(self.par[x])
            return self.par[x]
    
    # union tree
    def unite(self, x, y):
        x = self.find(x)
        y = self.find(y)
        # parent same
        if x == y:
            return False
        
        if self.rank[x] < self.rank[y]:
            self.par[x] = y
            self.size[y] += self.size[x]
            return True
        else:
            self.par[y] = x
            self.size[x] += self.size[y]
            if self.rank[x] == self.rank[y]:
                self.rank[x] += 1
            return True
    # check
    def same(self, x, y):
        return self.find(x) == self.find(y)
    
    # size
    def sizes(self, x):
        x = self.find(x)
        return self.size[x]
    
#[N,M] = [6,5]
#A = [2, 1, 5, 3, 4]
#B = [3, 2, 6, 4, 5]
[N,M] = list(map(int,input().split()))
A = [0]*M
B = [0]*M
for i in range(M):
    [a,b] = list(map(int,input().split()))
    A[i], B[i] = a, b

A.reverse()
B.reverse()
uf = UnionFind(N)
ans_list = [0]*M
ans_list[0] = (N*(N-1))//2
ans = ans_list[0]
for i in range(M-1):
    if uf.same(A[i], B[i]) == True:
        ans = ans
    else:
        ans = ans - uf.sizes(A[i])*uf.sizes(B[i])
    uf.unite(A[i],B[i])
    ans_list[i+1] = ans
    
ans_list.reverse()
for i in range(M):
    print(ans_list[i])
Buggy python submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(10**6) 
N = int(input())
data = list(map(int,input().split()))
res = 0
while (True):
    exist_odd: bool = False
    for i in range(N):
        if data[i]%2 == 1:
            exist_odd = True
    if exist_odd == True:
        break
        
    for i in range(N):
        data[i] = data[i]//2
    
    res += 1
        
print(res)

Fixed submission:
N = 1
data = []
for i in range(N):
    data_input = list(map(int,input().split()))
    data.append(data_input)
data = data[0][0]
ans=0
for i in range(3):
    k=2-i
    ans += data // (10**k)
    data = data % (10**k)
    
print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
data = list(map(int,input().split()))
res = 0
exist_odd: bool = False
while exist_odd == False:
    for i in range(N):
        if data[i]%2 == 1:
            exist_odd = True
    
    if exist_odd == True:
            break
        
    for i in range(N):
        data[i] = data[i]//2
    
    res += 1
    
print(res)

Fixed submission:
n = input()
a = list(map(int, input().split()))
cnt = 0
while all(i%2==0 for i in a):
    a = [i/2 for i in a]
    cnt += 1
print(cnt)

Buggy python submission (verdict: Runtime Error):
N = int(input())
data = list(map(int,input().split()))
res = 0
exist_odd: bool = False
while exist_odd == False:
    for i in range(N):
        if data[i]%2 == 1:
            exist_odd = True
    
    if exist_odd == True:
            break
        
    for i in range(N):
        data[i] = data[i]//2
    
    res += 1
    
print(res)

Fixed submission:
n = input()
a = list(map(int, input().split()))
cnt = 0
while all(i%2==0 for i in a):
    a = [i/2 for i in a]
    cnt += 1
print(cnt)

Buggy python submission (verdict: Runtime Error):
N = int(input())
data = list(map(int,input().split()))
remain = [0]*N
res = 0
while max(remain) == 0:
    exist_odd: bool = False
    for i in range(N):
        if data[i]%2 == 1:
            exist_odd = True
    if exist_odd == True:
        break
        
    for i in range(N):
        data[i] = data[i]//2
    
    res += 1
        
print(res)

Fixed submission:
n = input()
a = list(map(int, input().split()))
cnt = 0
while all(i%2==0 for i in a):
    a = [i/2 for i in a]
    cnt += 1
print(cnt)

Buggy python submission (verdict: Runtime Error):
N = int(input())
data = list(map(int,input().split()))
res = 0
while (True):
    exist_odd: bool = False
    for i in range(N):
        if data[i]%2 == 1:
            exist_odd = True
        if data[i] == 0:
            exist_odd = True
    if exist_odd == True:
        break
        
    for i in range(N):
        data[i] = data[i]//2
    
    res += 1
        
print(res)

Fixed submission:
n = input()
a = list(map(int, input().split()))
cnt = 0
while all(i%2==0 for i in a):
    a = [i/2 for i in a]
    cnt += 1
print(cnt)

Buggy python submission (verdict: Runtime Error):
N = int(input())
data = list(map(int,input().split()))
res = 0
while (True):
    exist_odd: bool = False
    for i in range(N):
        if data[i]%2 == 1:
            exist_odd = True
    if exist_odd == True:
        break
        
    for i in range(N):
        data[i] = data[i]//2
    
    res += 1
        
print(res)

Fixed submission:
n = input()
a = list(map(int, input().split()))
cnt = 0
while all(i%2==0 for i in a):
    a = [i/2 for i in a]
    cnt += 1
print(cnt)
Buggy python submission (verdict: Time Limit Exceeded):
def main():
    n, k, q, *al = map(int, open(0).read().split())
    gl = [k for _ in range(n)]
    for a in al:
        gl = [
            g if i == a-1
            else g-1
            for i, g in enumerate(gl)
        ]

    res = '\n'.join(
        'No' if g <= 0
        else 'Yes'
        for g in gl
    )
    print(res)

if __name__ == '__main__':
    main()


Fixed submission:
def main():
    n, k, q, *al = map(int, open(0).read().split())
    gl = [0] * n
    for a in al:
        gl[a-1] += 1

    res = '\n'.join(
        'Yes' if g > q-k
        else 'No'
        for g in gl
    )
    print(res)

if __name__ == '__main__':
    main()