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

Solution (Python):
N = int(input())
A = [int(i) for i in input().split()]
ans = 0
flag=True
while flag:
  for a in A:
    if a%2 == 1:
      flag = False
  if not flag:
    break
   
  ans+=1
  for i in range(N):
    A[i] = A[i] // 2

print(ans)

Solution (Python):
N=int(input().strip())
A=list(map(int,input().split()))
ct=0
while sum(i%2 for i in A)==0:
    ct+=1
    A=[i//2 for i in A]
print(ct)

Solution (Python):
input()
a = [int(x) for x in input().split()]
count = 0
while True:
    for i in range(len(a)):
        if(a[i]%2 == 0):
            a[i] = a[i]/2
        else:
            print(count)
            exit()
    count = count + 1

Solution (Python):
n=int(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(ans)

Solution (Python):


import numpy
import re
import math

def main():
	"""
	テストコード実行
	:return:
	"""
	n = 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))

if __name__ == '__main__':
	main()

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

Solution (Python):
N = int(input())
A = map(int, input().split())
counter = []
for a in A:
    count = 0
    while True:
        if a % 2 != 0:
            counter.append(count)
            break
        count += 1
        a = int(a / 2)

print(min(counter))

Solution (Python):
n = int(input())
l = list(map(int,input().split()))
k = 0
m = 0
for _ in range(100):
    for i in range(len(l)) :
        if l[i] % 2 != 0  :
            m = 10
            break
        else:
            l[i] = l[i]/2
    if m != 0 :
        break
    k += 1
print(k)

Solution (Python):
N = input()
integers=list(map(int, input().split()))
count = 0

def Judge(integersList):
    for i in range(len(integersList)):
        if integersList[i]%2 == 0:
            pass
        else:
            return False
    return True

while True:
    if Judge(integers):
        for i in range(len(integers)):
            replacement = integers[i]/2
            integers[i] = replacement
        count+=1
    else:
        break

print(count)

Solution (Python):
cnt = int(input())

nums = input().split()
calc_cnt = 0

n = sum(int(x) % 2 == 0 for x in nums)

while n == cnt:
    for i in range(cnt-1):
        nums[i] = int(nums[i]) / 2
    calc_cnt += 1
    n = sum(int(x) % 2 == 0 for x in nums)
print(calc_cnt)

Solution (Python):
N = int(input())
lis = [int(i) for i in input().split()]

cnt = 0
j = 0
flag = True

while(flag):
    if(j == N-1):
        cnt = cnt + 1
        j = 0
    elif(lis[j]%2 == 1):
        flag = False
    else:
        lis[j] = lis[j]/2
    
    j = j + 1

print(cnt)

Solution (Python):
def num_2n(i):
    count = 0
    while(i % 2 == 0):
        i = i / 2
        count += 1
    return count



def main():
    num_ans = int(input())
    ans_list = list(map(int, input().split()))
    num_2n_list =[]
    for i in ans_list:
        num_2n_list.append(num_2n(i))
    num_2n_list.sort()
    print(num_2n_list[0])


if __name__ == '__main__':
    main()

Solution (Python):
input()
n=eval(input().replace(' ','|'))
print(len(bin(n&-n))-3)

Solution (Python):
N = int(input())
A = [int(i) for i in input().split()]
count = 10**9

def cal(num):
    sum = 0
    while True:
        if num % 2 == 0:
            sum += 1
            num /= 2
        else:
            break
    return sum

for i in range(N):
    count = min(cal(A[i]), count)
print(count)

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

Solution (Python):

N = int(input())

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

loop = 1000000
for a in A:
    num = 0
    b = a
    while True:
        if b%2 == 0:
            num += 1
            b /= 2
        else:
            break
    loop = min(num,loop)

print(loop)

Solution (Python):
n=input()
x=list(map(int,input().split()))

i = 0
while all(map(lambda x:x%2==0, x)):
	x= list(map(lambda x:x/2, x))
	i += 1

print(i)

Solution (Python):
import math
n = 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))

Solution (Python):



_ = input()
ans = 0

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

flag = True

while 1:
    for v in a:
        if v % 2 == 0:
            pass
        else:
            flag = False
            break
    
    if flag == False:
        break
    
    a = [i/2 for i in a]
    ans += 1

print(ans)

Solution (Python):
N = int(input())
charA = input().split()

A = []
for i in range(N):
    A.append(int(charA[i]))

count = -1
finalA = [0]*N
         
