Problem:


Score : 200 points

Problem Statement

There are N positive integers written on a blackboard: A_1, ..., A_N.

Snuke can perform the following operation when all integers on the blackboard are even:

Replace each integer X on the blackboard by X divided by 2.

Find the maximum possible number of operations that Snuke can perform.

Constraints

1 \leq N \leq 200

1 \leq A_i \leq 10^9

Input

Input is given from Standard Input in the following format:

N
A_1 A_2 ... A_N

Output

Print the maximum possible number of operations that Snuke can perform.

Sample Input 1

3
8 12 40

Sample Output 1

2

Initially, [8, 12, 40] are written on the blackboard.
Since all those integers are even, Snuke can perform the operation.

After the operation is performed once, [4, 6, 20] are written on the blackboard.
Since all those integers are again even, he can perform the operation.

After the operation is performed twice, [2, 3, 10] are written on the blackboard.
Now, there is an odd number 3 on the blackboard, so he cannot perform the operation any more.

Thus, Snuke can perform the operation at most twice.

Sample Input 2

4
5 6 8 10

Sample Output 2

0

Since there is an odd number 5 on the blackboard already in the beginning, Snuke cannot perform the operation at all.

Sample Input 3

6
382253568 723152896 37802240 379425024 404894720 471526144

Sample Output 3

8



Sample input:
3
8 12 40


Sample output:
2

Submission status: Accepted

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

def count(x):
    cnt = 0
    while x%2==0:
        x//=2
        cnt += 1
    return cnt

ans = 10**9
for i in a:
    ans = min(ans, count(i))
print(ans)

Submission status: Accepted

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

count=0
while True:
    exist_odd = False
    for i in range(n):
        if a[i] % 2 != 0:
            exist_odd = True
    if exist_odd:
        break
    for i in range(n):
        a[i] /= 2
    count += 1

print(count)

Submission status: Accepted

Solution code:
s=map(int,input().split())
s=map(int,input().split())
ans = []
for i in s:
    tmp=i
    count=0
    while(1):
        if tmp%2==0:
            tmp=tmp/2
            count=count+1
        else:
            break
    ans.append(count)
print(min(ans))

Submission status: Accepted

Solution code:
n = int(input())
al = list(map(int, input().split()))

def dev_by_2(x, cnt=0):
    if x % 2 == 0:
        x /= 2
        cnt += 1
        return(dev_by_2(x, cnt))
    else:
        return cnt

ans = 1001001001
for a in al:
    ans = min(ans, dev_by_2(a))

print(ans)

Submission status: Accepted

Solution code:
input()
A = list(map(int,input().split()))
count = 0
while all(a % 2 == 0 for a in A):
    A = [a/2 for a in A]
    count +=1
else: print(count)

Submission status: Accepted

Solution code:
n= int(input())
nyuuryok = input().split()
nyuuryoku = [0]*n
for i in range(n):
    nyuuryoku[i] = int(nyuuryok[i])
count = 0
count2 = 0
while count2 == 0:
    if(all([x % 2 == 0 for x in nyuuryoku])):
        for i in range(n):
            nyuuryoku[i] = nyuuryoku[i]/2
        count += 1
        
    else:
        count2 += 1
print(count)

Submission status: Accepted

Solution code:
N = int(input().rstrip())
INPUT = list(map(int, input().rstrip().split(' ')))

for count in range(1000000000):
    for i in range(N):
        p, mod = divmod(INPUT[i], 2)
        if mod == 0:
            INPUT[i] = p
        else:
            break
    else:
        continue
    print(count)
    break

Submission status: Accepted

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

count = 0

while all(a % 2 == 0 for a in A):
  A =[a/2 for a in A]
  count += 1
print(count)

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int, input().split()))
t=0
g=0
while g==0:
    for i in range(n):
        if a[i]%2==0:
            a[i]=a[i]//2
            t+=1
        else:
            g=1
