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 = map(int ,input().split())
min1 = 30
for i in A:
    tmp = 0
    while i%2 == 0:
        tmp += 1
        i /= 2
    
    if tmp < min1:
        min1 = tmp

print(min1)

Submission status: Accepted

Solution code:

a=int(input())
b=[int(i) for i in input().split()]


e=b
f=0
for j in range(10000):
	d=0
	#print(e)
	for i in range(a):
		if e[i]%2==0 and sum(e)!=0:
			d=d+1
		else:
			break
	#print(d)
	if d==a:
		f=f+1
	e=[k/2 for k in e]
print(f)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
counts = []

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

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

    counts.append(count)
print(min(counts))

Submission status: Accepted

Solution code:
def choise(n,s):
    k = 0
    lis = s.split()
    lis = list(map(lambda x: int(x), lis))
    while (len(lis) == int(n)):
        lis = list(filter(lambda x: x % 2 == 0, lis))
        if (len(lis) == int(n)): k += 1
        lis = list(map(lambda x: x / 2, lis))
    return k

if __name__ == "__main__":
    n = input()
    s = input()

    print(choise(n,s))

Submission status: Accepted

Solution code:
import numpy as np
a = int(input())
ary = np.array(list(input().split()), dtype=int)

def is_all_even(nums):
    return (nums % 2 == 0).all()

count = 0
while True:
    if not is_all_even(ary):
        print(count)
        break
    else:
        count += 1
        ary //= 2

Submission status: Accepted

Solution code:
import math
N = int(input())
A = list(map(int, input().split()))
ans = float('inf')
for a in A:
  ans = min(ans, len(bin(a)) - bin(a).rfind('1') - 1)
print(ans)

Submission status: Accepted

Solution code:
N = int(input())

numlist = input().split()
# numlist = map(int,input().split())

# print(N,numlist)

def div(list):
    ret = []
    for i in list:
        ret.append(int(i)/ 2)
    return ret

def chkEven(list):
    for i in list:
        if not int(i) % 2 == 0:
            return False
    return True

cnt = 0


while chkEven(numlist):
    cnt += 1
    numlist = div(numlist)
    
print(cnt)

Submission status: Accepted

Solution code:
input()
n=eval(input().replace(' ','|'))
print(len(bin(n&-n))-3)
#コピペです。

Submission status: Accepted

Solution code:
length = int(input())
a_list = map(int, input().split())

num_list = []
for a in a_list:
    t = a
    num = 0
    while t % 2 == 0:
        num += 1
        t = t / 2
    num_list.append(num)

print(min(num_list))
#こぴぺです。

Submission status: Accepted

Solution code:
length = int(input())
a_list = map(int, input().split())

num_list = []
for a in a_list:
    t = a
    num = 0
    while t % 2 == 0:
        num += 1
        t = t / 2
    num_list.append(num)

print(min(num_list))

Submission status: Accepted

Solution code:
def containOdd(x):
    for c in x:
        if c % 2 == 1:
            return True
    return False

l = int(input())
nl = list(map(int, input().split()))
i = 0
while not containOdd(nl):
    nl = list(map(lambda x: x/2, nl))
    i += 1
print(i)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
length = int(input())
a_list = map(int, input().split())

num_list = []
for a in a_list:
    t = a
    num = 0
    while t % 2 == 0:
        num += 1
        t = t / 2
    num_list.append(num)

print(min(num_list))

Submission status: Accepted

Solution code:
N = int(input())
A = [int(_) for _ in 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:
num = int(input())
numbers = list(map(int,input().split()))

count = 0
flag = 0
while flag == 0:
    i = 0
    for i in range(num):
        if numbers[i] % 2 == 0:
            numbers[i] = numbers[i]/2
        else:
            flag += 1
    count += 1
print(count-1)

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline
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()))
count = 0
flag = True
while flag:
    for i in range(N):
        if A[i] % 2 == 0:
            A[i] /= 2
        else:
            flag = False
            print(count)
            exit()
    count += 1

Submission status: Accepted

Solution code:
N = int(input())
num = [int(j) for j in input().split()]
i, ans = 0, 0

while num[i]%2 == 0:
    i += 1
    if i == N:
        ans += 1
        i = 0
        num = [j/2 for j in num]

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())

A0 = map(int, input().split())
B = []
A = []
count=0
for i in A0:
    A.append(i)
for i in A:
    while(i%2==0 and i>0):
        count+=1
        i = i/2
    B.append(count)
    count=0
print(min(B))

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
def even(numbers):
  return all([i%2 == 0 for i in numbers])
count = 0
while even(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()))
a = A
def calc(n):
  if(n%2 == 0):
    return int(n/2)
  else:
    return False

