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):
nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(input())
s = lambda: input()

N = n()
A = nl()

res = 1000000000
for a in A:
    count = 0
    while a % 2 == 0:
        a //= 2
        count += 1
    if count < res:
        res = count
print(res)

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

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

Solution (Python):
n = int(input())
alist = [int(a) for a in input().split()]

def div2(b):
  return b//2
count = 0

f = 0
while(1):
  for i in alist:
    if i % 2 == 1:
      f = 1
  if f == 0:
    alist = list(map(div2,alist))
    count+=1
  else:
    break
  
print(count)

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

a_list = [int(a) for a in input().split()]

def calc_div2(n):
    return n//2

c = 0
f = 0
while(1):
    for a in a_list:
        if a%2 == 0:
            pass
        else:
            f = 1
            break
    if f == 1:
        break
    else:
        a_list = list(map(calc_div2, a_list))
        c += 1
print(c)

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 = 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 = 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 = 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(i%2==0 for i in a):
    a = [i/2 for i in a]
    ans += 1
print(ans)

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
count=0
while(1):
    if list(map(lambda x:x%2,a)).count(0)!=n:
        print(count)
        break
    a = list(map(lambda x:x/2,a))
    count += 1

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

min=1000

for i in range(0,n):
    u=min
    ren=h[i]
    while 1:
        if ren%(2**u)!=0:
            u=u-1
            min=u
        else:
            break
    
print(min)

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):

import sys

MOD = 2  

def solve(N: int, A: "List[int]"):

    i = 0
    while True:
        m = 2**(i+1)
        bEnd = False
        for a in A:
            if a % m != 0:
                bEnd = True
                break
        if bEnd:
            break
        i += 1

    print(i)



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    A = [ int(next(tokens)) for _ in range(N) ]  
    solve(N, A)

if __name__ == '__main__':
    main()

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

ans = 10**9
for i in input().split():
    check = int(i)
    if check % 2 == 1:
        print(0)
        exit()
    
    count=0
    while check % 2 == 0:
        check /= 2
        count+=1
    ans=min(ans,count)
    
print(ans)

Solution (Python):
n = input()
list_num = [int(num) for num in input().split()]
 
count = 0
condition = False 
 
while condition == False :
    for num in list_num:
        if int(num % 2) == 1:
            condition = True
            break
            
    if condition == False :
        count += 1
        list_num = list(map(lambda x: int(x / 2), list_num ))

print(count)

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

cnt = 0
while True:
    if list(map(lambda x: x%2 ,INPUT)).count(0) == N:
        INPUT = list(map(lambda x: x/2 ,INPUT))
        cnt = cnt + 1
    else:
        break

print(cnt)

Solution (Python):
def divnum(x):
    y = 0
    while not x%2:
        x/=2
        y+=1
    return y
input();print(min([divnum(int(i)) for i in input().split()]))

Solution (Python):


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

    ans = float("inf")
    for i in range(N):
        ans1 = 0
        while True:
            if A[i]%2 == 0:
                A[i] /= 2
                ans1 += 1
            else:
                break
        ans = min(ans, ans1)
    
    print(ans)

if __name__ == "__main__":
    solve()

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

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

Solution (Python):
import math
n = input()
a = list(map(int, input().split()))
b  = 0
cnt = 0
while "loop":
    for num in a:
        if num % 2 == 1:
            b= 1
    if  b == 0:
            a = [ i	/2 for i in a]
            cnt += 1
    else:
        break
print(cnt)

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

while(1):
  for num  in a:
    if num  % 2 == 1:
      bol = 1

  if bol == 0:
        a = [ i	/2 for i in a]
        count += 1
  else:
          break

print(count)

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

Solution (Python):

N = int(input())
temp = [int(x) for x in input().split()]
ans = []
for t in temp:
  count = 0
  while t%2 == 0:
    t = t/2
    count += 1
  ans.append(count)

print(min(ans))

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

flg = 0
cnt = 0

while (flg == 0):
    for i in a:
        if i%2 == 1:
            flg = 1
    if flg == 1:
        break
    cnt += 1
    a = [i/2 for i in a]

print(cnt)

Solution (Python):


import sys



