Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
def D_RainFlowsintoDams():
    import numpy as np
    N = int(input())
    A = [list(map(int, input().split()))]
    A = np.array(A)
    # XB = A のXを求める
    X = (np.eye(N) + np.eye(N, k=1) + np.eye(N, k=-N+1)) * 0.5
    # X^{-1} を求める
    B = np.linalg.solve(X, A.T)
    # 両辺に左からX^{-1}をかける
    for x in range(N):
        print(int(B.T[0][x]), end=" ")

if __name__ == "__main__":
    D_RainFlowsintoDams()


Fixed submission:
def D_RainFlowsintoDams():
    N = int(input())
    A = list(map(int, input().split()))
    total = sum(A)
    x = total - 2*sum([A[i] for i in range(1, N -1, 2)])
    for i in range(N):
        print(x, end=" ")
        x = 2 * A[i] - x
def D_Determinant():
    # 行列式を使うと時間がかかりすぎる
    import numpy as np
    N = int(input())
    A = [list(map(int, input().split()))]
    A = np.array(A)
    # XB = A のXを求める
    X = (np.eye(N) + np.eye(N, k=1) + np.eye(N, k=-N+1)) * 0.5
    # X^{-1} を求める
    B = np.linalg.solve(X, A.T)
    # 両辺に左からX^{-1}をかける
    for x in range(N):
        print(int(B.T[0][x]), end=" ")

if __name__ == "__main__":
    D_RainFlowsintoDams()

Buggy python submission (verdict: Runtime Error):
def D_RainFlowsintoDams():
    import numpy as np
    N = int(input())
    A = np.array([list(map(int, input().split()))])
    # XB = A のXを求める
    X = (np.eye(N) + np.eye(N, k=1) + np.eye(N, k=-N+1)) * 0.5
    # X^{-1} を求める
    X = np.linalg.inv(X)
    # 両辺に左からX^{-1}をかける
    B = np.dot(X, A.T)
    for x in range(N):
        print(int(B.T[0][x]), end=" ")

if __name__ == "__main__":
    D_RainFlowsintoDams()

Fixed submission:
def D_RainFlowsintoDams():
    N = int(input())
    A = list(map(int, input().split()))
    total = sum(A)
    x = total - 2*sum([A[i] for i in range(1, N -1, 2)])
    for i in range(N):
        print(x, end=" ")
        x = 2 * A[i] - x
def D_Determinant():
    # 行列式を使うと時間がかかりすぎる
    import numpy as np
    N = int(input())
    A = [list(map(int, input().split()))]
    A = np.array(A)
    # XB = A のXを求める
    X = (np.eye(N) + np.eye(N, k=1) + np.eye(N, k=-N+1)) * 0.5
    # X^{-1} を求める
    B = np.linalg.solve(X, A.T)
    # 両辺に左からX^{-1}をかける
    for x in range(N):
        print(int(B.T[0][x]), end=" ")

if __name__ == "__main__":
    D_RainFlowsintoDams()
