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):
import numpy as np

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

A = np.array(tmpA)
ans = 0
odd = 0

while odd == 0:
    for a in A:
        if a % 2 == 1:
            odd = 1
            break
    if odd != 1:
        A = A//2
        ans += 1
print(ans)

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

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

Solution (Python):
num=int(input())
board=list(map(int,input().split(" ")))
count=0
flug=1

while(flug):
  
  for i in range(num):
    if board[i]%2 == 0:
      board[i]=board[i]/2
    else:
      flug=0
      break
      
    if i==num-1:
      count+=1
    
print(count)

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

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

flag = False
for i in range(len(a)):
	tmp = a[i]
	if tmp%2:
		flag= True
	while not(tmp%2):
		r[i]+=1
		tmp/=2
if flag:
	print(0)
else:
	print(min(r))

Solution (Python):
num = int(input())
ban = input().split(" ")

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

a = map(int,ban)
ans = min(map(ans_divide,a))

print(ans)

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

Solution (Python):
import numpy as np

N = int(input())
A = np.array([int(c) for c in input().split()])
count = 0

while np.all(np.where(A % 2 == 0, True, False)):
    A = A / 2
    count += 1

print(count)

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

Solution (Python):
N = int(input())
A = input().split()
A = [int(i) for i in A]
res = 10 ** 9
for a in A:
    counter =0
    while(a%2 ==0):
        a = a/2
        counter +=1
    res = min(res,counter)
print(res)

Solution (Python):
n = int(input())
nums = list(map(int, input().split()))
counter = 0
flag = True
while flag == True:
  for i,num in enumerate(nums):
    if num % 2 != 0:
      flag = False
    else:
      nums[i] = int(nums[i] / 2)
  counter += 1
    
print(counter - 1)

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

t = 0
bool = True
while bool:
    t += 1
    for j in range(len(l)):
        if l[j] % 2 == 1:
            bool = False
            break
        else:
            l[j] /= 2
print(t-1)

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

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

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

Solution (Python):


from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


def main():
    N =int(input())
    A = list(map(int, input().split()))
    ans = 0
    while True:
        ok = True
        for i in range(N):
            if A[i] != 0 and A[i] % 2 == 0:
                A[i] //= 2
            else:
                ok = False
        if not ok:
            break
        ans += 1

    print(ans)


if __name__ == '__main__':
    main()

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

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

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

print(ans)

Solution (Python):
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):
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())
list = input().split()

num_list = []
for c in list:
    n = int(c)
    num_list.append(n)

state = True

i = 0

while state:
    j = 0
    for n in num_list:
        if n % 2:
            state = False
        else:
            del num_list[j]
            n /= 2
            n = int(n)
            num_list.insert(j,n)
        j += 1
        if j == N and state:
            i += 1
print(i)

Solution (Python):

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


i = 0

while True:
    for v in A:
        if v % 2 ** (i + 1) != 0:
            print(i)
            exit()
    i += 1

Solution (Python):

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


i = 0

while True:
    for v in A:
        if v % 2 ** (i + 1) != 0:
            print(i)
            exit()
    i += 1

Solution (Python):
import sys


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


ans = sys.maxsize

for i, v in enumerate(A):
    cnt = 0
    j = v
    while j % 2 == 0:
        cnt += 1
        j //= 2
    ans = min(ans, cnt)

print(ans)

Solution (Python):

n=int(input())
a=list(map(int,input().split()))
ans=0
flag=True

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

Solution (Python):
import sys
import math
import collections
import itertools
import array
import inspect


sys.setrecursionlimit(10000)



def chkprint(*args):
    names = {
        id(v): k
        for k, v in inspect.currentframe().f_back.f_locals.items()
    }
    print(', '.join(
        names.get(id(arg), '???') + ' = ' + repr(arg) for arg in args))



def to_bin(x):
    return bin(x)[2:]


def li_input():
    return [int(_) for _ in input().split()]




dp = None