N = int(sys.stdin.readline().rstrip())
li = [int(x) for x in sys.stdin.readline().rstrip().split()]



flag = True
count = 0
while flag:
  r = 0
  for i in li:
    r = r + int(i%2)

  if r > 0:
    break
  
  count = count + 1

  li = [x/2 for x in li]

print(count)

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):
def abc():
    n = int(input())
    a = list(map(int, input().split()))
    cnt = 0
    while True:
        if len([x for x in a if x % 2]) > 0:
            break
        for i in range(n):
            a[i] //= 2
        cnt += 1
    print(cnt)


abc()

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

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

ans = min(map(x, A))

print(ans)

Solution (Python):
def main():
    N = input()
    A = list(map(int, input().split()))
    count = 0
    flag = False
    while True:
        for x in A:
            if x % 2 != 0:
                flag = True

        if flag:
            print(count)
            break

        A = [x / 2 for x in A]
        count += 1

if __name__ == '__main__':
    main()

Solution (Python):
import sys

def input():
    return sys.stdin.readline().rstrip()

if __name__ == "__main__":
    n = int(input())
    alist = list(map(int, input().split()))
    
    res = float("inf")
    for a in alist:
        b = format(a, "b")
        res = min(res, (len(b)-1) - b.rfind("1"))
    
    print(int(res))

Solution (Python):
import sys
c=int(input())
l=list(map(int,input().split()))
n=0
while(1):
    for i in l:
        if i%2 != 0:
            print(n)
            sys.exit(0)
    n+=1
    l=list(map(lambda i: i/2, l))

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

def is_even(a):
    for num in a:
        if num % 2 != 0:
            return False
    return True

cnt = 0

while is_even(a):
    a = [num / 2 for num in a]
    cnt += 1

print(cnt)

Solution (Python):
n=int(input())
a=input().split()
l=[None]*n
b=[None]*n
for i in range(n):
    l[i]=int(a[i])
s=0
while 1:
    for i in range(n):
        b[i]=l[i]%2
    if 1 in b:
        break
    for j in range(n):
        l[j]=l[j]/2
    s+=1
print(s)

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

divide_num = 0

def all_even(s):
    for i in s:
        
        if i % 2 == 1:
            return False
    return True

while all_even(s):
    for i in range(n):
        s[i] /= 2
    divide_num += 1

print(divide_num)

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

num=0
while max([i%2 for i in b])!=1: 
    b=[i/2 for i in b]
    num+=1

print(num)

Solution (Python):

N = int(input())
counter = 0
arr = [int(i) for i in input().split(" ")]
flag = True
while flag:
    ret = []
    for i in range(len(arr)):
        if arr[i] % 2 == 1:
            flag = False
            break
        arr[i] = arr[i] >> 1
        if arr[i] % 2 == 1:
            counter = counter + 1
            flag = False
            break
    if flag:
        counter = counter + 1

print(counter)

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

Solution (Python):

length = int(input())
numbers = map(int, input().split())







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

ans = min(map(how_many_times_divisible,numbers))


print(ans)

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

n = int(input())
a = map(int, input().split())
ans = min(map(how_many_times_divisible, a))

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):
n = int(input())
a = list(map(int,input().split()))
i = 0
while(1):
	if list(map(lambda x:x%2,a)).count(0)==n:
		i += 1
		a = list(map(lambda x:x/2, a))
	else:
		break
print(i)

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

def gusu(a):
    if a % 2 == 0:
        return a // 2
    else:
        return -1

flag = True
cnt = 0

while flag:
    atai_lis = list(map(gusu,atai_lis))
    if -1 in atai_lis:
        flag = False
    else:
        cnt += 1


print(cnt)

Solution (Python):
N=int(input())
L=list(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, L))
print(ans)

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

Solution (Python):
import bisect
import os
from collections import Counter, deque
from fractions import gcd
from functools import lru_cache
from functools import reduce
import functools
import heapq
import itertools
import math
import numpy as np
import re
import sys

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(2147483647)
INF = float("inf")

N = int(sys.stdin.readline())
A = np.array(list(map(int, sys.stdin.readline().split())))

ans = 0
while (A % 2).sum() == 0:
    A //= 2
    ans += 1