Buggy python submission (verdict: Runtime Error):
def C_AntiDivision():
    from math import gcd
    a,b,c,d = map(int, input().split())
    total = b - a + 1
    total_c = (b // c) + (-a // c) + 1
    total_d = (b // d) + (-a // d) + 1
    gcd_cd = c*d // gcd(c,d)
    total_cd = (b // gcd_cd) + (-a // gcd_cd) + 1
    #print(total_c, total_d, total_cd, gcd_cd)
    print(int(total - total_c - total_d + total_cd))

if __name__ == "__main__":
    C_AntiDivision()

Fixed submission:
def C_AntiDivision():
    from sys import version_info
    try:
        from math import gcd
    except:
        from fractions import gcd
    a,b,c,d = map(int, input().split())
    total = b - a + 1
    total_c = (b // c) + (-a // c) + 1
    total_d = (b // d) + (-a // d) + 1
    gcd_cd = c*d // gcd(c,d)
    total_cd = (b // gcd_cd) + (-a // gcd_cd) + 1
    #print(total_c, total_d, total_cd, gcd_cd)
    print(int(total - total_c - total_d + total_cd))

if __name__ == "__main__":
    C_AntiDivision()
Buggy python submission (verdict: Runtime Error):
def C_TypicalStairs():
    N, M = map(int, input().split())
    am = [int(input()) for i in range(M)]
    n_list = [i for i in range(N+1)]
    can_move = True
    num_move = 0
    # 到達不可を除く
    for i in range(M-1):
        if ((am[i] + 1) == am[i+1]):
            can_move = False
    if (can_move):
        num_move = fib(len(n_list[:am[0]]))
        if (M <= 1):
            pass
        else:
            for i in range(M-1):
                num_move *= fib(len(n_list[am[i]+1:am[i+1]]))
        num_move *= fib(len(n_list[am[M-1]+1:]))
    print(num_move % 1000000007)

def fib(n):
    if (n <= 1):
        a0 = n
    else:
        a0, a1 = 0, 1
        for _ in range(n):
            a0, a1 = a1, a0 + a1
    return a0
if __name__ == "__main__":
    C_TypicalStairs()

Fixed submission:
def C_TypicalStairs():
    N, M = map(int, input().split())
    am = [int(input()) for i in range(M)]
    n_list = [i for i in range(N+1)]
    can_move = True
    num_move = 0
    if(M == 0):
        num_move = fib(len(n_list))
    else:
        # 到達不可を除く
        for i in range(M-1):
            if ((am[i] + 1) == am[i+1]):
                can_move = False
        if (can_move):
            num_move = fib(len(n_list[:am[0]]))
            if (M <= 1):
                pass
            else:
                for i in range(M-1):
                    num_move *= fib(len(n_list[am[i]+1:am[i+1]]))
            num_move *= fib(len(n_list[am[M-1]+1:]))
    print(num_move % 1000000007)

def fib(n):
    if (n <= 1):
        a0 = n
    else:
        a0, a1 = 0, 1
        for _ in range(n):
            a0, a1 = a1, a0 + a1
    return a0
if __name__ == "__main__":
    C_TypicalStairs()
Buggy python submission (verdict: Runtime Error):
from operator import itemgetter
n = int(input())
rest = []
for i in range(n):
    s, p = map(str, input().split())
    rest.append([i+1, s, int(p)])

    rest.sort(key=itemgetter(2), reverse=True)
    rest.sort(key=itemgetter(1))
    for i in range(n):
      print(rest[i][0])

Fixed submission:
def Guidebook():
    n = int(input())
    rest = []
    for i in range(n):
        s, p = map(str, input().split())
        rest.append([i+1, s, int(p)])

    rest.sort(key=lambda x:x[2], reverse=True)
    rest.sort(key=lambda x:x[1])
    for i in range(n):
        print(rest[i][0])
if __name__ == "__main__":
    Guidebook()

Buggy python submission (verdict: Runtime Error):
from operator import itemgetter
n = int(input())
rest = []
for i in range(n):
  s, p = map(str, input().split())
  rest.append([i+1, s, int(p)])

  rest = sorted(rest, key=itemgetter(2), reverse=True)
  rest = sorted(rest, key=itemgetter(1))
  for i in range(n):
    print(rest[i][0])

Fixed submission:
def Guidebook():
    n = int(input())
    rest = []
    for i in range(n):
        s, p = map(str, input().split())
        rest.append([i+1, s, int(p)])

    rest.sort(key=lambda x:x[2], reverse=True)
    rest.sort(key=lambda x:x[1])
    for i in range(n):
        print(rest[i][0])
if __name__ == "__main__":
    Guidebook()
Buggy python submission (verdict: Runtime Error):
def Switches():
    from math import log2
    N, M = map(int, input().split())
    # m行n列
    switchList = []

    # スイッチの組み合わせ取得
    for i in range(M):
        k = list(map(int, input().split()))
        k = k[1:]
        # print(k)
        switchList.append([True * (i+1 in k) for i in range(N)])
    p = list(map(int, input().split()))
    # print(switchList)
    result = 0

    # 2bit化し、条件比較を行い結果がpと等しければ正解とする
    for i in range(2**N):
        tmp = format(i, "0"+str(N)+"b")
        tmp = [int(j) for j in tmp]
        # print(tmp)
        tmp = [sum([switchList[k][j] * tmp[j] for j in range(N)]) % 2 for k in range(M)]
        if p == tmp:
            result += 1

    print(result)

if __name__ == "__main__":
    Switches()

Fixed submission:
def Switches():
    from math import log2
    N, M = map(int, input().split())
    # m行n列
    switchList = []

    # スイッチの組み合わせ取得
    for i in range(M):
        k = list(map(int, input().split()))
        k = k[1:]
        # print(k)
        switchList.append([True * (i+1 in k) for i in range(N)])
    p = list(map(int, input().split()))
    # print(switchList)
    result = 0

    # 2bit化し、条件比較を行い結果がpと等しければ正解とする
    for i in range(2**N):
        tmp = format(i, "0"+str(N)+"b")
        tmp = [int(j) for j in tmp]
        # print(tmp)
        tmp = [sum([switchList[k][j] * tmp[j] for j in range(N)]) % 2 for k in range(M)]
        if p == tmp:
            result += 1

    print(result)

if __name__ == "__main__":
    Switches()
Buggy python submission (verdict: Time Limit Exceeded):
n, m = map(int,input().split())
a = list(map(int,input().split()))
b = [0]*m
c = [0]*m
for y in range(m):
    b[y], c[y] = map(int,input().split())
for x in range(m):
    for y in range(b[x]):
        if c[x] <= min(a):
            break
        aj = a.index(min(a))
        a[aj] = c[x]
        
print(sum(a))

Fixed submission:
n, m = map(int,input().split())
a = list(map(int,input().split()))
bc = [list(map(int, input().split())) for _ in range(m)]
bc.sort(reverse=True, key=lambda x:x[1])
tmp = []
for B, C in bc:
    tmp += [C]*B
    if len(tmp) >= n:
        break

a.extend(tmp)
a.sort(reverse=True)

print(sum(a[:n]))

Buggy python submission (verdict: Time Limit Exceeded):
n, m = map(int,input().split())
a = list(map(int,input().split()))
for y in range(m):
    b, c = map(int,input().split())
    for i in range(b):
        if c <= min(a):
            break
        ai = a.index(min(a))
        a[ai] = c
        
print(sum(a))

Fixed submission:
n, m = map(int,input().split())
a = list(map(int,input().split()))
bc = [list(map(int, input().split())) for _ in range(m)]
bc.sort(reverse=True, key=lambda x:x[1])
tmp = []
for B, C in bc:
    tmp += [C]*B
    if len(tmp) >= n:
        break

a.extend(tmp)
a.sort(reverse=True)

print(sum(a[:n]))
Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
s = list(input())
print("".join(s[:K]+ list(s[K].lower()) + s[K + 1:]))

Fixed submission:
N, K = map(int, input().split())
s = list(input())
print("".join(s[:K-1]+ list(s[K-1].lower()) + s[K:]))
Buggy python submission (verdict: Runtime Error):
from functools import reduce
from fractions import gcd
N = int(input())
A = list(map(int,input().split()))
A.sort(reverse=True)
gcd_max = 0
if (N > 4):
    for i in range(4):
        gcd_now = reduce(gcd, list(x for x in A if x != A[i]))
        if (gcd_max < gcd_now): gcd_max = gcd_now
    for i in range(N):
        gcd_now = gcd(gcd_max, A[i])
        if (gcd_max < gcd_now): gcd_max = gcd_now
else:
    for i in range(N):
        gcd_now = reduce(gcd, list(x for x in A if x != A[i]))
        if (gcd_max < gcd_now): gcd_max = gcd_now
    
print(gcd_max)

Fixed submission:
from fractions import gcd
# input
N = int(input())
A = list(map(int,input().split()))
L_A = [0] * (N+1)
R_A = [0] * (N+1)
for i in range(N):
    L_A[1+i] = gcd(L_A[i], A[i])
for i in reversed(range(N)):
    R_A[i] = gcd(R_A[i+1], A[i])
print(max(gcd(L_A[i], R_A[i+1]) for i in range(N)))

Buggy python submission (verdict: Runtime Error):
from functools import reduce
from fractions import gcd
N = int(input())
A = list(map(int,input().split()))
gcd_max = 0
for i in range(N):
    gcd_now = reduce(gcd, list(x for x in A if x != A[i]))
    if (gcd_max < gcd_now): gcd_max = gcd_now
    
print(gcd_max)

Fixed submission:
from fractions import gcd
# input
N = int(input())
A = list(map(int,input().split()))
L_A = [0] * (N+1)
R_A = [0] * (N+1)
for i in range(N):
    L_A[1+i] = gcd(L_A[i], A[i])
for i in reversed(range(N)):
    R_A[i] = gcd(R_A[i+1], A[i])
print(max(gcd(L_A[i], R_A[i+1]) for i in range(N)))

Buggy python submission (verdict: Runtime Error):
from functools import reduce
from math import gcd
N = int(input())
A = list(map(int,input().split()))
gcd_max = 0
for i in range(N):
    gcd_now = reduce(gcd, list(x for x in A if x != A[i]))
    if (gcd_max < gcd_now): gcd_max = gcd_now
    
print(gcd_max)

Fixed submission:
from fractions import gcd
# input
N = int(input())
A = list(map(int,input().split()))
L_A = [0] * (N+1)
R_A = [0] * (N+1)
for i in range(N):
    L_A[1+i] = gcd(L_A[i], A[i])
for i in reversed(range(N)):
    R_A[i] = gcd(R_A[i+1], A[i])
print(max(gcd(L_A[i], R_A[i+1]) for i in range(N)))
Buggy python submission (verdict: Runtime Error):
def C_IrohasObsession():
    N, K = map(int, input().split())
    D = list(map(int, input().split()))
    D_tmp = []
    for x in range(10):
        if x not in D:
            D_tmp.append(x)
    for x in range(len(D_tmp)):
        ans = D_tmp[-1] * (10**(x))
    if N > ans:
        ans = D_tmp[1] * (10 ** (len(str(N))-1))
    else:
        ans = 0
        for i_1 in D_tmp:
            if ans > N: break
            ans = i_1
            if len(str(N)) <= len(str(ans)): continue
            for i_10 in D_tmp:
                if ans > N: break
                ans = i_10 * 10 + i_1
                if len(str(N)) <= len(str(ans)): continue
                for i_100 in D_tmp:
                    if ans > N: break
                    ans = i_100 * 100 + i_10 * 10 + i_1
                    if len(str(N)) <= len(str(ans)): continue
                    for i_1000 in D_tmp:
                        if ans > N: break
                        ans = i_1000 * 1000 + i_100 * 100 + i_10 * 10 + i_1
    print(ans)

if __name__ == "__main__":
    C_IrohasObsession()

Fixed submission:
def C_IrohasObsession():
    N, K = map(int, input().split())
    D = list(map(int, input().split()))
    ans = 0
    for x in range(N, 100000):
        for y in str(x):
            if int(y) in D:
                break
        else:
            ans = int(x)
            break
    print(ans)

if __name__ == "__main__":
    C_IrohasObsession()

Buggy python submission (verdict: Runtime Error):
def C_IrohasObsession():
    N, K = map(int, input().split())
    D = list(map(int, input().split()))
    D_tmp = []
    for x in range(10):
        if x not in D:
            D_tmp.append(x)
    for x in range(len(D_tmp)):
        ans = D_tmp[-1] * (10**(x+1))
    if N > ans:
        ans = D_tmp[1] * (10 ** len(str(N-1)))
    else:
        ans = 0
        for i_1 in D_tmp:
            if ans > N: break
            ans = i_1
            if len(str(N)) <= len(str(ans)): continue
            for i_10 in D_tmp:
                if ans > N: break
                ans = i_10 * 10 + i_1
                if len(str(N)) <= len(str(ans)): continue
                for i_100 in D_tmp:
                    if ans > N: break
                    ans = i_100 * 100 + i_10 * 10 + i_1
                    if len(str(N)) <= len(str(ans)): continue
                    for i_1000 in D_tmp:
                        if ans > N: break
                        ans = i_1000 * 1000 + i_100 * 100 + i_10 * 10 + i_1
    print(ans)

if __name__ == "__main__":
    C_IrohasObsession()

Fixed submission:
def C_IrohasObsession():
    N, K = map(int, input().split())
    D = list(map(int, input().split()))
    ans = 0
    for x in range(N, 100000):
        for y in str(x):
            if int(y) in D:
                break
        else:
            ans = int(x)
            break
    print(ans)

if __name__ == "__main__":
    C_IrohasObsession()
Buggy python submission (verdict: Runtime Error):
a = int(input())
t = [int(i) for i in input().split()]

x = 0

for i in t:
  x += 1 / i

print(1 / x)

Fixed submission:
a = int(input())
s = input()
if a >= 3200:
  print(s)
else:
  print("red")
Buggy python submission (verdict: Runtime Error):
K, X = map(int, input().split())
for i in range(X - K + 1, X + K):
if i < X + K - 1:
print(i, end=' ')
else:
print(i)


Fixed submission:
a, b = map(int, input().split())
print(max(a+b, a-b,a*b))

Buggy python submission (verdict: Runtime Error):
 K, X = map(int, input().split())
2 for i in range(X - K + 1, X + K):
3 if i < X + K - 1:
4 print(i, end=' ')
5 else:
6 print(i)


Fixed submission:
a, b = map(int, input().split())
print(max(a+b, a-b,a*b))
Buggy python submission (verdict: Runtime Error):
K, X = map(int, input().split())
for i in range(X - K + 1, X + K):
if i < X + K - 1:
print(i, end=' ')
else:
print(i)


Fixed submission:
K, X = map(int, input().split())
for i in range(X - K + 1, X + K):
  if i < X + K - 1:
    print(i, end=' ')
  else:
    print(i)

Buggy python submission (verdict: Runtime Error):
 K, X = map(int, input().split())
 for i in range(X - K + 1, X + K):
 if i < X + K - 1:
 print(i, end=' ')
 else:
 print(i)


Fixed submission:
K, X = map(int, input().split())
for i in range(X - K + 1, X + K):
  if i < X + K - 1:
    print(i, end=' ')
  else:
    print(i)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
al = list(map(int, input().split()))
l = []
for i in range(n):
    l.append(al.index(i + 1) + 1)
print(*l, sep = ' ')

Fixed submission:
n = int(input())
al = list(map(int, input().split()))
cl = []
for j in range(n):
    cl.append([al[j], j + 1])
cl.sort()
bl = []
for i in range (n):
    bl.append(cl[i][1])
print(*bl, sep=' ')
Buggy python submission (verdict: Runtime Error):
a = input()

b = input()


if int(a) % 2 == 0 or int(b) % 2 == 0:
    print('Even')
    
else:
    print('Odd')

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


if int(b) % 2 == 0 or int(c) % 2 == 0:
    print('Even')
    
else:
    print('Odd')
Buggy python submission (verdict: Runtime Error):
n = int(input())
d_list = list(map(int, input().split()))
d_list.sort(reverse = True)
count = 1

for i in range(1, n):
    if d_list[i] < d_list[i-1]:
        count += 1
print(count)

Fixed submission:
n = int(input())
d_list = [int(input()) for i in range(n)]
d_list.sort(reverse = True)
count = 1

for i in range(1, n):
    if d_list[i] < d_list[i-1]:
        count += 1
print(count)
Buggy python submission (verdict: Time Limit Exceeded):
k, s = map(int, input().split())
count = 0
for x in range(k + 1):
    if s >= x:
        for y in range(k + 1):
            if s >= x + y:
                for z in range(k + 1):
                    if x + y + z == s:
                        count += 1
print(count)

Fixed submission:
k, s = map(int, input().split())
count = 0
for x in range(k + 1):
    for y in range(k + 1):
        if s >= x + y:
            if k >= s - (x + y):
                count += 1
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
k, s = map(int, input().split())
count = 0
for x in range(k + 1):
    for y in range(k + 1):
        for z in range(k + 1):
            if x + y + z == s:
                count += 1
print(count)

Fixed submission:
k, s = map(int, input().split())
count = 0
for x in range(k + 1):
    for y in range(k + 1):
        if s >= x + y:
            if k >= s - (x + y):
                count += 1
print(count)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int,input().split()))

num = []
for i in range(N) : 
    num.append(A.index(max(A)) + 1)
    A[A.index(max(A))] = 0
    
for i in range(N) :
    print(num[N-1-i], end = ' ')


Fixed submission:
import numpy as np

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

num = np.argsort(A)

for i in range (N) : 
    print(str(num[i]+1), end = ' ')
Buggy python submission (verdict: Runtime Error):
def substring():
    sub = []
    words = input()
    num = int(input())
    for i in range(len(words)):
        for j in range(len(words)):
            word = words[i:j+1]
            if word not in sub:
                sub.append(word)
    sub.sort()
    del sub[0]
    print(sub[num-1])
    
if __name__ == '__main__':
    substring()

Fixed submission:
def substring():
    a = input()
    K = int(input())
    atra = set()
    
    for i in range(len(a)):
        for j in range(i + K + 1):
            if i >= j:
                continue
            atra.add(a[i:j])
    atra = sorted(atra)
    print(atra[K - 1])
    
if __name__ == '__main__':
    substring()
Buggy python submission (verdict: Runtime Error):
A, B, C = map(int, input().split())
K = int(input())

for i in range(K):
    if 2*A > (B + C):
        A = A * 2
    elif 2*B > (A + C):
        B = B * 2
    elif 2*C > (B + A):
        C = C * 2
    elif A == B == C:
        A = A * 2

print(A+B+C)


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

takahashi = a 

if a > b:
    takahashi -= 1
print(takahashi)
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())

if a*b%2==0:
    print('Even')
    else: print('Odd')

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

if a*b%2==0:
    print('Even')
else: print('Odd')
Buggy python submission (verdict: Time Limit Exceeded):
# question 3
N = input()
H = input().split()

# question 3
i = 0

for n in range(0, int(N)-1):
  j = 0
  
  for h in range(n, int(N)-1):
    if int(H[h]) < int(H[h+1]):
      break
    j += 1      
  
  if i < j:
    i = j
    
  if i >= int(N) - n:
    break
    
print(i)


Fixed submission:
# question 3
N = input()
H = input().split()

# question 3
i = 0
res = [0]

for n in range(0, int(N)-1):
  if int(H[n]) >= int(H[n+1]):
    i += 1
  else:
    res.append(i)
    i = 0

res.append(i)
    
print(max(res))
Buggy python submission (verdict: Runtime Error):
N,K = (int(i) for i in input().split())
S = input()

a = [S]
res = []

for i in range(K):
  res = []
  
  for k in a:
    Ss = k[::-1]
    SSs = k + Ss
    a = []
  
    for j in range(len(S)):
      a.append(SSs[j:len(S)+j])
      res.append(SSs[j:len(S)+j])
  
print(min(res))

Fixed submission:
S = input()

a = S[0]
b = ''
cnt = 0

for st in S[1:]:
  b += st
  
  if a == b:
    continue
  else:
    cnt += 1
    a = b
    b = ''

if cnt > 0:
  cnt += 1

print(cnt)
Buggy python submission (verdict: Runtime Error):
a = input()
b = range(1, a + 1)
res = 0
max_cnt = 0

for bb in b:
  cnt = 0
  bb_org = bb
  while True:
    if bb % 2 == 0:
      bb /= 2
      cnt += 1
    else:
      break
  if cnt > max_cnt:
    max_cnt = cnt
    res = bb_org
    
print(res)

Fixed submission:
a = int(input())
b = range(1, a + 1)
res = 1
max_cnt = 0

for index, bb in enumerate(b):
  cnt = 0
  while True:
    if bb % 2 == 0:
      bb /= 2
      cnt += 1
    else:
      break
  if cnt > max_cnt:
    max_cnt = cnt
    res = index + 1
    
print(res)

Buggy python submission (verdict: Runtime Error):
a = input()
b = range(1, a + 1)
res = 0
max_cnt = 0

for index, bb in enumerate(b):
  cnt = 0
  while True:
    if bb % 2 == 0:
      bb /= 2
      cnt += 1
    else:
      break
  if cnt > max_cnt:
    max_cnt = cnt
    res = index + 1
    
print(res)

Fixed submission:
a = int(input())
b = range(1, a + 1)
res = 1
max_cnt = 0

for index, bb in enumerate(b):
  cnt = 0
  while True:
    if bb % 2 == 0:
      bb /= 2
      cnt += 1
    else:
      break
  if cnt > max_cnt:
    max_cnt = cnt
    res = index + 1
    
print(res)
Buggy python submission (verdict: Runtime Error):
rule = input().split()
men = input().split()

mens = 0
for i in men:
  if int(rule[0]) <= int(i):
    mens += 1

print(mens)

Fixed submission:
a = int(input())
if a % 2 == 0:
  print((a//2)/a)
else:
  print(((a//2)+1)/a)
Buggy python submission (verdict: Time Limit Exceeded):
S = input().split()

A = abs(int(S[0]) - int(S[1]))
frag = 0
for i in range(A):
  if abs(int(S[0]) - i) == abs(int(S[1]) -i):
    print(i)
    frag = 1
  
if frag == 0:
  print('IMPOSSIBLE')

Fixed submission:
S = input().split()

A = abs(int(S[0]) - int(S[1]))
ans = 0
if A % 2 == 0:
  ans = int(A / 2) 
  if int(S[0]) > int(S[1]):
    print(ans + int(S[1]))
  else:
    print(ans + int(S[0]))
else:
  print('IMPOSSIBLE')
Buggy python submission (verdict: Runtime Error):
n = int(input().split())

num1 =  ( int(n[0]) * 3 + int(n[1]) ) // 2

print(num1)

Fixed submission:
n =input().split()

num1 =  ( int(n[0]) * 3 + int(n[1])) // 2

print(num1)

Buggy python submission (verdict: Runtime Error):
n = int(input().split())

num1 =  ( n[0] * 3 + n[1] ) // 2

print(num1)

Fixed submission:
n =input().split()

num1 =  ( int(n[0]) * 3 + int(n[1])) // 2

print(num1)
Buggy python submission (verdict: Time Limit Exceeded):
li = list(map(int,input().split()))
N = li[0]
K = li[1]
Q = li[2]
score = [K] * N
for i in range(Q):
    A_i = int(input())
    A_i -= 1
    score = map (lambda x: x - 1, score)
    score = list(score)
    score[A_i] += 1
index_num = 0
for i in range(N):
    if score[index_num] <= 0:
        print("No")
    else:
        print("Yes")
    index_num += 1

Fixed submission:
li = list(map(int,input().split()))
N = li[0]
K = li[1]
Q = li[2]
score = [K] * N
for i in range(Q):
    A_i = int(input())
    A_i -= 1
    score[A_i] += 1
score = map(lambda x: x - Q, score)
score = list(score)
index_num = 0
for i in range(N):
    if score[index_num] <= 0:
        print("No")
    else:
        print("Yes")
    index_num += 1