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

Solution (Python):

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

i = 1
while True:
    for a in A:
        if a % (2**i) == 0:
            pass
        else:
            print(i-1)
            exit()
    i += 1

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

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

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

res = float('inf')

for i in A:
    cnt = 0
    while True:
        if i % 2 == 1:
            if cnt == 0:
                print(0)
                exit()
            elif cnt < res:
                res = cnt
                break
            else:
                break
        i = i // 2
        cnt += 1

print(res)

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

minno = 10 ** 9

for x in a:
    cheknow = 0
    while x % 2 == 0:
        x = x / 2
        cheknow += 1
    if cheknow < minno:
        minno = cheknow
print(minno)

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

flag = False
doit = 0
while flag == False:
    counter = 0
    for x in a:
        if x % 2 == 1:
            flag = True
        else:
            a[counter] = x / 2
            counter += 1
    doit += 1
print(doit - 1)

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:
      A[i]//=2
    else:
      print(ans)
      exit()
  ans+=1

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

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

print(min(map(devisible, A)))

Solution (Python):
N = int(input())
A = input().split()
result = 0
count = False
while count == False:
    if (A == ([0] * N or ["0"] * N)): break
    for i in range(N):
        if (int(A[i]) % 2 != 0): count = True
        A[i] = int(A[i]) / 2
    if (count == True): break
    result += 1

print(result)

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

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

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

print(cnt)

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
ans=float('inf')
for i in range(n):
  res=0
  while a[i]%2==0:
    a[i]/=2
    res+=1
  ans=min(ans,res)
print(ans)

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

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

Solution (Python):
N = int(input())
Alist = list(map(int, input().split()))
answer = 40
for a in Alist:
    i = 0
    while a % 2 == 0:
        a = a / 2
        i += 1
    if i < answer:
        answer = i
print(answer)

Solution (Python):
n = int(input())
print(min(bin(int(i))[::-1].find("1") for i in input().split()))

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

cnt = 0

while True:
    for i in range(N):
        if nums[i] % 2 == 1:
            result = "Odd"
            break
        else:
            result = "Even"
            nums[i] /= 2
    if result == "Odd": break
    cnt += 1
print(cnt)

Solution (Python):
n = input()
nums = [int(i) for i in input().split(" ")]

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

counter = 0
while(is_even(nums)):
  counter += 1
  nums = [n/2 for n in nums]
print(counter)

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

for i in range(n):
    if c[i]%2!=0:
        print(0)
        exit()

while f==0:
    for i in range(n):
        c[i]=c[i]/2
        if c[i]%2!=0:
            ans+=1
            print(ans)
            exit()
    ans+=1

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

    count += 1

print(count)

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

Solution (Python):
N = 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())
ai=list(map(int,input().split()))
b=[]
for a in ai:
  count =0
  while a%2==0 :
    count+=1
    a/=2
  b.append(count)
print(min(b))

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

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


def how_many_times(N):
    exp = 0
    while N % 2 == 0:
        N //= 2
        exp += 1
    return exp

result = min(map(how_many_times, A))
print(result)

Solution (Python):
N = input()
A = [int(x) for x in input().split()]
def cnt(x):
    i = 0
    while x%2 == 0:
        x //= 2
        i += 1
    return i
ans = min(cnt(a) for a in A)
print(ans)

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


def how_many_times(N):
    exp = 0
    while N % 2 == 0:
        N //= 2
        exp += 1
    return exp

result = min(map(how_many_times, A))
print(result)

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


def how_many_times(N):
    exp = 0
    while N % 2 == 0:
        N //= 2
        exp += 1
    return exp

result = min([how_many_times(v) for v in A])
print(result)

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

def how_many_times_divisible_of_two(N):
    exp = 0
    while N % 2 == 0:
        N //= 2
        exp += 1
    return exp

result = min([how_many_times_divisible_of_two(v) for v in A])
print(result)

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
ans = 0
while True:
    if all(map(lambda x: x % 2 == 0, A)):
        ans += 1
        A = list(map(lambda x: x/2,A))
    else:
        break
print(ans)

Solution (Python):
n = 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 = input()
A = list(map(int,input().split()))
c = 0
d = -1
while c>d:
  d+=1
  for i in A:
    if i%2 == 0:
      continue
    else :
      print(c)
      break
  else :
    A=list(map(lambda x :x/2,A))
    c += 1

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

Solution (Python):