print(ans)

Solution (Python):

N = int(input())
list = input().split(" ")

num_list = []

for num in list:
    num_list.append(int(num))

count = 0
end_flg = 0
while True:
    for i in range(len(num_list)):
        if num_list[i] % 2 == 1:
            end_flg = 1
        else:
            num_list[i] = int(num_list[i]/2)
    if end_flg == 1:
        break
    count += 1

print(count)

Solution (Python):
N = int(input())
lst = [int(x) for x in input().split()]
i = -1
tmp = 0
while tmp == 0:
  tmp = sum([x%2 for x in lst])
  lst = [x/2 for x in lst]
  i += 1
print(i)

Solution (Python):
ccc = int(input())
aaa = list(map(int,input().split()))
           
def hantei(xxx):
    count = 0
    while True:
        for i in range(len(xxx)):
            if xxx[i]% 2 != 0:
                return count
            else:
                xxx[i] = xxx[i] // 2
        count += 1
print(hantei(aaa))

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

ans_count = 0
while(True):
    flag = True
    for x in li:
        if x % 2 != 0:
            flag = False

    if flag:
        li = list(map(lambda x: int(x/2), li))
        ans_count += 1
    else:
        break

print(ans_count)

Solution (Python):
import numpy as np
input()
x = np.array(input().split(),dtype=np.int32)

answer = 0
while (x%2==0).all():
  x //= 2
  answer += 1
print(answer)

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

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

ans = 0
while True:
    for i in range(N):
        
        if data[i] % 2 == 0:
            data[i] = int(data[i]/2)
        else:
            print(ans)
            exit()
    ans += 1

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

ans = 0
while True:
    for i in range(N):
        
        if data[i] % 2 == 0:
            data[i] = int(data[i]/2)
        else:
            print(ans)
            exit()
    ans += 1

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

ans = 0
while True:
    for i in range(N):
        
        if data[i] % 2 == 0:
            data[i] = int(data[i]/2)
        else:
            print(ans)
            exit()
    ans += 1

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

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

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

Solution (Python):
import re  
import sys 


def i_input(): return int(input())
def s_input(): return map(int,input().split())
def l_input(): return list(map(int, input().split()))


n = i_input()
current_a_list = l_input()
count = 0