print(t//n)

Submission status: Accepted

Solution code:
N=int(input())
A=list(map(int,input().split()))
ans=0
a=True

while a==True:
    for i in range(N):
        if A[i]%2==0:
            A[i]=A[i]//2
        else:
            a=False
    ans+=1
    
ans-=1
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
numList = list(map(int, input().split()))

flag = True
cnt = 0

while flag:
    for i in range(len(numList)):
        if numList[i] % 2 == 1:
            flag = False
            cnt -= 1
            break
        numList[i] /= 2

    cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
N = int(input())
A = input().split()
X = 1000000000
count = 0
for i in range(N):
  while int(A[i]) % 2 == 0:
    A[i] = int(A[i])//2
    count +=1
  if count < X:
    X = count
  count =0
print(X)

Submission status: Accepted

Solution code:
N = int(input())
A = input().split()
X = 1000000000
count = 0
for i in range(N):
  t = int(A[i])
  while t % 2 == 0:
    t = t//2
    count +=1
  if count < X:
    X = count
  count =0
print(X)

Submission status: Accepted

Solution code:
def function(b):
  counter=0
  while b%2 ==0:
    b /= 2
    counter+=1
  return counter

N=int(input())
A_list = [int(A_i) for A_i in input().split()]
B_list = min(map(function,A_list))
print(B_list)

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,input().split()))
k=10**9
for i in range(n):
    t=0
    while True:
        if a[i]%2==0:
            a[i]=a[i]//2
            t=t+1
        else:
            if t<k:
                k=t
                break
            else:
                break
print(k)

Submission status: Accepted

Solution code:
n = int(input())
a = [int(x) for x in input().split()]
key = 10**9

for i in range(n):
  b = a[i]
  c = 0
  while b%2 == 0:
    b //= 2
    c += 1
  if key > c:
    key = c
print(key)

Submission status: Accepted

Solution code:
n = int(input())
a=list(map(int, input().split()))
count = 0
success = True
while True:
    for i, ele in enumerate(a):
        if ele % 2 == 0:
            a[i] = ele / 2
        else:
            success = False
    if not success:
        break
    count += 1
print(count)

Submission status: Accepted

Solution code:
n = int(input())
lst = list(map(int,input().split()))
cnt = 10000000000000000000
for i in range(n):
  temp = 0
  while (lst[i]%2==0):
    lst[i] = lst[i]//2
    temp += 1
  if temp < cnt:
    cnt = temp
print(cnt)

Submission status: Accepted

Solution code:
n = int(input())
A = list(map(int, input().split()))
count = 0
flag = 1
while(flag):
    flag = 0
    for i in range(n):
        if A[i]%2 == 0:
            A[i] /= 2
        else:
            break
    else:
        flag = 1
        count += 1 

print(count)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
B = [ ]
c = -1
for i in A:
  B.append(list(bin(i)))
for i in range(10000):  
  for j in range(N):
    if B[j][-i-1] == '0':
      continue
    else:
      c = i
      break
  if c == 0:
    print(0)
    break
  elif c>0:
    print(i)
    break

Submission status: Accepted

Solution code:
ans = 10 **9
N = int(input())
A = list(map(int,input().split()))
for i in A:
    p = 0
    while i % 2 ==0:
        i //=2
        p += 1
    if p < ans:
        ans = p
print(ans)

Submission status: Accepted

