Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):

A, B, C, D = map(int, input().split())

CN = C
DN = D
while CN != DN:
    if CN < DN:
        CN += C
    else:
        DN += D

CD = CN

#print(CD)

C_count = B//C - (A-1)//C 
D_count = B//D - (A-1)//D
CD_count = B//CD - (A-1)//CD 



#print(C_count, D_count, CD_count)

print(B - A + 1 - C_count - D_count + CD_count)


Fixed submission:

A, B, C, D = map(int, input().split())

def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

def lcm(a, b):
    return a * b // gcd (a, b)


CD = lcm(C, D)

#print(CD)

C_count = B//C - (A-1)//C 
D_count = B//D - (A-1)//D
CD_count = B//CD - (A-1)//CD 



#print(C_count, D_count, CD_count)

print(B - A + 1 - C_count - D_count + CD_count)

Buggy python submission (verdict: Time Limit Exceeded):

A, B, C, D = map(int, input().split())

CN = C
DN = D
while True:
    if CN % D == 0:
        break
    CN += C

CD = CN

#print(CD)

C_count = B//C - (A-1)//C 
D_count = B//D - (A-1)//D
CD_count = B//CD - (A-1)//CD 



#print(C_count, D_count, CD_count)

print(B - A + 1 - C_count - D_count + CD_count)

Fixed submission:

A, B, C, D = map(int, input().split())

def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

def lcm(a, b):
    return a * b // gcd (a, b)


CD = lcm(C, D)

#print(CD)

C_count = B//C - (A-1)//C 
D_count = B//D - (A-1)//D
CD_count = B//CD - (A-1)//CD 



#print(C_count, D_count, CD_count)

print(B - A + 1 - C_count - D_count + CD_count)

Buggy python submission (verdict: Time Limit Exceeded):

import math

A, B, C, D = map(int, input().split())

CN = C
DN = D
while CN != DN:
    if CN < DN:
        CN += C
    else:
        DN += D

CD = CN

#print(CD)

C_count = B//C - (A-1)//C 
D_count = B//D - (A-1)//D
CD_count = B//CD - (A-1)//CD 



#print(C_count, D_count, CD_count)

print(B - A + 1 - C_count - D_count + CD_count)

Fixed submission:

A, B, C, D = map(int, input().split())

def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

def lcm(a, b):
    return a * b // gcd (a, b)


CD = lcm(C, D)

#print(CD)

C_count = B//C - (A-1)//C 
D_count = B//D - (A-1)//D
CD_count = B//CD - (A-1)//CD 



#print(C_count, D_count, CD_count)

print(B - A + 1 - C_count - D_count + CD_count)

Buggy python submission (verdict: Runtime Error):

import math

A, B, C, D = map(int, input().split())
CD = int(C * D / math.gcd(C, D))

#print(CD)

C_count = B//C - (A-1)//C 
D_count = B//D - (A-1)//D
CD_count = B//CD - (A-1)//CD 



#print(C_count, D_count, CD_count)

print(B - A + 1 - C_count - D_count + CD_count)

Fixed submission:

A, B, C, D = map(int, input().split())

def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

def lcm(a, b):
    return a * b // gcd (a, b)


CD = lcm(C, D)

#print(CD)

C_count = B//C - (A-1)//C 
D_count = B//D - (A-1)//D
CD_count = B//CD - (A-1)//CD 



#print(C_count, D_count, CD_count)

print(B - A + 1 - C_count - D_count + CD_count)
Buggy python submission (verdict: Time Limit Exceeded):
S = input()

BC_str = ""
A_index_lst = []
for i in range(len(S)):
    if S[i] == "A":
        A_index_lst.append(len(BC_str))
    else:
        BC_str += S[i]



ans = 0
i = 0
running_A_count = 0
while i + 1 < len(BC_str):
    if i in A_index_lst:
        running_A_count += A_index_lst.count(i)
    if BC_str[i] == "B" and BC_str[i+1] == "C":
        ans += running_A_count
        i += 1
    else:
        running_A_count = 0
    
    i += 1






print(ans)

Fixed submission:
S = input()


