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()))
mini = []
for i in range(N):
    j = 0
    while 1:
        if A[i] % 2 == 1:
            mini.append(j)
            break
        else:
            A[i] = A[i]/2
            j += 1
print(min(mini))

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

m=99
for i in A:
  tmpi = i
  c = 0
  while True:
    if tmpi % 2== 0:
      tmpi//=2
      c+=1
    else:
      break
  m = min(c,m)
  if m == 0:
    break
print(m)

Solution (Python):
n = int(input())
nums = [int(i) for i in input().split()]
counters = []
for i in range(n):
  num = nums[i]
  c = 0
  while num % 2 == 0:
    num /= 2
    c += 1
  counters.append(c)
print(min(counters))

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


def cal(value):
    return value / 2


def odd_even_cal(value):
    return value % 2


flug, counter = -1, 0
while flug < 0:
    if 1 in list(map(odd_even_cal, array)) or 0 in array:
        flug = 1
        break
    counter += 1
    array = list(map(cal, array))

print(counter)

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

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

Solution (Python):
def calc_div2(n):
    return n/2

count = 0
flag = 0
n_num = input()
data_list = list(map(int, input().split()))

while flag == 0:
    for data in data_list:
        if data%2 != 0:
            flag = 1
            break
    if flag == 0:
        data_list = list(map(calc_div2, data_list))
        count+=1
print( count )

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

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

while all(i % 2 == 0 for i in a):
    a = list(map(lambda x: int(x/2), a))
    cnt += 1

print(cnt)

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

target_list = [int(s) for s in in_list]
max_num = max([s%2 for s in target_list])

counter = 0
while max_num==0:
    target_list = [int(s)/2 for s in target_list]
    max_num = max([s%2 for s in target_list])
    counter += 1

print(counter)

Solution (Python):
n, *a = map(int, open(0).read().split())

from functools import reduce

e = reduce(lambda x,y:x|y, a, 0)

print((e^(e-1)).bit_length()-1)

Solution (Python):
n=eval([*open(0)][1].replace(*' |'))
print(len(bin(n&-n))-3)

Solution (Python):
n=eval([*open(0)][1].replace(*' |'))
print(len(bin(n&-n))-3)

Solution (Python):






N = int(input().strip())
As = list(map(int, input().strip().split()))

count = 0

