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()))
count = 0

while(True):
    if(any(x%2==1 or x==0 for x in A)): break
    A = list(int(x/2) for x in A)
    count += 1
print(count)

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

ans = 0
B = []
for a in A:
    cnt = 0
    while a % 2 == 0:
        a //= 2
        cnt += 1
    B.append(cnt)

print(min(B))

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

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

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

def bisect_array(array):
    for i in range(len(array)):
        array[i] = array[i] / 2
    return array

while boolean:
    for i in A:
        if i % 2 != 0:
            boolean = False
    if boolean == True:count += 1
    A = bisect_array(A)

print(count)

Solution (Python):
from functools import reduce
from fractions import gcd
n=int(input())
a=list(map(int,input().split()))
x=reduce(gcd,a)

ans=0
while x%2==0:
    ans+=1
    x//=2
print(ans)

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

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

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

Solution (Python):
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp % i == 0:
            cnt = 0
            while temp % i == 0:
                cnt += 1
                temp //= i
            arr.append([i, cnt])

    if temp != 1:
        arr.append([temp, 1])

    if arr == []:
        arr.append([n, 1])

    return arr


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

    ans = float("inf")
    for i in range(n):
        if factorization(As[i])[0][0] != 2:
            ans = 0
            break
        else:
            ans = min(ans, factorization(As[i])[0][1])
    print(ans)


if __name__ == "__main__":
    main()

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

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
ans = 10**9
for i in a:
    c = 0
    while i%2==0:
        c+=1
        i//=2
    ans = min(ans,c)
print(ans if ans!=10**9 else 0)

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 = input().split()

i = 0
ans = 0

even_count = N

while even_count == N:
  even_count = 0
  i = 0

  while i < N:
    a = int(A[i])
    if a % 2 == 0:
      even_count += 1
      A[i] = a // 2
      i += 1
    else:
      break

  if even_count == N:
    ans += 1
  else:
    break

print(ans)

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

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

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

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

Solution (Python):
a = input();
s = input().split()
b = 0;
c = True;
d = 0;
while c:
    d = 0
    for i in range(len(s)):
        if int(s[i]) % 2 == 0:
            s[i] = int(s[i]) / 2
            d = d + 1
        else:
            c = False
            break;
        if d == len(s):
            b = b + 1
print(b)

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

ans = 100

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

print(ans)

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

Solution (Python):
import sys
INF = 10 ** 9
MOD = 10 ** 9 + 7
from collections import deque
sys.setrecursionlimit(100000000)

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

def main():
    n = int(input())
    a = list(map(int,input().split()))
    ans = INF
    for num in a:
        ans = min(ans,cnt2(num))
    
    print(ans)

if __name__=='__main__':
    main()

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

cout=0
while True:

	bre=False
	for i in a:
		if i%2==1:
			bre=True
			break
	if bre:
		break

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


print(cout)

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

Solution (Python):
input()
l = list(map(int, input().split()))
count = 0
while True:
  t = list(filter(lambda x:x % 2 != 0, l))
  if len(t) > 0:
    break
  l = list(map(lambda x:x/2, l))

  count += 1

print(count)

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
ans = 10**9  
for i in range(n):
    if a[i] % 2 == 1:
        print(0)
        quit()

    count = 0
    while a[i] % 2 == 0:
      a[i] //= 2
      count += 1
    ans = min(ans, count)

print(ans)

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

print(ans)

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

print(min(counter))

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

Solution (Python):
n=int(input())
a=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())
B = list(map(int, input().split()))
out = 0
flag = 0
while(1):
	for i in range(len(B)):
		if B[i] % 2 != 0:
			flag = 1
			break
		else:
			B[i] /= 2
	if(flag == 1): break
	out += 1
	
print(out)

Solution (Python):






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


count = 0
while all(element % 2 == 0 for element in a):
    a = [element/2 for element in a]
    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(a % 2 == 0 for a in A):
    A = [a/2 for a 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):
import math
import string


def readints():
    return list(map(int, input().split()))


