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 = list(map(int, input().split()))
 
counter = 0
while sum(list(map(lambda x: x % 2, a))) == 0:
    a = list(map(lambda x: x / 2, a))
    counter += 1
 
print(counter)

Submission status: Accepted

Solution code:
def count_factors(num, fact):
  if num % fact != 0:
    return 0
  return 1 + count_factors(num // fact, fact)

input()
nums = [int(tok) for tok in input().split()]
print(min(map((lambda n : count_factors(n, 2)), nums)))

Submission status: Accepted

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

Submission status: Accepted

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

ans=0
flag=0
while True:
    for i,a in enumerate(A):
        if a%2:
            flag=1
            break
        A[i]=int(a/2)
    if flag:
        break
    ans+=1
print(str(ans))

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))
def waru(A, count):
    B = []
    for a in A:
        if a%2 != 0:
            return count
        else:
            B.append(int(a/2))
    return waru(B, count+1)
print(waru(A, 0))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    A = [int(a) for a in input().split()]
    minp = float('inf')
    for a in A:
        p = 0
        while a>0 and a % 2 == 0:
            p += 1
            a = a // 2
        minp = min(minp, p)
    return minp

if __name__ == '__main__':
    print(main())

Submission status: Accepted

Solution code:
num = int(input())
a = [int(e) for e in input().split()]
cnt = 0   
cnt2 = 0
while 1:
  cnt = 0
  for i in range(num):
    if a[i]%2 != 0:
      cnt += 1
  if cnt != 0:
    break
  for i in range(num):
    a[i] = int(a[i]/2)
  cnt2 += 1
  
print(cnt2)

Submission status: Accepted

Solution code:
n = int(input())

def is_even(a):
	is_even_all = True
	new_a = []
	for ai in a:
		if int(ai) % 2 == 1:
			is_even_all = False
			break
		else:
			new_a.append(int(ai / 2))
	return new_a, is_even_all
	
a = list(map(int, input().split()))
is_even_all = True
num = 0
while is_even_all:
	a, is_even_all = is_even(a)
	if is_even_all:
		num += 1
print(num)

Submission status: Accepted

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

def can(array):
  C = len(list(
    filter(
      lambda i: i % 2 == 1, array
    )
  ))
  return C == 0

while can(A):
  A = [n / 2 for n in A]
  count += 1
print(count)

Submission status: Accepted

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

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

Submission status: Accepted

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

print(a)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
lis = list(map(int,input().split()))
m = 0
b = True
while(b):
  for index,l in enumerate(lis):
    if l % 2 == 1:
      b = False
      m -= 1
      break
    else:
      lis[index] = l / 2
  m += 1
print(m)

Submission status: Accepted

Solution code:
N = input()
arr = input().split(' ')

i = 0
while True:
    arr_mod = list(map(lambda x: int(x)%2, arr))
    sum_a = sum(arr_mod)
    arr = list(map(lambda x: int(x)/2, arr))
    
    if sum_a > 0.0:
      print(i)
      break
    
    i += 1

Submission status: Accepted

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

Submission status: Accepted

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

sum = 0
for num in a:
    sum = sum | num

