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()))
ans = 0
while True:
        for i in range(n):
                if a[i]%2 != 0:
                        print(ans)
                        exit()
                else:
                        a[i] //= 2
        ans += 1

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

Solution (Python):
counter = 0
judge = False
N = int(input())
a_list = input().split()

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


while True:
    for i in range(N):
        if not a_list[i]/2 == int(a_list[i] / 2):
            judge = True
            break
        a_list[i] = a_list[i] / 2
    if judge == True:break
    counter += 1


print(counter)

Solution (Python):
N = int(input())
numlist = list(map(int,input().split()))
temp = 9999999999999
for i in numlist:
	sum = 0
	if i % 2 != 0:
		temp =0
		break
	else:
		while i % 2 ==0:
			i //= 2
			sum += 1
		if temp > sum :
			temp = sum
			
print(temp)

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

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

count = 0
while True:
    even = True
    for n in a:
        if n % 2 == 1:
            even = False
    if even:
        count += 1
        a = [i / 2 for i in a]
    else:
        break
print(count)

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

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

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

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

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

ans = 0
flag = True

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

print(ans)

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
import math
result = 10**9
for i in range(n):
  temp = -1
  while a[i] == math.floor(a[i]):
    a[i] = a[i]/2
    temp += 1
  result = min(temp, result)
print(result)

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

Solution (Python):
from collections import Counter
def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a
n = int(input())
li = list(map(int, input().split()))

count2 = []
for i in range(n):
    fact = prime_factorize(li[i])
    count = Counter(fact)
    try:
        count2.append(count[2])
    except:
        print(0)
        exit()
print(min(count2))

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

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

while sum(map(lambda x: x%2, s)) == 0:
  s =list(map(lambda x: x/2, s))
  count+=1
  
print(count)

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

times=0
flg=1

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

print(times)

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

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

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

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

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

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

Solution (Python):
N = int(input())
a = list(map(int, input().split()))
cnt = 10000
for i in range(len(a)):
    tmp_cnt = 0
    while int(a[i] % 2) == 0:
        tmp_cnt += 1
        a[i] /= 2
    if tmp_cnt <= cnt:
        cnt = tmp_cnt
    else:
        continue
print(cnt)

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

print(count-1)

Solution (Python):
def main():
    n = int(input())
    a = list(map(int, input().split(' ')))
    def solve(num):
        counter = 0
        while num%2 == 0:
            counter += 1
            num /= 2
        return counter
    a = [solve(i) for i in a]
    print(min(a))
if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
a = list(map(int, input().split(' ')))
def solve(num):
    counter = 0
    while num%2 == 0:
        counter += 1
        num /= 2
    return counter
a = [solve(i) for i in a]
print(min(a))

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

Solution (Python):
def solve():
    cnt = 0
    while True:
        for i in range(n):
            if (li[i] % 2 != 0):
                print(cnt)
                return
            else:
                li[i] = li[i] // 2
        cnt += 1


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

solve()

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

counter = 0
remainder = 0

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

print(counter)

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

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

elems = [2 ** i for i in range(100)]

num_even = 0
cnt = 0
for i, e in enumerate(elems):
    for num in nums:
        num_even += num % e
    if num_even > 0:
        break
    else:
        cnt = i

print(cnt)

Solution (Python):
import sys
from functools import reduce
import copy
import math
from pprint import pprint
import collections


sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def int_inputs(num_of_input):
    ins = [int(input()) for i in range(num_of_input)]
    return ins


def solve(inputs):
    A = string_to_int(inputs[0])
    min_devide_num = -1
    for a in A:
        count = 0
        while a % 2 == 0:
            a /= 2
            count += 1
        if min_devide_num == -1 or min_devide_num > count:
            min_devide_num = count
    return min_devide_num


def string_to_int(string):
    return list(map(int, string.split()))


if __name__ == "__main__":
    input()
    ret = solve(inputs(1))
    print(ret)

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

ans = 10**9