ans = 0
i = 0
running_A_count = 0
while i + 1 < len(S):
    if S[i] == "A":
        running_A_count += 1
    elif S[i] == "B" and S[i+1] == "C":
        ans += running_A_count
        i += 1
    else:
        running_A_count = 0
    
    i += 1






print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
N, M = map(int, input().split())



ables_list = np.zeros(N)

for i in range(M):
    L, R = map(int, input().split())
    L -= 1
    ables_list[L: R] += 1

count = 0
for i in range(N):
    if ables_list[i] == M:
        count += 1

print(count)

Fixed submission:
#   C



N, M = map(int, input().split())


mini, maxi = map(int, input().split())

for i in range(1, M):
    L, R = map(int, input().split())
    if L > mini:
        mini = L
    if R < maxi:
        maxi = R
    if mini > maxi:
        break
#    print(mini, L, R, maxi)
if mini > maxi:
    print(0)
else:
    print(maxi - mini + 1)
Buggy python submission (verdict: Runtime Error):
#   D


N, M = map(int, input().split())

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

Bs_and_Cs_lst = []

for _ in range(M):
    B, C = map(int, input().split())

    Bs_and_Cs_lst.append((C, B))


As_lst.sort()
Bs_and_Cs_lst.sort(reverse=True)


p = 0
finish = False
for C, B in Bs_and_Cs_lst:
    for i in range(B):
        if As_lst[p+i] < C:
            As_lst[p+i] = C
        else:
            finish = True
            break
    if finish:
        break
    p += B


print(sum(As_lst))

Fixed submission:

N, M = map(int, input().split())

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

Bs_and_Cs_lst = []

for _ in range(M):
    B, C = map(int, input().split())

    Bs_and_Cs_lst.append((C, B))


As_lst.sort()
Bs_and_Cs_lst.sort(reverse=True)


p = 0
finish = False
for C, B in Bs_and_Cs_lst:
    for i in range(B):
        if p + i >= N:
            finish = True
            break

        if As_lst[p+i] < C:
            As_lst[p+i] = C
        else:
            finish = True
            break
    if finish:
        break
    p += B


max_count = 0
for i in range(N):
    max_count += As_lst[i]

print(max_count)

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

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

Bs_and_Cs_lst = []

for _ in range(M):
    B, C = map(int, input().split())

    Bs_and_Cs_lst.append((C, B))


As_lst.sort()
Bs_and_Cs_lst.sort(reverse=True)


p = 0
finish = False
for C, B in Bs_and_Cs_lst:
    for i in range(B):
        if As_lst[p+i] < C:
            As_lst[p+i] = C
        else:
            finish = True
            break
    if finish:
        break
    p += B


max_count = 0
for i in range(N):
    max_count += As_lst[i]

print(max_count)

Fixed submission:

N, M = map(int, input().split())

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

Bs_and_Cs_lst = []

for _ in range(M):
    B, C = map(int, input().split())

    Bs_and_Cs_lst.append((C, B))


As_lst.sort()
Bs_and_Cs_lst.sort(reverse=True)


p = 0
finish = False
for C, B in Bs_and_Cs_lst:
    for i in range(B):
        if p + i >= N:
            finish = True
            break

        if As_lst[p+i] < C:
            As_lst[p+i] = C
        else:
            finish = True
            break
    if finish:
        break
    p += B


max_count = 0
for i in range(N):
    max_count += As_lst[i]

print(max_count)
Buggy python submission (verdict: Time Limit Exceeded):
#   C

import numpy as np

N, K = map(int, input().split())

sum_poss = 0
for n in range(1, N+1):
    m = 0
    poss = 1
    while n*2**m < K:
        m *= 2
        poss /= 2
    sum_poss += poss/N
    
#sum_poss /= N


print(sum_poss)

Fixed submission:
#   C

import numpy as np

N, K = map(int, input().split())

sum_poss = 0
for n in range(1, N+1):
    m0 = 0
    if n >= K:
        m0 = 0
    else:
        m0 = int(np.log2(K/n))
        if np.log2(K/n) - int(np.log2(K/n)) != 0:
            m0 += 1
