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



Sample input:
3
8 12 40


Sample output:
2

Submission status: Accepted

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

ans = 10 ** 9
for a in A:
    x = 0
    while a > 1:
        if a % 2 != 0:
            break
        a //= 2
        x += 1
    ans = min(ans, x)

print(ans)

Submission status: Accepted

Solution code:
N = input()
x = list(map(int, input().split()))
end = True
count = 0

def div2(y):
    return y / 2

while end:
    for i in x:
        if i % 2 == 1:
            end = False
            break
    else:
        count += 1
        x = list(map(div2, x))
        continue
    break
print(count)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
n=int(input())
A=list(map(int,input().split()))
ans=float("inf")
for a in A:
  count=0
  while a%2==0:
    count+=1
    a//=2
  ans=min(ans,count)
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
a_list = list(map(int, input().split(' ')))
max_count = 10 ** 9
for i in a_list:
    i, j = divmod(i, 2)
    count = 0
    while j == 0:
        count += 1
        i,j = divmod(i, 2)
    if max_count >= count:
        max_count = count
print(max_count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
a = list(map(int, input().split()))
count =0
flag = "true"
while flag=="true":
  for k in range(n):
    if a[k]%2==0:
      a[k] //= 2
    else:
      flag = "false"
      break
  count += 1
print(count-1)

Submission status: Accepted

Solution code:
N = int(input())

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

count = 0
t = 0

while t == 0:
    for i in range(N):
        if s[i] % 2 != 0:
            t = 1
            count -= 1
            break
        else:
            s[i] = int(s[i]/2)
    count += 1
    
print(count)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

cnt = 0
flg = True
while flg:
    for i, item in enumerate(A):
        if item % 2 == 0:
            A[i] = int(item / 2)
        else:
            flg = False
            break
    if flg:
        cnt += 1
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
lst = sorted(list(map(int, input().rstrip().split())))
count = 0

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

print(count)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
n_cnt=int(input())
n=list(map(int,input().split()))
output=-1
flag=True

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

Submission status: Accepted

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

l=[]

for k in a:
  m=0
  while k%2==0:
    k=k/2
    m +=1
  l.append(m)

print(min(l))

Submission status: Accepted

Solution code:

# ABC-081_B-ShiftOnly

N = int(input())
in_list = input().split()

div_list = []
count = 1
times = 0

while count == 1:
    for i in range(N):
        if int(in_list[i])%2 == 0:
            in_list[i] = int(in_list[i])/2
        else:
            count = 0
            break;
    if count == 1:
        times += 1

print(times)

Submission status: Accepted

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

carray = []
for i in a:
  c = 0
  while i != 0 and i % 2 == 0:
    i /= 2
    c += 1
  carray.append(c)
print(min(carray))

Submission status: Accepted

Solution code:
def is_even_list(A):
    for a in A:
        if (int(a) % 2 == 1):
            return False
    return True

def divide_list(A):
    newA = []
    for a in A:
        newA.append(int(a) / 2)
    return newA

N = int(input())
A = input().split()
count = 0

while(is_even_list(A)):
    A = divide_list(A)
    count += 1
print(count)

Submission status: Accepted

Solution code:
_,*a=map(int,open(0).read().split())
c=0
while True:
  if any([e%2>0 for e in a]):
    break
  else:
    c+=1
    a=[e/2 for e in a]
print(c)

Submission status: Accepted

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

count = 0
while 1:
  a = Ss % 2 == 0
  if (a.sum() != Ss.size):
    break
  Ss = Ss/2
  count += 1
print(count)

Submission status: Accepted

Solution code:
import re

n = int(input())
a = input()
a = re.split(" ",a)

count = 0
ans = 0
while(count == 0):
    for i in range(len(a)):
        if(int(a[i])%2 == 1):
            count = 1
    if(count == 0):
        ans += 1
        for i in range(len(a)):
            a[i] = int(a[i])/2
print(ans)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
def ii(): return int(input())
def mi(): return map(int, input().rstrip().split())
def lmi(): return list(map(int, input().rstrip().split()))
def li(): return list(input().rstrip())
# template


N = ii()
A = lmi()
mincnt = 10e9
for i in A:
    cnt = 0
    while i % 2 == 0:
        cnt += 1
        i = i//2
    mincnt = min(mincnt, cnt)

print(mincnt)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
tmpA = A
ans = 0
while True:
    tmpA = [a/2 for a in tmpA if a%2==0 and a!=0 ]
    if len(A) == len(tmpA):
        ans+=1
    else:
        print(ans)
        exit()

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
bisect_left = bisect.bisect_left
bisect_right = bisect.bisect_right
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')

#A
def A():
    n, a, b = LI()
    print(min(n*a,b))
    return

#B
def B():
    a = S()
    print(a.count("1"))
    return

#C
def C():
    n = II()
    a = list(str(n))
    a = list(map(int,a))
    if not n % sum(a):
        print("Yes")
    else:
        print("No")
    return

#D
def D():
    n = II()
    a = LI()
    ans = 0
    while True:
        for i in range(n):
            if a[i] % 2:
                print(ans)
                return    
            a[i] /= 2
        ans += 1
    print(ans)
    return

#E
def E():
    return

#F
def F():
    return

#G
def G():
    return

#H
def H():
    return

#Solve
if __name__ == '__main__':
    D()

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LS()
    return l
sys.setrecursionlimit(1000000)
mod = 1000000007

#A
def A():
    n,a,b = LI()
    print(min(n*a,b))
    return

#B
def B():
    s = S()
    print(s.count("1"))
    return

#C
def C():
    n = list(map(int, S()))
    k = 0
    s = sum(n)
    for i in range(len(n)):
        k *= 10
        k += n[i]
    if k%s == 0:
        print("Yes")
    else:
        print("No")
    return

#D
def D():
    n = I()
    a = LI()
    ans = float("inf")
    for i in range(n):
        m = 0
        while a[i]%2 == 0:
            m += 1
            a[i] //= 2
        ans = min(m,ans)
    print(ans)
    return

#E
def E():
    return

#F
def F():
    return

#G
def G():
    return

#H
def H():
    return

#I
def I_():
    return

#J
def J():
    return

#Solve
if __name__ == "__main__":
    D()

Submission status: Accepted

Solution code:
N = int(input())
A = eval(input().replace(" ", "|"))
print(str(bin(A))[::-1].find("1"))

Submission status: Accepted

Solution code:
N = int(input())
*A, = map(int, input().split())

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

Submission status: Accepted

Solution code:
def generatorDiv(int_list, power_of, exponent):
    for num in int_list:
        yield num//((power_of)**exponent)

n = int(input())
a = list(map(int, input().split()))
counter = 0
gen = generatorDiv(a, 2, counter)

while 1:
    binOR = 0
    for num in gen:
        binOR = binOR | num
    if (binOR & 1) == 0:
        counter += 1
        gen = generatorDiv(a, 2, counter)
    else:
        break;
        
print(counter)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
n = int(input())
a = [int(x) for x in input().split()]
counter = 0

while 1:
    binOR = 0
    for num in a:
        binOR = binOR | num
    if (binOR & 1) == 0:
        counter += 1
        a = [x//2 for x in a]
    else:
        break;
        
print(counter)

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0
flg = True

while flg:
    for i in range(N):
        if A[i] % 2:
            flg = False
            break
        else:
            A[i] >>= 1

    if flg:
        ans += 1

print(ans)

Submission status: Accepted

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

ans=10**10

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding:UTF8
count = int(input())
s = input()
num_list = s.split(" ")
new_num_list = []
for i in range(count):
  work = int(num_list[i])
  work_count = 0
  while work%2 == 0:
    work_count = work_count+1
    work = work//2
  new_num_list.append(work_count)
new_num_list.sort()
print(new_num_list[0])

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0

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

print(ans)

Submission status: Accepted

Solution code:
N=int(input())
a=[int(i) for i in input().split()]
c=list(range(len(a)))
d=0
for j in range(len(a)):
    while a[j]%2==0:
        d=d+1
        a[j]=a[j]/2
        c[j]=d
    d=0
print(min(c))

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0

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

Submission status: Accepted

Solution code:
N = int(input())
lis = list(map(int, input().split())) 
count = 0
boolean = True
while boolean:
    for i in range(N):
        if lis[i] % 2 == 1:
            boolean = False
            break
        else:
            lis[i] /= 2

    if boolean:
        count +=1

print(count)

Submission status: Accepted

Solution code:
N = int(input())
num_list = list(map(int, input().split()))
 
ans = 10**10
 
for i in num_list:
  div_num = 0
  while i % 2 == 0:
    i  //= 2
    div_num += 1  
    
  if ans > div_num:
     ans = div_num
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
num = int(input())
board = list(map(int, input().split()))
evener = 0
ope = True

while True:
    for i in range(num):
        if board[i]%2 == 0:
            board[i] = board[i]/2
        else:
            ope = False
            break
    if ope == True:
        evener+=1
    else:
        break

print(evener)

Submission status: Accepted

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

ans = 10 ** 9
for i in a:
    count = 0
    while True:
        if i % 2 == 0 and i > 0:
            i >>= 1
            count += 1
        else:
            break
    ans = min(ans, count)
print(ans)

Submission status: Accepted

Solution code:
n=int(input())
data=list(map(int, input().split()))
for i in range( max(data)):
  even_data = list(filter(lambda x: x%2==0, data))
  if len(even_data) < n:
    print(i)
    break
  data = list(map( lambda x: x / 2,  data))

Submission status: Accepted

Solution code:
N=int(input())
s=list((int(x) for x in input().split()))
c=0
kaisu=1000
for x in s:
    while x%2==0:
        c=c+1
        x=x/2
    if kaisu>=c:
        kaisu=c
    c=0
print(kaisu)

Submission status: Accepted

Solution code:
N = int(input())
list = input().split()
ans = 0
is_dev = True
while True:
  for i in range(N):
    list[i] = int(list[i])
    if list[i] % 2 == 1:
      is_dev = False
      break
    list[i] = int(list[i]) / 2

  if not is_dev:
    break
  else:
    ans += 1

print(ans)

Submission status: Accepted

Solution code:
N = input()
lst = list(map(int,input().split()))

counter = 0
while all([x%2 == 0 for x in lst]):
  counter += 1
  for k in range(int(N)):
    a = lst[k] / 2
    lst[k] = a
    
    

print(counter)

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
line1, line2 = [sys.stdin.readline() for i in range(2)]
components = [int(i) for i in line2.strip().split()]
count = 0
while all([i % 2 == 0 for i in components]):
    count += 1
    components = [i//2 for i in components]
else:
    print(count)

Submission status: Accepted

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

ans = 0
flag = "go"
while flag == "go":
    for i in range(N):
        if A[i] % 2 != 0:
            flag = "stop"
            break
        
    if flag == "go":
        for i in range(N):
            A[i] = A[i] / 2
        ans = ans + 1
        
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
a = list(map(int, input().split()))
counter = 0
roop_flag = True
while roop_flag:
    for i in range(N):
        if a[i] % 2 != 0:
            roop_flag = False
            break
        else:
            a[i] = a[i]/2
    else:
        counter += 1

print(counter)

Submission status: Accepted

Solution code:
a=int(input())
list=list(map(int,input().split()))
flag=False
ans=30
for i in range(31):
  for j in list:
    if j % (2**i) != 0:
      if not(flag):
        flag = True
        ans = i-1
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))
res = 100
for i in a:
    cnt = 0
    while i%2==0:
        cnt += 1
        i /= 2
    res = min(res,cnt)
print(res)

Submission status: Accepted

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

while k:
	for i in range(len(A)):
		if A[i] % 2 == 1:
			k = False
			break

	if k:
		ans += 1
		for i in range(len(A)):
			A[i] = A[i] / 2

print(ans)

Submission status: Accepted

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

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

	if k == True:
		ans += 1
		for i in range(len(A)):
			A[i] = A[i] / 2

print(ans)

Submission status: Accepted

Solution code:
n = int(input())
alist = [int(_) for _ in input().split()]

result = []
for a in alist:
  each_result = 0
  while a%2 == 0:
    a = a/2
    each_result = each_result + 1
  result.append(each_result)

print(min(result))

Submission status: Accepted

Solution code:
from math import *

N = int(raw_input())
A = map(int, raw_input().split())
print [n for n, x in enumerate([len([j for j in A if j % 2**i == 0]) for i in range(int(log(max(A), 2))+2)]) if x == N][-1]

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = input().split()
AA = [int(s) for s in A]

def Even(X):
    counter = 0
    for i in range(len(X)):
        if X[i] % 2 == 0:
            counter += 1
    if counter == len(X):
        return True
    else:
        return False

counter = 0
while Even(AA) == True:
    AA = [int(i / 2) for i in AA]
    counter += 1

print(counter)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
input()
numbers = list(map(int, input().split()))
 
count = 0
while(True):
	if sum(list(map(lambda x: x % 2, numbers))) == 0:
		numbers = list(map(lambda x: x / 2, numbers))
		count += 1
	else:
		break
print(count)

Submission status: Accepted

Solution code:
#081 shift only
N =int(input())

A=list(map(int,input().split()))
ans = 0
for i in range(5*10**8):
    tmp=0
    for j,k in enumerate(A):
        if k%2 ==0:
            A[j] =k/2
            tmp+=1
    if tmp ==len(A):
        ans+=1
    else:
        print(ans)
        exit()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
kazu = int(input())
numbers_list = list(map(int, input().split()))
count = 0
seisu = 0
while True:
    for index in range(kazu):
        if numbers_list[index] % 2 != 0:
            seisu = 1
            break
        else:
            numbers_list[index] = numbers_list[index] / 2
    if seisu == 1:
        break
    count += 1
print(count)

Submission status: Accepted

Solution code:
sam_num = int(input())  # 4
num = list(map(int, input().split()))  # [12, 6, 24, 44]
count = 0
flag = 0

while True:
    for i in range(sam_num):
        # print(num[i])
        if num[i] % 2 != 0:  # odd
            flag = 1
            break
        num[i] = num[i] / 2
        # print(num[i])
    if flag == 1:
        break
    count = count + 1

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#ABC081B -Shift only

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

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

Submission status: Accepted

Solution code:
N = int(input())
a = list(map(int, input().split()))
l = [0] * N
for i, n in enumerate(a):
    cnt = 0
    while n % 2 == 0:
        n /= 2
        cnt += 1
    l[i] = cnt
print(min(l))

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
def counter(n):
    count = 0
    while n % 2 == 0:
        n /= 2
        count += 1
    return count

N = int(input())
A = (int(x) for x in input().split())#ここでAには入力された数がリストとして格納される
y = min(map(counter,A))
print(y)

Submission status: Accepted

Solution code:
n = input()
a = [int(x) for x in input().split()]
count = 0
while(all(num % 2 == 0 for num in a)):
    a = [num / 2 for num in a]
    count += 1
print(count)

Submission status: Accepted

Solution code:
N = input()
A = list(map(int, input().split()))
count = 0
existOdd = False
while not existOdd:
    for a in A:
        if a % 2 == 1:
            existOdd = True

    if not existOdd:
        A = list(map(lambda x: x / 2, A))
        count += 1

print(count)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))
for i in range(N):
  A=list(map(lambda x:x|A.pop(),A))