def main():
    N = int(input())
    A = li_input()

    ans = 0

    while True:
        A_ = []
        is_end = False

        for a in A:
            if a % 2 != 0:
                is_end = True
                break
            else:
                A_.append(a // 2)

        if is_end:
            break
        else:
            ans += 1
            A = A_[:]

    print(ans)


main()

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

import math
mn = min(x & (-x) for x in A)
print(int(math.log(mn, 2)))

Solution (Python):
N = int(input())
a = input().split()
ans = 200
for i in a :
  cnt = 0
  i = int(i)
  while(i % 2 == 0):
    i/=2
    cnt+=1
  if ans > cnt :
    ans = cnt
    
print(ans)

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

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
ans=float('inf')
for i in a:
  tmp=0
  while i>1:
    if i%2==0:
      tmp+=1
      i//=2
    else:
      break
  ans=min(ans,tmp)
print(ans)

Solution (Python):
N = int(input())
A = list(map(int,input().split()))
flag = True
n = -1
while flag:
  for a in A:
    if a%2 == 1:
      flag = False
  A = [int(a/2) for a in A]
  n += 1
print(n)

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

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

is_even = 1
n_operation = 0
while(is_even):
    a_list = [a/2 for a in a_list if a % 2 == 0]
    if len(a_list) < n:
        is_even = 0
    else:
        n_operation += 1
        
print(n_operation)

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

Solution (Python):
def SolveABC081B(array):
    print max(j for j in range(32) if all(i % 2**j == 0 for i in array))
    
input()
inputArray = map(int, raw_input().split())
SolveABC081B(inputArray)

Solution (Python):
import numpy as np
def IntLog2(N):
    k = 0
    while N%2 == 0:
        k += 1
        N /= 2
    return k

N = raw_input()
inputArray = map(int, raw_input().split())
Log2_inputArray = [IntLog2(n) for n in inputArray]
print min(Log2_inputArray)

Solution (Python):
from collections import defaultdict
import sys,heapq,bisect,math,itertools,string,queue,datetime
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inpl(): return list(map(int, input().split()))
def inpl_s(): return list(input().split())

N = int(input())
aa = inpl()
ans = INF
for a in aa:
	tmp = 0
	while a%2 == 0:
		a //= 2
		tmp += 1
	ans  = min(tmp,ans)
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 = input()
num_list = list(map(int, input().split()))

count = 0

while all([num % 2 == 0 for num in num_list]):
    for i in range(len(num_list)):
        num_list[i] = num_list[i]/2
    count += 1

print(count)

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

count = 0

while all([num % 2 == 0 for num in num_list]):
    for i in range(len(num_list)):
        num_list[i] = num_list[i]/2
    count += 1

print(count)

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

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

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

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

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

print(cnt)

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

count = 0
flag = False

while True:
    for i, A in enumerate(As):
        if A % 2 == 0:
            As[i] = int(A/2)
        else:
            flag = True
            break

    if flag:
        break

    count += 1

print(count)

Solution (Python):
n = int(input())
a_list = list(map(int, input().split()))
n_operation = 0
while(1):
    even_len = len([a for a in a_list if a % 2 == 0])
    if len(a_list) != even_len:
        print(n_operation)
        exit()
    else:
        a_list = [a / 2 for a in a_list]
        n_operation += 1

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

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

Solution (Python):
N = int(input())
A = list(map(int,input().split()))
counter = 0
queue = 0
L =[]
for h in range(N) :
    if A[h] % 2 != 0 :
        print(0)
        queue += 1
        break
if queue == 0 :
    while len(A) >= 1 :
        if A[0] % 4 == 0 :
            A[0] = A[0] // 2
            counter += 1
        else :
            A.pop(0)
            L.append(counter)
            counter = 0
    print(min(L)+1)

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

def odd_detector(a_list):
    is_odd = 0
    for a_i in a_list:
        if a_i % 2 == 1:
            is_odd = 1
            break
    return is_odd

n_division = 0
while odd_detector(a_list) == 0:
    a_list = [a / 2 for a in a_list]
    n_division += 1

print(n_division)

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

n_division = 0

def odd_detector(a_list):
    is_odd = 0
    for a_i in a_list:
        if a_i % 2 == 1:
            is_odd = 1
            break
    return is_odd

while odd_detector(a_list) == 0:
    a_list = [int(a/2) for a in a_list]
    n_division += 1

print(n_division)

Solution (Python):
def f(n):
    n=int(n)
    c=0
    while not n%2:
        c+=1
        n/=2
    return c

_=int(input())
l=map(f,input().split())
print(min(l))

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(round(ans))

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

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

Solution (Python):
n=int(input())
a=[int(i) for i in input().split()]
ans=40
for i in a:
    tmp=0
    while i%2==0 and tmp<ans:
        i//=2
        tmp+=1
    ans=min(ans,tmp)
print(ans)

Solution (Python):



def isALLEven(arr):
    for i in arr:
        if i % 2 != 0:
            return False
    return True


def devide(i):
    return i / 2

def main():
    count = 0
    
    n = int(input())
    
    lists = list(map(int, input().split()))

    
    while isALLEven(lists):
        count += 1
        lists = list(map(devide, lists))
    
    print("{}".format(count))
    
if __name__ == '__main__':
    main()

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

ans = 10**9

for x in a:
    y = 0
    while x % 2 == 0:
        y += 1
        x = x/2
    if y <= ans:
        ans = y

print(ans)

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

n = int(input())
a = [int(m) for m in input().split(" ")]

print(min([count_two(a_i) for a_i in a]))

Solution (Python):
N = int(input())
A = list(map(int,input().split()))
ans = 29
for x in A:
    cnt = 0
    for i in range(ans):
        if x % 2 == 0:
            x = x//2
            cnt += 1
        else:
            break
    ans = min(ans,cnt)
print(ans)

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

while fin < 1:
    cnt = 0
    for i in range(len(il)):
        if il[i] % 2:
            fin = 1
            break
        else:
            cnt += 1                                                                                              

    if cnt == len(il):
        for i in range(len(il)):
            il[i] = il[i] / 2
        ans += 1
    else:
        break

print(ans)

Solution (Python):
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 = list(map(int,input().split()))
count=0
hantei = [i%2 for i in a]
while sum(a)%2 ==0 and sum(hantei)==0:
        a = [i/2 for i in a]
        hantei = [i%2 for i in a]
        count+=1
print(count)

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

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

Solution (Python):
_ = input()
num_list = input().split(" ")
num_list = list(map(lambda x:int(x), num_list))
shift_counter = 0

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

while(True):
  if checker(num_list):
    print(shift_counter)
    break
  else:
    num_list = [int(n/2) for n in num_list]
    shift_counter += 1

Solution (Python):
def count_factor2(num):
    count = 0
    while True:
        if num % 2 == 0:
            count += 1
            num //= 2
        else:
            return count

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

print(min([count_factor2(num) for num in nums]))

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

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

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

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

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

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

Solution (Python):
n = int(input())
n = eval(input().replace(' ', '|'))
for i in range(2000):
    if n & 1 << i:
        print(i)
        break

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

ans = 9999
for a in src:
    tmp = 0
    while a%2 == 0:
        a //= 2
        tmp += 1
    ans = min(ans,tmp)
print(ans)

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

def devide(array, count):
	dividable = True
	for i in array:
		if ((i % 2) != 0):
			dividable = False
	if (dividable):
		for index, value in enumerate(array):
			array[index] = value / 2
		count += 1
		return devide(array, count)
	else:
		return array, count

devided, count = devide(A, 0)
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 numpy as np


if __name__ == '__main__':
    n = int(input())
    A = np.array([int(a) for a in input().split()], dtype=np.int)

    isEven = True
    count = 0
    while isEven:
        if (A%2).any() != 0 :
            isEven = False
            break
        A = A/2
        count+=1
    print(count)

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

print(min(X))

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

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

print(cnt - 1)

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

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

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

pow = 1
pow_at = pow
div_flg = True

while div_flg == True :
    for i in a :
        if i % 2**pow != 0 :
            div_flg = False
            pow_at = pow - 1
    pow += 1
            
print(pow_at)

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

Solution (Python):

def count(x):
    c = 0
    while True:
        if x == 1 or x == 0:
            return c
        x, v = divmod(x, 2)
        if v == 0:
            c += 1
        else:
            return c

def main():
    n = [int(x.strip()) for x in input().split()]
    a = [int(x.strip()) for x in input().split()]

    m = 10 ** 9
    for x in a:
        c = count(x)
        m = min(m, c)

    print(m)
    

if __name__ == '__main__':
    main()

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

Solution (Python):
n = input()
num_list = list(map(int, input().split()))
ans = 0
while all(n % 2 == 0 for n in num_list):
    num_list = list(map(lambda x: x // 2, num_list))
    ans += 1
print(ans)

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

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

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

Solution (Python):
import numpy as np

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

j = 0
while all(A%2 == 0):
        j += 1
        A = A/2
print(j)

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

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

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

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

Solution (Python):
n=int(input())
A=list(map(int,input().split()))
c=0
loop=True
while(loop):
    for a in A:
        if a%2!=0:
            loop=False
            break
    if loop:
        A = list(map(lambda i:i//2, A))
        c+=1
    else:
        break
print(c)

Solution (Python):
def f(x):
    cnt = 0
    while x % 2 ==0:
        cnt += 1
        x /= 2
    return cnt

n = input()
a = list(map(int, input().split(" ")))
print(min(list(map(f, a))))

Solution (Python):
A=int(input())
B=input().split()
ans=111111111
for i in range(A):
    C=int(B[i])
    cnt=0
    while C%2==0:
        C//=2
        cnt+=1
    if ans>cnt:
        ans=cnt
print(ans)

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

while True:
    for i in range(len(l)):
        
        if l[i] % 2 == 0:
            l[i] = l[i]/2
        else:
            print(num)
            flg = 0
            break
    if flg == 0:
        break
    else:
        num += 1
        continue

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

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

print(count)

Solution (Python):
def is_divisible(x):
    if x % 2 == 0:
        return True
    return False

num = int(input())
count = 0
lis = [int(n) for n in input().split()]

while all([is_divisible(n) for n in lis]):
    count += 1
    lis = [n//2 for n in lis]

print(count)

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

n = int(input())
n_list = [int(n) for n in input().split(" ")]

n_two_count_list = [two_count(n) for n in n_list]

print(min(n_two_count_list))

Solution (Python):
def two_count(x):
	if int(str(x)[-1]) % 2 == 0:
		return 1 + two_count(x//2)
	else:
		return 0

n = int(input())
n_list = [int(n) for n in input().split(" ")]

n_two_count_list = [two_count(n) for n in n_list]

print(min(n_two_count_list))

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

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

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

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

flag=1
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+=1

print(count)

Solution (Python):


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

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

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

print(mi)

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

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(raw_input())
A=map(int,raw_input().split())
def f(x):
  cnt = 0
  while x >= 2 and x % 2 == 0:
    x /= 2
    cnt += 1
  return cnt
C=map(f,A)
print min(C)

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

cnt = 0
t_f = True

while t_f == True:
    for i in range(N):
        if a[i] % 2 == 1:
            t_f = False
            break
        else:
            a[i] = a[i]//2
    cnt += 1
    
print(cnt - 1)

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

ans = float('inf')
for a in A:
    cnt = 0
    while a % 2 == 0:
        a /= 2
        cnt += 1
    ans = min(ans, cnt)
print(ans)

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

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

print(cnt)

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

cnt = 0

flag = 0
while flag != 1:
    for i, a_num in enumerate(A):
        if a_num % 2 == 1:
            flag = 1
            break
        else:
            A[i] = a_num/2
    if flag == 0: cnt += 1

print(cnt)

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

Solution (Python):
N=int(input())
A= [int(i) for i in input().split()] 
import sys
count=0
while count<1000000:
    for i in range  (N):
        if A[i]%2==0:
            A[i]=A[i]/2
        else:
            print (count)
            sys.exit()
    count+=1

Solution (Python):
from itertools import count

_ = input()
xs = [int(x) for x in input().split()]

print(next(i for i in count(0) if not all(x % (2**i) == 0 for x in xs)) - 1)

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

cnt = 0
can_div = True
while can_div:
    for i in range(len(As)):
        if (As[i] % 2) == 1:
            can_div = False
        As[i] /= 2
    if can_div == True:
        cnt += 1

print(cnt)

Solution (Python):
a = input()
a = input()


d = a.split()
cnt = 0
run = 1
while(run):
    for i in d:
        if(int(i)%2==1):
            run = 0
            break
    if(run):
        cnt = cnt + 1
        j = 0
        for i in d:
            d[j] = int(d[j])/2
            j = j + 1
print(cnt)

Solution (Python):


cnt = int(input())
num_list = list(map(int, input().split()))

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

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
def isOdd(n):
    return n % 2 == 1
def div2(n):
    return n // 2

res = 0
while True:
    if sum(map(isOdd, A)) > 0 or sum(A) == 0:
        print(res)
        exit()
    else:
        res += 1
        A = list(map(div2, A))

Solution (Python):
N = int(input())
A = [int(a) for a in input().split()]
n = 0
while(True):
    B = [b%2 for b in A]
    if sum(B) != 0:
        break
    else:
        A = [a//2 for a in A]
        n += 1
print(n)

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

c=0
while True:
    if not all([1-ai%2 for ai in a]):break
    a=[ai//2 for ai in a]
    c+=1    
print(c)

Solution (Python):
N = int(input())
L = list(map(int, input().split()))
count = 0
k = 0
for i in range(10000):
    for j in range(N):
        if L[j]%2 == 0:
            L[j] = int(L[j]/2)
        else:
            k = 1
            break
    if k == 1:
        break
    count += 1
    
print(count)