while True:

    if all(a % 2 == 0 for a in As):
        count += 1
        As = [a // 2 for a in As]
    else:
        break

print(count)

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

Solution (Python):
n = input()
min_ = 10**18
a = list(map(int, input().split()))
for e in a:
  c = 0
  while e % 2 == 0:
    c += 1
    e //= 2
  min_ = min(min_, c)
print(min_)

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

cnt = 0

while all(i%2 == 0 for i in l):
  cnt +=1
  l = [i//2 for i in l]

print(cnt)

Solution (Python):
import math
def main():
  n = int(input())
  a = list(map(int,input().split()))
  ans=0
  while True:
    flg=0
    for i in range(0,n):
      if a[i]%2==1:
        flg=1
        break
      a[i]/=2
    if flg==1:
      print(ans)
      break
    ans+=1
main()

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

while True:
    for i in range(N):
        b += [a[i]%2]
    if b.count(0)== N:
        a = list(map(lambda x:x//2,a))
        c += 1
        b = []
    else:
        break
print(str(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):
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):
def resolve():
    input()
    A = list(map(int,input().split()))
    count=0
    while len(list(filter(lambda x: x%2==1,A)))==0:
        count+=1
        A =list(map(lambda x:x//2,A))
    print(count)
resolve()

Solution (Python):
import math
n = int(input())
a_li = [int(w) for w in input().split()]

ans = 10**9
for a in a_li:
    
    
    
    

    t = math.log2(a & -a)
    ans = min(ans, t)

print(int(ans))

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

c_list=[]
for i in list:
    count=0
    while True:
            
        if i%2==0:
            i=i/2
            count+=1
        else:
            break
    c_list.append(count)

    
print(min(c_list))

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

count = 0
flg=True

for i in range(N):
    if A[i]%2==1:
        flg=False
while flg:
    count +=1
    for i in range(N):
        a,b = divmod(A[i],2)
        A[i] = a
        if b != 0:
            count -= 1
            flg=False
            break
print(count)

Solution (Python):
N=int(input())
Y=10**100

A=list(map(int,input().split()))
for a in A:
    H=0
    while a%2==0:
        a//=2
        H+=1
    Y=min(Y,H)
print(Y)

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

import math
from collections import Counter

def prime_count(n):
    prime_count = Counter()
    for i in range(2, math.ceil(math.sqrt(n))+1):
        while n % i == 0:
            n /= i
            prime_count[i] += 1
    if n > 1:
        prime_count[int(n)] += 1
    return prime_count


ans = float('inf')

for a in A:
    c = prime_count(a)[2]
    ans = min(ans, c)

print(ans)

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

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

number = list(map(int,input().split()))
count = 0
total = 0
K = True
while K:
  for i in number:
    if i%2==0:
      count+=1
    else:
      K = False
    if count ==n:
      count = 0
      total +=1
      number = [i / 2 for i in number] 

print(total)

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

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):
a=int(input())
b=list(map(int,input().split()))
sum=0
break_loop=False
while True:
    for i in range(a):
        if b[i]%2!=0:
            break_loop=True
            break
        else:
            continue
    if break_loop==True:
        break
    b=list(map(lambda x:x/2,b))
    
    sum+=1
print(sum)

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

Solution (Python):









import sys
input = sys.stdin.readline

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


def IsAllEven(L, n):
    for i in range(len(L)):
        if L[i] % (2**n) != 0:
            return False
    return True


i = 0
while True:
    i += 1
    if not IsAllEven(list_A, i):
        break
print(i-1)

Solution (Python):
import sys
INF = 1_000_000_001
N = int(input())
A = input().split()
n = INF
for a in A:
    a = int(a)
    if a % 2 != 0:
        print(0)
        sys.exit()
    cnt = 0
    while a % 2 == 0:
        a = a >> 1
        cnt += 1
    n = min(n, cnt)
print(n)

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

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 = 1001001001

for a in A:
    tmp = 0
    while a % 2 == 0:
        a //= 2
        tmp += 1
    
    if tmp < cnt:
        cnt = tmp

print(cnt)

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
res = 10 ** 9
for a in A:
    if a % 2 == 1:
        print(0)
        exit()
    tmp = 0
    while a % 2 == 0:
        tmp += 1
        a //= 2
    res = min(res, tmp)
print(res)

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

    cnt += 1

print(cnt)

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

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

Solution (Python):
import numpy as np
N = int(input())
A = np.array(input().split(),dtype=np.int32)
a = 0

while (A%2==0).all():
  A//=2
  a+=1

print(a)

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

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

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

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

import math

flag = 0
count = 0
while flag == 0:
    for n in range(N):
        A[n] = A[n]/2
        if math.modf(A[n])[0] != 0:
            flag = 1
            break
    if flag ==0:
        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 = list(map(int,input().split()))
A = list(map(str,list(map(bin,A))))
for i in range(N):
    if i ==0:
        ans =len(A[i])-A[i].rfind("1")-1
    else:
        ans = min(ans,len(A[i])-A[i].rfind("1")-1)
print(ans)

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

n = int(input())
x = [int(i) for i in input().split()]
i = 0
while i < n:
  if i == 0:
    a = count(x[0])
  if a >count(x[i]):
    a = count(x[i])
  i+=1
    
print(a)

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

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

print(count)

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

Solution (Python):


N = int(input())
lstA = []
line = input()
for s in line.split():
    lstA.append(int(s))

cnt = 0
success = True
while success:
    lstB = []
    for x in lstA:
        if x % 2 == 0:
            lstB.append(x // 2)
        else:
            success = False
            break
    if success:
        lstA = lstB
        cnt += 1
print(cnt)

Solution (Python):


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

def round():
    for i in range(len(lstA)):
        if lstA[i] % 2 == 0:
            lstA[i] //= 2
        else:
            return False
    return True

cnt = 0
while round():
    cnt += 1
print(cnt)

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

result = float('inf')
for a in A:
    count = 0
    tmp = a
    while tmp % 2 == 0:
        tmp /= 2
        count += 1
    if count < result:
        result = count

print(result)

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

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

while True:
    temp = 0
    for i in range(n):
        if lista[i] % 2 == 0:
            lista[i] //= 2
            temp += 1

    if temp == n:
        count += 1
    else:
        break

print(count)

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

for i in range(n):
    tmp=format(a[i],'b')[::-1].find('1')
    if m>tmp:
        m=tmp
print(m)

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

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

print(count)

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

N = [0]*len(A)

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

print(min(N))

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

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

from sys import stdin

data = stdin.read().splitlines()

a = int(data[0])

b = [int(s) for s in data[1].split()]

print(min(map(count_how_many_divide, b)))

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

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):
def calc(a):
  ans=0
  
  while a%2==0:
    a/=2
    ans+=1
    
  return ans

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

print(min(map(calc, A)))

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

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

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

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

ct = 0
flg = False

while True:
  for item in a:
    if(item%2 == 1):
      flg = True

  if(flg == True):
    break
  else:
    a = [int(i/2) for i in a]
    ct += 1
  
print(ct)

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):
def solve(a, minA):
    cnt = 0
    while cnt < minA:
        if a % 2 == 1:
            break
        cnt += 1
        a = a // 2
    return cnt


def resolve():
    N = int(input())
    A = [int(i) for i in input().split()]
    minA = 10**9
    for a in A:
        minA = min(minA, solve(a, minA))
    print(minA)


resolve()

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

halfableCount = 0

while(True):
    
    existOdd = False
    for i in range(len(aList)):
        if aList[i] % 2 != 0:
            existOdd = True

    
    if existOdd:
        break

    
    for i in range(len(aList)):
        aList[i] = aList[i] >> 1

    halfableCount += 1

print(halfableCount)

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

halfableCount = 0

while(True):
    for i in range(len(aList)):
        
        if aList[i] % 2 == 1:
            break

        
        aList[i] = aList[i] >> 1
    else:
        halfableCount += 1
        continue

    
    break

print(halfableCount)

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
ans = float('inf')
for ai in A:
    c = 0
    while ai % 2 == 0:
        ai //= 2
        c += 1
    
    ans = min(ans, c)

print(ans)

Solution (Python):
N=int(input())
A=list(map(int,input().split()))
ans=list()
for i in A:
    num=i
    j=0
    while num%2==0:
        num=num/2
        j+=1
    ans.append(j)
print(min(ans))

Solution (Python):
def main():
    n = int(input())
    a = list(map(int, input().split()))
    for i in range(200):
        if all(i % 2 == 0 for i in a):
            a = [i // 2 for i in a]
        else:
            print(i)
            break

if __name__ == "__main__":
    main()

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

for i in range(10**5):
    for j in range(n):
        if a[j]%2==0:
            a[j]=a[j]//2
        else:
            print(i)
            exit()

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

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

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

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

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

c = 0
while True:
    if all(a% 2 ==0 for a in A):
        c += 1
        A = list(map(lambda x:x//2, A))
    else:
        break
print(c)

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

while True:
   if [i for i in a if i % 2 == 1]:
       break
   a = [i/2 for i in a]
   cnt += 1

print(cnt)

Solution (Python):
def func():
    n = int(input())
    a = [str(bin(int(x))) for x in input().split()]
    cnt = float('inf')
    for i in range(n):
        cnt = min(cnt, len(a[i]) - 1 - a[i].rfind('1'))
    print(cnt)


if __name__ == "__main__":
    func()

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

nums = list(map(int, input().split()))
count = 0
is_div = True

while is_div:
    for i in range(n):
        q, m = divmod(nums[i], 2)
        if m:
            is_div = False
            break
        else:
            nums[i] = q

    if is_div:
        count += 1
    else:
        break

print(count)

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
ans = 0
for i in a:
  ans |= i
n = ans&(-ans)
print(n.bit_length()-1)

Solution (Python):
import re

N = int(input())
A = [a for a in map(int,input().split())]

result = []

for a in A:
    m = re.search(r'0+$',bin(a))
    if m==None:
        result.append(0)
        break
    else:
        result.append(len(str(m.group())))

print(min(result))

Solution (Python):
n = int(input())
ls = list(map(int,input().split()))
lsb = [0 for i in range(n)]

for i in range(n):
    a = 0
    while  a == 0:
        if ls[i] % 2 == 0:
            lsb[i] += 1
            ls[i] = ls[i] // 2
        else:
            a = 1

ans = min(lsb)
print(ans)

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

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

print(ans)

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

count=0
for i in range(min(A)):
   for ii in A:
      if ii % 2 != 0 :
         print(count)
         exit()

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

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

while(1):
    odd = False
    for i, v in enumerate(a):
        if a[i] % 2 == 1:
            odd = True
    if odd:
        break
    ans += 1
    for i, v in enumerate(a):
        a[i] //= 2

print(ans)

Solution (Python):
n = int(input())
A = list(map(int, input().split()))
ans = 1
flg = True
while flg:
    for i in range(n):
        if A[i] % 2 ** ans != 0:
            flg = False
            break
    ans += 1
print(ans - 2)

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
c = 0
flg = True

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

    c += 1

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

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

count = 0
list_count = []

for i in range(n):
    a = list[i]
    while a % 2 == 0:
        count += 1
        a /= 2
    list_count.append(count)
    count = 0

print(min(list_count))

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

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

print(count)

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

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

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 = input()
A = list(map(int,input().split()))

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

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


def calc(A):
    for i in range(len(A)):
        if A[i] == 0:
            return False
        if A[i] % 2 == 1:
            return False
        A[i] = A[i] // 2
    return True

cnt = 0
while True:
    if calc(A) == False:
        break
    cnt += 1
print(cnt)

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

Solution (Python):
import sys

N = int(input())
A = [int(x) for x in input().split()]
div_times = 0

while 1:
    for a in A:
        if a % 2 != 0:
            print(div_times)
            sys.exit()
    A = list(map(lambda x: x // 2, A))
    div_times += 1

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

cnt = 0
while all(map(lambda x: int(x%2)==0, input_list)):
  input_list = list(map(lambda x: x/2, input_list))
  cnt+=1
print(cnt)

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):
import sys
input = sys.stdin.readline

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

def update(a):
    na = [0] * n
    for i in range(len(a)):
        v = a[i]
        if v % 2 != 0:
            return False
        else:
            na[i] = v / 2
    return na

k = 0
while True:
    a = update(a)
    if not a:
        break
    k += 1
print(k)

Solution (Python):


num = 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())
 
l = list(map(int, input().strip().split()))
 
count = 0
 
while all([a == 0 for a in list(map(lambda x: x%2, l))]):
    l = list(map(lambda x: x/2, l))
    count += 1
    
print(count)

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

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

print(ans)

Solution (Python):
n = int(input())
a_list = [int(x) for x in input().split()]
ans = 30
for a in a_list:
    temp = 0
    while True:
        a, mod = divmod(a, 2)
        if mod == 0:
            temp += 1
            if temp >= ans:
                break
        else:
            if temp < ans:
                ans = temp
            break
print(ans)

Solution (Python):
n = int(input())
a_list = [int(x) for x in input().split()]
ans = 30
for a in a_list:
    ba = bin(a)
    temp = len(ba) - ba.rfind("1") - 1
    if temp < ans:
        ans = temp
print(ans)

Solution (Python):
import sys
from sys import stdin

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

count = 0

while True:
    for i,value in enumerate(A):
        if value % 2 == 0:
            A[i] /= 2
        else:
            print(count)
            sys.exit()
    count += 1

print(count)

Solution (Python):
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):
input()
A = list(map(int, input().split()))
count = 0
while all(i % 2 == 0 for i 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 True:
    for i in range(n):
        fin = True
        if a[i] % 2 == 0:
            a[i] = (a[i] / 2)
        else:
            fin = False
            break
    if fin:
        count += 1
    else:
        break
print(count)

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

while k:
    for i in range(n):
        if a[i] % 2 == 0:
            a[i] = a[i] // 2
        else:
            k = False

    if k:
        c += 1

print(c)

Solution (Python):


n = int(input())

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

count = 0
result = 0
flag = True

while flag:
  for index, num in enumerate(li):
    if num % 2 == 0:
      count += 1
      li[index] = num / 2

  if count == n:
    count = 0
    result += 1
  else:
    flag = False

print(result)

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

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

Solution (Python):
"""
B- Shift Boy
"""


i = 0


a = int(input())

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


def half(n):
    return n/2


def mod(n):
    return n%2




d = list(map(mod, b))

while d.count(1)<1:
    b = list(map(half, b))
    d = list(map(mod, b))
    i += 1

print(i)

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

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

for i in a:
  while i%2 == 0:
    i = i/2
    count += 1
  if count < mincount:
    mincount = count
  count = 0

print(mincount)

Solution (Python):
n = int(input())
a = [int(i) for i in input().split()]
for i in range(len(a)):
    a[i] = bin(a[i])
c = 10 ** 9
for i in a:
    b = 0
    for j in range(len(i)):
        if i[- 1 - j] == "0":
            b += 1
        else:
            break
    if b < c:
        c = b
print(c)

Solution (Python):
if __name__ == '__main__':
    n = int(input())
    a = [int(i) for i in input().split()]
    min = -1

    for i in a:
        now = i
        count =0
        while now >1:
            if now %2 ==0:
                now=now//2
                count+=1
            else:
                break
        if min == -1 or min > count:
            min=count
    print(min)

Solution (Python):
import numpy as np







N = int(input())
A = list(map(int, input().split()))
A = np.array(A)
A=A.reshape(1,-1)
vector0=A*0
count=0
i=0
flg=False

for i in range(100):
    B=A%2
    C=((A%2 == vector0).all())
    if C == False:
        break
    count=count+1
    A=A/2

print(count)

Solution (Python):
N = input()
import numpy as np
A = np.array(list(map(int, input().split())))

ans = 0
while not np.any(A % 2):
  A = A / 2
  ans += 1
print(ans)

Solution (Python):
import numpy as np







N = int(input())
A = list(map(int, input().split()))
A = np.array(A)
A=A.reshape(1,-1)
vector0=A*0
count=0
i=0
flg=False

for i in range(19999):
    B=A%2
    for k in range(N-1) :
        if B[0,k] != 0:
            flg = True
            break
    if flg:
        break
    count=count+1
    A=A/2

print(count)

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