even = True
while(even):
    for i in range(N):
        if (A[i]%2 == 1):
            even = False
    for i in range(N):
        A[i] = A[i]/2
    count = count +1

print(count)

Solution (Python):
import numpy as np

_ = input()
arr = np.array(list(map(int, input().split())))

cnt = 0
while True:
    if ((arr / 2) == np.ceil(arr / 2)).all():
        cnt += 1
        arr = arr/2
    else:
        break
print(cnt)

Solution (Python):
def judge_odd():
    for i in a:
        if i % 2 == 1:
            return True
    return False


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

cnt = 0
while True:
    if judge_odd():
        break
    for idx, v in enumerate(a):
        a[idx] = v // 2
    cnt += 1
print(cnt)

Solution (Python):
if __name__ == '__main__':
    n = input()
    li = list(map(int, input().split(' ')))
    ans = float('inf')

    while li != []:
        li_value = li.pop()
        cnt = 0
        while li_value % 2 != 1:
            cnt += 1
            li_value /= 2
        ans = min(ans, cnt)
    print(ans)

Solution (Python):
import math
n = 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))

Solution (Python):
if __name__ == '__main__':
    n = input()
    li = list(map(int, input().split(' ')))
    flag, cnt = True, 0

    while flag:
        for list_index in range(len(li)):
            value = li[list_index]
            if value % 2 == 0:
                li[list_index] /= 2
            else:
                flag = False
                break

        if flag:
            cnt += 1

    print(cnt)

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

  else:
    count -= 1
    break


print(count)

Solution (Python):




def even(num):
    if num % 2 == 0:
        return num / 2
    else:
        return False

if __name__ == '__main__':

    n = input()
    a = map(int, input().split())
    count = 0

    while True:
        new = [0 if even(i) == False or even(i) == 0 else even(i) for i in a]
        if 0 in new:
            break
        a = new
        count += 1
    print(count)

Solution (Python):
import math
n = 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))

Solution (Python):
N = int(input())
A = [int(a) for a in input().split()]
cnt = 0
while True:
  for i in range(N):
    if A[i] % 2 == 1:
      print(cnt)
      exit(0)
    else:
      A[i] = A[i] // 2
  cnt += 1

Solution (Python):
N =input()
A = list(map(int,input().split()))
cnt=0
ans=0
wh=1
while(wh==1):
    for j in range(len(A)):
        if A[j]%2==0:
            cnt+=1
            A[j]/=2
        else: wh=0
        if (j==len(A)-1 and cnt==len(A)):
            cnt=0
            ans+=1
print(ans)

Solution (Python):
input_num = input()
input = input().split()

times = 0
i = 0
    
while True:
  if int(input[i]) % 2 == 0:
    input[i] = int(input[i]) / 2
    i += 1
    if i == int(input_num) - 1:
      i = 0
      times += 1
  else:
    break
print(times)

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

n = 0
while list(map(lambda x:x%(2**(n+1)),A)).count(0) == N:
    n += 1
print(n)

Solution (Python):
def check(numbers, count):
  if all([num % 2 == 0 for num in numbers]):
    numbers = [num / 2 for num in numbers]
    count += 1
    count = check(numbers, count)
  return count

length = input('')
numbers = [int(num) for num in (input('')).split()]
count = check(numbers, 0)
print(count)

Solution (Python):
count = int(input())
ans=0
int_list = list(map(int,input().split()))
even_list = [i for i in int_list if i%2 ==0]
if len(even_list) != count:
    print("0")
else:
    while len([i for i in even_list if i%2 ==0]) == count:
        even_list = [i/2 for i in even_list]
        ans+=1
    print(ans)

Solution (Python):
ans = 10**9
N = int(input())
a = list(map(int,input().split()))

for b in a:
    count = 0
    while b%2 == 0:
        count += 1
        b = b//2
    ans = min(ans, count)
print(ans)

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

Solution (Python):
N = int(input())
A = [int(a) for a in input().split()]
n = 0
flag = True
while flag:
  for i in range(N):
    if (A[i] % 2) == 0:
      A[i] /= 2
    else:
      flag = False
      break
  if flag:
    n += 1
print(n)

Solution (Python):
import math

ignore = input()
num = map(int,input().split())
score = []
for i in num:
    temp = i
    while i%2 == 0:
        i = i/2
    score.append(temp/i)
print(int(math.log(min(score),2)))

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

temp = A
counter = 0
canDevide = list(map(lambda x:x%2, temp))
while canDevide.count(0) == N:
    counter = counter + 1

    temp = list(map(lambda x: x / 2, temp))
    canDevide = list(map(lambda x:x%2, temp))