Solution code:
import sys
## io ##
def IS(): return sys.stdin.readline().rstrip()
def II(): return int(IS())
def MII(): return list(map(int, IS().split()))
def MIIZ(): return list(map(lambda x: x-1, MII()))
## dp ##
INIT_VAL = 0
def DD2(d1,d2): return [[INIT_VAL]*d2 for _ in range(d1)]
def DD3(d1,d2,d3): return [DD2(d2,d3) for _ in range(d1)]
## math ##
def to_bin(x: int) -> str: return format(x, 'b') # rev => int(res, 2)
def to_oct(x: int) -> str: return format(x, 'o') # rev => int(res, 8)
def to_hex(x: int) -> str: return format(x, 'x') # rev => int(res, 16)
MOD=10**9+7
def divc(x,y) -> int: return -(-x//y)
def divf(x,y) -> int: return x//y
def gcd(x,y):
    while y: x,y = y,x%y
    return x
def lcm(x,y): return x*y//gcd(x,y)
def enumerate_divs(n):
    """Return a tuple list of divisor of n"""
    return [(i,n//i) for i in range(1,int(n**0.5)+1) if n%i==0]
def get_primes(MAX_NUM=10**3):
    """Return a list of prime numbers n or less"""
    is_prime = [True]*(MAX_NUM+1)
    is_prime[0] = is_prime[1] = False
    for i in range(2, int(MAX_NUM**0.5)+1):
        if not is_prime[i]: continue
        for j in range(i*2, MAX_NUM+1, i):
            is_prime[j] = False
    return [i for i in range(MAX_NUM+1) if is_prime[i]]
## libs ##
from itertools import accumulate as acc
from collections import deque, Counter
from heapq import heapify, heappop, heappush
from bisect import bisect_left

#======================================================#

def main():
    n = II()
    aa = MII()
    minv = 10**5
    for a in aa:
        cnt = 0
        while a%2 == 0:
            cnt += 1
            a //= 2
        minv = min(minv, cnt)
    print(minv)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

count = 0
flag = 0
while True:
    for i in range(N):
        if A[i] % 2 == 1:
            flag = 1
        else:
            A[i] = A[i] / 2

    if flag == 1:
        break
    else:
        count += 1

print(count)

Submission status: Accepted

Solution code:
n = int(input())
N = list(map(int,input().split()))
ans = 0
c = True
while c == True :
  for i in range(n):
    if N[i] % 2 == 1:
      c = False
    else:
      N[i] = int(N[i] / 2)
      
  if c == True:
    ans += 1

print(ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

ans=0
while True:
    for i in range(n):
        if a[i]%2==1:
            break
        a[i]=int(a[i]/2)
    else:
        ans+=1
        continue
    break
print(ans)

Submission status: Accepted

Solution code:
N=int(input())
A=list(map(int,input().split()))
K=0
for i  in range(1,10000000):
    for j in A:
        if j%(2**i)!=0:
            break
    else:
        K+=1
        continue
    break

print(K)

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
A = LIST()

cnt = 0
flg = True

while flg:
	for i in range(N):
		if A[i]%2 == 0:
			A[i] //= 2
		else:
			flg = False
	if flg:
		cnt += 1

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a = map(int, input().split())

count = 0
flag = True

while(flag):
    tmp_a = []
    for i in a:
        if i % 2 !=0:
            flag = False
            break
        tmp_a.append(i/2)
    a = tmp_a
    if flag == True:
        count += 1

print(count)

Submission status: Accepted

Solution code:
_ = input()
values = list(map(int, input().split()))
count = 0

while all([int(x) % 2 == 0 for x in values]):
    count += 1
    values = [int(x / 2) for x  in values]

print(count)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline

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

ans = 1
bi = 2**ans
while True:
    for i in range(n):
        if a[i] % bi != 0:
            print(ans-1)
            exit()
    ans +=1
    bi = 2**ans

Submission status: Accepted

Solution code:
N = int(input())

count = -1

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

tf = True

while tf is True:
    count += 1
    for i in range(N):
        if a[i] % 2  != 0:
            tf = False
            break
        else:
            a[i] = a[i] / 2

print(count)

Submission status: Accepted

Solution code:
def resolve():
    # 整数 1 つ
    n = int(input())
    # 整数複数個
    # a, b, c = list(map(int, input().split()))
    # 整数 N 個 (改行区切り)
    # N = [int(input()) for i in range(N)]
    # 整数 N 個 (スペース区切り)
    A = list(map(int, input().split()))
    # 整数 (縦 H 横 W の行列)
    # A = [list(map(int, input().split())) for i in range(H)]

    cnt=0
    judge=True
    while judge == True:
        for i in range(len(A)):
            if A[i] % 2 == 1:
                judge = False
            else:
                A[i] = A[i] /2

        if judge == True:
            cnt += 1

    print(cnt)


resolve()

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))
s = True
count = 0
while(s):
    for i in range(n):
        if a[i]%2 == 0:
            a[i] = int(a[i]/2)
        else:
            s = False
            break
    count += 1
print(count-1)

Submission status: Accepted

Solution code:
N = int(input())
a = list(map(int, input().split()))
j = 0

while True:
  if [i for i in a if i%2 == 1]:
    break
  a = [i/2 for i in a]
  j += 1
  
print(j)

Submission status: Accepted

Solution code:
import math

def calc_half(n):
  return int(n // 2)

def calc_surplus(n):
  return int(n % 2)

N = int(input())
str_A = input().split()
A_0 = [int(i) for i in str_A]
A = A_0

while list(map(calc_surplus, A)) == [0] * N:
  A = list(map(calc_half, A))
  
print(int(math.log(int(A_0[0] / A[0]), 2)))

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
ct = 0
flag = 0
while flag == 0:
    for i in range(N):
        if A[i] % 2 != 0:
            flag = 1
            break
        else:
            A[i] /= 2
    if flag == 1:
        break
    ct += 1
print(ct)

Submission status: Accepted

Solution code:
N = int(input())

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

i = 0

while 1 != 0:
    new = [(num/2) for num in nums if (num%2) == 0]

    if len(new) != N:
        print(i)
        exit()
    else:
        i += 1
        nums = new

Submission status: Accepted

Solution code:
import numpy as np
N = int(input()) 
line = input().split()
l = [int(s) for s in line]

ary = np.array(l)
count = 0

while  not sum(ary) == 0 :
    
    aa = ary % 2
    
    if not sum(aa) == 0:
        break
    
    ary = ary / 2
    
    count += 1

print(count)

Submission status: Accepted

Solution code:
n = int(input())
a = map(int, input().split())

def how_many_times_divisible(n):
    ans = 0
    while n % 2 == 0:
        n /= 2
        ans += 1
    return ans
 

ans = min(map(how_many_times_divisible, a))
 
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
count = 0
check = 0

while check == 0:
    for i in range(N):
        if A[i]%2 == 1:
            check += 1
            break
        else:
            A[i] = A[i]/2
    count += 1


print(count-1)

Submission status: Accepted

Solution code:
import numpy as np
n = int(input())
a = list(map(int, input().split()))
a = np.array(a)
count = 0
while all(a % 2 == 0):
    count += 1
    a //= 2
print(count)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

def main():
    # 入力
    N = int(input())
    nums = list(map(int, input().split()))

    cnt = 0
    while len([x for x in nums if x % 2 == 1]) == 0:
        cnt += 1
        nums = [x/2 for x in nums]

    print(cnt)


main()

Submission status: Accepted

Solution code:
n = int(input())
a = [int(x) for x in input().split()]
ans = 0
flg = True
while flg:
    for i in range(n):
        if a[i] % 2 == 0:
            a[i] //= 2
        else:
            flg = False
            break
    if flg:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
# n, k = list(map(int, input().split()))
a = list(map(int, input().split()))
check = False
for i in range(n):
    if a[i] % 2 != 0:
        check = True
        break
count = 0
while check == False:
    for i in range(n):
        a[i] /= 2
        if a[i] % 2 != 0:
            check = True
            break
    count += 1
print(count)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))
kar = a[0]
ans = 0
while True:
    if kar % 2 == 0:
        kar = kar//2
        ans += 1
    else:
        break

for i in range(1,n):
    for j in range(ans):
        if a[i] % 2 == 0:
            a[i] = a[i] // 2
        else:
            ans = j
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
a_list = [int(a) for a in input().split(' ')]
bin_or = 0
for a in a_list:
    bin_or |= a
cnt = 0
while bin_or & 1 != 1:
    cnt += 1
    bin_or >>= 1
print(cnt)

Submission status: Accepted

Solution code:
N = int(input())
S = []
S = list(map(int, input().split()))
f = 0
t = 0
while  t == 0:
    for i in range(len(S)):
        t = S[i]%2
        if t == 1:
            break
        else:
            S[i] = int(S[i]/2)
    if t ==1:
        break
    f = f + 1
print(f)

Submission status: Accepted

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

ans=0
exist_odd=False
while True:
  for i in range(N):
    if A[i]%2!=0:
      exist_odd=True
  if exist_odd:
      break
  ans+=1
  for i in range(N):
    A[i]=int(A[i]/2)

print(ans)

Submission status: Accepted

Solution code:
import numpy as np
n = int(input())
L = list(map(int,input().split()))
L = np.array(L)
cnt = 0
while all((x%2 == 0 for x in L)):
    L //=2
    cnt +=1
print(cnt)

Submission status: Accepted

Solution code:

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

odd_included = False
counter = 0

for i in range(len(in_list)):
    if in_list[i] % 2 != 0:
        odd_included = True

    while odd_included == False:
        for i in range(len(in_list)):
            if in_list[i] % 2 != 0:
                odd_included = True
                break
            if odd_included == False:
                in_list[i] = in_list[i] / 2
        if odd_included == False:
            counter += 1

print(counter)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
ans = 0
div_2 = True
while div_2:
    for i in range(n):
        if a[i] % 2 != 0:
            div_2 = False
    if div_2:
        ans += 1
    a = [i // 2 for i in a]
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
count = 0
while all(i%2==0 for i in A):
    for i in range(N):
        A[i] = A[i]//2
    count += 1
print(count)

Submission status: Accepted

Solution code:
N = int(input())
li = list(map(int,input().split()))	
count = 0
flag = True

while flag==True:
	for i in range(N):
		if li[i]%2!=0:
			flag=False
		else:
			li[i] = li[i] // 2
	if flag==True:
		count += 1
print(count)

Submission status: Accepted

Solution code:
N = int(input())
A = [int(a) for a in input().split()]

flag = False
ans = 0

while flag == False :
	for i in range(len(A)):
		if A[i] % 2 == 0 :
			A[i] = A[i] // 2
		else :
			flag = True
			break
	if flag == False :
		ans += 1

print(ans)

Submission status: Accepted

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

flag = 0
cnt = 0

while flag == 0:
    for i in range(N):
        if A[i] % 2 == 0:
            A[i] = A[i] // 2
        else:
            flag = 1
            break
    if flag == 0:
        cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
count = 0

#all(): 全ての要素がTrueならTrue
#any(): 一つでもTrueならTrue
while all(a%2==0 for a in A): 
    A = [a/2 for a in A]
    count += 1

print(count)

Submission status: Accepted

Solution code:
n = int(input())
a = map(int,input().split())
ap = list()
count = 0
for i in a:
    while i%2 ==0:
        i /= 2
        count += 1
    ap.append(count)
    count = 0
print(min(ap))

Submission status: Accepted

Solution code:
def resolve():
    N = int(input())
    L = list(map(int, input().split()))
    count = 0
    flag = False
    while True:
        for i in range(N):
            if L[i] % 2 == 0:
                L[i] = L[i] // 2
            else:
                flag = True
                break

        if flag:
            break
            
        count += 1
        
    
    print(count)
    
if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

ans = 10**9
for i in range(n):
    c = 0
    while a[i] % 2 == 0:
        c += 1
        a[i] //= 2
    ans = min(ans,c)
print(ans)

Submission status: Accepted

Solution code:
N = int(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)

Submission status: Accepted

Solution code:
n = int(input())

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

odd_flg = False
count = 0

while True:
    for i in range(n):
        if a[i] % 2 != 0:
            odd_flg = True

    if odd_flg == True:
        break

    for i in range(n):
        a[i] //= 2

    count += 1

print(count)

Submission status: Accepted

Solution code:
n = int(input())
A = list(map(int, input().split()))
f = 0
ans = 0
while f == 0:
    for i in range(n):
        if not A[i]%2 == 0:
            f = 1
    if f == 0:
        ans += 1
        for j in range(n):
            A[j] /= 2
print(ans)

Submission status: Accepted

Solution code:
import numpy as np
import sys

input = sys.stdin.readline

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

A = np.array(A)

cnt = 0

while 1:
    for i in range(N):
        if A[i]%2:
            print(cnt)
            exit()

    A = A/2
    cnt+=1

Submission status: Accepted

Solution code:
N=int(input())
alist=list(map(int,input().split()))

answer=0
loop_flg=True
while(loop_flg):
  for i in range(N):
    if alist[i]%2==0:
      alist[i]//=2
    else:
      loop_flg=False
      break
  else:
    answer+=1
    
print(answer)

Submission status: Accepted

Solution code:
N = int(input())

data1 = input()
data2 = data1.split()
A = list(map(int, data2))

def half(num):
    return num / 2

ans = 0

while all(elem % 2 == 0 for elem in A):
    ans += 1
    A = [half(x) for x in A]

print(ans)

Submission status: Accepted

Solution code:
count = int(input())
numbers = [int(num) for num in input().split()]

counter = 0
while True:
  tmp = 0
  for item in numbers:
    tmp += item % 2
  if tmp > 0:
    break
  counter += 1
  numbers = [item / 2 for item in numbers]
print(counter)

Submission status: Accepted

Solution code:
N = int(input())
A_in = list(map(int, input().split()))
A_sub = A_in
A_sub_sum = 0
j = 0

while True:
    for i in range(N):
        A_sub_sum += float(A_sub[i] % 2)
    if A_sub_sum == 0:
        for i in range(N):
            A_sub[i] /= 2
        j += 1
    else: break
print(j)

Submission status: Accepted

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

res = 10**8
for i in range(n):
    t = 0
    while a[i] % 2 != 1:
        a[i] = a[i]//2
        t += 1
    # print(a[i], t)
    res = min(res, t)

print(res)

Submission status: Accepted

Solution code:
import math
M = input()
a = list(map(int,input().split()))
ans = float("inf")
for i in a:
    ans = min(ans, len(bin(i)) - bin(i).rfind("1") - 1)
print(round(ans))

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**8)

def sort(a):
	a.sort()

def rev(a):
	a.reverse()

def sd():
	return int(input())

def _sd():
	return map(int,input().split())


def ss():
	return input()

def sf():
	return float(input())

def dfs():
		# write dfs code here. And delete pass.
		pass

def bfs():
		# write bfs code here. And delete pass.
		pass
 
def main():
	f=bool(False)
	ans = int(0)
	N=sd()
	A=list(map(int,input().split()))
	while(1):
		for i in range(N):
			if A[i]%2:
				f=True
			else : 
				A[i]/=2
		if(not f):
			ans+=1
		else:
			break
	print(ans)

main()

Submission status: Accepted

Solution code:
def resolve():
    n=int(input())
    l=list(map(int, input().split()))
    joken=0
    cnt=0
    while joken==0:
        for i in range(n):
            if l[i]%2!=0:
                joken=1
        if joken==0:
            for i in range(n):
                l[i]=l[i]//2
            cnt+=1
    print(cnt)
resolve()

Submission status: Accepted

Solution code:
N=int(input())
a=list(map(int, input().split()))

flag=1
cnt=0
while flag==1:
  for i in range(N):
    if a[i]%2==0:
      a[i]=int(a[i]/2)
    else:
      flag=0
      break
  if flag==1:
    cnt+=1
print(cnt)

Submission status: Accepted

Solution code:
import sys
import numpy as np

readline = sys.stdin.readline

n = int(input())
a = np.array(readline().split(), dtype=np.int64)

ans = 0
while np.all(a&1 == 0):
    a >>= 1 
    ans += 1
print(ans)

Submission status: Accepted

Solution code:
N = input()
A = list(map(int,input().split()))
count = 0
exist_odd = False

while (exist_odd == False):
  for x in A:
    if x % 2 != 0:
      exist_odd = True
      
  if exist_odd == True:
    break
  else:
    A = [x/2 for x in A]
  count += 1
print(count)

Submission status: Accepted

Solution code:
import numpy as np


n = int(input())
a = list(map(int, input().split()))
a = np.array(a, int)
count = 0
while True:
    if not (a%2).any():
        a //= 2
        count += 1
    else:
        break
print(count)

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,input().split()))
flg=True
c=0
while flg==True:
  for i in range(n):
    if a[i]%2==1:
      flg=False
      
  if flg == True:
    c+=1
    a=[int(i/2) for i in a]
    