cnt = 0
while all(a) == True:
  a = list(map(calc, a))
  cnt += 1
print(cnt-1)

Submission status: Accepted

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

print(cal(n,s))

Submission status: Accepted

Solution code:
# coding: utf-8
N = input()
lst = map(int, input().split())

ans = 100000000
for x in lst:
    cnt = 0
    while x%2==0:
        cnt += 1
        x //= 2
    ans = min(ans, cnt)
print(ans)

Submission status: Accepted

Solution code:
# coding: utf-8
N = input()
lst = map(int, input().split())

val = 100000000
for x in lst:
    cnt = 0
    while x%2==0:
        cnt += 1
        x //= 2
    if val > cnt:
        val = cnt
print(val)

Submission status: Accepted

Solution code:
input()
count = 0
end = 0
An = list(map(int,input().split()))
while end is not 1:
  for n in An:
    if(n % 2 is not 0):
      end = 1
  if end is not 1:
    count = count + 1
    for n in range(len(An)):
      An[n] = int(An[n]/2)
print(count)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

def main():
    sn = input()
    sa = input().split(' ')
    aa = [int(s) for s in sa]

    c = 0
    f = True

    while f:
        for i, ai in enumerate(aa):
            if ai & 1 != 0:
                f = False
                break
            else:
                aa[i] = ai >> 1
        if f:
            c += 1

    print(c)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import numpy as np
import sys


#リスト作成
Num_lst = []

#入力
N = int(input())
Num = map(int, input().split())

#イテレータをリストに変換し、さらにnparrayに変換
Num_lst = np.array(list(Num))


#確認
if N!=len(Num_lst):
    sys.exit()

    
#処理回数を計測するためのフラグを設定
flag = 0    

while True:

    #すべて偶数の場合フラグに1を追加し、各要素を2で割る
    if np.all(Num_lst%2==0):
        flag += 1
    
        Num_lst = Num_lst/2
    
    #すべて奇数の場合、処理を終了する
    else:
        break
    
print(flag)

Submission status: Accepted

Solution code:
def abc081_b():
    _ = int(input())
    a = list(map(int, input().split()))
    ans = 100000
    for num in a:
        tmp = 0
        while num % 2 == 0:
            num /= 2
            tmp += 1
        if tmp < ans:
            ans = tmp
    print(ans)


abc081_b()

Submission status: Accepted

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

ans = 40

for a in A:
    count = 0
    while a % 2 == 0:
        a //= 2
        count += 1
    
    ans = min(ans, count)

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

i=-1
con=True

while con:
    for j in range(0, N):
        if A[j]%2:
            con=False
        else:
            A[j]/=2
    i+=1
print(i)

Submission status: Accepted

Solution code:
def how_many_times_divisible(n):
    ans1 = ~-(n & -n).bit_length()
    ans2 = bin(int(n))[::-1].index('1')
    res = 0
    while n % 2 == 0:
        n /= 2
        res += 1
    assert res == ans1 == ans2
    return res

N, *A = map(int, open(0).read().split())
ans = min(map(how_many_times_divisible, A))
print(ans)

Submission status: Accepted

Solution code:
def how_many_times_divisible(n):
    ans = ~-(n & -n).bit_length()
    res = 0
    while n % 2 == 0:
        n /= 2
        res += 1
    assert res == ans
    return res

N, *A = map(int, open(0).read().split())
ans = min(map(how_many_times_divisible, A))
print(ans)

Submission status: Accepted

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


# print(le)

count = 0
bool = 0

while(1):
    for i in range(0,N):
        if le[i]%2 != 0:
            bool = 1
            break
        le[i] = le[i]/2
    if bool == 1:
        break
    count += 1

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import re

input = sys.stdin.readline
def gets(): return input().strip()
def geti(): return map(int, input().split())
def getf(f): return f(input())
def gi(): return int(input())

n = gi()
minv = 999999

for i in geti():
    v = 0

    while i % 2 == 0:
        i >>= 1
        v += 1

    minv = min(minv, v)

print(minv)

Submission status: Accepted

Solution code:
N = int(input())
n = 0
lis = [int(i) for i in input().split()]
while True:
    lis2 = []
    for i in lis:
        if i %2 == 0:
            lis2.append(int(i/2))
        else:
            print(n)
            exit()
    lis = lis2
    n+=1

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    aa = list(map(int, input().split()))
    res = 1 << 30
    for a in aa:
        quot = 0
        while a % 2 == 0:
            a //= 2
            quot += 1
        res = min(res, quot)
    print(res)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())