print(counter)

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
count = 0
flag = True
while flag == True:
    for num in range(N):
        if A[num] % 2 == 0:
            A[num] /= 2
        else:
            flag = False
            count -= 1
            break
    count += 1
print(count)

Solution (Python):
import fractions
from functools import reduce


def factorize(n):
    fct = []  
    b, e = 2, 0  
    while b * b <= n:
        while n % b == 0:
            n = n // b
            e = e + 1
        if e > 0:
            fct.append((b, e))
        b, e = b + 1, 0
    if n > 1:
        fct.append((n, 1))
    return fct


def reduce_gcd(numbers):
    return reduce(fractions.gcd, numbers)


def main():
    N = int(input())
    A_N = list(map(int, input().rstrip().split()))
    gcd = reduce_gcd(A_N)
    factorized = factorize(gcd)
    if factorized:
        print(factorized[0][1])
    else:
        print('0')


if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
A = list(map(int, input().split(' ')))
num = [0] * N
for i, m in enumerate(A):
    cnt = 0
    while m % 2 == 0:
        m = m // 2
        cnt += 1
    num[i] = cnt
print(min(num))

Solution (Python):
N = int(input())
a = [int(i) for i in input().split()]
ans = 0
A = True
while(A):
    for i in range(N):
        if (a[i]%2 == 1):
            A = False
        else:
            a[i]= a[i]//2
    ans += 1

print(ans-1)

Solution (Python):
n=int(input())
aa=list(map(int,input().split(" ")))




j=True
i=0
while j:
    for a in aa:
        if a%2!=0:
            j=False

    if j:
        for k in range(n):
            aa[k]=aa[k]/2

        i+=1
print(i)

Solution (Python):
N = int(input())
A = [int(i) for i in input().split()]
i,counter = 0,0
divCheck = False
while True:
    i = 0
    for i in range(0,N):
        if A[i] % 2 == 0:
            A[i] /= 2
        else:
            divCheck = True
    if divCheck:
        break
    counter += 1
print(counter)

Solution (Python):
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)

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
count_a = [0 for i in range(N)]
key = max(A)
for i in range(N):
    while True:
        if A[i] % 2 != 0:
            break
        A[i] /= 2
        count_a[i] += 1
        if count_a[i] > key:
            break
    key = count_a[i]

        
print(min(count_a))

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
count_a = [0 for i in range(N)]
for i in range(N):
    while True:
        if A[i] % 2 != 0:
            break
        A[i] /= 2
        count_a[i] += 1
    
print(min(count_a))

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
count = 0
NO = 0
while True:
    for i in range(N):
        if A[i] % 2 == 0:
            A[i] = A[i] / 2
        else:
            NO = 1
            break
    if NO == 1:
        break
    count += 1
    
print(count)

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

cnt = 0
flag = True
while True:
    cnt += 1
    for i in range(n):
        if a[i] % (2**cnt) != 0:
            flag = False
    if flag ==False:
        break
print(cnt-1)

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

Solution (Python):
input();print(min(j.index("1") for j in (tuple(bin(int(i))[::-1]) for i in input().split())))

Solution (Python):
n = int(input())
s = [int(i) for i in input().split()]
count = 0
while True:
    tmp = []
    for i in s:
        if i % 2 == 0:
            tmp.append(i/2)
        else:
            print(count)
            exit()
    count += 1
    s = tmp[:]

Solution (Python):
def counter(x):
    
    if x%2 == 0:
        return 1 + counter(x/2)
    else:
        return 0

n = int(input()) 
a = [int(i) for i in input().split()] 
b = [counter(i) for i in a]
print(min(b))

Solution (Python):
N=int(input())
q=10**9
for i in list(map(int,input().split())):
    s=0
    while i%2==0:
        i/=2
        s+=1
    q=min(s,q)  
print(q)

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
cnt = 0
flag = True

def calc_half(n):
    return n / 2

while flag:
    for i in a:
        if i % 2 == 1:
            flag = False
    if flag:
        a = list(map(calc_half, a))
        cnt += 1
print(cnt)

Solution (Python):
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)

Solution (Python):
n = int(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))

Solution (Python):
N = int(input())
listA =input().split(' ')
count = 0
for i in range(len(listA)):
    listA[i]=int(listA[i])

flag = False
while True:
    for i in listA:
        if int(i)%2!=0:
            flag=True

    if flag==True:
        break


    for j in range(N):
        listA[j] = int(listA[j])/2
    count+=1