#    print(m0, 1/(2**m0))
    sum_poss += 1/((2**m0)*N)
    
#sum_poss /= N


print(sum_poss)
Buggy python submission (verdict: Time Limit Exceeded):
R, G, B, N = map(int, input().split())

count = 0

tmp_lst = [R, G, B]
tmp_lst.sort()
X, Y, Z = tmp_lst[0], tmp_lst[1], tmp_lst[2]

x_max = int(N/X)    #   max の中では一番大きい
y_max = int(N/Y)
z_max = int(N/Z)

#print(x_max, y_max, z_max, X, Y, Z)

for z in range(z_max + 1):
    for y in range(y_max + 1):
        tmp = N - z*Z - y*Y
        if tmp < 0:
            break
        if tmp % X == 0 and tmp // X <= x_max:
#            print(tmp // X, y, z)
            count += 1

print(count)

Fixed submission:
R, G, B, N = map(int, input().split())

count = 0

tmp_lst = [R, G, B]
tmp_lst.sort()
X, Y, Z = tmp_lst[0], tmp_lst[1], tmp_lst[2]

x_max = int(N/X)    #   max の中では一番大きい
y_max = int(N/Y)
z_max = int(N/Z)

#print(x_max, y_max, z_max, X, Y, Z)

for z in range(z_max + 1):
    for y in range(y_max + 1):
        tmp = N - z*Z - y*Y
        if tmp < 0:
            break
        if tmp % X == 0 and tmp // X <= x_max:
#            print(tmp // X, y, z)
            count += 1

print(count)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
S = input()

WtoBcounter = 0
for i in range(N):
    if S[i] == "#":
        for j in range(i+1, N):
            if S[j] == ".":
                WtoBcounter += 1
        break

BtoWcounter = 0
for i in range(N-1, -1, -1):
    if S[i] == ".":
        for j in range(i-1, -1, -1):
            if S[j] == "#":
                BtoWcounter += 1

output = 0
if WtoBcounter < BtoWcounter:
    output = WtoBcounter
else:
    output = BtoWcounter

print(output)

Fixed submission:
N = int(input())
S = input()

BtoW_stones_num = 0
for i in range(N):
    if S[i] == "#":
        BtoW_stones_num += 1

count = 0
brack_stone_num = 0
white_stone_num = 0
WtoB_stone_num = 0
for i in range(N-1, -1, -1):
    if S[i] == "#":
        if  white_stone_num == 0:
            brack_stone_num = 0
        else:
            brack_stone_num += 1
        if brack_stone_num > white_stone_num:
            WtoB_stone_num += white_stone_num
            brack_stone_num = 0
            white_stone_num = 0
    else:
        white_stone_num += 1
    
print(brack_stone_num + WtoB_stone_num)
Buggy python submission (verdict: Runtime Error):
N = int(input())

L_lst = map(int, input().split())

L_lst.sort()
L_sum = sum(L_lst)
L_max = L_lst[-1]

if L_max * 2 >= L_sum:
  print("No")
else:
  print("Yes")

Fixed submission:
N = int(input())
 
L_lst = list(map(int, input().split()))
 
L_lst.sort()
L_sum = sum(L_lst)
L_max = L_lst[-1]
 
if L_max * 2 >= L_sum:
  print("No")
else:
  print("Yes")
Buggy python submission (verdict: Runtime Error):
A, B, C = map(int, input().split())

x = min(B, C) * 2

y = C - B
if 0 < y <= A:
    xp = y
elif 0 < y:
    xp = A


print(x + xp + 1)
    

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

if C <= B:
    print(C + B)
elif B < C <= A+B+1:
    print(C+B)
else:
    print(B*2+A+1)
Buggy python submission (verdict: Runtime Error):

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

p_arr = np.array(p_lst) - 1

a_arr = [N*i + 1 for i in range(N)]
b_arr = [0]*N
for i in range(N):
    b_arr[p_arr[i]] = N*(N - p_arr[i]) + i + 1

a_output = ""
b_output = ""
for i in range(N):
    a_output += str(a_arr[i])
    b_output += str(b_arr[i])
    if i == N-1:
        continue
    else:
        a_output += " "
        b_output += " "

