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=int(input())
a=list(int(i) for i in input().split())
count=-1
exit_num=0

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

Submission status: Accepted

Solution code:
n = int(input())
list = list(map(int, input().split()))
count = 0
operator = True

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

print(count)

Submission status: Accepted

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

c = 0
while all (a%2==0 for a in A):
    A = list(a//2 for a in A)
    c += 1
print(c)

Submission status: Accepted

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

def is_even(lis):
    return [x for x in lis if x % 2]

mod2_list = is_even(num_list)

i = 0
while mod2_list == []:
    num_list = [x / 2 for x in num_list]
    mod2_list = is_even(num_list)
    i += 1
    
print(i)

Submission status: Accepted

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

while flag==0:
  for i in range(N):
    if A[i]&1==0:
      A[i]=A[i]>>1
    else:
      print(ans)
      flag=1
      break
  ans+=1

Submission status: Accepted

Solution code:
import numpy as np
n = int(input())
aa = list(map(int, input().split()))
ans=0
while True:
    bb = list(map(lambda x:x%2, aa))
    if sum(bb)==0:
        aa = list(map( lambda x:x/2, aa))
        ans+=1
    else:
        break
print(ans)

Submission status: Accepted

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

n=0
odd=False

while not(odd):
    for i in range(len(a)):
        if a[i]%2 == 1:
            odd=True
        else:
            a[i] /= 2
    if not(odd):
        n += 1

print(n)

Submission status: Accepted

Solution code:
N=int(input())
A=list(map(int, input().split()))
n=float("inf")
tmp=0
for i in range(N):
    while(A[i]%2 == 0):
        tmp+=1
        A[i]/=2
    if(tmp<n):
        n=tmp
    tmp=0
print(n)

Submission status: Accepted

Solution code:
k=int(input())
l=list(map(int,input().split()))
i=0
while True:
  ans = [m//2 for m in l if (m % 2)==0]
  if len(ans)==k:
    l=ans
    i+=1
  else:
    break

print(i)

Submission status: Accepted

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

print(cnt)

Submission status: Accepted

Solution code:
n = input()
num = []
num = input().split(" ")
 
t = 0 
a=0 
while True: 
  num2=[] 
  for i in num: 
    if not int(i)%2==0:
      a =1
      break
    num2.append(int(i)/2)
  num = num2
  if a==1: 
     print(t) 
     break
  t+=1

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = 10 ** 9
for i in range(N):
  cnt = 0
  while A[i] % 2 == 0:
    cnt += 1
    A[i] //= 2
  ans = min(ans, cnt)
print(ans)

Submission status: Accepted

Solution code:
""" AtCoder """

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

count = 0

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

Submission status: Accepted

Solution code:
def counter(a):
  count = 0 
  while a%2 ==0:
    a /= 2
    count += 1
  return count
N = int(input())
s = [int(n) for n in input().split()]
print(min([counter(a) for a in s]))

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:
# ABC 081 B - Shift Only 

N = int(input())

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

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

Submission status: Accepted

Solution code:
n = input().split()[0]
n = int(n)

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

def ok_continue(a_list):
    contain_odd = [x for x in a_list if x % 2 == 1]
    if contain_odd:
        return False
    return True

n_sousa = 0

while ok_continue(a_list):
    a_list = [a / 2 for a in a_list]
    n_sousa += 1

print(n_sousa)

Submission status: Accepted

Solution code:
from statistics import mean, median,variance,stdev
import numpy as np
import sys
import math
import fractions

def j(q):
    if q==1: print("Yes")
    else:print("No")
    exit(0)


def ct(x,y):
    if (x>y):print("")
    elif (x<y): print("")
    else: print("")

def ip():
    return int(input())


n = ip()                              #入力整数1つ
#x,y= (int(i) for i in input().split())      #入力整数横2つ
#n,x,y = (int(i) for i in input().split())    #入力整数横3つ
#n,m,x,y= (int(i) for i in input().split())  #入力整数横4つ
a = [int(i) for i in input().split()]        #入力整数配列
#a = input()                                  #入力文字列
#a = input().split()                          #入力文字配列
#n = ip()                      #入力セット(整数改行あり)(1/2)
#a=[ip() for i in range(n)]    #入力セット(整数改行あり)(2/2)

#jの変数はしようできないので注意
#全足しにsum変数使用はsum関数使用できないので注意
s = 0
while (1):
    for i in range(n):
        if a[i]%2:
            print(s)
            exit(0)
        else :a[i]/=2
    s+=1

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = input()
A = list(map(int, input().split()))
i = 0
while True:
    if len([a for a in A if a % 2]) > 0:
        break
    A = list(map(lambda x: x/2, A))
    i+=1
print(i)

Submission status: Accepted

Solution code:
from time import sleep
n = input()
A = list(map(int, input().split()))
i = 0
while True:
    if len([a for a in A if a % 2]) > 0:
        break
    A = list(map(lambda x: x/2, A))
    i+=1
print(i)

Submission status: Accepted

Solution code:
def zero_count(binary):
    count = 0
    def pop(binary):
        if binary[-1] == '0':
            nonlocal count
            count += 1
            pop(binary[:-1])
        else:
            return
    pop(binary)
    return count


n = int(input())
print(min(map(lambda x: zero_count(bin(int(x))), input().split())))

Submission status: Accepted

Solution code:
n=int(input())
lst=list(map(int,input().split()))
count=0
def check(lst):
    for i in lst:
        if i%2 != 0:
            return False
    return True
def two_devision(lst):
    new_lst=[]
    for i in lst:
        new_lst.append(i//2)
    return new_lst
while check(lst):
    lst=two_devision(lst)
    count += 1
print(count)

Submission status: Accepted

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

def check(ls):
    for i in ls:
        if i%2:
            return False
    return True

res = 0
while check(A):
    A = list(map(lambda n:n//2,A))
    res += 1

print(res)

Submission status: Accepted

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

P = []

for i in A:
    ans = 0
    while int(i) == i:
        i = i/2
        ans += 1
    P.append(ans)

print(min(P)-1)

Submission status: Accepted

Solution code:
N=int(input())
s=input()
list=list(s.split())
for i in range(N):
    list[i]=int(list[i])
count=0
while(True):
    for i in range(N):
        list[i]/=2
        if list[i]!=int(list[i]):
            break
    if list[i]!=int(list[i]):
        break
    count+=1
print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = [int(x) for x in input().split()]
count = 0
while True:
    for i in range(len(A)):
        if A[i] % 2 == 1:
            print(count)
            exit(0)
        A[i] /= 2
    count += 1

Submission status: Accepted

Solution code:
N = int(input())
number = input().split()
number = [int(s) for s in number]
for i in range(1, 31):
   frag = 0
   for j in range(N):
      if number[j] % (2**i) != 0:
         frag = 1
         break
   if frag == 1:
      print(i - 1)
      break

Submission status: Accepted

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

Submission status: Accepted

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

ans = 100
for a in A:
    count = 0
    while a%2 == 0:
        a = a/2
        count += 1
    if count < ans:
        ans = count

print(ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
def calc_div(num):
    return num / 2

n = str(input())
num_list = list(map(int, input().split()))

cnt = 0
while True:
    shouldDiv = True

    for i in num_list:
        if i % 2 != 0:
            shouldDiv = False
            break

    if shouldDiv:
        num_list = list(map(calc_div, num_list))
        cnt += 1
    else:
        break

print(cnt)

Submission status: Accepted

Solution code:
_ = input()
kokuban = list(map(lambda x:int(x),input().split()))
n=0
while(not(False in list((map(lambda x:x%2==0,kokuban))))):
      kokuban = list(map(lambda x:x/2,kokuban))
      n+=1
print(n)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
N = int(input())
A = [int(n) for n in input().split(" ")]
cnt = 0
isKeep = True
while(isKeep):
    for i in range(len(A)):
        if A[i] % 2 == 0:
            A[i] = A[i]/2
        else:
            isKeep = False
    if isKeep:
        cnt = cnt + 1
print(cnt)

Submission status: Accepted

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

def calc_half(n):
    return int(n / 2)

all_even = True
count = 0
while all_even:
    for value in a:
        if value % 2 == 1:
            all_even = False
            break
    if all_even:
        a = list(map(calc_half, a))
        count +=1
print(count)

Submission status: Accepted

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

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

Submission status: Accepted

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

ans = 999999
for a in array:
  cnt = 0
  while(a % 2 == 0):
    cnt += 1
    a = a / 2
  ans = min(ans, cnt)
print(ans)

Submission status: Accepted

Solution code:
V = int(input())

def has_odd(L):
    for l in L:
        if l % 2 != 0:
            return True
    return False

def dev2(l):
    return l // 2

nums = list(map(int, input().split()))
times = 0
while not has_odd(nums):
    nums = list(map(dev2, nums))
    times += 1
print(times)

Submission status: Accepted

Solution code:
import sys
N=int(input())
x=[int(i) for i in input().split()]
cnt=0
while(1):
    for i in range(N):
        if x[i]%2 != 0:
            print(cnt)
            sys.exit()
    tmp=[i//2 for i in x]
    x=tmp
    cnt+=1

Submission status: Accepted

Solution code:
def isEven(iterable):
    for n in iterable:
        if n % 2 != 0:
            return False
    return True

if __name__ == '__main__':
    n = int(input())
    a = list(map(int, input().split()))

    count = 0
    while isEven(a):
        a = [int(x/2) for x in a]
        count = count+1
    print(count)

Submission status: Accepted

Solution code:
int_count = int(input())
int_arr = list(map(int, input().split()))

result = 0
number = 1

stop = False

while True:
    for num in int_arr:
        if num % 2 == 1:
            stop = True
            break
    if stop:
        break
    else:
        result = result + 1
        for i, v in enumerate(int_arr):
            int_arr[i] = v/2


print(result)

Submission status: Accepted

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

print(count)

Submission status: Accepted

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

print(count)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
N = int(input())

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

i=0
gcd=2
while(True):
    flag=False
    for Ai in A:
        if Ai % gcd != 0:
            flag=True
            break
    if flag:
        break
    else:
        gcd *= 2
        i+=1

print(i)

Submission status: Accepted

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

def f(x):
    ans = 0
    while x % 2 == 0:
        x /= 2
        ans += 1
    return ans

print(min(map(f,a)))

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 math
n = int(input())
a = list(map(int, input().split()))
scores = [0]*n

for index in range(n):
	count = 0
	x = a[index]
	while x!=0 and ((x & 1) == 0):
		x = x >> 1
		count += 1
	scores[index] = count

print(min(scores))

Submission status: Accepted

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

print(c)

Submission status: Accepted

Solution code:
n = int(input())
arr = [int(x) for x in input().split()]

def countTwoInFactor(n):
   def countTwoInFactori(n, acc):
      return countTwoInFactori(n / 2, acc + 1) if n % 2 == 0 else acc
   return countTwoInFactori(n, 0)

arr2 = [countTwoInFactor(x) for x in arr]
arr2.sort()
print(arr2[0])

Submission status: Accepted

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

Submission status: Accepted

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

ans =1000000
tmp_ans = 0
for i in range(n):
  while a[i]%2==0:
    a[i]=a[i]//2
    tmp_ans +=1
  ans = min(ans,tmp_ans)
  tmp_ans=0
  
print(ans)

Submission status: Accepted

Solution code:
N = input()
A = list(map(int,input().split()))
res = 0
while True:
    result = 0
    for i in A:
        if i%2:
            result = 1
    if result:
        break

    A = [i/2 for i in A]
    res += 1

print(res)

Submission status: Accepted

Solution code:
a = int(input())
num = input().split()
num2 = [int(i) for i in num]
count = 0
#print(num2)

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

print(count)

Submission status: Accepted

Solution code:
def check(n):
  if n%2==0:
    return True
  else:
    return False
n=int(input())
a=list(map(int, input().split()))
a_count = [0 for i in range(n)]
for i in range(n):
  while check(a[i]):
    a_count[i] += 1
    a[i] /= 2
a_count.sort()
print(a_count[0])

Submission status: Accepted

Solution code:
from math import log2
# python template for atcoder1
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline

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


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

Submission status: Accepted

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

n = int(input())
n_lst = list(map(int,input().split()))
ans = min(map(calc_div_cnt,n_lst))
print(ans)

Submission status: Accepted

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

is_odd = 0
while not is_odd:
    for num in n_lst:
        is_odd += num%2
    if not is_odd:
        for i in range(len(n_lst)):
            n_lst[i] //= 2
        is_odd = 0
        ans += 1
print(ans)

Submission status: Accepted

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

for a in A:
    b=0
    while a%2==0:
        a//=2
        b+=1
    l.append(b)
print(min(l))

Submission status: Accepted

Solution code:
def devide_counter(num):
    devide_count = 0
    while num%2==0:
        num /= 2
        devide_count += 1
    return devide_count

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

devide_count_list=[]
for a in A:
    devide_count_list.append(devide_counter(a))
    
print(min(devide_count_list))

Submission status: Accepted

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

def two_counter(i):
    if i == 0:
        # 10 ** 100 == inf
        return 10 ** 100
    cnt = 0
    while i%2 == 0:
        cnt += 1
        i /= 2
    return cnt
ans = 10 ** 100

visual = [two_counter( L[i] ) for i in range(N)]
print(min(visual))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

c = list()

for n in range(N):
    for i in range(1,31):
        if not a[n]%(2**i)==0:
            c.append(i-1)
            break
print(min(c))

Submission status: Accepted

Solution code:
import numpy as np

N = int(input())
num = list(map(int, input().split()))
num = np.array(num)
count = 0
judge = 0

for i in range(N):
    if (num[i] % 2) == 1:
        judge = 1

while judge == 0:

    num = num/2
    count += 1

    for i in range(N):
        if (num[i] % 2) == 1:
            judge = 1

print(count)

Submission status: Accepted

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

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

ans = min(map(div,list))

print(ans)

Submission status: Accepted

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

if len(A) == N:
  while all([i % 2 == 0 for i in A]) == True:
    A = [j / 2 for j in A]
    count += 1
else:
  print("Error")

print(count)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 081
import math
def getInt(): return int(input())
def getIntList(): return [int(x) for x in input().split()]
def zeros(n): return [0]*n
def db(x): 
    global debug
    if debug: print(x)
debug = True
def power2(n):
    c = 0
    while n>0:
        if n%2!=0: return c
        c+=1
        n//=2
    return c

n = getInt()
a = getIntList()
cnt = 10**9
for i in range(n): cnt = min(cnt, power2(a[i]))
print(cnt)

Submission status: Accepted

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

res = 0
for a in li:
    res = res | a

n = 0
while True:
    if res & 1:
        print(n)
        break
    res //= 2
    n += 1

Submission status: Accepted

Solution code:
def func(x):
    n = x
    cnt = 0
    while n % 2 == 0:
        n = n // 2
        cnt += 1
    return cnt


def main():
    n = int(input())
    l = [int(i) for i in input().split()]

    l2 = [func(i) for i in l]
    print(min(l2))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())
nums = list(map(int, input().split()))
count = 0
while not next((True for num in nums if num % 2 == 1 or num < 1), False):
    nums = list(map(lambda x: x // 2, nums))
    count += 1

print(count)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))
cnt = 0
s = 'on'
while True:
    for i in range(n):
        if a[i] % 2 == 0:
            a[i] //= 2
        else:
            s = 'off'
            break
    else:
        cnt += 1
    
    if s == 'off':
        break
    
print(cnt)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))
count = 0
break1 = 0
for i in range(1000000000):
    j = 0
    for j in range(N):
        if A[j]%2 == 0:
            A[j] = int(A[j]/2)
        else:
            break1 = 1
            break
    if break1 == 1:
        break
    count+=1
print(count)

Submission status: Accepted

Solution code:
n= int(input())
a = list(int(i) for i in input().split())
ct = 0
flag = 0
while flag == 0:
 for i in range(n):
  if a[i]%2 == 0:
   a[i] = a[i]//2
   ct+= 1
  else:
   flag = 1
   break
print(ct//n)

Submission status: Accepted

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


count = 0
while True:
    j = False
    for i in value:
        if i % 2:
            j = True
    if j:
        break
    else:
        count += 1
        value = [int(i / 2) for i in value]

print(count)

Submission status: Accepted

Solution code:
#encoding:utf-8



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

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

print(int(answer))

Submission status: Accepted

Solution code:
n = int(input())
A = [int(i) for i in input().split()]
ans = 10 ** 9
if all(A[i] % 2 == 0 for i in range(n)):
    for i in range(n):
        count = 0
        while A[i] % 2 == 0:
            A[i] //= 2
            count += 1
        ans = min(ans, count)
else:
    ans = 0
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
tmp = input()
num = list(map(int,input().split()))
minCount = 100
chkCount = 0
for i in num:
  chk = i
  chkCount = 0
  while(True):
    if chk%2 == 0:
      chk = chk/2
      chkCount+=1
      if chkCount >= minCount:
        break;
    else:
      break
  if minCount > chkCount:
    minCount = chkCount
print(str(minCount))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main(n, xs):
    # type: (int, List[int]) -> None
    even = lambda x: x % 2 == 0 # type: Callable[[int],bool]
    allEven = lambda xs: all(map(even, xs)) # type: Callable[[Iterable[int]],bool]
    cnt = 0
    while allEven(xs):
        cnt = cnt + 1
        xs = list(map(lambda x: x // 2, xs))
    print(cnt)
    return

if __name__ == '__main__':
    # main(sys.argv[1:])
    n = int(input())
    xs = list(map(int, input().split()))
    main(n, xs)

Submission status: Accepted

Solution code:
n = int(input())
a = input().split(" ")
count = 0

for i in range(100):
    for j in range(len(a)):
        if(int(a[j]) % 2 != 0):
            break
        else:
            a[j] = int(a[j]) / 2
            count += 1
    else:
        continue
    break

print(count // len(a))

Submission status: Accepted

Solution code:
N = [int(i) for i in input()]
A = [int(i) for i in 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:
import math
N = int(input())
A = list(map(int,input().split()))

judge = 0
counter = 0

while judge == 0:
	for i in range(0,N):
		if A[i] % 2 == 1:
			judge = 1
		
		A[i] = A[i] //2
		
	counter = counter + 1

counter = counter -1
print(counter)

Submission status: Accepted

Solution code:
import math
n = int(input())
arr = list(map(int, input().split())) 
r = float("inf")
for i  in range(n):
    r0 = 0
    while (arr[i] % 2) < 1:
        arr[i] /= 2
        r0 += 1
    if r > r0:
        r = r0

print(r)

Submission status: Accepted

Solution code:
n = int(input().rstrip())
data = input().rstrip()
data = [int(v) for v in data.split(' ')]

counter = 0

while True:
    flag = False
    for i, v in enumerate(data):
        if v % 2 == 0:
            data[i] = v / 2
        else:
            flag = True
            break

    if flag:
        break
    else:
        counter += 1

print(counter)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
c=int(input())
ii=input()
i=[]

iii=ii.split(" ")
count=0

#print(iii)
for z in iii:
  i.append(int(z))
#print(i)
  


while True:
  
  for j in i:
    if j%2==1:
      print(str(count))
      exit()
    else:
      continue
  for k in range(0,c):
    i[k]=i[k]/2
  #print(i)
  count=count+1

Submission status: Accepted

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


def inpl(): return list(map(int, input().split()))

N = int(input())
A = inpl()

print(min(func(a) for a in A))

Submission status: Accepted

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

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

print(min(Ans))

Submission status: Accepted

Solution code:
N = int(input())#list(map(int, input()))
l = list(map(int, input().split()))
c = 0 
# print(len(list(filter(lambda x: x % 2 == 0, l))))
# print(N)

while len(list(filter(lambda x: x % 2 == 0, l))) == N:
    l = list(map(lambda x: x / 2 ,l))
    #print(l)
    #print(list(filter(lambda x: x % 2 == 0, l)))
    c += 1

print(c)

Submission status: Accepted

Solution code:
### coding: UTF-8

#import math
#import random as rd
#import numpy as np

n=int(input())
line=list(map(int,input().split( )))
#n=4
#line=[4,16,12,8]


count_line=[]

for i in range(n):
    num=0
    while line[i]%(2**(num+1))==0:
        num+=1
    count_line.append(num)
    
    

print(min(count_line))

Submission status: Accepted

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

Submission status: Accepted

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

while True:
    if A[index%n]%2 == 0:
        A[index%n] //= 2
        count += 1
        index += 1
    else:
        break

print(count//n)

Submission status: Accepted

Solution code:
input()
print(min([len(bin(int(num)).rsplit('1',1).pop(-1)) for num in input().split()]))

Submission status: Accepted

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

print(n)

Submission status: Accepted

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

ans = -1
f = True

while (f):
    ans += 1
    for i in range(n):
        if (A[i] == 0 or A[i] % 2 != 0):
            f = False
            break
        A[i] /= 2

print(ans)

Submission status: Accepted

Solution code:
N=int(input())#入力回数を決める
data = input().split() 
list_count = []
for num in data:
    count = 0
    while int(num) % 2 == 0:
        num = int(num) / 2
        count += 1
    list_count.append(count) 

print(min(list_count))

Submission status: Accepted

Solution code:
N = int(input())
As = map(int, input().split())
As = map(lambda x: format(x, 'b'), As)
As = list(As)

maxlen = max(map(len, As))

for i in range(maxlen):
    test = '0'*(i+1)
    Bs = list(map(lambda x: x.endswith(test), As))

    if False in Bs:
        print(i)
        break

Submission status: Accepted

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

temp = 0

for i in a:
    temp |= i

count = 0
while True:
    if temp % 2 != 0:
        break
    temp /= 2
    count +=  1
print(count)