print(count)

Solution (Python):
n = int(input())
a = [int(i) for i in input().split()]
t = 1
while a[0]%(t*2)==0:
    t *= 2
for k in range(1,n):
    while a[k]%t != 0:
        t = t//2
r = 0
while t != 1:
    t = t//2
    r += 1
print(r)

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

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
c = 0
while True:
    flag = False
    for i, x in enumerate(a):
        if x % 2 == 0:
            a[i] /= 2
        else:
            flag = True
            break
    if flag:
        break
    else:
        c += 1
print(c)

Solution (Python):
n = input()
a = list(map(int, input().split()))
ans=[]
for x in a:
    t=0
    k=0
    while(t==0):
        if x%2==0:
            k+=1
            x=x//2
        else:
            t=1
    ans.append(k)

print(min(ans))

Solution (Python):
x = int(input())
nums = list(map(int,input().split()))

count = 0
flag = 1

while flag == 1:
    for i in range(len(nums)):
        x = nums[i]%2
        if x == 0:
            nums[i] = nums[i]/2
            continue
        else:
            flag = 0
            break
    if flag == 1:
        count = count+1

print(count)

Solution (Python):
N = int(input())
alines = input().split(' ')

num = list(map(int, alines))
c = -1

while 0 not in num:
	c += 1
	num = list(map(lambda x: x/2 if x%2 == 0 else 0, num))

print(c)

Solution (Python):
N = int(input())
A_list = list(map(int, input().split(' ')))
assert len(A_list) == N