print(c)

Submission status: Accepted

Solution code:
N = input()  #一応読むけど、ループ回せば不要では
aList=input().split()

opCnt = 0
isAllE = True  #奇数見つかるまでは見なしTrue

while isAllE:
  for a in aList:
    if int(a)%2 == 1:
      isAllE = False
      break
  else:
    opCnt = opCnt + 1
    for i,a in enumerate(aList):
      aList[i] = int(int(a)/2)

print(opCnt)

Submission status: Accepted

Solution code:
N = input()
list = list(map(int, input().split()))
count = 0
while all(a % 2 == 0 for a in list):
  list = [a/2 for a in list]
  count += 1
print(count)

Submission status: Accepted

Solution code:
N=int(input())
*A,=map(int,input().split())
ans=0
while 1:
    if sum(i%2 for i in A)>0:
        break
    else:
        ans+=1
    i=0
    while i<N:
        A[i]=A[i]/2
        i+=1
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
an = list(map(int, input().split()))
digit = len(an)
ans = 0
while len(an) == digit:
    an = [a/2 for a in an if a % 2 == 0]
    ans += 1
print(ans-1)

Submission status: Accepted

Solution code:
N = int(input())
li = list(map(int, input().split()))
ans = float('inf')
for i in li:
    cnt = 0
    if i%2==0:
        tudukeru = True
    else:
        tudukeru = False
        ans = 0
    while tudukeru:
        if i%2 == 0:
            i = i//2
            cnt += 1
        else:
            tudukeru = False
            if cnt < ans:
                ans = cnt
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
nums = [int(i) for i in input().split()]
ans = 0
while True:
  if [i for i in nums if i % 2 == 1]:
    break
  nums = [i/2 for i in nums]
  ans += 1
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
nums = [int(i) for i in input().split()]
ans = 0
while True:
    if [i for i in nums if i % 2 == 1]:
        break
    nums = [i//2 for i in nums]
    ans += 1
print(ans)

Submission status: Accepted

Solution code:
def howmanytimesdisible(n):
  ans = 0
  while n%2==0:
    n/=2
    ans+=1
  return ans

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

ans = min(map(howmanytimesdisible,li))

print(ans)

Submission status: Accepted

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

count = 0
contin = True
while contin:
    for i in range(len(a)):
        if a[i] % 2 == 0:
            a[i] = a[i] / 2
        else:
            contin=False
            break
    count += 1
print(count - 1)

Submission status: Accepted

Solution code:
N=input()
list=list(map(int, input().split()))
m=0
while all(a%2==0 for a in list):
  list=[a/2 for a in list]
  m += 1
print(m)

Submission status: Accepted

Solution code:
import sys, math, itertools, collections, bisect 
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8') 
inf = float('inf') ;mod = 10**9+7 
mans = inf ;ans = 0 ;count = 0 ;pro = 1

n = int(input())
list = list(map(int, input().split()))
chk = True

for i in range(0, 10**9):
    for i in range(n):
        if list[i]%2==0:
            list[i] = list[i]//2
        else:
            chk = False

    if chk == True:
        ans += 1
    else:
        break

print(ans)

Submission status: Accepted

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

ans = 0
flag = False
while True:
    for i in range(N):
        if A[i] % 2 == 0:
            A[i] = A[i] / 2
        else:
            flag = True
            break
    if flag:
        break
    ans += 1
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
count = 0
while all([x % 2 == 0 for x in A]):
    A = [x / 2 for x in A]
    count += 1

print(count)

Submission status: Accepted

Solution code:
n = int(input())
A = list(map(int,input().split()))
ans = 10**10
for a in A:
    tmp = 0
    while(a%2 == 0):
        a = a//2
        tmp += 1
    ans = min(ans,tmp)
print(ans)

Submission status: Accepted

Solution code:
input()
Nums = list(map(int, input().split()))

count = 0
while all(n % 2 == 0 for n in Nums):
  Nums = [n/2 for n in Nums]
  count += 1

print(count)

Submission status: Accepted

Solution code:
N=input()
A=list(map(int,input().split()))
count=0
while all([a%2==0 for a in A]):
    A = [a/2 for a in A]
    count+=1
print(count)

Submission status: Accepted

Solution code:
input()
A=list(map(int,input().split()))
count=0
while all([a%2==0 for a in A]):
    A = [a/2 for a in A]
    count+=1
print(count)

Submission status: Accepted

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

ans = 0
min = 1000000

for i in range(n):
	while (a[i]>>1 != 0) and (a[i]%2 == 0):
		a[i]=a[i]>>1
		ans+=1
	if ans<min:
		min = ans
	ans = 0
print(min)

Submission status: Accepted

Solution code:
# coding: utf-8
	
def main():
	# 文字数を入力
	N = int(input())
	# 黒板に書かれている整数を入力します。
	A = input().split(' ')
	value = 0
	for i in range(N):
		value |= int(A[i])
	C = 0
	if value > 0:
		while (value & 1) == 0:
			C += 1
			value >>= 1

	# 結果を出力します。
	print(C)


if __name__ == '__main__':
	main()

Submission status: Accepted

Solution code:
n=int(input())
a=input()
b=a.split()
O=int(b[0])
Count=0
while O%2==0:
    O/=2
    Count+=1
for i in range(n):
    count=0
    o=int(b[i])
    while o%2==0:
        count+=1
        o/=2
    if count<Count:
        Count=count
print(Count)

Submission status: Accepted

Solution code:
n, a = int(input()) - 1, list(map(int, input().split()))
result = 10 ** 9

for q in range(n):
    count = 0
    while (a[q] % 2) == 0:
        a[q] /= 2
        count += 1
    result = min(count, result)
print(result)