def main():
    n = int(input())
    li = list(map(int, input().split()))
    c = 0
    end = False
    while True:
        for i in range(n):
            if li[i] % 2:
                end = True
                break
            li[i] = li[i] / 2
        if end:
            break
        else:
            c += 1
    print(c)


if __name__ == "__main__":
    main()

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
count = 0
for _ in range(10**6):
  for i in range(n):
    if a[i] % 2 == 0:
      a[i] = a[i]//2
      count += 1
    else:
      break
print(count//n)

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

print(count)

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

print(count)

Solution (Python):


size = int(input())
nums = [int(s) for s in input().split()]

count = 0
checked = False

while True:
  for i in range(size):
    t = nums[i]
    if t % 2 == 1:
      checked = True
      break;
    nums[i] = t/2
  if checked:
    break
  count = count + 1

print(count)

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

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

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

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

Solution (Python):


n = int(input())
lis = list(map(int, input().split()))
ans = 0

while (1):
    count = 0
    for i in range(n):
        if lis[i] % 2 == 0:
            lis[i] //= 2
            count += 1
    if count == n:
        ans += 1
    else:
        break

print(ans)

Solution (Python):
number = int(input())
target_list = input().split()

loopFlg = True
loopCnt = 0

while loopFlg == True:
  for i in range(number):
    if int(target_list[i])%2 == 1:
      loopFlg = False
    target_list[i] = str(int(target_list[i])//2)

  if loopFlg == True:
  	loopCnt += 1

print(loopCnt)

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

while(True):
	for i in range(n):
		if a[i] % 2 == 0:
			a[i] = a[i] / 2
		else:
			print(answer)
			exit()
	answer += 1

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

g = A[0]
for i in range(N):
  g = math.gcd(g,A[i])

cnt = 0
while g % 2 == 0:
  g = g//2
  cnt += 1

print(cnt)

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

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

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

print(n)

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

ans=0
while True:
  for i in l:
    if i%2!=0:
      print(ans)
      exit()
  ans+=1
  l=[i/2 for i in l]

Solution (Python):
n=int(input())
l=list(map(int,input().split()))
d=[]
for i in range(n):
    c=0
    x=l[i]
    while(x%2==0):
        c+=1
        x=x//2
    d.append(c)
m=min(d)
print(max(0,m))

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

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

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


counter = 0


while True:
    
    can_do = True
    for i in range(N):
        if A[i] % 2 == 1:
            can_do = False

    
    if not can_do:
        break

    
    for i in range(N):
        A[i] //= 2

    
    counter += 1

print(counter)

Solution (Python):
N=int(input())
A=[int(i) for i in 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()))
can = True
count = 0

while(can):
    for i in range(len(A)):
        if(A[i] % 2 != 0):
            can = False
        else:
            A[i] = A[i] / 2
    if(can):
        count+=1
print(count)

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

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

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

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

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

print(count)

Solution (Python):

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

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

def count(k):
  p=0
  while k % 2**p==0:
    p+=1
  return p-1
	
for i in range(N):
  s.append(count(a[i]))

print(min(s))

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):
N = int(input())
A = [int(i) for i in input().split()]