a = [int(i) for i in input().split()]
_min = 10**5
for _a in a:
    count = 0
    while _a > 0 and _a % 2 == 0:
        count += 1
        _a = _a // 2
    _min = min(_min, count)
print(_min)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
_ = int(input())

def is_even(ls):
    if sum([x%2 for x in ls]) == 0:
        return True
    return False

def check(ls, c):
    if not is_even(ls):
        return c
    else:
        c += 1
        return check([x/2 for x in ls], c)

A = list(map(int, input().split()))
print(check(A, 0))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
N = int(raw_input()) #Ｎの整数を入力
A = map(int, raw_input().split()) #N個の正の整数Ａを入力
Count = 0 #何回操作したか
while True: #奇数になるまでループ
  f = 0 #奇数になったら１にする
  for i in range(N): #A[0]~A[N]まで/2をする
    if A[i] %2 != 0:f = 1 #奇数だったら1にする
    A[i]=A[i]/2 #/2をする
  if f==1:break #ループを抜ける
  Count += 1 #全ての個数が偶数なら+1
print Count #結果

Submission status: Accepted

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

mindiv = -1
for a in A:
  if mindiv == -1:
    mindiv = len(bin(a)) - len(bin(a).rstrip('0'))
  else:
    tmp = len(bin(a)) - len(bin(a).rstrip('0'))
    if tmp < mindiv:
      mindiv = tmp

print(mindiv)

Submission status: Accepted

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

for i in range(N):
    if(A[i]%2==1):
        print("0")
        quit()

for i in range(2**30):
    count+=1
    for j in range(len(A)):
        A[j]=int(A[j]/2)
        if(A[j]%2==1):
            print(count)
            quit()

Submission status: Accepted

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

Submission status: Accepted

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

count = 0
def odd_counter(L,c):
    for i in range(N):
        if a_list[i]%2==0:
            a_list[i]/=2
        else:
            return c
    c+=1
    return odd_counter(a_list,c)

print(odd_counter(a_list,count))

Submission status: Accepted

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

divide_2 = []

for i in a:
    counter = 0
    while i%2==0:
        i /= 2
        counter += 1
    divide_2.append(counter)
print(min(divide_2))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
times = int(input())
num_li = list(map(int,input().split(" ")))
cou = ans = 0
lim = 1

while lim:
    lim -= 1
    for i in range(times):
        if num_li[i] % 2 == 0:
            cou += 1
            num_li[i] = num_li[i]/2
        
    if cou == times:
        ans += 1
        lim += 1
        cou = 0
    else:
        print(ans)

Submission status: Accepted

Solution code:
# Shift only
n = int(input())
a = list(map(int, input().split()))
ans = 0
while not any(i % 2 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()))

result = 0
has_odd_number = False
while True:
    for i in range(n):
        if a[i] % 2 != 0:
            has_odd_number = True
            break
        a[i] //= 2

    if has_odd_number:
        break
    else:
        result += 1

print(result)

Submission status: Accepted

Solution code:
n=int(input())
l=list(map(int,input().split()))
m=0
f=False
f2=True
for i in l:
  a=i
  c=0
  while True:
    if f and c>m:
      break
    if a%2:
      if f2 or m>c:
        m=c
      f=True
      break
    else:
      a/=2
      c+=1
print(m)

Submission status: Accepted

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

exists_odd = False
result = 0
while not exists_odd:
    for i in range(n):
        if a[i] % 2 != 0:
            exists_odd = True

        a[i] //= 2

    if not exists_odd:
        result += 1

print(result)

Submission status: Accepted

Solution code:
n=int(input())
p=0
B=[]
A=list(map(int,input().split()))
for j in range(n):
  i=0
  while A[j]%(2**i)==0:
    p=i
    i+=1
  else:
    B.append(p)
print(min(B))

Submission status: Accepted

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

def amari(a):
  y=0
  for i in range(n):
    if a[i]%2==1:
      y=1
  return y

cnt=0
while amari(a)==0:
  for i in range(n):
    a[i]=a[i]/2
  cnt+=1
  
print(cnt)

Submission status: Accepted

Solution code:
# _*_ coding:utf-8 _*_
#  Atcoder_Beginners_Contest081-B
#  https://beta.atcoder.jp/contests/abc081/tasks/abc081_b


def devide2(s):

	strList = s.split(' ')
	listLength = len(strList)
	intList = []
	for i in range(listLength-1):
		intList.append(int(strList[i]))
	sunukeCheckGoing = True
	sunukeCheckCounter = 0
	while sunukeCheckGoing:
		for j in range(listLength-1):
			oddCheck = intList[j]%2
			if oddCheck == 1 :
				sunukeCheckGoing = False
			else :
				intList[j]=intList[j]//2
		if sunukeCheckGoing == True:
			sunukeCheckCounter = sunukeCheckCounter +1

	answer = sunukeCheckCounter
	return answer


