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 = []
for tmp in range(len(a)):
    b = a[tmp]
    c = 0
    while True:
        if b%2 != 0:
            ans.append(c)
            break
        else:
            b /= 2
            c += 1
print(min(ans))

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

for i in range(1,31):
  b = np.array([n/2 if n%2==0 else 0 for n in a])
  a = b
  if 0 in list(b):
    print(i-1)
    exit()

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

Solution (Python):
n=int(input())
i=0
num=input().split()
t=True
while t==True:
  for j in range(n):
    if int(num[j])%2==1:
      t=False
      break
    else:
      num[j]=int(num[j])/2
  i += 1
print(i-1)

Solution (Python):



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


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


def calc(s):
    for i in range(n):
        s[i] = s[i] / 2
    return s


count = 0
while True:
    if check(s):
        s = calc(s)
        count += 1
    else:
        break


print(count)

Solution (Python):
from functools import reduce
from operator import or_

n = int(input())
x = reduce(or_, map(int, input().split()), 0)
print((x & -x).bit_length() - 1)

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

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**15
mod = 10**9+7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def M(n): return ModInt(n)
def MI(): return M(I())


def main():
    n = I()
    a = LI()
    r = inf
    for c in a:
        tr = 0
        while c%2 == 0:
            c/=2
            tr+=1
        if tr < r:
            r = tr
    return r



print(main())

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

for x in xrange(30):
    if [y for y in F if y%(2 ** (x + 1))]:
        break

print x

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

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

print ans

Solution (Python):


def div(A,N):
	for n in range(N):
		A[n] = A[n]//2

N = int(input())
A = list(map(int, input().split(' ')))
f = 1
cnt = 0
ans = 0

while True:
	for a in A:
		if(a%2 == 0): cnt += 1
	if cnt == N: 
		div(A,N)
		ans += 1
		cnt = 0
	else: break

print(ans)

Solution (Python):
def gusu(N,A):
    t=0
    for i in range(0,N):
        if(int(A[i])%2==1):
            t=1

    if(t==1):
        return 0
    else:
        return 1

N=int(input())

A_input = input()
A = A_input.split()

flag=0
while(1):
    if(gusu(N,A)==1):
        flag+=1
        for j in range(0,N):
            A[j]=int(A[j])/2
    else:
        break

print(flag)

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

count = 0
sw = 1

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

print(count)

Solution (Python):



def even_count(array,num):
    count = 0
    for i in range(num):
        if array[i]%2 == 0:
            count += 1
    return(count)

num = int(input())
a = [int(i) for i in input().split()]
count = 0
even = 0
while True:
    even = even_count(a,num)
    if even != num:
        break
    else:
        a = list(map(lambda x:x/2, a))
        count += 1
    even = 0

print(count)

Solution (Python):
import sys
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt, ceil, floor
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache, reduce
from operator import xor
INF = float("inf")
sys.setrecursionlimit(10**7)


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


def inside(y: int, x: int, H: int, W: int) -> bool: return 0 <= y < H and 0 <= x < W


def main():
    N = int(input())
    A = list(map(int, input().split()))
    for ans in count(0):
        for i in range(N):
            if A[i] % 2 != 0:
                print(ans)
                return
            else:
                A[i] //= 2


if __name__ == '__main__':
    main()

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