ans = 0
for t in range(200):
    if sum & 1 == 0:
        sum = sum >> 1
        ans += 1
    else:
        break
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a = {int(i) for i in input().split()}
ans = 0
while not any(i&1 for i in a):
    ans += 1
    a = {i//2 for i in a}

print(ans)

Submission status: Accepted

Solution code:
n = int(input())
a = [int(i) for i in input().split()]
ans = 0
while not any(i&1 for i in a):
    ans += 1
    a = [i//2 for i in a]

print(ans)

Submission status: Accepted

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

ans = []
for i in range(n):
    c = 0
    while True:
        if a[i]%2 == 0:
            a[i] = a[i]/2
            c += 1
        else:
            ans.append(c)
            break
print(min(ans))

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a = map(int, input().split())
m = float('inf')
for i in a:
  count = 0
  while i%2 == 0:
    i = i//2
    count += 1
  m = min(m, count)
  if m==0:
    break
print(m)

Submission status: Accepted

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

def c():
    loop=0
    while True:
        for i in range(n):
            ai=a[i]
            if ai%2==0:
                a[i]=ai//2
            else:
                return loop
        loop+=1

print(c())

Submission status: Accepted

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

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

print(c-1)

Submission status: Accepted

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

while True:
  for j in range(N):
    if x[j] % 2 == 0:
      x[j] /= 2
    else:
      K = 0
      break
  
  else:
    count += 1
  if K==0:
    break

print(count)

Submission status: Accepted

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

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

Submission status: Accepted

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

c=10**9
for a in A:
    t=0
    while a%2==0:
        a=a//2
        t+=1

    c=min(c,t)


print(0 if c==N else c)

Submission status: Accepted

Solution code:
x = int(input())
a = list(map(int,input().split()))
count = 0
mod = 0
while mod == 0:
    count += 1
    for i in range(x):
        if a[i]%2 == 0:
            a[i] = a[i]/2
        
        else:
            mod += 1
            break
print(count-1)

Submission status: Accepted

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

def exec(a, n):
    if len([x for x in a if x%2 == 0]) == n:
        return [int(x/2) for x in a]
    return []

i = 0
while True:
    t = exec(a, n)
    if len(t):
        i += 1
        a = t
    else:
        break

print(i)

Submission status: Accepted

Solution code:
num = input()
arr = input().split()

def hoge(fuga):
    new_list = []
    for i in fuga:
        if int(i) % 2 == 0:
            new_list.append(int(i)/2)
        else:
            return False
    return new_list


count = 0
while True:
    arr = hoge(arr)
    if arr == False:
        break
    count += 1

print(count)

Submission status: Accepted

Solution code:
num = input()
listt = input().split()

def hoge(fuga):
    new_list = []
    for i in fuga:
        if int(i) % 2 == 0:
            new_list.append(int(i)/2)
        else:
            return False
    return new_list


count = 0
while True:
    listt = hoge(listt)
    if listt == False:
        break
    count += 1

print(count)

Submission status: Accepted

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

flag = False
count = 0
while True:
    tmp = []
    for a in A:
        if a % 2 != 0:
            flag = True
            break
        else:
            tmp.append(a / 2)

    if flag:
        break

    A = tmp
    count += 1

print(count)

Submission status: Accepted

Solution code:
import numpy as np
n=int(input())
a=map(int, input().split())
b=np.array([i for i in a])

c=0

while all(b%2==0):
    b=b/2
    c += 1
    
print(c)

Submission status: Accepted

Solution code:
import numpy as np
n=int(input())
a=list(map(int, input().split()))
b=np.array(a)

c=0

while all(b%2==0):
    b=b/2
    c += 1
    
print(c)

Submission status: Accepted

Solution code:
import numpy as np
n=int(input())
a=map(int, input().split())
b=[]

for i in a:
    b.append(i)

b=np.array(b)
c=0

while all(b%2==0):
    b=b/2
    c += 1
    
print(c)

Submission status: Accepted

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

Submission status: Accepted

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

cnt = 0
sw = 0
while sw == 0:
  for i in range(n):
    if l[i] % 2 == 0:
      l[i] = l[i]/2
    
    else:
      print(cnt)
      sw += 1
      break
  
  cnt += 1

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
count=0
while True:
  for i in A:
    if i%2 != 0:
      print(int(count))
      quit()
  
  A = list(map(lambda x: x/2, A))
  #print(A)
  count+=1
  #break
print(int(count))

Submission status: Accepted

Solution code:
s=input()
a = list(map(int,input().split()))
x=len(a)
f=0
for k in range(1000000000):
    f=f+1
    for i in range(x):
        if a[i]%2 == 1:
            break
        a[i]=0.5*a[i]
    else:
        continue
    break
print(f-1)

Submission status: Accepted

Solution code:
size = int(input())
src = input()
values = [int(value) for value in src.split(' ')]
count = 0

while True:
    flg = True
    for value in values:
        if value % 2 != 0:
            flg = False
            break
        
    if flg:
        values = [value / 2 for value in values]
        count += 1
    else:
        break

print(count)

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,input().split()))
b=[]
def div2(x):
  cnt=0
  while(x%2==0):
    x/=2
    cnt+=1
  return cnt