print(a_output)
print(b_output)


Fixed submission:
import numpy as np

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

p_arr = np.array(p_lst) - 1

a_arr = [N*i + 1 for i in range(N)]
b_arr = [0]*N
for i in range(N):
    b_arr[p_arr[i]] = N*(N - p_arr[i]) + i + 1

a_output = ""
b_output = ""
for i in range(N):
    a_output += str(a_arr[i])
    b_output += str(b_arr[i])
    if i == N-1:
        continue
    else:
        a_output += " "
        b_output += " "

print(a_output)
print(b_output)
Buggy python submission (verdict: Time Limit Exceeded):
import time

time.sleep(3)
a, b = map(int, input().split())
print(max(a + b, a - b, a * b))

Fixed submission:
a, b = map(int, input().split())
print(max([a + b, a - b, a * b]))
Buggy python submission (verdict: Runtime Error):
import numpy as np

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

listA=[] #appendのために宣言が必要
while True:
    try:
        listA.append(list(map(int,input().split())))

    except:
        break;
        #または、quit(),os.exit()をして止める。

count = 0
for i in range(n):
    for j in range(n):
        if(i < j):
            dis = 0
            for k in range(d):
                dis += (listA[i][k]-listA[j][k]) ** 2
            dis = np.sqrt(dis)
            if(dis.is_integer()):
                count += 1


print(count)


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

if( a*n < b ):
    print(a*n)
else:
    print(b)
Buggy python submission (verdict: Runtime Error):
import numpy as np

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

listA=[] #appendのために宣言が必要
while True:
    try:
        listA.append(list(map(int,input().split())))

    except:
        break;
        #または、quit(),os.exit()をして止める。

count = 0
for i in range(n):
    for j in range(n):
        if(i < j):
            dis = 0
            for k in range(d):
                dis += (listA[i][k]-listA[j][k]) ** 2
            dis = np.sqrt(dis)
            if(dis.is_integer()):
                count += 1


print(count)


Fixed submission:
import numpy as np

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

listA=[] #appendのために宣言が必要
while True:
    try:
        listA.append(list(map(int,input().split())))

    except:
        break;
        #または、quit(),os.exit()をして止める。

count = 0
for i in range(n):
    for j in range(n):
        if(i < j):
            dis = 0
            for k in range(d):
                dis += (listA[i][k]-listA[j][k]) ** 2
            dis = np.sqrt(dis)
            #if(dis.is_integer()):
            if( dis/int(dis) == 1 ):
                count += 1


print(count)
Buggy python submission (verdict: Runtime Error):
def main():

    # 1 <= a <= b <= 10^18
    # 1 <= c,d <= 10^9

    a, b, c, d = map( int, input().split())
    count = 0

    for i in range(a, b):
        if(i % c != 0):
            if(i % d != 0):
                count += 1

    print(count)

if __name__ == '__main__':
    main()



Fixed submission:
def main():

    s = input()
    s = str(s)
    flag = 0

    if(s[0] == s[1]):
        print('Bad')
        flag = 1
    
    if(flag == 0 and s[1] == s[2]):
        print('Bad')
        flag = 1
    
    if(flag == 0 and s[2] == s[3]):
        print('Bad')
        flag = 1
    
    if(flag == 0):
        print('Good')

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
import math