Solution (Python):
def b_shift_only(N, A):
    def is_even(lst):
        
        for x in lst:
            if x % 2 == 1:
                return False
        return True
    a = A[:]
    count = 0
    
    while is_even(a):
        a = [x // 2 for x in a]
        count += 1
    return count

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

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

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

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

Ans = 0

but = 0

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

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

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

Solution (Python):
N = int(input())
P = list(map(int,input().split()))
S = []
a = 0
p = 0
s = 0
while True:
    
    for i in range(N):
        if P[i] % 2 == 1:
            s = 1
        else:
            P[i] = P[i] / 2
    if s == 1:
        break
    a += 1

print(a)

Solution (Python):
C=int(input())
D=list(map(int,input().split()))
S=0
flag=0
while(flag==0):
	for I in range(C):
		if D[I]%2==0:
			D[I]/=2
			if I==(C-1):
				S+=1
		else:
			flag=1
			break	
print(S)

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

count = 10000000000000
for Ai in A:
	buff = 0
	while Ai % 2 == 0:
		Ai = Ai / 2
		buff += 1
	count = min(buff, count)
print(count)

Solution (Python):
n = int(input())
num = list(map(int, input().split()))
a = 0
y=[]

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

print(min(y))

Solution (Python):
import numpy as np

n = int(input())
a = list(map(int, input().split()))
z = np.ones(n) * 2
count = 0

for i in range(1000000000) :
  b = filter(lambda x: x%2 == 1, a)
  if len(list(b)) >= 1 :
    break
  else :
    a = a / z
    count += 1

print (count)

Solution (Python):
N = int(input())
lis = list(map(int,input().split()))
min = 100
for item in lis:
    i = item
    count = 0
    while (i % 2) == 0:
        count += 1
        i /= 2
    if min > count:
        min = count
print (min)

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

def all_devided_2(A):

	for i in range(len(A)):
		if A[i] % 2 != 0:
			return False
	return True

res = 0
while all_devided_2(A) == True:
	res += 1
	for i in range(len(A)):
		A[i] //= 2;

print(res)

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

Solution (Python):
raw_input()
t=map(int, raw_input().split(" "))
count=0

while True:
    flag=True
    for i in t:
        if i % 2 != 0:
            flag=False
    if not flag:
        break
    else:
        t = [x / 2 for x in t]
        count+=1
        
print count

Solution (Python):
N=int(input())
AS=map(int,input().split())
tw=[]
for num in AS:
    cnt=0
    while num%2==0:
        num/=2
        cnt+=1
        if num==1:
            break
    tw.append(cnt)
print(min(tw))

Solution (Python):
i = int(input()); 
j = input();
list = j.split(" ", i-1)
for y in list:
  y = int(y)
results = [0]*i
for x in range(0,i):
  while (int(list[x]) % 2 == 0):
    if (int(list[x]) % 2 == 0):
      list[x] = int(list[x]) /2 
      results[x] += 1
print(min(results))

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

    cnt = []
    apnd = cnt.append
    for i in A:
        if i & 1:
            print(0)
            return
        else:
            j = 0
            x = i
            while 1:
                x = x // 2
                j += 1
                if x & 1:
                    apnd(j)
                    break
    print(min(cnt))

main()

Solution (Python):
N = int(input())
hoge = True
fuga = True
count = 0

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

for i in range(N - 1):
    if l[i] % 2 == 1:
        hoge = False
        break

while True:
    if hoge == False:
        break
    for j in range(N):
        if l[j] % 2 == 1:
            fuga = False
            break
        l[j] = l[j] / 2
    if fuga == False:
        break
    count += 1

if hoge == False:
    print(0)
else:
    print(count)

Solution (Python):
N = input()
A = input().split()

total = 0
judge = 0
while judge == 0:
    li = []
    for a in A:
        if int(a) % 2 == 0:
            li.append(int(a)//2)
        else:
            judge = 1
    if judge == 0:
        total += 1
    A = li

print(total)

Solution (Python):
n = input()
b = [int(x) for x in input().split()]
c = 0
flg = True
while flg:
    for i,x in enumerate(b):
        if x!=0 and x%2 != 0:
            flg=False
            break
        b[i] = int(x/2)
    c += 1
print(c-1)

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

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

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

print(ans)

Solution (Python):
import numpy as np

s=input()
ar=np.array(list(map(int,input().split())))

i=0
while(np.all(ar%2==0)):
    i+=1
    ar//=2
print(i)

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

def h():
    m = 0
    while True:
        for i in range(n):
            if a_l[i]%2 == 1: return m
            a_l[i] = a_l[i]/2

        m += 1

print(h())

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

Solution (Python):
N =int(input())
list = input().rstrip().split()


flg = True
for i in range(N):
    if int(list[i])%2 == 1:
        flg = False
count = 0
while flg:
    x = 0
    for x in range(N):
        if int(list[x])%2 == 1:
            flg = False
            break
        else:
            list[x] = str(int(list[x])//2)
    if flg:
        count +=1
print(count)

Solution (Python):

def re_into(nums, count, list_size):
    numbers = []
    for i in nums:
        if i % 2 == 0:
            numbers.append(i // 2)

    if len(numbers) == list_size:
        count += 1
        re_into(numbers, count, list_size)
    else:
        print(count)


n = input()
nums = list(map(int, input().split()))
l = len(nums)

re_into(nums, 0, l)

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

def gcd( x, y ):
    while y != 0:
        x, y = y, x%y
    return x

Z = A[0]

for i in range(N):
    Z = gcd(Z ,A[i])

flag = 0
i = 0

while flag == 0:
    if Z % pow(2,i) == 0:
        i += 1
    else :
        flag = 1

print(i-1)

Solution (Python):
def main():
    N = int( input() )
    A = [int(i) for i in input().split()]
    
    b_flag = False
    n_div = 0
    while True:
        for a in A:

            if(a % 2 != 0):
                b_flag = True
            
        if(b_flag):
            break
        else:
            A = [i / 2 for i in A]
            n_div += 1
    print(n_div)
    
    
if __name__=="__main__":
    main()

Solution (Python):


n = int(input())
data = input()
a = data.split(" ")
count = 0
sum = 0
i = 0
while i < n:
    if int(a[i])%2==0:
        a[i]=int(a[i])/2
        count+=1
        if count%n==0:
            sum+=1
        i += 1
    else:break
    if i==n:i -= n
    
print(sum)

Solution (Python):
import sys

DBG_FLAG = 1

def pdbg(str):
    if(DBG_FLAG == 1):
        sys.stdout.flush()
        print str

def max_num(num):
    if(num % 2):
        return 0
    else:
        return 1 + max_num(num / 2)


N = int(raw_input())
array = map(int, raw_input().split())




min = 1
num = 0

ans = []

for item in array:
    ans.append(max_num(item))

ans.sort()

print ans[0]

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

Solution (Python):
N = int(input())
data = input().split()
data = data[:N]

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

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

Solution (Python):



N = int(input())
A = input().split()
l = len(A)
n = 0

for i in range(l):
    A[i] = int(A[i])

def check(list):
    leng = len(list)
    for j in range(leng):
        if list[j] % 2 == 1:
            return 1
    return 0

while check(A) == 0:
    for s in range(l):
        A[s] = A[s] / 2
    n += 1

print(n)

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

while all([j % 2 == 0 for j in nums]):
    
    count += 1
    nums = [int(x) // 2 for x in nums]
    
print(count)

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

count = 0
while all([x % 2 == 0 for x in A]):
    A = [x >> 1 for x in A]
    count += 1

print(count)

Solution (Python):
N = int(input())
A = [int(i) for i in input().split(' ')]
for i in range(10**9):
 if sum([i%2 for i in A])>0:
  print(i)
  break
 else: A = [i/2 for i in A]

Solution (Python):
N=int(input())
A=list(map(int,input().split()))
count=[0 for i in range(N)]

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

print(min(count))

Solution (Python):
import numpy as np

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

count = 0
while 1:
    if np.count_nonzero(A % 2) == 0:
        count += 1
        A = A // 2
    else:
        break

print(count)

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

for i in range(0,35):
	k = 2 << i
	B = list(map(lambda x:x%k,A))
	if B.count(0) != N:
		print(i)
		exit(0)

Solution (Python):
n = int(raw_input())
ans = 100
x = map(int,raw_input().split(" "))
for a in x:
  a = bin(a)
  a = a[a.rfind("1"):]
  a = len(a)
  if ans > (a-1):
    ans = a-1
print ans

Solution (Python):

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

def gusuka(date):
    for i in range(N):
        if date[i]%2!=0:
            return False
    return True

count = 0
if gusuka(inp):
    count += 1
    while True:
        for i in range(N):
            inp[i] = inp[i]/2
        if gusuka(inp):
            count += 1
        else:
            break

print(count)

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

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

Solution (Python):
def gcm(a,b):
  while b:
    a,b=b,a%b
  return a
n = input()
a = [int(x) for x in [i for i in input().split()]]
r=-1
for i in a:
  if r==-1:
    r=i
    continue
  r=gcm(r,i)
x=0
while r!=1:
  if r%2!=0:
    x=-1
    break
  r/=2
  x+=1
  
print(x)

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

for j in range(1000):
    count_are=0
    for i in range(n):
        if a[i]%2==0:
            count_are=count_are+1
    if count_are==n:
        count=count+1
        for i in range(n):
            a[i]=a[i]/2
    else:
        break

print(count)

Solution (Python):


N=int(input())
a1=input().split()
A = [int(i) for i in a1]
x = [0 for i in range(N)]
for i in range(N):
    for j in range(30):
        if A[i]%2 == 0:
            A[i]= A[i]/2
            x[i] = x[i]+1
print(min(x))

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

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
m = 10000000000
for i in range(N):
    cnt = 0
    temp = A[i]
    while temp % 2 == 0:
        temp = temp / 2
        cnt += 1
    if m > cnt:
        m = cnt
print(m)

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

Solution (Python):


def div(A,N):
	for n in range(N):
		A[n] = A[n]//2

N = int(input())
A = list(map(int, input().split(' ')))
f = 1
cnt = 0
ans = 0

while True:
	for a in A:
		if(a%2 == 0): cnt += 1
	if cnt == N: 
		div(A,N)
		ans += 1
		cnt = 0
	else: break

print(ans)

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

res = 0
end = False
buf = a[:]
while True:
  for i,v in enumerate(buf):
    if v % 2 == 0:
      buf[i] = v // 2
    else:
      end = True
      break
  if not end:
    res += 1
  else:
    break

print(res)

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

print count

Solution (Python):
def judge(L):
    for l in L:
        if l % 2:
            return False

    return True

def solve():
  N = int(input())
  A = list(map(int, input().split(" ")))

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

  print(cnt)


solve()

Solution (Python):
if __name__=="__main__":
    count = 0
    idx = int(input())
    n = list(map(int,input().split(" ")))
    while True:
        for i in range(idx):
            if n[i]|1==n[i]:
                print(count)
                exit()
            else:
                n[i]=n[i]>>1
        count+=1

Solution (Python):



"""abc081_b"""

import sys
import pprint
import re

import itertools
pp = pprint.PrettyPrinter(indent=2)

def main():
    """Main function."""
    n = int(input())
    as_ = list(map(int, input().split(' ')))

    count = 0
    while True:
        odds = list(filter(lambda x: x % 2 != 0, as_))
        if odds:
            break
        else:
            count += 1
            as_ = list(map(lambda x: x >> 1, as_))

    print(count)

if __name__ == '__main__':
    sys.exit(main())

Solution (Python):
import sys
s=input()
a=[]
a=map(int,raw_input().split())

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

Solution (Python):




def test(n, a):
    count = 0
    while(True):
        for i in range(n):
            a[i] = int(a[i])
            if a[i]%2 == 0:
                a[i] /= 2
                if i == n-1:
                    count += 1
            else:
                return count
    return count

if __name__ == "__main__":
    n = int(input())
    a = input().split(" ")
    print(test(n, a))

Solution (Python):
from copy import deepcopy
def howmanytimes(x):
	global count
	flag=False	
	for i in range(len(x)):
		if x[i]%2==0:
			x[i]=int(x[i]/2)
		else:
			flag=True
	if flag:
		return 0
	else:
		count+=1
		howmanytimes(x)
	
			
a=int(input())
t=list(map(int,input().split()))
q=deepcopy(t)
count=0
howmanytimes(q)
print(count)

Solution (Python):
import math

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

mincnt = 250

for i in range(N):
    tmp = A[i]
    tmpcnt = 0
    while tmp%2 == 0:
        tmp = math.floor(tmp/2)
        tmpcnt += 1

    if mincnt > tmpcnt:
        mincnt = tmpcnt

print(mincnt)

Solution (Python):


N = int(raw_input())
As = map(int, raw_input().split())

count = 0
flag = 0

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

print count

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

Solution (Python):
N = int(input())
A = input().split(" ")
ans =0
judge = True
while judge:
    temp = 0
    for i in range(len(A)):
        if int(A[i])%2 == 0:
            temp +=1
            A[i]=int(A[i])/2
    if temp == len(A):
        ans += 1
    else:
        judge=False
        
        print(ans)

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

import numpy as np
A = np.array(A)

ans = 0
while 1:
    if(sum(A%2) == 0):
        ans += 1
        A = A/2
    elif(sum(A%2) != 0):
        break;
print(ans)

Solution (Python):
def main():
    n=input()
    a=[int(i) for i in input().split()]
    ans=0
    f=False
    while True:
        for k,v in enumerate(a):
            if v%2==0:
                a[k]=a[k]//2
            else:
                print(ans)
                f=True
                break
        if f:
            break
        else:
            ans+=1

if __name__=='__main__':
    main()

Solution (Python):


import sys

def main(argv):
    line = sys.stdin.readline()
    while line:
        N = line.rstrip("\n")
        A = map(lambda a: int(a), sys.stdin.readline().rstrip("\n").split(" "))
        count = 0
        flag = True
        while flag:
            for i in xrange(len(A)):
                if A[i] % 2 != 0:
                    flag = False
                    break
                A[i] = A[i] / 2
            else:
                count += 1
        print count

        line = sys.stdin.readline()

if __name__ == "__main__":
    main(sys.argv)

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

    c = 0
    while 1:
        if all(A[i] % 2 == 0 for i in range(N)):
            for j in range(N):
                A[j] /= 2
            c += 1
        else:
            break
    print(c)


if __name__ == "__main__":
    main()

Solution (Python):
import sys

line = sys.stdin.readline().strip()
N = int(line)

line = sys.stdin.readline().strip()
A = [int(x) for x in line.split()]

r = 0
while 1:
    if all(x % 2 == 0 for x in A):
        A = [x // 2 for x in A]
        r += 1
    else:
        break

print(r)

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

Solution (Python):

import sys
N = int(sys.stdin.readline())
line = sys.stdin.readline()
A = [ int(i) for i in line.strip().split() ]
min = 999999
for a in A:
    cnt = 0
    while(min > cnt):
        if a%2 == 1:
            min = cnt
            break
        else:
            a = a/2
            cnt += 1
print(cnt)

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

ans = 10**1000
for a in A:
    counter = 0
    while(a%2 == 0):
        a = a//2
        counter += 1
    ans = min(ans,counter)
print(ans)

Solution (Python):
import numpy as np
n = int(input())
data = np.array(list(map(int, input().split())))
count = 0
while np.sum(data % 2 != 0) == 0:
    data = data / 2
    count += 1
print (count)

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

a_s = input().split()
for i in range(n):
    a_s[i] = int(a_s[i])

cnt = 0
flag = True
while flag:
    for i in range(n):
        a_s[i] = a_s[i]/2
        if a_s[i]%1 == 0.5:
            print(cnt)
            flag = False
            break
        
    cnt += 1

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

def w(x):
  if x % 2 ==0:
    return x / 2
  else:
    return 0
n=0
while min(a)>0:
  a=[w(i) for i in a]
  n+=1
  if min(a)==0:
    n-=1
print(n)

Solution (Python):
def func(a):
  cr = 0
  num = a
  while(1):
    if num % 2:
      return cr
    else:
      num = num//2
      cr +=1

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

maxnum = max(l)

for i in range(int(n)):
  cr = func(l[i])
  maxnum = min(maxnum,cr)
  
print(maxnum)

Solution (Python):


import numpy as np
s=input()
a=list(map(int,input().split()))
na=np.array(a)
ans=0
while True:
    if sum(na%2)==0:
        na=na/2
        ans+=1
    else:
        break
print(ans)

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


print(c)

Solution (Python):
input()
num = map(int, raw_input().split())
n = int()
while True:
    num = map(lambda x: -1 if x%2 else x/2, num)
    if -1 in num:
        print n
        break
    n += 1

Solution (Python):
import math
import itertools
import heapq
from sys import stdin, stdout, setrecursionlimit
from bisect import bisect, bisect_left, bisect_right
from collections import defaultdict, deque








def LM(t, r): return list(map(t, r))
def R(): return stdin.readline()
def RS(): return R().split()
def I(): return int(R())
def F(): return float(R())
def LI(): return LM(int,RS())
def LF(): return LM(float,RS())
def ONE_SL(): return list(input())
def ONE_IL(): return LM(int, ONE_SL())
def ALL_I(): return map(int, stdin)
def ALL_IL(): return LM(int,stdin)


def ap(f): return f.append
def pll(li): print('\n'.join(LM(str,li)))
def pljoin(li, s): print(s.join(li))




def main():
	N = I()
	A = LM(lambda x:x/2, LI())
	_A = [i%2==0 for i in A]

	if sum(_A) == N:
		ans=1
		while sum(_A)==N:
			ans+=1
			A = [i/2 for i in A]
			_A = [i%2==0 for i in A]

	else:
		ans=0
	
	print(ans)

if __name__ == '__main__':
	main()

Solution (Python):
n = int(input())
nums = list(map(int, input().split()))
count = 0
def judge(n, nums, count):
  for i in range(10000):
    for j in range(n):
      if nums[j] % 2 == 0:
        nums[j] /= 2
      else:
        return count
    count += 1

print(judge(n, nums, count))

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

Solution (Python):
N=int(input())
st=input().split()
count=30
for i in range(N):
    a=int(st[i])
    cp=0
    while(True):
        if a%2==1:
            break
        else:
            a=a//2
            cp+=1
    if count>cp:
        count=cp
print(count)

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

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

result = 0
while True:
    num = [A[i] % 2**(result + 1) for i in range(N)]
    if num.count(0) != N:
        break
    result += 1

print(result)

Solution (Python):
N = int(input())
listA = list(map(int,input().split()))
count = [0 for i in range(N)]

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


print(min(count))

Solution (Python):
 
N = int(input())
s = input().split()
s = [int(i) for i in s]
ans = []
for i in range(N):
    ans_sub = 0
    while s[i] / 2 == int(s[i] / 2) : 
        ans_sub += 1
        s[i] /= 2
    ans.append(ans_sub)
print(min(ans))

Solution (Python):
num = int(input())
val = [int(x) for x in input().split()]

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

print(cnt)

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

ans = 0
while True:
    ok = True
    for i, a in enumerate(A):
        if a % 2 == 0:
            A[i] //= 2
        else:
            ok = False
            break
    if not ok:
        break
    ans += 1

print(ans)

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

ans = float("inf")
for i in range(n):
    if(a[i] % 2 == 1):
        ans = 0
        break
    else:
        tmp = a[i]
        count = 0
        while(tmp % 2 == 0):
            tmp /= 2
            count += 1
        if(count < ans):
            ans = count
print(ans)

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

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