for i in range(n):
  b.append(div2(a[i]))
print(min(b))

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:
all_even = lambda ys: not any(map(lambda y: y % 2, ys))
div_2 = lambda ys: list(map(lambda y: y // 2, ys))

input()
xs = [int(x) for x in input().split()]
count = 0
while all_even(xs):
  count += 1
  xs = div_2(xs)

print(count)

Submission status: Accepted

Solution code:
input_a = int(input())
list_b = list(map(int, input().split()))
count = 0
breakcount = 0
while breakcount == 0:   
    for i in range(input_a):
        if list_b[i] % 2 == 0:
            list_b[i] /= 2
        else:
            breakcount = 1
            break
    count += 1
print(count - 1)

Submission status: Accepted

Solution code:
a=int(input())
b=input().split()
 
l=[int(i) for i in b]
 
cnt=[0 for i in range(a)]
 
for i in range(a):
    while l[i]%2==0:
        cnt[i]+=1
        l[i]=l[i]/2
        if l[i]%2==1:
            break
 
print(min(cnt))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def how_many_times_divisible(n):
	ans = 0
	while n % 2 == 0:
		n /= 2
		ans += 1
	return ans
 
N = int(input())
a = map(int, input().split())
ans = min(map(how_many_times_divisible, a))
 
print(ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
N = int(input())
A = list(map(int, input().split()))
Ad = [0] * N
tmp = 0

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# ABC 081 B - Shift Only
# 整数の入力
a = int(input())
# スペース区切りの整数の入力
b = [int(s) for s in input().split()]
i = -1 
j = True
while j:
    for k in range(a):
        if (b[k] % 2) == 0:
            b[k] = b[k] / 2
        else:
            j = False
            break
    i = i + 1
print(i)

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc081/tasks/abc081_b


def two_factor(x):
    cnt = 0
    while x % 2 == 0:
        cnt += 1
        x //= 2
    return cnt


N = int(input())
a = map(two_factor, map(int, input().split()))
print(min(a))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=input()
div=30
count=0
for i in input().split():
  while int(i)%2==0:
    i=int(i)/2
    count+=1
  if count<div:
    div=count
  count=0
print(div)

Submission status: Accepted

Solution code:
n=int(input())
c=32
for i in input().split():
    d=0
    z=int(i)
    while z%2==0:
        d+=1
        z=z//2
    if d<c:
        c=d

print(c)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a=int(input())
b=list(map(int,input().split()))
i=2
num=0
count=1
while num<100:
    list_c=[]
    j=i**count
    for k in range(0,a):
            list_c.append(b[k]%j)
            
    if all(elem == 0 for elem in list_c):
        count+=1
        num+=1
                
    else:
        break
print(count-1)

Submission status: Accepted

Solution code:
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:
import math

num = int(input())

numbers = list(map(int, input().split()))
numbers = list(map (bin,numbers))
#print(numbers)
for i in range(num):
  s = numbers[i]
  numbers[i] =len(numbers[i])-(s.rfind('1'))-1
print(min(numbers))

Submission status: Accepted

Solution code:
import numpy as np
n=int(input())
alist=np.array(list(map(int,input().split())))
counter=0
flag=0
while flag==0:
  for a in alist:
    if a%2==1:
      flag=1
      break
  if flag==0:
    alist=alist/2
    counter=counter+1
print(counter)

Submission status: Accepted

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

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

rst = 0
while True:
    if (sum([i%2 for i in lst]) == 0):
        lst = [i/2 for i in lst]
        rst = rst + 1
    else:
        print(rst)
        break

Submission status: Accepted

Solution code:
n=int(input())

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

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

Submission status: Accepted

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

mi = 10 ** 5
c = []

for i in range(N):
    temp = A[i]
    ctemp = 0
    while temp % 2 == 0:
        ctemp += 1
        temp = temp // 2
    c.append(ctemp)

print(min(c))

Submission status: Accepted

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

mi = 10 ** 5

for i in range(N):
    temp = A[i]
    c = 0
    while temp % 2 == 0:
        c += 1
        temp = temp // 2
    if c < mi:
        mi = c
print(mi)

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()))
 
n = []
 
for x in A:
  ans = 0
  while x%2 == 0:
    x //= 2 
    ans += 1
  n.append(ans)
 
print(min(n))

Submission status: Accepted

Solution code:
N = int(input())
A = [int(s) for s in input().split()]
ans = min([(a & -a).bit_length() - 1 for a in A])
print(ans)

Submission status: Accepted

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

count = 0
while True:
    judge = [i%2 for i in A]
    if sum(judge)==0:
        A = [i/2 for i in A]
        count += 1
    else:
        break
print(count)

Submission status: Accepted

Solution code:
import math
import sys
n = int(input())
li = list(map(int, input().split()))
tmp = []
for i in li:
    count = 0
    while i%2 == 0:
        count += 1
        i = i/2
    tmp.append(count)
print(min(tmp))

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

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import fractions
n = int(input())
a = list(map(int, input().split()))
gcd = 0
for i in a:
    gcd = fractions.gcd(gcd, i)
cnt = 0
while True:
    if gcd % 2 == 0:
        gcd //= 2
        cnt += 1
    else:
        print(cnt)
        exit()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
import math
import numpy as np

N = int(input())
A_list = list(map(int, input().split()))
np_A = np.array(A_list)
tmp_cou = 0
x = 1
while x==1:
    for i in np_A:
        if i % 2 == 0:
            tmp_cou += 1
        else:
            x = 2
    np_A = np_A/2

cou = math.floor(tmp_cou/N)
print(cou)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
ans = 40
a = list(map(int, input().split()))
for i in range(n):
    r = 0
    while (a[i] & 1 == 0):
        r += 1
        a[i] >>= 1
    ans = min(ans, r)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin

a = stdin.readline().rstrip()
b = [int(x) for x in stdin.readline().rstrip().split()]
count = 0

while(True):
  if sum([x % 2 for x in b]) == 0:
    count += 1
    b = [x // 2 for x in b]
  else:
    break
    
print(count)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
def pow(x):
    if x % 2 != 0:
        return 0
    else:
        return 1 + pow(x/2)
print(min(pow(_) for _ in a))

Submission status: Accepted

Solution code:
n = int(input())
li = list(map(int, input().split()))
a = 0
br = False
while True:
    for i in li:
        if i % 2 != 0:
            br = True
            break
    if br:
        break
    a += 1
    li = list(map(lambda x: x / 2, li))
print(a)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
print(min(len(bin(i)) - bin(i).rfind('1') for i in a) - 1)

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())
A = input()

A = A.split()

lst = []



for i in range(N):
	c = 0
	a = int(A[i])
	while  a % 2 == 0:
		a = a / 2
		c = c + 1
	lst.append(c)
	
anc = lst[0]
	
for i in range(1, N):
	if anc > lst[i]:
		anc = lst[i]
		
print(anc)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
n = int(input())
# スペース区切りの整数の入力
a_list = list(input().split())

count = 10000000

for i in range(len(a_list)):
    a_tmp = int(a_list[i])
    count_tmp = 0
    while int(a_tmp) % 2 == 0:
        a_tmp /= 2
        count_tmp += 1
    if count > count_tmp:
        count = count_tmp
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
N = int(input())
A = list(map(int,input().split()))
A = np.array(A)
count = 0
while True:
  x = 0
  for i in A:
    if i % 2 == 1:
      x = 1
  if x == 1:
    break
  else:
    A = A / 2
    count += 1

print(count)

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:
import numpy as np
N = int(input())
A = list(map(int, input().split()))
A = np.array(A)
count = 0
while 1:
    x = 0
    for i in range(N):
        if A[i] % 2 == 1:
            x = 1
    if x == 1:
        break
    else:
        A = A / 2
        count+=1
print(count)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
li = list(map(int, input().split()))
m = 1000000
for l in li:
    c = 0
    while l % 2 == 0:
        l /= 2
        c += 1
    m = min(c, m)
print(m)

Submission status: Accepted

Solution code:
import sys
input1 = input().rstrip()
inputs = input().rstrip().split(' ')
count = 0
flg = 0
while True:
    for i in range(len(inputs)):
        if (int(inputs[i])%2 == 0):
            inputs[i] = int(inputs[i]) / 2
        else:
            flg = 1
    if (flg == 1):
        break
    count += 1
print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

cnt = 0
f = True
while f:
  for a in A:
    if a % 2 != 0:
      print (cnt)
      f = False
      break
  else:
    A = list(map(lambda x : x//2, A))
    cnt += 1

Submission status: Accepted

Solution code:
n = int(input())
a = map(int,input().split())
ans = 1000
tmp = 0
for i in a:
    tmp = 0
    while i % 2 == 0:
        i = i / 2
        tmp += 1
    if ans > tmp:
        ans = tmp
print(ans)

Submission status: Accepted

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

num = int(input())

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

ans = min(map(a,nums))

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

res = 0

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

print(res)

Submission status: Accepted

Solution code:
loop = int(input())
kokuban=[int(x) for x in input().split()]
flag=False
result =0

while(flag==False) :
    for index,obj in enumerate(kokuban) :
        if int(obj)%2 == 0:
            kokuban[index]= int(obj)//2
        else:
            flag=True
    if flag==False :
        result +=1

print(result)

Submission status: Accepted

Solution code:
N=int(input())
S=[int(x) for x in input().split()]
res=0
while not 1 in S:
  S=[x//2 for x in S if x%2==0]
  if len(S)==N:
    res+=1
  else:
    break
print(res)

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()
n=input()
aa=list(map(int,input().split()))
c=0
while True:
    if all(a&1==0 for a in aa):
        aa = list(map(lambda a: a>>1, aa))
        c+=1
    else:
        break
print(c)

Submission status: Accepted

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

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

print(num)

Submission status: Accepted

Solution code:
N = input()
A = list(map(int,input().split()))
cnt = 0
#while allで全てtrueという条件
while all(a%2==0 for a in A):
  A = [a/2 for a in A]
  cnt += 1
print(cnt)

'''
a%2==0 for a in A→→リストAという文字列が全てa%2==0という条件式に当てはまっているつまり偶数である時True
の時はA = [a/2 for a in A]
  cnt += 1を処理する。
 A = [a/2 for a in A]→→Aという文字列を二で割ってAという文字列に返す。
cntに自己代入する。
'''

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

Submission status: Accepted

Solution code:
import sys

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

counter = 0
while True:
    for judge in range(len(s)):
        if s[judge] % 2 != 0:
            print(counter)
            sys.exit()
        else:
            s[judge] = s[judge] / 2
    counter += 1

Submission status: Accepted

Solution code:
n=int(input())
a = list(map(int,input().split()))
x=0
f=0
while f==0: #フラグが0の間はループを回す
    for i in range(len(a)): # リストを１つずつ探索していく
        if a[i]%2 == 0:
            a[i]=a[i]//2    #もしも偶数ならリストをかきかえる
        else: #1つでも奇数であれば終了
            f=1 #　フラグfを1にする
            break
        if i == n-1: #ループが最後まで回っていたら
            x+= 1 #成功回数を１増やす
print(x)

Submission status: Accepted

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

ans = 0

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

print(ans)

Submission status: Accepted

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

while 1:
    a = list(map(lambda x: x/2, a))

    for i in a:
        if not i.is_integer():
            is_count = False

    if is_count:
        c += 1
    else:
        break

print(c)