for i in range(N):
    tmp = 0
    while(li[i]%2 == 0):
        li[i] /= 2
        tmp += 1
    ans = min(ans, tmp)

print(ans)

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

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

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

Solution (Python):
N = int(input())
A = [int(s) for s in input().split()]
kotae = 0
nanika=True
while nanika==True:
  count = 0
  for i in range(N):
    if A[i] % 2 == 0:
      count += 1
  if count == N:
    for i in range(N):
      A[i] //= 2
    kotae += 1
  else:
    nanika=False
print(kotae)

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

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

Solution (Python):
import fractions as f
n=int(input())
c=list(map(int, input().split()))
for i in range(1,n):
    c[i]=f.gcd(c[i-1],c[i])
ans=0
while True:
    if c[n-1]/2==c[n-1]//2:
        ans+=1
        c[n-1]/=2
    else:
        break
print(ans)

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

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

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

def divise_count(x):
  c = 0
  while x%2==0:
    x = x//2
    c += 1
  return c

ans = 1000000000
for a in A:
  ans = min(ans, divise_count(a))

print(ans)

Solution (Python):

n=input()
Numbers = list(map(int,input().split()))
ans=0
while all(x%2==0 for x in Numbers):
    ans+=1
    Numbers=[t/2 for t in Numbers]
print(ans)

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

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

a_divided = list(map(how_many_times_divisible,a))

ans = min(a_divided)

print(ans)

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

count, end =-1,0
while end==0:
    for i in range(N):
        if A[i]% 2 == 1:
            end=1
            break
    A= list(map(lambda x: x/2, A))
    count +=1
print(count)

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

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

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

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

for i in range(n):
    cnt = 0
    while a[i] % 2 == 0:
        a[i] //= 2
        cnt += 1
    if i == 0:
        min_cnt = cnt
    elif min_cnt > cnt:
        min_cnt = cnt
print(min_cnt)

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

print(int(b/n))

Solution (Python):
import numpy as np

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

def divide_by_2(array):
  rest = array % 2
  global cnt
  if np.all(rest == 0):
    cnt += 1
    divide_by_2(array / 2)
    
divide_by_2(A)
print(cnt)

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

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

count = 0
while True:
    if all(A[i]%(2**(count+1))==0 for i in range(n)):
        count += 1
    else:
        print(count)
        break

Solution (Python):
N = int(input())
A = [int(a) for a in input().split()]
count = 0
while(1):
    if all(a%2==0 for a in A):
        count += 1
        for i in range(N):
            A[i] /= 2
    else:
        break

print(count)

Solution (Python):
def bb081():
    n = int(input())
    an = list(map(int, input().split()))

    cnt = 0
    alleven = True
    while alleven:
        for i in range(0, n):
            if an[i]%2 == 0:
                an[i] /= 2
            else:
                alleven = False
                break
        if alleven:
            cnt += 1

    print(cnt)

bb081()

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

Solution (Python):
def slove():
    import sys
    import fractions
    input = sys.stdin.readline
    n = int(input().rstrip('\n'))
    gcd = 0
    a = list(map(int, input().rstrip('\n').split()))
    for v in a:
        gcd = fractions.gcd(gcd, v)
    c = 0
    while True:
        if gcd % 2 != 0:
            print(c)
            exit()
        else:
            gcd //= 2
            c += 1


if __name__ == '__main__':
    slove()

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

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

print(count)

Solution (Python):
_ = int(input())
isEven = True
l1 = map(int, input().split())
count = 0
l2 = []
while isEven:
    for i in l1:
        if i % 2 == 0:
            l2.append(i / 2)
        else:
            isEven = False
            break
    if isEven:
        l1 = l2.copy()
        l2 = []
        count = count + 1
print(count)

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

counter = 0