res = 0
while True:
  
  if len(list([i for i in A if i % 2 != 0])) == 0:
    res += 1
  else:
  	break
  
  A = [i // 2 for i in A]

  
print(res)

Solution (Python):

n=input("")
a=input("")
a=a.split(" ")
a=[int(s) for s in a]
a.sort()
base=100000
n=1
for num in a:
    while num%2**n==0:
        n=n+1
    n=n-1
    if n < base:
        base=n
print(base)

Solution (Python):
n=int(input())  
A=list(map(int, input().split()))
a=[]
for i in range(n):
  for j in range(10**9):
    if A[i]%(2**(j+1))!=0:
      a.append(j)
      break 
print(min(a))

Solution (Python):
import numpy as np
                                              
N = int(input())
A = np.array(list(map(int, input().split())))
i = 0
while True:
    if np.any(A % 2 == 1):
        break
    A = A / 2
    i += 1
print(i)

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

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

Solution (Python):
N=int(input())
A=list(map(int,input().split()))
M=int((max(A)**0.5)//1)
c=0
for i in range(M):
    for j in range(N):
        if A[j]%2==0:
            A[j]=int(A[j]//2)
            c+=1
        elif A[j]%2!=0:
            break
print(c//N)

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

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

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

print(min(A))

Solution (Python):
n=int(input())
val1 = input().split(" ")
val2=[int(i) for i in val1]

w = 0

while True:
    v = 0
    for i in range(n):
        if val2[i] % 2 == 1:
            v = 1
    if v ==1:
        break
    if v ==0:
        for i in range(n):
            val2[i] = val2[i]/2
        w += 1

print(w)

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

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

while(a==0):
    nl = []
    sl = []
    for i in num:
        if i %2 ==0:
            nl.append(i/2)
        else:
            sl.append(i)
    if sl == []:
        num =nl
        count += 1
    else:
        a = 1

print(count)

Solution (Python):
N = int(input())  
num_list =  list(map(int, input().split()))
    
count = 0
actual_count = 0
w = 0
new_list = []
while (w == 0):
    count = 0
    for i in range(N):
        a = num_list[i]
        
        b = int(a) % 2 
        if (b == 0):
            count = count + 1
    if (count == N):
            new_list =[]
            for n in range(N):
                a = num_list[n]
                b = int(a) / 2
                new_list.append(b)
            num_list = []
            for l in range(N):
                a = new_list[l]
                num_list.append(a)
                
            
            actual_count += 1
    else:
        w = 1
        
        
print(actual_count)

Solution (Python):
N = int(input())
A = list(map(int,input().split()))
def X(x):
  y = 0
  while x%2==0:
    x = x/2
    y = y+1
  return y
a = [X(A[i]) for i in range(0,N)] 
  
print(min(a))

Solution (Python):
N = int(input())
A = list(map(int,input().split()))
def X(x):
  y = 0
  while x%2==0:
    x = x/2
    y = y+1
  return y
a = [X(A[i]) for i in range(0,N)] 
  
print(min(a))

Solution (Python):
n = input()
l = [int(x) for x in input().split()]
cnt = 0
while len([True for x in l if x%2==0]) == len(l):
  l = [x/2 for x in l]
  cnt += 1
print(cnt)

Solution (Python):
n = int(input())
l = list(map(int, input().split()))
count = 0

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

Solution (Python):

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

count = 0
while True:
    if [i for i in x if i % 2 == 1]:
        break
    x = [i/2 for i in x]
    count+=1

print(count)

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

n=int(input())
a=[int(i)for i in input().split()]
res=0
div=lambda x:x/2
while notExistOdd(a):
    res+=1
    a=list(map(div,a))
print(res)

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

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
ans = float('inf')
for a in A:
    ans = min(ans, len(bin(a)) - bin(a).rfind('1')-1)
print(ans)

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

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

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

Solution (Python):
def divide(iterable):
	return list(map((lambda x : x // 2),iterable))
    
N = int(input())
nums = list(map(int, input().split()))
count = 0
flag = 0
while 1:
  if flag == 1:
    break
  for num in nums:
    if num % 2 == 1:
      flag = 1
      break
  else:
    count += 1
    nums = divide(nums)
print(count)

Solution (Python):
N = int(input())
L = list(map(int, input().split()))
l = []
for i in L:
  l.append(format(i, 'b')[::-1].find('1'))
print(min(l))

Solution (Python):
input()
def a(n):
    return 0 if n%2 else a(n//2)+1
print(min([a(i) for i in list(map(int,input().split()))]))

Solution (Python):
_ = input()
a = [int(i) for i in input().split()]

cnt = 0
while all(not i % 2 for i in a):
    a = [i // 2 for i in a]
    cnt += 1
else:
    print(cnt)

Solution (Python):
_ = input()
a = [int(i) for i in input().split()]

cnt = 0
while not sum([i % 2 for i in a]):
    a = [i // 2 for i in a]
    cnt += 1
else:
    print(cnt)

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

    ans = 0
    is_even = True

    while is_even:
        list_tmp = []
        for an in a:
            if an % 2 == 0:
                list_tmp.append(an / 2)
            else:
                is_even = False
                break
        if is_even:
            a = list_tmp
            ans += 1

    print(ans)


if __name__ == '__main__':
    main()

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

counter = 0
while True:
  hasOdd = 0
  for i in range(N):
    if A[i] % 2 == 1:
      hasOdd += 1

  if hasOdd > 0:
    break

  A = [i / 2 for i in A]
  counter += 1
print(str(counter))

Solution (Python):
def warimakuri(num):
  return format(num, 'b')[::-1].find('1')
N=int(input())
L=list(map(int,input().split()))
L=[warimakuri(i) for i in L]
print(min(L))

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

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

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

ans = 1000
for i in a:
    x = 0
    while i:
        if i & 1:
            break
        else:
            x += 1
        i >>= 1
    ans = min(ans, x)
print(ans)

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

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

two = [0] * n

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

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

two = [0] * n

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

Solution (Python):
from typing import List

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

count = 0

def halfen(i: int)->int:
    return i >> 1

def isAllEven(l: List[int])->bool:
    for i in l:
        if(i % 2 == 1 or i == 0):
            return False
    return True

while True:
    if not isAllEven(numbers):
        break
    numbers = list(map(halfen, numbers))
    count += 1

print(count)

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

ans = 0

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

print(ans)

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

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

print(count)

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

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

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

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

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

ans = 0
isEven = True

while isEven:
  list_tmp = []
  for an in a:
    q, mod = divmod(an, 2)
    if mod ==0:
      list_tmp.append(q)
    else:
      isEven = False
      break;
  a = list_tmp
  ans += 1

print(ans - 1)

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

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

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

ans = 0
isEven = True

while isEven:
  list_tmp = []
  for an in a:
    if an % 2 ==0:
      list_tmp.append(an / 2)
    else:
      isEven = False
      break;
  a = list_tmp
  ans += 1

print(ans - 1)

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

ans = -1
isEven = True

while isEven:
  list_tmp = []
  for an in a:
    if an % 2 ==0:
      list_tmp.append(an / 2)
    else:
      isEven = False
      break;
  a = list_tmp
  ans += 1

print(ans)

Solution (Python):
import sys

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










ans = 0
isEven = True

while isEven:
  list_tmp = []
  for an in a:
    if an % 2 ==0:
      list_tmp.append(an / 2)
    else:
      isEven = False
      break;
  a = list_tmp
  ans += 1

print(ans - 1)

Solution (Python):
import sys

n = int(input())
a = map(int, input().split())
ans = sys.maxsize
for an in a:
  cnt = 0
  while an % 2 == 0:
    an /= 2
    cnt += 1
  if cnt < ans:
    ans = cnt
print(ans)

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

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

res = 0
while True:
	odd = list(filter(lambda x: x % 2 == 1, As))
	if odd:
		break
	else:
		As = list(map(lambda x: x // 2, As))
		res += 1
print(res)

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

Solution (Python):


from typing import List


def main():
    N = int(input())
    args = list(map(lambda x: int(x), input().split()))
    counter = 0
    target = args
    while canDev(target):
        counter += 1
        target = dev2(target)

    print(counter)


def canDev(target: List[int]) -> bool:
    for item in target:
        if item % 2 != 0:
            return False
    return True


def dev2(target: List[int]) -> List[int]:
    return list(map(lambda x: int(x / 2), target))


if __name__ == "__main__":
    main()

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

count=[0]*N

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

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

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

import math
x = A[0]
for i in range(1,N):
    x = math.gcd(x,A[i])

ans = 0
while x%2 == 0:
    x = x//2
    ans += 1

print(ans)

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

z = True
count = -1
while z == True:
    count += 1
    for i, j in enumerate(y):
        if j % 2 == 0:
            y[i] = j / 2
        else:
            z = False

print(count)

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

count = 0
flag = False

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

print(count)

Solution (Python):
digit = int(input())
li = list(input().split(" "))
li = [int(i) for i in li]

count = 0
flag = False

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

print(count)

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

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

for i in range(10**9):
    if chk_a()==False:
        break
print(i)

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

cnt= 0
remaindar = list(map(lambda x:x % 2,src_list))
while (1 not in remaindar):
    src_list=list(map(lambda x:x/2,src_list))
    remaindar = list(map(lambda x:x % 2,src_list))
    cnt+=1

print(cnt)

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

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

ini = 0

def search(li):
    L = len(li)
    for i in range(L):
        if li[i]%2 != 0:
            return False
        else:
            li[i] = li[i]//2
    return True


while True:
    if search(y):
        ini += 1
    else:
        break

print(ini)

Solution (Python):
N = int(input())
arrange = input().split()
split = True
count = 0

for i in range(N):
    arrange[i] = int(arrange[i])

while split:
    for i in range(N):
        if arrange[i] % 2 == 0:
            arrange[i] /= 2
        else:
            split = False
    count += 1

print(str(count - 1))