if __name__ == '__main__':
	_ = input()
	intAsStr=input()
	count=devide2(intAsStr)
	print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s1 = int(input())
s2 = [int(x) for x in input().split(" ")]

def allEven(l):
    result = True
    for n in l:
        result = n % 2 == 0 and result
    return result
ns = s2
count = 0
while allEven(ns):
    ns = [x / 2 for x in ns]
    count += 1
print(count)

Submission status: Accepted

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

ans = float("inf")

for i in a:
    binary = bin(i)
    ans = min(ans, len(binary) - binary.rfind("1") - 1)

print(ans)

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]/=2
                b[i]+=1


print(min(b))

Submission status: Accepted

Solution code:
e = [[int(i) for i in input().split()] for i in range(2)]
max_count = 999999

for i in range(e[0][0]):
    tmp = e[1][i]
    count = 0

    while True:
        tmp, m = divmod(tmp, 2)
        if m == 1:
            break

        count += 1

    if count < max_count:
        max_count = count

print(max_count)

Submission status: Accepted

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

ans = 0
exit = False

while True:
    for num in nums:
        if num % 2 != 0:
            exit = True
            break
    if exit:
        break

    ans += 1

    for i in range(len(list(nums))):
        nums[i] = nums[i] // 2

print(ans)

Submission status: Accepted

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

result = 0
has_odd = False
for a_i in a:
    if (a_i % 2) != 0:
        has_odd = True
while not has_odd:
    for i in range(n):
        a[i] //= 2
        if (a[i] % 2) != 0:
            has_odd = True

    result += 1

print(result)

Submission status: Accepted

Solution code:
N  = int(input())
a = input().split()
A = [int(s) for s in a]   #strのリストをintのリストに変換

Counter = 0

while True:
	for i in range(N):
		if A[i-1] % 2 == 0:	#偶数の時,2で割る
			A[i-1] = A[i-1] / 2
		else: #奇数の時,次のelseは無視されてbreak,つまりwhileのループを抜ける
			break
	else:	#else以下はfor分が最後まで行った時実行される
		Counter += 1
		i = 0
		continue

	break	

print(Counter)

Submission status: Accepted

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

while True:
  if (sum(list(map(lambda x:x%2,A))))!= False:
    print(count)
    exit()
  else:
    A=list(map(lambda x:x/2,A))
    count+=1

Submission status: Accepted

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

def exists_odd_number(a):
    for a_i in a:
        if a_i % 2 != 0:
            return True

    return False


count = 0
while True:
    if exists_odd_number(a):
        break

    count += 1
    for i, a_i in enumerate(a):
        a[i] = a_i // 2

print(count)

Submission status: Accepted

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

ans = 10 ** 9

for n in l:
    count = 0
    while n % 2 == 0:
        n //= 2
        count += 1
    ans = min(ans, count)

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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

    t = 0
    while True:
        for i in range(N):
            if A[i] % 2 == 0:
                A[i] = A[i]/2
            else:
                print(t)
                sys.exit()
        t += 1

main()

Submission status: Accepted

Solution code:
import sys

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

    t = 0
    while True:
        for i in range(N):
            if A[i] % 2 == 0:
                A[i] //= 2
            else:
                print(t)
                sys.exit()
        t += 1

main()

Submission status: Accepted

Solution code:
n = int(input())

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

counter = 0
check = 0

for i in range(n):
    if a[i] % 2 == 0:
        check += 1



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

Submission status: Accepted

Solution code:
a = int(input())
ar = list(map(int,input().split(" ")))
count = 0
sw = "ON"
while sw == "ON":
    for r in ar:
        if r % 2 == 1:
            sw = "OFF"
    if sw == "ON":
        count += 1
        for i,r in enumerate(ar):
            ar[i] //= 2
print(count)

Submission status: Accepted

Solution code:
input()
nums = map(int, input().split())
result = 32
for num in nums:
  if (num & 1) == 1:
    result = 0
    break
  num = num >> 1
  div_times = 1

  while (num & 1) == 0:
    num = num >> 1
    div_times += 1
  if div_times < result:
    result = div_times
print(result)

Submission status: Accepted

Solution code:
input()
nums = input().split()
result = 32
for num in nums:
  num = int(num)
  div_times = 0
  while (num & 1) == 0:
    num = num >> 1
    div_times += 1
  if div_times < result:
    result = div_times
print(result)

Submission status: Accepted

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