def nCr(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor



dx = [-1, -1, -1, 0, 0, 1, 1, 1]
dy = [-1, 0, 1, -1, 1, -1, 0, 1]

n = int(input())
a = readints()

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

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

Solution (Python):

x = 100000

N = int(input())
if N <=200:
    A = list(map(int,input().split()))
    for i in range(N):
            y = 0
            
            while A[i] % 2 == 0:
                y += 1
                A[i] = A[i]//2
            if x > y:
                x = y

else:
    print('error')
    
print(x)

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

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

Solution (Python):
Num = int(input())
List = list(map(int, input().split()))

n = 0

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

print(n)

Solution (Python):
N = int(input())
A = [int(x) for x in input().split()]
cnt = 0
while True:
    if len(A) == A.count(0):
        break
    if len([x for x in A if x%2 == 0]) == len(A):
        A = [x//2 for x in A]
        cnt += 1
    else:
        break
print(cnt)

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

ope_count = 0
flag = True
while(flag):
    for i in range(n):
        if a_list[i]%2==0:
            a_list[i] /= 2
        else :
            flag = False
    if flag:
        ope_count+=1

print(ope_count)

Solution (Python):
import sys
from math import sqrt

input = sys.stdin.readline


def I():
    return int(sys.stdin.readline())


def MI():
    return map(int, sys.stdin.readline().split())


inf = float("inf")
mod = 10 ** 9 + 7


def main():
    _ = I()
    a_list = MI()

    min = inf
    for a in a_list:
        c = 0
        while a % 2 == 0 and c < min:
            c += 1
            a /= 2

        if min > c:
            min = c

    print(min)
    pass


if __name__ == "__main__":
    main()

Solution (Python):
N = int(input())
box = list(map(int, input().split()))
mcnt = float('inf')
for b in box:
    cnt = 0
    while b % 2 == 0:
        b = b // 2
        cnt += 1
        if cnt > mcnt:
            break
    if cnt < mcnt:
        mcnt = cnt
print(mcnt)

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

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

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

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

cnt = 0
flag = False
while True:
    for a in arr:
        if a == 0 or a == 1 or a % 2 == 1:
            flag = True
            break

    if flag:
        break

    arr = [a // 2 for a in arr]
    cnt += 1

print(cnt)

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):
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 = 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):
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())
num = list(map(int, input().split(" ")))
oparation = 10 ** 8

for i in range(N):
    temp = 0
    while(1):
        if(num[i] % 2 or num[i] == 0):
            break
        else:
            num[i] /= 2
            temp += 1
    if(oparation > temp):
        oparation = temp
        
print(oparation)

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())
nums = [int(i) for i in input().split()]
ans = 0
while True:
  if [i for i in nums if i % 2 == 1]:
  	break
  nums = [i//2 for i in nums]
  ans += 1 
print(ans)

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

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()))
ans = 10000
for i in range(len(A)):
    cnt = 0
    while A[i] > 0 and A[i] % 2 == 0:
        cnt += 1
        A[i] /= 2
    ans = min(ans, cnt)
print(ans)

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

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

count = 0

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

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

while b == True:
    for i in range(0,len(list)):
        if list[i] % 2 != 0:
            b = False
        else:
            list[i] = list[i] / 2
    if b == False:
        break
    c += 1

print(c)

Solution (Python):
import sys

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

cnt=0
while 1:
  for i in range(n):
    if aa[i]%2>0:
      print(cnt)
      sys.exit()
    aa[i]=aa[i]//2
  cnt+=1

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

while not any([n%2 for n in num]):
    num = [n/2 for n in num]
    count += 1
print(count)

Solution (Python):
n=int(input())
a=[int(i) for i in input().split()]
t=[0 for _ in range(n)]
for i in range(n):
  while a[i]%2==0:
    t[i]+=1
    a[i]=a[i]/2
print(min(t))

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


if __name__ == '__main__':
    solve()

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

Solution (Python):
n = input()
a = [bin(int(x))[2:] for x in input().split()]
a = [len(x) - (x.rfind('1') + 1) for x in a]
print(min(a))

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

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

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