count = 0
while sum([A % 2 for A in A_list]) == 0:
    count += 1
    A_list = [A // 2 for A in A_list]

print(count)

Solution (Python):
input()
numbers = list(map(lambda x: int(x), input().split(" ")))

min = -1
for number in numbers:
    count = 0
    while number%2 == 0:
        count += 1
        number /= 2
    if count < min or min == -1:
        min = count
print(min)

Solution (Python):
n = int(input())
a = list(map(int, input().split(" ")))
sum = -1
flag = 0
while flag == 0:
    for i in range(n):
        if a[i]%2 == 1:
            flag = 1
            break
        a[i] = a[i]/2
    sum += 1
print(sum)

Solution (Python):
input()
def f(n,c=0):
    while n&1==0:
        n>>=1
        c+=1
    return c
print(min([f(n)for n in map(int,input().split())]))

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

i=0
while(True):
    if len(list(filter(lambda x:x%2==1,A)))>0:
        break
    else:
        A = list(map(lambda x:x//2,A))
        i+=1
        
print(i)

Solution (Python):
def abe(n):
    count = 0
    while n % 2 ==0:
        n = n / 2
        count += 1
    return count

x = int(input())
y = map(int,input().split())
z = min(map(abe,y))
print(z)

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
min = 30
for i in a:
        j=0
        while i%2==0:
                i/=2
                j+=1
        if j < min:
                min=j
print(min)

Solution (Python):
n = int(input())

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

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

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

count = 0

b = []

for i in range(len(a)):
    b.append(a[i] % 2)
    
c = []

for i in range(len(a)):
    c.append(0)
    
while b == c:
    count = count + 1
    for i in range(len(a)):
        if a[i] % 2 ==1:
            break
        else:
            dd = a[i]
            a[i] = dd /2
    b.clear()
    for i in range(len(a)):
        b.append(a[i] % 2)
print(count)

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
ans = -1
f = 1

while f:
    ans += 1
    for k in range(N):
        if A[k]%2 == 0:
            A[k]//=2
        else:
            f = 0

print(ans)

Solution (Python):
N = int(input())
A = [int(i) for i in input().split()]
B = [0]*N
for i in range(N):
    while A[i] % 2 == 0:
        B[i] += 1
        A[i] /= 2

print(min(B))

Solution (Python):
N = int(input())
A = list(map(int,input().split()))
c = 0
while 1:
    if list(map(lambda x: x%2, A)) == [0 for _ in range(N)]:
        A = list(map(lambda x: x//2, A))
        c += 1
    else:
        break
print(c)

Solution (Python):
_ = input()
nums = list(map(int, input().split()))
count = 0
while all(map(lambda x: x % 2 == 0, nums)):
    count += 1
    nums = list(map(lambda x: x / 2, nums))
print(count)

Solution (Python):
input()

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

f1 = lambda x: x % 2 == 1
f2 = lambda x: x // 2

count = 0

while True:
    if any(map(f1, A)):
        break
    A = list(map(f2, A))
    count += 1

print(count)

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

def cnt(li, c):
    arr = []
    for i in li:
        arr.append(i/2)
        if i%2!=0: return c
    return cnt(arr, c+1)

print(cnt(a,0))

Solution (Python):
n = input()
ls = list(map(int, input().split()))

count = 0
is_succses = True

while is_succses:
	count += 1
	for i, x in enumerate(ls):
		if x % 2 == 0:
			is_succses = True
			ls[i] = int(x / 2)
		else:
			is_succses = False
			break

print(count - 1)

Solution (Python):
import math
n = 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))

Solution (Python):
number_of_list = int(input())
lists = map(int, input().split())

def n2(n):
    counter = 0
    while n % 2 == 0:
        n = n / 2
        counter += 1
    return counter

lists_n2 = list(map(n2, lists))
print(min(lists_n2))

Solution (Python):
import sys

s_args = sys.stdin.read().splitlines()


a = [int(s_a) for s_a in s_args[1].split(' ')]

lsb = [ai & -ai for ai in a]

print(min(lsb).bit_length() - 1)

Solution (Python):
def judgeeven(lst):
	m = len(lst)
	for i in range(0, m):
		if lst[i] % 2 != 0: return False
	
	return True

n = int(raw_input())
inpt = map(int, raw_input().split())
cnt = 0

while judgeeven(inpt):
	for i in range(0, n):
		inpt[i] = inpt[i] / 2
	cnt = cnt + 1

print cnt

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

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

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
ans = 30
for i in range(N):
  cnt = 0
  while A[i] % 2 == 0:
    A[i] /= 2
    cnt += 1
  ans = min(ans, cnt)
print(ans)

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

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

if __name__ == '__main__':
    print(main())

Solution (Python):
N = input()
a = [int(x) for x in input().split()]

count = 0
while True:
    b = list(map(lambda x: x % 2, a))
    if 1 in b:
        break
    a = list(map(lambda x: x // 2, a))
    count += 1
print(count)

Solution (Python):
from math import log2;from fractions import gcd;from functools import reduce;input();print(int(log2(reduce((lambda x, y: gcd(x, y)), [int(s) for s in input().split(" ")] + [2 ** 31]))))

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

n=[0]*N
for i in range(N):
    while A[i]%2==0:
        n[i]+=1
        A[i]=A[i]/2
        
print(min(n))

Solution (Python):
N =int(input())
array=list(map(int, input().split()))

x=[]

for i in array:
    count = 0
    while i%2==0:
        i=i/2
        count = count +1
    x.append(count)
print(min(x))

Solution (Python):


n = int(input())
nums = [int(x) for x in input().split()]
count = -1
flag = 0
while(True):
    count += 1
    for i in range(n):
        if nums[i] % 2 == 0:
            nums[i] = nums[i] / 2
            
        else:
            flag = 1
    if flag == 1:
        break
print(count)

Solution (Python):
def aaa(n):
    cnt = 0
    while n % 2 == 0:
        n /= 2
        cnt += 1
    return cnt
n = int(input())
a = map(int, input().split())
cnt = min(map(aaa, a))
print(cnt)

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

result = 0

while True:
    temp_a = []
    for num in a:
        if num%2 == 0:
            temp_a.append(num//2)
    if len(temp_a) != n:
        break
    a = temp_a
    result += 1

print(result)

Solution (Python):
N = int(input())
nums = list(map(int, input().split()))
cnt = 0

while True:
    for idx, num in enumerate(nums):
        if num % 2 == 0:
            num //= 2
            nums[idx] = num
        else:
            print(cnt)
            exit()
    cnt += 1

Solution (Python):
def judge_even():
    for i in range(len(n_list)):
        if n_list[i]%2 == 0:
            n_list[i] = n_list[i]//2
        else:
            return False
    return True


if __name__ == '__main__':
    _ = int(input())
    n_list = [int(n) for n in input().split()]

    count = 0
    while True:
        if judge_even():
            count += 1
        else:
            break

    print(count)

Solution (Python):
a=input()
a=int(a)
l=list(map(int,input().split(" ")))
m=100
for i in l:
  temp=i
  for j in range(40):
    if temp%2==0:
      temp/=2
    else:
      if j<m:
        m=j
      break
print(m)

Solution (Python):

n = int(input())
nums = [int(i) for i in input().split()]

even_nums = list(filter(lambda x: x % 2 == 0, nums))

divide_num = 0
while len(even_nums) == n:
    even_nums = list(map(lambda x: x / 2, even_nums))
    divide_num+=1
    even_nums = list(filter(lambda x: x % 2 == 0, even_nums))

print(divide_num)

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

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
b = 2

counter = 0
while True:
    flag = True
    for i in range(n):
        if a[i] % b != 0:
            flag = False
            break
    
    if flag == False:
        break
    counter = counter + 1
    b = b * 2
print(counter)

Solution (Python):
n = input()
ls = list(map(int, input().split()))

cnt = ''
for idx in range(0,len(ls)):
    buf = 0
    while ls[idx] % 2 ==0:
        ls[idx] /= 2
        buf += 1
    if cnt == '' or  buf < cnt:
        cnt = buf
print(cnt)

Solution (Python):
import math
import sys

def getinputdata():

    
    array_result = []
    
    data = input()

    
    array_result.append(data.split(" "))

    flg = 1

    try:


        while flg:

            data = input()

            array_temp = []

            if(data != ""):
                
                array_result.append(data.split(" "))

                flg = 1

            else:

                flg = 0
    finally:


        return array_result





arr_data = getinputdata()

n = int(arr_data[0][0])
arr = arr_data[1]

arr2 = list(map(int, arr))




mycnt = 0

chkflg = True

while chkflg:

    arr_temp=[]
    for v in arr2:

        if(v % 2 == 1):

            chkflg = False

        else:

            arr_temp.append(v / 2)

    else:
        
        if chkflg:
            
            mycnt+=1
        
        arr2 = arr_temp
        
print(mycnt)

Solution (Python):
N = input()
l = list(map(int, input().split()))
counter = 0

def is_all_even(l):
    le = list(filter(lambda x:x % 2 == 0, l))
    return len(l) == len(le)

while is_all_even(l):
    counter += 1
    l = [i/2 for i in l]

print(counter)

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
num = 10000
for i in range(n):
    rec = 0
    j = 2
    while a[i] % j == 0:
        j *= 2
        rec += 1
        if rec >= num:
            break

    num = min(rec, num)

print(num)

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

Solution (Python):
input()
def f(n,c=0):
    while n&1==0:
        n>>=1
        c+=1
    return c
print(min([f(n)for n in map(int,input().split())]))

Solution (Python):


def fact_of_two(i):
    for j in range(10000):
        if i % (2 ** j) != 0:
            break
    assert j >= 1
    return j - 1

n = int(input())
ai = list(map(int, input().split()))
assert len(ai) == n

mi = 999999
for a in ai:
    mi = min(mi, fact_of_two(a))

print(mi)

Solution (Python):


_ = int(input())
array = list(map(int, input().split()))
currentMinI = 30 
for n in array:
    i = 0
    while i < currentMinI and (n & (1 << i)) == 0:
        i += 1
    currentMinI = min(currentMinI, i)
print(currentMinI)

Solution (Python):


N = int(input())
array = list(map(int, input().split()))
currentMinI = 30 
for n in array:
    i = 0
    while (n & (1 << i)) == 0:
        i += 1
    currentMinI = min(currentMinI, i)
print(currentMinI)

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

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
ans = 1000000007

for i in a:
    tmp = 0
    while (i % 2 == 0 and i > 0):
        tmp += 1
        i /= 2
    
    ans = min(ans, tmp)

print(ans)

Solution (Python):
from functools import reduce

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

cnt = 0
while reduce(lambda x, y: x and y, [n % 2 == 0 for n in A]):
    A = [n // 2 for n in A]
    cnt += 1

print(cnt)

Solution (Python):
import math
n = 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(ans)

Solution (Python):


def devide_recursive(a, count):
    for number in a:
        if number % 2 != 0:
            return count
    count += 1
    return devide_recursive(list(map(lambda x: x / 2, a)), count)

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

    count = devide_recursive(a, 0)
    print(count)

if __name__ == '__main__':
    main()

Solution (Python):
N=int(input())
nums=list(map(int,input().split()))

def discriminant(n):
    count=0
    while n%2==0:
        n//=2
        count+=1
    return count

for i in range(N):
    nums[i]=discriminant(nums[i])

print(min(nums))

Solution (Python):
import math
num = int(input())
s = list(map(int, input().split()))
ans = float('inf')

for i in s:
    ans = min(ans, len(bin(i)) - bin(i).rfind("1") - 1)
print(round(ans))

Solution (Python):
import math
n = 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))