print(len(str(bin(A[0])))-str(bin(A[0])).rfind('1')-1)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
answer = 0

for i in a:
    answer = answer | i
print(len(bin(answer & -(answer))) - 3)

Submission status: Accepted

Solution code:
n = int(input())
def reduce(x):
    cnt = 0
    while( x % 2 == 0):
        x = x//2
        cnt += 1
    return cnt
print( min( [ reduce(int(i)) for i in input().split() ] ) )

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from functools import reduce

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

def gcd(x,y):
    l = max(x,y)
    s = min(x,y)
    while s != 0:
        l,r = s,l % s
        s = r
    return l

kai = reduce(gcd,As)

counter = 0
while kai % 2 == 0:
    kai //= 2
    counter += 1

print(counter)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
N = int(input())
P = list(map(int,input().split()))
cnt = 0
repeat = True

while repeat:
    for i in range(N):
        if P[i] % 2 == 1:
            repeat = False
            break
        else:
            P[i] = P[i] // 2
    cnt += 1

cnt -= 1
print(cnt)

Submission status: Accepted

Solution code:
n = input()
a_str = input().split()
a = list(map(int, a_str))
count = 0
should_continue = True
while should_continue:
    # print("i")
    for i, num in enumerate(a):
        # print(num)
        if num%2 == 0:
            num //= 2
            a[i] = num
            # print(num)
        else:
            should_continue = False
    if should_continue:
        count+=1