def devision(num_list, count):
    new_num_list = []
    for num in num_list:
        if num%2 ==0:
            new_num_list.append(num//2)
        else:
            print(count)
            return
    count += 1
    return devision(new_num_list, count)

devision(num_list, 0)

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

c = 0

def is_even(n):
    if n % 2 == 0:
        return True
    
    else:
        return False

while True:
    if list(map(is_even, a)).count(True) == n:
        c += 1
    
    else:
        break
    
    a = list(map(lambda x: int(x/2), a))
    
print(c)

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

for i in range(0,200):
    c=[x%2 for x in l]
    if c==[0 for x in range(0,a)]:
        l=[x/2 for x in l]
    else:
        break
    
print(i)

Solution (Python):
mylist = []
for i in range(0, 2):
    val = input()
    if ' ' in val:
        mylist.append(val)
a = list((map (int,mylist[0].split(' '))))

cnt = 0
while True:
    map (int,a)
    if all(map(lambda x: x % 2 == 0, a)) == False:
        break
    a = list(map(lambda x:x//2,a))
    cnt +=1
print (cnt)

Solution (Python):
first=int(input())
number=input().split()
numbers=[int(n) for n in number]
 
count=0
 
if all(a % 2 ==0 for a in numbers):
    count+=1
else:
    pass
 
answer=[m/2 for m in numbers]
 
while all(n % 2 ==0 for n in answer):
    count+=1
    answer=[m/2 for m in answer] 
 
print(count)

Solution (Python):
w = input()
a = input()
l = [int(x) for x in a.split()]
c = 0
while True:
  for i, v in enumerate(l):
    if v % 2 == 0:
      l[i] = v / 2
    else:
      break
  else:
    c += 1
    continue
  break
print(c)

Solution (Python):
from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
import itertools
from itertools import permutations, combinations, accumulate
import sys
import bisect
import string
import math
import time


def I(): return int(input())


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


def S(): return input()


def MS(): return map(str, input().split())


def LI(): return [int(i) for i in input().split()]


def LI_(): return [int(i)-1 for i in input().split()]


def StoI(): return [ord(i)-97 for i in input()]


def ItoS(nn): return chr(nn+97)


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


def show(*inp, end='\n'):
    if show_flg:
        print(*inp, end=end)


def print_matrix(mat):
    for i in range(len(mat)):
        print(*mat[i])


YNL = {False: 'No', True: 'Yes'}
YNU = {False: 'NO', True: 'YES'}
MOD = 10**9+7
inf = float('inf')
IINF = 10**10
l_alp = string.ascii_lowercase
u_alp = string.ascii_uppercase
ts = time.time()

nums = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']



show_flg = False


def factorization(n):
    if n <= 1:
        return []

    ret = []
    while n > 2 and n % 2 == 0:
        ret.append(2)
        n //= 2
    i = 3
    while i <= math.sqrt(n):
        if n % i == 0:
            ret.append(i)
            n //= i
        else:
            i += 2
    ret.append(n)
    return ret


def main():
    N = I()
    A = LI()
    ans = 10 ** 19

    for i in range(N):
        ret = factorization(A[i])
        num = len([i for i in ret if i == 2])
        ans = min(num, ans)

    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
N=int(input())
An=list(map(int, input().rstrip().split()))
cnt=0
while True:
    if len(list(filter(lambda a:(a+1)%2, An))) < len(An):
        break
    An=list(map(lambda a:int(a/2), An))
    cnt+=1
print(cnt)

Solution (Python):
N = int(input())
l = list(map(int, input().split()))
even = True
ans = 0
while even == True:
  for i, j in enumerate(l):
    if j%2==0:
      l[i] /= 2
    else:
      even = False
  if even == True:
    ans += 1

print(ans)

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

Solution (Python):
def check(X):
    for i in range(len(X)):
        if X[i] % 2 != 0:
            return False
        X[i] /= 2
    return True

N = int(input())
A = list(map(int, input().split()))
ans = 0
while check(A):
    ans += 1
print(ans)

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

for i in range(30):
    for i in range(n):
        if a[i] % 2 == 0:
            a[i] = a[i]//2
            if i == n-1:
                ans += 1
        else:
            break
        
print(ans)

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

NGflag = 0
count = 0

while True:
    for i in range(a):
        if li[i] % 2 == 0:
            li[i] = li[i] / 2 

        else:
            NGflag = 1

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

print(count)

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


def is_even(n: int) -> bool:
    if n % 2 == 0:
        return True
    else:
        return False


def div_by_2(n: int) -> int:
    return n // 2


ans = 0
while all(map(is_even, A)):
    ans += 1
    A = list(map(div_by_2, A))
print(ans)

Solution (Python):
import sys
input = sys.stdin.readline

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

for i in range(10 ** 5):
    for j in range(len(a)):
        if a[j] % 2 != 0:
            print(cnt)
            exit()
        else:
            a[j] /= 2
    cnt += 1

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

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

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

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

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

count = []

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

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

print(ret)

Solution (Python):

import math


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

    cnt = 0
    while True:

        is_exist_odd = False
        for _a in a:
            if _a % 2 == 1:
                is_exist_odd = True
                break

        if is_exist_odd:
            break

        a = list(map(lambda _a: _a / 2, a))
        cnt += 1

    print(cnt)


if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
numbers = list(map(int, input().split()))
count = [0]*n

for i in range(n):
  while True:
    if numbers[i]%2 == 1:
  	  break
    numbers[i] = numbers[i]/2
    count[i] += 1
  
print(min(count))

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

i = 0
def atcode(nums):
    global i
    for n in nums:
        if n%2==0:
            pass
        elif n==0:
            return i
        else:
            return i
    nums = [n/2 for n in nums]
    i += 1
    return atcode(nums)

print(atcode(nums))

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 = input()
a = list(map(int, input().split()))
 
def how_many_times(x):
    n=0
    while x%2==0:
        x=x//2
        n+=1
    return n
 
print(min(map(how_many_times, a)))

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


cnt = -1
tmp = True
while tmp:
    cnt += 1
    for i in range(n):
        if a[i] % 2 == 0:
            a[i] = a[i] // 2
        else:
            tmp = False

print(cnt)

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

numbers = []
for i in list:
    j = 1
    while j > 0:
        if i % 2**j == 0:
            j = j + 1
        else:
            break
    t = j - 1
    numbers.append(t)
    
print(min(numbers))

Solution (Python):
input();print(min(len(str(bin(i&-i)))for i in map(int,input().split()))-3)

Solution (Python):
input();print(min((int(x)&-int(x)).bit_length()for x in input().split())-1)

Solution (Python):
input()
a=min(list(map(lambda x:int(x)&-int(x),input().split())))
i=0
while a:a//=2;i+=1
print(i-1)

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

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

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

Solution (Python):

import sys
def main():
    n = int(input())
    h = list(map(int, input().split()))
    count = 0
    loop = 0

    
    while True:
        if h[loop] % 2 != 0:
            print(count)
            sys.exit()
        loop = loop + 1
        
        if loop == len(h):
            h = list(map( lambda x:x/2, h))
            count = count + 1
            loop = 0

if __name__ == '__main__' :
    main()

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

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

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

print(min(B)) if min(B) > 0 else print(0)

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

counter = 0
while all(a%2==0 for a in A):
    A = list(a/2 for a in A)
    counter += 1

print(counter)

Solution (Python):
mylist = []
for i in range(0, 2):
    val = input()
    if ' ' in val:
        mylist.append(val)
a = list((map (int,mylist[0].split(' '))))

cnt = 0
while True:
    map (int,a)
    if all(map(lambda x: x % 2 == 0, a)) == False:
        break
    a = list(map(lambda x:x//2,a))
    cnt +=1
print (cnt)

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

odd_flag = False
count = 0
while True:
    for i, j in enumerate(A):
        if j % 2 == 1:
            odd_flag = True
            break
        A[i] = j / 2
    if not odd_flag:
        count += 1
    else:
        break
        
print(count)

Solution (Python):


import sys
 
stdin = sys.stdin
inf = 1 << 60
mod = 1000000007
 
ni = lambda: int(ns())
nin = lambda y: [ni() for _ in range(y)]
na = lambda: list(map(int, stdin.readline().split()))
nan = lambda y: [na() for _ in range(y)]
nf = lambda: float(ns())
nfn = lambda y: [nf() for _ in range(y)]
nfa = lambda: list(map(float, stdin.readline().split()))
nfan = lambda y: [nfa() for _ in range(y)]
ns = lambda: stdin.readline().rstrip()
nsn = lambda y: [ns() for _ in range(y)]
ncl = lambda y: [list(ns()) for _ in range(y)]
nas = lambda: stdin.readline().split()

N = ni()
a = na()

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

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


def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr


for i in a:
    if i%2 == 1:
        print(0)
        exit()

l = []
for i in a:
    l.append(factorization(i))

ans = 10 ** 9
for i in l:
    if i[0][0] == 2:
        ans = min(i[0][1], ans)

print(ans)

Solution (Python):
def divide_2(t):
  global now
  now = 0
  for i in range(10**5):
    if t%2 == 1:
      return now
      break
    else:
      t = t//2
      now += 1
now = 0
N = int(input())
A = list(map(int,input().split()))
k = []
for i in range(N):
  k.append(divide_2(A[i]))
print(min(k))

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 if i%2 ==0]
    cnt += 1

print(cnt)

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

while True:
    exist_odd = False

    for i in range(n):
        if input_list[i] % 2 != 0:
            exist_odd = True

    if exist_odd:
        break

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

    count += 1

print(count)

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

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

flag = False
count = 0
while True:
    
    for i in input_list:
        if i % 2 != 0:
            flag = True
            break

    if flag:
        break

    
    count += 1
    input_list = list(map(cal_division, input_list))

print(count)