while True:
  a_list = [a//2 for a in a_list if not a%2!=0]
  if len(a_list) < n:
    break
  else:
    counter += 1
      
print(counter)

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

c = 0
while True:
    if all(n % 2 == 0 for n in nums):
        nums = list(map(lambda n: n / 2, nums))
        c += 1
    else:
        break

print(c)

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

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

Solution (Python):
N = int(input())
A = list(map(int,input().split()))
for i in range(10**9):
    A = [l//2 for l in A if l//2 == l/2 ]
    if len(A) != N:
        print(i)
        break

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

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

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

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

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

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

print(ans)

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

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

t=0


judge=True

while judge:
    for a in A:
        if a%2!=0:
            judge=False
            break
    if judge:
        A = [i//2 for i in A]
        t+=1

print(t)

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

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

Solution (Python):
N=int(input())
a=[int(x) for x in input().split()]
c=0
e_odd=False
while not e_odd:
	for i in range(N):
		if (a[i]%2==0):
			a[i]=a[i]//2
		else:
			e_odd=True
			break
	else:
		c+=1
print(c)

Solution (Python):
def devide(target, step):
    if (target % 2 == 0):
        step += 1
        step = devide(target / 2, step)

    return step


def resolve():
    N = int(input())
    targets = list(map(int, input().split()))
    min_step = 10000
    for i in range(N):
        step = devide(targets[i], 0)
        if(step < min_step):
            min_step = step
    print(min_step)
    
resolve()

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
l=[]
for i in range(30):
    c=i
    for j in range(n):
        if a[j]%2==0:
            a[j]//=2
        else:
            l.append(c)
            break
print(l[0])

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

DA = []
for v in A:
    d = 0
    while v & 1 == 0:
        v = v >> 1
        d += 1
    DA.append(d)

print(min(DA))

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

Solution (Python):
n = int(input())
li = list(map(int,input().split()))
li = [bin(x) for x in li]

ans = 10**6
for i in range(len(li)):
    ans = min(ans,len(li[i])-li[i].rfind("1")-1)
print(ans)

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

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

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

ans = 10**9
for i in range(n):
    tmp = 0
    for j in range(10 ** 9):
        if a[i] % 2 == 0:
            a[i] //= 2
            tmp += 1
        else:
            ans = min(ans, tmp)
            break
print(ans)

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

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

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

print(c)

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

n = int(input())
a = list(map(int,input().split()))
b = 0
c = 2
f = 0


while True:
    for i in a:
        if i % c > 0:
            f = f +1
            break
    if f == 1:
        break

    b = b + 1
    c = c * 2



print(b)

Solution (Python):
import sys

n = int(input())
a_L = list(map(int,input().split()))
counter = 0


while True:
    for val in a_L:
        if val % 2 != 0:
            print(counter)
            sys.exit(0)
    counter +=1
    a_L = [i/2 for i in a_L]

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

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

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

ans = min(map(func, A))
print(ans)

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
odd = True
ans = 0
def half(x):
    return x/2
while odd:
  if all(i%2 == 0 for i in a):
    ans+=1
    a = list(map(half,a))
  else:
    odd = False
print(ans)

Solution (Python):
import numpy as np

input()
x = np.array(input().split(),dtype='int32')

ans = 0

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

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

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

cnt_list = [0 for _ in range(len(a))]

i = 0

for a_i in a:
    while a_i % 2 == 0:
        cnt_list[i] += 1
        a_i /= 2
    i += 1

print(min(cnt_list))

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

DA = []
for v in A:
    d = 0
    while v%2 == 0:
        v //= 2
        d += 1
    DA.append(d)

print(min(DA))

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


def cal_one(n):
    return n%2

def cal_two(n):
    return n//2

ans = 0
while True:
    if sum(list(map(cal_one,a))):
        print(ans)
        exit()
    else:
        a = list(map(cal_two,a))
        ans += 1

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

flag=0
ans=[]
for a in A:
  if a%2==0:
    count=0
    while a%2==0:
      a=a/2
      count=count+1
    ans.append(count)
  else:
    flag=1
    
if flag==0:
  print(int(min(ans)))
else:
  print(0)

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

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

Solution (Python):
def printAnsewer(ans):
    print(ans)


def calc(num) :
    for index, num_for_divide in enumerate(num):
        if int(num_for_divide) % 2 != 0 :
            return False
            break
        num[index] = int(num_for_divide) / 2
    return True

num_of_number = int(input())
num = input().split()

count = 0

while calc(num) == True:
    count += 1


printAnsewer(count)

Solution (Python):
def calc(l):
    r = 0
    finish = False
    while True:
        for i in range(0, len(l)):
            if l[i] % 2 == 0:
                l[i] = l[i]//2
            else:
                finish = True
                break
        if finish:
            break
        r += 1

    return r


_ = input()
l = list(map(int, input().split()))
r = calc(l)
print(r)

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

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
count = 0
div = 2
flag = False
while True:
  for a in A:
    if a % div != 0:
      flag = True
      break
  if flag:
    break
  else:
    count += 1
    div *= 2

print(count)

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

i=1
X=True
while X==True:
    for j in range(N):
        if A[j]%2**i!=0:
            X=False
            break
    i+=1
print(i-2)

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

out = 0
loop = True

while loop:
  for i in range(0, n):
    if a[i] % 2 == 1:
      loop = False
      break
    a[i] = a[i]/2
  if loop:
    out += 1

print(out)

Solution (Python):

from functools import reduce
from operator import or_


def main():
    
    N, *A = map(int, open(0).read().split())
    x = reduce(or_, map(int, A))
    ans = bin(x)[::-1].find("1")
    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):
import copy

N = int(input())
A = list(map(int,input().split()))
ans = 0
while 1:
  newA = []
  for a in A:
    if a % 2 == 0:
      newA.append(a//2)
    else:
      print(ans)
      exit()
  ans += 1
  A = copy.deepcopy(newA)
print(ans)

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

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

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

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

Solution (Python):

N = int(input())
A = list(map(int, input().split()))
n = 0
cont = True

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

print(n)

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

count = 0
flag = 0

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


	count += 1 if flag == 0 else +0

print(count)

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

Solution (Python):
import numpy as np

N = int(input())
A = np.array(list(map(int,input().split())))
B = A
count = 0
while True:
  B = A//2
  A = A/2
  C = A-B
  if max(C) != 0:
    break
  count += 1
print(count)

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
t = 0
def exist_odd(A):
  B = list(map(lambda x : x%2, A))
  return any(B)
  
while exist_odd(A) != True:
  A = list(map(lambda x: x // 2, A))
  t = t+1
print(t)

Solution (Python):
def two(n,m):
  if n<=0:
    return -1
  elif n%2==0:
    return two(n//2,m+1)
  else:
    return m

N=int(input())
A=list(map(lambda x: two(int(x),0),input().split()))


print(min(A))

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) :
    for i in range(len(A)): A[i] = A[i]/2
    c += 1
print(c)

Solution (Python):
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    

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

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

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

Solution (Python):
n=int(input())
p=list(map(int,input().split()))
p_=[]
b=False
c=0
while b==False:
  p_=list(map(lambda in_:in_%2,p))
  b = 1 in p_
  p=list(map(lambda in_:int(in_/2),p))
  c+=1
print(c-1)

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

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

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

Solution (Python):
def shift_only():
    _ = int(input())
    A = sorted(set(map(int, input().split())))

    count = 0
    temp = A
    while True:
        temp = [num / 2 for num in temp if num % 2 == 0]
        if len(temp) == len(A):
            count += 1
        else:
            print(count)
            break

if __name__ == "__main__":
    shift_only()

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

ans = 0
while True:
    A = [a//2 if a%2 == 0 else 0 for a in A]
    if not all(A):
        break
    ans += 1
print(ans)

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

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

count=0
while True:
  for number in numbers:
    if number%2 != 0:
      print(int(count))
      quit()
      
  numbers = list(map(lambda number:number/2,numbers))
  count += 1

print(int(count))

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

for i in A:
    temp = format(i, 'b')
    ans = min(ans, len(temp) - temp.rfind('1') - 1)

print(ans)