print(count)

Submission status: Accepted

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

cnt = 0

while True:
    if 1 in [i%2 for i in A]:
        break
    A = [j // 2 for j in A]
    cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
n = int(input())
a = [int(item) for item in input().split()]

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

Submission status: Accepted

Solution code:
import numpy as np
N = input()
s = np.array(list(map(int, input().split())))
count = 0
while True:
  _exp = 2**(count+1)
  if np.all( s%_exp == 0):
    count += 1
  else:
    break
print(count)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))
ans = 1000000000000000000000
for i in a:
	two = 0
	while i%2 == 0:
		two += 1
		i = i//2
	ans = min(ans,two)
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
i = 0
cou = 0
flag = 0
list1 = list(map(int,input().split()))
while True:
 for i in range(0,N):
  if int(list1[i]) % 2 == 0:
   flag += 1
 if flag == N:
  cou += 1
  list1  = list(map(lambda num:int(num/2) , list1))
  flag = 0
 else:
  break
print(cou)

Submission status: Accepted

Solution code:
N = int(input())
a_list = list(map(int, input().split(' ')))
count_all = 0
continue_flag = True

while continue_flag:
    count = 0
    for i, a in enumerate(a_list):
        if a % 2 == 0:
            count += 1
            a_list[i] //= 2

    if count == N:
        count_all += 1
    else:
        continue_flag = False