numbers_div2 = []
for num in numbers:
  count = 0
  while num % 2 == 0:
    num /= 2
    count += 1
  numbers_div2.append(count)
  
print(min(numbers_div2))

Submission status: Accepted

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

min_div = float("inf")
for i in range(N):
	c = 0
	while A[i] % 2 == 0:
		A[i] /= 2
		c += 1
	if min_div > c:
		min_div = c
print min_div

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
ans = 10**9
for i in range(N):
    j = 0
    R = A[i] % 2
    B = A[i] // 2
    while(R==0):
        j += 1
        R = B % 2
        B = B // 2
    ans = min(j, ans)
    
print(ans)

Submission status: Accepted

Solution code:
def div_cnt(input_n):
    cnt = 0
    while input_n % 2 == 0:
        input_n /= 2
        cnt += 1

    return cnt

input_n = int(input())
input_a = list(map(int,input().split()))
cnt = min(map(div_cnt,input_a))

print(cnt)

Submission status: Accepted

Solution code:
input_n = input()
input_a = input().split()
cnt = 0
end_flg = True

while end_flg:
    for i in range(int(input_n)):

        if int(input_a[i]) % 2 == 0:
            input_a[i] = int(input_a[i])/2

        else:
            end_flg = False
            break
    if end_flg == False:break
    cnt+=1

print(cnt)

Submission status: Accepted

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

count = 0
switch = 'on'

while True:
    for i in range(n):
        if li[i]%2 == 0:
            li[i] = int(li[i]/2)
        else:
            print(count)
            switch = 'off'
            break
    count += 1

    if switch == 'off':
        break

Submission status: Accepted

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

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

print(counter)

Submission status: Accepted

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

Submission status: Accepted

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

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())
l = list(map(int, input().split()))
ans = []

for num in l:
	b = num
	count = 0
	while(b & 1 == 0):
		b >>= 1
		count += 1
	ans.append(count)
	
print(min(ans))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sun Nov 11 15:09:04 2018
ABC081
@author: maezawa
"""

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

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

print(j)

Submission status: Accepted

Solution code:
N=int(input())
List=list(map(int,input().split()))
Flag=0
Counter=-1
Element=0
while Flag<1:
  while Element<N:
      if List[Element]%2==1:
        Flag=1
      List[Element]=List[Element]/2
      Element+=1
  Element=0
  Counter+=1
print(Counter)

Submission status: Accepted

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

j = 0
new = []
while True:
    for m,i in enumerate(l):
        if i % 2 == 0:
            l[m] = i/2
            
            if m+1 == n:
                j +=1
        else:
            print(j)
            exit()

Submission status: Accepted

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

j = 0
new = []
while True:
    for m,i in enumerate(l):
        if i % 2 == 0:
            l[m] = i/2
            
            if m+1 == n:
                j +=1
        else:
            print(j)
            break
    else:
        continue
    break

Submission status: Accepted

Solution code:
num = int(input())

number = input()
number = [int(x) for x in number.split(" ")]

def two(number,num,flag):
  for i in range(num):
    if number[i] % 2 !=0:
      flag = False
    number[i] /= 2

  return number,flag

flag = True
count = 0
while flag:
  number , flag =two(number,num,flag)
  if flag == True:
    count += 1
 

print(str(count))

Submission status: Accepted

Solution code:
import functools
n = input()
v = functools.reduce(lambda x, y: x | y, map(int, input().split()))
cnt = 0
while v & 1 == 0:
    v >>= 1
    cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
def dividable(N,A):
    wareru = True
    for i in range(N):
        if A[i] % 2 != 0:
            wareru = False
            break
    return wareru

def divide(N,A):
    for i in range(N):
        A[i] = A[i] // 2
    return A


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

times = 0

while dividable(N,A):
    A = divide(N,A)
    times += 1

print(times)

Submission status: Accepted

Solution code:
def dividable(N,A):
    wareru = True
    for i in range(N):
        if A[i] % 2 != 0:
            wareru = False
            break
    return wareru

def divide(N,A):
    for i in range(N):
        A[i] = A[i] // 2
    return A


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

times = 0

while dividable(N,A):
    divide(N,A)
    times += 1

print(times)

Submission status: Accepted

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

Submission status: Accepted

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

print(count)

Submission status: Accepted

Solution code:
#!/bin/env python

def main():
    N = int(raw_input())
    A = map(int, raw_input().split(" "))
    retval = 1e9
    for a in A:
        cnt = 0
        while a % 2 == 0:
            a /= 2
            cnt += 1
        retval = min(cnt, retval)
    print retval

if __name__ == '__main__':
    main()