def main():

    # 1 <= a <= b <= 10^18
    # 1 <= c,d <= 10^9

    a, b, c, d = map( int, input().split())
    count = 0

    ac = -(-a // c)
    bc = b // c

    ad = -(-a // d)
    bd = b // d

    cd = int(c * d / math.gcd(c, d))

    acd = -(-a // cd)
    bcd = b // cd

    cm_num = bc - ac + 1
    dm_num = bd - ad + 1
    cdm_num = bcd - acd + 1

    count = cm_num + dm_num - cdm_num

    total = b - a + 1

    print(total - count)

if __name__ == '__main__':
    main()



Fixed submission:
#import math
import fractions

def main():

    # 1 <= a <= b <= 10^18
    # 1 <= c,d <= 10^9

    a, b, c, d = map( int, input().split())
    count = 0

    ac = -(-a // c)
    bc = b // c

    ad = -(-a // d)
    bd = b // d

    cd = int(c * d / fractions.gcd(c, d))

    acd = -(-a // cd)
    bcd = b // cd

    cm_num = bc - ac + 1
    dm_num = bd - ad + 1
    cdm_num = bcd - acd + 1

    count = cm_num + dm_num - cdm_num

    total = b - a + 1

    print(total - count)

if __name__ == '__main__':
    main()

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

def main():

    # 1 <= a <= b <= 10^18
    # 1 <= c,d <= 10^9

    a, b, c, d = map( int, input().split())
    count = 0


    ac = -(-a // c)
    bc = b // c

    ad = -(-a // d)
    bd = b // d

    cd = int(c * d / math.gcd(c, d))
    acd = -(-a // cd)
    bcd = b // cd

    cm_num = bc - ac + 1
    dm_num = bd - ad + 1
    cdm_num = bcd - acd + 1

    count = cm_num + dm_num - cdm_num

    total = b - a + 1

    print(total - count)

if __name__ == '__main__':
    main()



Fixed submission:
#import math
import fractions

def main():

    # 1 <= a <= b <= 10^18
    # 1 <= c,d <= 10^9

    a, b, c, d = map( int, input().split())
    count = 0

    ac = -(-a // c)
    bc = b // c

    ad = -(-a // d)
    bd = b // d

    cd = int(c * d / fractions.gcd(c, d))

    acd = -(-a // cd)
    bcd = b // cd

    cm_num = bc - ac + 1
    dm_num = bd - ad + 1
    cdm_num = bcd - acd + 1

    count = cm_num + dm_num - cdm_num

    total = b - a + 1

    print(total - count)

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Time Limit Exceeded):
def main():
    n = int(input())
    a = list(map(int, input().split()))

    flag = True
    count = 0
    for i in a:
        if(i%2 == 1):
            flag = False

    while flag == True:
        count += 1
        a = list(map( lambda x: int(x/2), a))
        for i in a:
            if(i%2 != 0):
                False
    
    print(count)

if __name__ == '__main__':
    main()

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

    flag = True
    count = 0
    for i in a:
        if(i%2 == 1):
            flag = False

    while flag == True:
        count += 1
        a = list(map( lambda x: int(x/2), a))
        for i in a:
            if(i%2 != 0):
                flag = False
    
    print(count)

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
n = input()
if n == ins[::-1]:
    print("Yes")
else:
    print("No")


Fixed submission:
n = input()
if n == n[::-1]:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
H = [int(h) for h in input().split()]

max = 0
i = 0
while i < len(H):
    count = 0
    for j in range(i, len(H)-1):
        if H[j] >= H[j+1]:
            count += 1
        else:
            i = j
            break
    if count > max:
        max = count
    i += 1

print(max)

Fixed submission:
N = int(input())
H = [int(h) for h in input().split()]

max = 0
count = 0
for i in range(len(H)-1):
    if H[i] >= H[i+1]:
        count += 1
    else:
        if count > max:
            max = count
        count = 0
if count > max:
    max = count
print(max)
Buggy python submission (verdict: Time Limit Exceeded):
def main():
    N = int(input())

    strs = []
    for _ in range(N):
        str = [ci for ci in input()]
        str.sort()
        t = ''.join(str)
        strs.append(t)

    count = 0
    for i, si in enumerate(strs):
        for sj in strs[i+1:]:
            if si == sj:
                count += 1
    print(count)


main()

Fixed submission:

def main():
    N = int(input())

    A = []
    for _ in range(N):
        a = sorted(list(input()))
        A.append(''.join(a))
    td = {}
    for t in A:
        if t not in td.keys():
            td[t] = 1
        else:
            td[t] += 1
    count = 0
    for v in td.values():
        count += v * (v - 1) // 2
    print(count)


main()

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

    td = {}
    for _ in range(N):
        str = [ci for ci in input()]
        str.sort()
        t = ''.join(str)
        if t not in td.keys():
            td[t] = 0
        else:
            if td[t] == 0:
                td[t] = 1
            else:
                td[t] += td[t] * 2
    count = 0
    for v in td.values():
        count += v
    print(count)


m

Fixed submission:

def main():
    N = int(input())

    A = []
    for _ in range(N):
        a = sorted(list(input()))
        A.append(''.join(a))
    td = {}
    for t in A:
        if t not in td.keys():
            td[t] = 1
        else:
            td[t] += 1
    count = 0
    for v in td.values():
        count += v * (v - 1) // 2
    print(count)


main()
Buggy python submission (verdict: Runtime Error):
def main():
    A = input()  # 500円の枚数
    B = input()  # 100円の枚数
    C = input()  # 50円の枚数

    x = input()
    result = 0
    for a in range(A):
        for b in range(B):
            for c in range(C):
                total = 500 * a + 100 * b + 50 * c
                if total == x:
                    result += 1

    return result


if __name__ == '__main__':
    main()

Fixed submission:
def main():
    A = int(input())  # 500円の枚数
    B = int(input())  # 100円の枚数
    C = int(input())  # 50円の枚数
    X = int(input())
    result = 0
    for a in range(A + 1):
        for b in range(B + 1):
            for c in range(C + 1):
                total = 500 * a + 100 * b + 50 * c
                if total == X:
                    result += 1

    print(result)


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
def main():
    N = int(input())
    A = int(input())
    B = int(input())
    counter = 0

    for n in range(1, N+1):
        sum = int(n / 10) + n % 10
        if A <= sum and sum <= B:
            counter += n

    print(counter)


if __name__ == '__main__':
    main()

Fixed submission:
def main():
    N, A, B = map(int, input().split())
    counter = 0

    for n in range(1, N+1):
        sum = 0
        for digit in str(n):
            sum += int(digit)
        if A <= sum and sum <= B:
            counter += n

    print(counter)


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
def main():
    _ = int(input())
    # nums = [int(input()) for _ in range(N)]
    nums = map(int, input().split())
    counter = 0
    loop = True
    while loop:
        for i, n in enumerate(nums):
            if n % 2 == 0:
                nums[i] = n / 2
            else:
                loop = False
                break
        if loop:
            counter += 1
    print(counter)


if __name__ == '__main__':
    main()

Fixed submission:
def main():
    _ = int(input())
    nums = [int(i) for i in input().split()]
    # nums = map(int, input().split())
    counter = 0
    loop = True
    while loop:
        for i, n in enumerate(nums):
            if n % 2 == 0:
                nums[i] = n / 2
            else:
                loop = False
                break
        if loop:
            counter += 1
    print(counter)


if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
def main():
    _ = int(input())
    A = str(input().strip('()'))
    nums = [int(a) for a in A.split(',')]
    counter = 0
    loop = True
    while loop:
        for i, n in enumerate(nums):
            if n % 2 == 0:
                nums[i] = n / 2
            else:
                loop = False
                break
        if loop:
            counter += 1
    print(counter)


if __name__ == '__main__':
    main()

Fixed submission:
def main():
    _ = int(input())
    nums = [int(i) for i in input().split()]
    # nums = map(int, input().split())
    counter = 0
    loop = True
    while loop:
        for i, n in enumerate(nums):
            if n % 2 == 0:
                nums[i] = n / 2
            else:
                loop = False
                break
        if loop:
            counter += 1
    print(counter)


if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
def main():
    N = int(input())
    nums = [int(input()) for _ in range(N)]
    counter = 0
    loop = True
    while loop:
        for i, n in enumerate(nums):
            if n % 2 == 0:
                nums[i] = n / 2
            else:
                loop = False
                break
        if loop:
            counter += 1
    print(counter)


if __name__ == '__main__':
    main()

Fixed submission:
def main():
    _ = int(input())
    nums = [int(i) for i in input().split()]
    # nums = map(int, input().split())
    counter = 0
    loop = True
    while loop:
        for i, n in enumerate(nums):
            if n % 2 == 0:
                nums[i] = n / 2
            else:
                loop = False
                break
        if loop:
            counter += 1
    print(counter)


if __name__ == '__main__':
    main()