print(count_all)

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-
import math

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
li = input().split()
t = 0
li2 = []
for i in li:
    t  = 0
    while True:
        if int(i) % 2 == 0:
            i = int(i) / 2
            t += 1
        else:
            li2.append(t)
            break

li2.sort()
ans = li2[0]
print(ans)

Submission status: Accepted

Solution code:

n = int(input().rstrip())
values = list(map(int,input().rstrip().split()))

m = 500000000 #max divide
for i in range(len(values)):
	nowV = values[i]
	nm = 0
	for j in range(500000000):
		if nowV % 2 == 0:
			nm += 1
			nowV = nowV / 2
		else:
			break 
	m = min(m,nm)
print(m)

Submission status: Accepted

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

leave = False
while True:
    for i in range(N):
        if A[i]% 2 == 1:
            leave = True
    if leave == True:
        break
    n += 1
    A = list(map(lambda x : x/2, A))
    
print(n)

Submission status: Accepted

Solution code:

n = int(input())
l = input().split()
l_i = [int(j) for j in l]

min = l_i[0]
count = 0
flag = True

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

print(count)

Submission status: Accepted

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

n = 0
leave = False
while True:
    for i in range(N):
        if A[i]%2 == 1:
            leave = True
    if leave == True:
        break
    n+=1
    A = list(map(lambda x : x/2, A))

print(n)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = [int(i) for i in input().split()]
ans = []
for i in range(N):
    count = 0
    k = A[i]
    while k % 2 == 0:
        k = k // 2
        count += 1
    ans.append(count)
print(min(ans))

Submission status: Accepted

Solution code:
_=input()
Al=list(map(int,input().split()))
count=0
while all(map(lambda x:x%2==0,Al)):
    Al=list(map(lambda x:x//2,Al))
    count+=1
print(count)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

flag = False
cnt = 0

for i in range(10000000000):
    for j in range(n):
        if a[j] % 2 == 0:
            a[j] = int(a[j] / 2)
        else:
            flag = True
            break
    if flag == True:
        break
    else:
        cnt += 1

print(cnt)

Submission status: Accepted

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

counts = []
for i in A:
    count = 0
    while i % 2 == 0 and i != 0:
        i /= 2
        count += 1
    counts.append(count)
print(min(counts))