while 1:
    
    new_a_list = []
    for a in current_a_list:
        if a % 2 == 0:
            new_a_list.append(a // 2)
        else:
            print(count)
            sys.exit()

    count += 1
    current_a_list = new_a_list

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

a = set(a)
cnt = 10**10
for i in a:
    c = 0
    while i%2 == 0:
        i /=2
        c +=1
    cnt = min(cnt,c)

print(cnt)

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

ans = 0

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

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

def check(i):
    count = 0
    while i%2 == 0:
        i = i//2
        count += 1
    return count

ans = 10**9
for i in A:
    ans = min(ans, check(i))

print (ans)

Solution (Python):
n = int(input())
li = list(map(int,input().split()))
split_cnt = 0
p = 0
while p == 0:
    for i in range(len(li)):
        if li[i] % 2 == 1:
            p = 1
            break
        else:
            li[i] = li[i] / 2
    split_cnt += 1
print(split_cnt - 1)

Solution (Python):


n = int(input())

a = list(map(int, input().split()))
ans = 0
tmp = 0
while tmp == 0:
    for i in range(n):
        a[i] = a[i]//2
        if a[i] % 2 == 1:
            tmp += 1
    if tmp >= 1 and ans == 0:
        break
    ans += 1

print(ans)

Solution (Python):
_ = input()
num_list = list(map(int, input().split()))

res = 1000000

for num in num_list:
  count = 0
  
  while(num % 2  == 0):
    num /= 2
    count += 1
  
  if count < res:
    res = count
    
print(res)

Solution (Python):
n = int(input())
a = [int(i) for i in input().split()]
flag = 0
sum = 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:
        sum += 1
print(sum)

Solution (Python):
if __name__ == '__main__':
    N = int(input())
    A = list(map(int, input().split(' ')))
    count = 0
    while True:
        A_b = [x%2 == 0 for x in A]
        if not False in A_b:
            A = list(map(lambda x: x//2, A))
            count += 1
        else:
            print(count)
            break

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

Solution (Python):











import sys
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial
from heapq import heappop, heappush, heappushpop
inf=float('inf')
mod = 10**9+7
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    from functools import reduce
    from fractions import gcd
    N = I()
    A = LI()
    GCD = reduce(gcd, A)
    ans=0
    while GCD % 2 == 0:
        ans += 1
        GCD //= 2
    print(ans)

if __name__ == '__main__':
    main()

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

ans = []
for i in a:
    tmp = 0
    while i % 2 == 0:
        i //= 2
        tmp += 1
    ans.append(tmp)

print(min(ans))

Solution (Python):
from collections import defaultdict

def check(a, pre):
    ans = 0
    while a % 2 == 0:
        ans += 1
        a //= 2
        if ans == pre:
            break
    return ans


def main():
    num = int(input())
    data = list(map(int, input().split()))

    ans = check(data[0], 10 ** 10)
    for i in range(1, num):
        ans = min(ans, check(data[i], ans))
    print(ans)


if __name__ == '__main__':
    main()

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

ans = [0]*N

for i in range(N):
    while A[i]%2==0:
        A[i] //= 2
        ans[i] += 1

print(min(ans))

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

n_operation = 0
while True:
  new_A_list = []
  for A in A_list:
    if A % 2:
      print(n_operation)
      exit()
    else:
      new_A_list.append(A // 2)
  
  A_list = new_A_list
  n_operation += 1

Solution (Python):
N = int(input())
L = [int(i) for i in input().split()]
ct = 0
i = 0
while(i <= N):
  if i == N:
    ct += 1
    i = 0
  elif L[i] % 2 == 0:
    L[i] //= 2
    i += 1
  else:
    print(ct)
    break

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

    ans = min(ans, ans_i)

print(ans)

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

print(count - 1)

Solution (Python):

N = input()

lst_A = input().split()

ans = 0

flag = True

for i in range(len(lst_A)):
    lst_A[i] = int(lst_A[i])

while 1:
    for i in range(len(lst_A)):
        W = lst_A[i] % 2
        if W == 1:
            flag = False
            break

    if flag == False:
        break

    for i in range(len(lst_A)):
        lst_A[i] = lst_A[i] / 2

    ans += 1

print(ans)

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

Solution (Python):
int(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 = [int(i) for i in input().split()]
cnt = 0    
flag = 1

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

def check(li):
    for i in li:
        if i%2 != 0:
            return 0
        else:
            continue
    return 1
    
flag = check(A)
while flag == 1:
    A = list(map(calc_half, A))
    cnt += 1
    flag = check(A)
print(cnt)

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

def d(a, c):
    for index, item in enumerate(a):
        if item % 2 == 0:
            a[index] = int(item / 2)
        else:
            return c
    c += 1
    return d(a, c)

print(d(a, c))

Solution (Python):
import copy
n=int(input())
a=input().split(" ")
count = 0
t=True
while t:
  b=[]
  for j in a:
    if int(j)%2 == 0:
      b.append(int(j)/2)
    elif int(j)<2:
      t=False
    else:
      t=False
  if t==False:
    break
  count = count+1
  a=copy.deepcopy(b)
print(count)

Solution (Python):
import sys

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

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

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

print(count)

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

while 1:
  for i in range(n):
    if a[i]%2 == 1:
      flag = False
      break
    else:
      a[i] = a[i]//2
      if i == n-1:
        counter += 1
  if flag == False:
  	break
  
print(counter)

Solution (Python):
import numpy as np

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

Solution (Python):
import numpy as np

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

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

Solution (Python):
n=int(input())
a= list(input().split())
a= [int(i) for i in a]
inc = 0

while len([i for i in a if i % 2 == 0]) == n :
    a = [i / 2  for i in a ]
    inc +=1

print(inc)

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

cnt = 0
cnt_li = []
for i in range(N):
    cnt = 0
    while A[i]%2 == 0:
        cnt += 1
        A[i] = A[i] / 2
    cnt_li.append(cnt)
print(min(cnt_li))

Solution (Python):
_ = input()
data_list = [int(e) for e in input().split()]
cnt = 0
end_flag = False
for i in range(10000):
    for i in range(len(data_list)):
        if data_list[i] % 2 == 0:
            data_list[i] /= 2
        else:
            end_flag = True
            break
    if end_flag == True:
        break
    else:
        cnt += 1
print(cnt)

Solution (Python):
N = int(input())
s = list(map(int,input().split()))
count = 0
while(1):
    for x in range(N):
        if s[x]%2!=0:
            print(count)
            exit()
    count += 1
    s = [x//2 for x in s]

Solution (Python):
def is_even(list):
    ans = True
    for i in list:
        if i % 2 != 0:
            ans = False
            break
    return ans            

def devide(list):
    ans = 0
    if is_even(list):
        next_list = [i/2 for i in list]
        ans = devide(next_list)
        ans = ans + 1
    return ans


N = int(input())
list = [int(s) for s in input().split()]

answer = devide(list)

print(answer)

Solution (Python):
n = int(input())
a = 10 ** 9
for b in map(int,input().split()):
    i = 0
    c = int(b)
    while c // 2 == c / 2:
        i = i + 1
        c = c/2
    if i < a:
        a = i

print(a)

Solution (Python):
ans, l, a = 0, int(input()), list(map(int, input().split()))

while len(list(filter(lambda x:x%2==0, a)))==l:
    a = list(map(lambda x:x//2, a))
    ans += 1
print(ans)

Solution (Python):
str = input()
N = int(str)

A = []
str = input().split()
for i in range(N):
    A.append(int(str[i]))

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

print(cnt)

Solution (Python):

n = int(input())
num = [ int(v) for v in input().split() ]
def pow_2(m):
	t = 0
	while m % 2 == 0:
		m //= 2
		t += 1
	return t


num = [ pow_2(i) for i in num ]
print(min(num))

Solution (Python):
import numpy as np

length = int(input())
nums = np.array(list(map(int, input().split())))
count = 0
while (nums % 2 == 0).all():
    count += 1
    nums = nums // 2

print(count)

Solution (Python):
import sys
def recurcive(n,length,result):
    tmp=[]
    for _ in range(length):
        if n[_]%2==0:
            tmp.append(int(n[_]/2))
            
        else:
            print(result)
            sys.exit()
            
    
    result+=1
    
    recurcive(tmp,length,result)

    

length=int(input())
n=list(map(int,input().split(" ")))
recurcive(n,length,0)

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

res = float('inf')

for i in range(N):
    count = 0

    while A[i] % 2 == 0:
        A[i] /= 2
        count += 1

    if res > count:
        res = count

print(res)

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

count = 0
flg = True

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

Solution (Python):
n=int(input())
l=list(map(int,input().split()))
c=0
while True:
  l1=[]
  for item in l:
    if item%2==0:
      l1.append(item/2)
  if len(l1)==n:
    l=l1
    c+=1
  else:
    break
print(c)

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

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

Solution (Python):

n = int(input())
an = list(map(int, input().split()))
count = 0
while True:
	amari = list(map(lambda x: x % 2, an))
	an = list(map(lambda x: x / 2, an))
	if 1 in amari:
		break
	else:
		count += 1
print(count)

Solution (Python):
import sys
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def MI(): return map(int, sys.stdin.readline().split())
def II(): return int(sys.stdin.readline())


n = II()
a = LI()
cnt = 0
while all(num % 2 == 0 for num in a):
    cnt += 1
    a = list(map(lambda x: x // 2, a))
print(cnt)

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

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

Solution (Python):
ans = 10**9
a = int(input())
b = list(map(int,input().split()))
for i in b:
  num = 0
  while i%2 == 0:
    i //= 2
    num += 1
  if num < ans:
    ans = num
print(ans)

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

for i in range(N):
    number = A[i]
    multiplier = 0
    while True:
        if number % 2 == 0:
            multiplier += 1
            number /= 2
        else:
            break
    multiplier_list.append(multiplier)
print(min(multiplier_list))

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
ans=[]
for i in range(len(a)):
    cnt=0
    m=a[i]
    while m%2==0:
        cnt+=1
        m//=2
    ans.append(cnt)
print(min(ans))