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(map(int, input().split()))

ans = 32
for i in range(len(A)):
    tmp_ans = 0
    while A[i] % 2 == 0:
        A[i] /= 2
        tmp_ans += 1
    ans = min(ans, tmp_ans)
    
print(ans)

Submission status: Accepted

Solution code:
N=int(input())
A=list(map(int,input().split()))
cnt=0
f=True
while(f):
    if all(map(lambda x: x%2==0, A)):
        A=list(map(lambda x: x/2, A))
        cnt+=1
    else:
        f=False

print(cnt)

Submission status: Accepted

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

cnt=0
while True:
    len1=len(a)
    a=[i//2 for i in a if i%2==0]
    len2=len(a)
    if len1!=len2:
        break
    cnt+=1
print(cnt)

Submission status: Accepted

Solution code:
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:
N = int(input())
A = map(int, input().split())

Ai = []

m  = 1000
for a in A:
    tmp = 0
    while(a % 2 == 0):
        tmp += 1
        a //= 2
    m = min(m, tmp)

print(m)

Submission status: Accepted

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

n_divided = 0

def list_contains_odd(list):
    r = False
    for idx in range(len(list)):
        if list[idx] % 2 != 0:
            r = True
    return r

while 1:
    if list_contains_odd(a_list):
        print(n_divided)
        exit()
    else: 
        a_list = [x/2 for x in a_list]
        n_divided += 1

Submission status: Accepted

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

n_divided = 0

def list_contains_odd(list):
    r = False
    for idx in range(len(list)):
            if list[idx] % 2 != 0:
                r = True
    return r

# 1回も割れない場合
if list_contains_odd(a_list):
    print("0")
else: # 最低1回は割れる場合
    while 1:
        a_list = [x/2 for x in a_list]
        n_divided += 1
        if list_contains_odd(a_list):
            print(n_divided)
            exit()

Submission status: Accepted

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

def hoge(n):
  result = 0
  while True:
    if n%2 == 0:
      result += 1
      n = n//2
    else:
      break
  return result

print(min([hoge(a) for a in A]))

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))
B = []
for i in A:
    tmp = i
    b = 0
    while tmp%2 == 0:
        b += 1
        tmp //= 2
    B.append(b)
B = sorted(B)
print(B[0])

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
aMin = 30
for i in a:
    aCnt = 0
    while n > 0:
        if i % 2 != 1:
            aCnt += 1
            i /= 2
        else:
            break
    if aCnt < aMin:
        aMin = aCnt
print(aMin)

Submission status: Accepted

Solution code:
# 自分の回答
n = int(input())
array = list(map(int, input().split()))
flg = 0
count = 0
while(flg == 0):
    j = 0
    for j in range(n):
        if(array[j] % 2 == 0):
            array[j] /= 2
            j += 1
            if(j == (n -1)):
                count += 1
        else:
            flg = 1
            break
print(count)

Submission status: Accepted

Solution code:
import math

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

flag=True
cout=-1;

while flag:
    cout+=1
    for i in range(n):
        if a[i]%2 is int(0):
            a[i]=int(a[i]/2)
        else:
            flag=False


print(cout)

Submission status: Accepted

Solution code:
# 初期値
N = int(input())
A = list(map(int, input().split()))

count = 0
##############################
def counter(A, count):
    global new_A
    global new_count
    new_A = []
    new_count = count
    for a in A:
        if a == 0:
            break
        elif a % 2 == 0:
            new_A.append(int(a / 2))
        else:
            break
    if len(new_A) == N:
        new_count += 1
    return new_A, new_count
#################################

# 計算
counter(A, count)

for i in range(100):
    counter(new_A, new_count)

print(counter(new_A, new_count)[1])

Submission status: Accepted

Solution code:
import numpy as np
N = int(input())
a = list(map(int,input().split()))
flg = 1
ans = 0
while flg == 1:
    for i in range(N):
        if a[i]%2!=0:
            flg = 0
    if flg == 1:
        ans +=1
        for i in range(N):
            a[i]=a[i]/2
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

n=input()
A=map(int,input().split())
x=min(map(how_many_times_devisible,A))
print(x)

Submission status: Accepted

Solution code:
n = int(input())
a = [int(i) for i in input().split()]
ans = 10**10
for i in range(n):
	counter = 0
	while a[i] % 2 == 0:
		a[i] /= 2
		counter += 1
	if counter <= ans:
		ans = counter
print(ans)

Submission status: Accepted

Solution code:
import sys
N = int(input())
a = list(map(int, input().split()))
infi =100
#答えとなる変数
ans = 0

for i in range(infi):
    for j in range(len(a)):
        if(a[j]%2 != 0):
           print(ans)
           sys.exit()
        else:
            a[j] = a[j]/2
            
    ans +=1
print(ans)

Submission status: Accepted

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

ct = 0
while(1) :
  count = 0
  for i in range(n):
    if a[i]%2 != 0:
      count+=1
  if count != 0:
    break
  else:
    a1 = [j/2 for j in a]
    a = a1
    ct += 1
  
print(ct)

Submission status: Accepted

Solution code:
n = int(input())
a = [int(i) for i in input().split()]
ans = 0
bre = 0
while True:
	for s in range(n):
		if a[s] % 2 != 0:
			bre += 1
		a[s] = a[s] // 2
	if bre != 0:
		break
	ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin
mod = 10**9 + 7
import numpy as np

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
sa = lambda h: [list(map(int, stdin.readline().split())) for i in range(h)]

n = ni()
a = np.array(na())
c = 0
odd_exist = False
while not odd_exist:
        for ai in a:
                if ai % 2 !=0:
                        odd_exist = True

        if odd_exist:
                print(c)
                break
        else:
                a = a//2
                c += 1

Submission status: Accepted

Solution code:
N = int(input())
nums = [int(x) for x in input().split()]
cnt = 0
loop = True
while loop:
  if not all([n%2 is 0 for n in nums]):
    break
  for i, n in enumerate(nums):
    nums[i] = n//2
  cnt +=1
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
nums = [int(x) for x in input().split()]
cnt = 0
loop = True
while loop:
  if not all([n % 2 is 0 for n in nums]):
     
    break
    
  for i, n in enumerate(nums):
    nums[i] = n//2
  cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
N = int(input())
nums = [int(x) for x in input().split()]
cnt = 0
loop = True
while loop:
  if not all([n % 2 is 0 for n in nums]):
    loop = False 
    break
    
  for i, n in enumerate(nums):
    nums[i] = n//2
  cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
N = int(input())
nums = [int(x) for x in input().split()]
cnt = 0
loop = True
while loop:
    if not all([n % 2 is 0 for n in nums]):
        loop = False
        break

    for i, n in enumerate(nums):
        nums[i] = n//2
    cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
def half(n):
	return n/2
def half_mod(n):
	return n%2

N = int(input())
A = list(map(int, input().split()))
zero = [0] * N
count = 0

while list(map(half_mod, A)) == zero:
	count += 1
	A = list(map(half, A))
      
print(count)

Submission status: Accepted

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

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

print(act)

Submission status: Accepted

Solution code:
def get_power(number):
    number = int(number)
    count = 0
    while True:
        if number % (2**(count+1)) == 0:
            count += 1
        else:
            return count

n = int(input())
an = list(map(get_power, input().split()))

an.sort()
print(an[0])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
cnt = 0
while all(i%2 == 0 for i in a):	#all()はすべてiterがtrueならtrueを返す
  a = [i/2 for i in a]			#式"i%2==0"を評価するとbool型が帰る
  cnt += 1
  
print(cnt)

Submission status: Accepted

Solution code:
# all()が標準でない言語だとできない。
# ただ、リスト内包表記が美しい
n = int(input())
a = list(map(int, input().split()))
cnt = 0
while all(i%2 == 0 for i in a):	#all()はすべてiterがtrueならtrueを返す
  a = [i/2 for i in a]			#式"i%2==0"を評価するとbool型が帰る
  cnt += 1
  
print(cnt)

Submission status: Accepted

Solution code:
"""
python3 b_ans.py
3          
8 12 40
[3, 2, 3]
全部を割って、一番割れなかった数を返せば、事足りる。面白い！
"""

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

Submission status: Accepted

Solution code:
n = int(input())
 
counter = 0
Nums = [int(num) for num in input().split()]
for i in range(0, 10000):
  if all(num % 2**i == 0 for num in Nums):
    counter = i
  else:
    break
print(counter)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/python
# coding: UTF-8

from math import *
import os
import sys

#import scipy.optimize
import numpy as np


##################################################################
if __name__ == "__main__":
    Input = [raw_input() for i in range(2)]
    N = Input[0]
    A = list(map(int,Input[1].split()))
    A = np.array(A)
    for ans in range(100):
        temp = A % 2
        if sum(temp) != 0:
            break
        else:
            A = A/2        
    print ans

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 = list(map(lambda i : i / 2, a))
    count += 1
print(count)

Submission status: Accepted

Solution code:
n = int(input())
a = set(map(int,input().split()))
count = 0
while True:
    b = set()
    for i in a:
        if i%2 != 0:
            break
        b.add(i//2)
    else:
        a = b
        count += 1
        continue
    break
print(count)

Submission status: Accepted

Solution code:
c=0;N,*A=map(int,open(0).read().split()) #open(0).read()でどんな形も読み込み可能。Aの前の*でAが変数であることを示す。
while all(map(lambda i:i&1==0,A)):
    A=list(map(lambda i:i>>1,A));c+=1
print(c)

Submission status: Accepted

Solution code:
c=0;N,*A=map(int,open(0).read().split()) #open(0).read()でどんな形も読み込み可能。
while all(map(lambda i:i&1==0,A)):A=list(map(lambda i:i>>1,A));c+=1
print(c)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#Shift only
N = int(input())
A = list(map(int,input().split()))
count = [0]*N
for a in range(N):
    count_local = 0
    while A[a]%2 == 0:
        A[a] = A[a]/2
        count_local += 1
        if count_local >= count[a]:
            count[a] = count_local

print(min(count))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
from fractions import gcd
# import queue
# from collections import Counter
# from itertools import accumulate
from functools import reduce

def lcm(a, b):
    return a * b // gcd(a, b)

def combination_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def permutations_count(n, r):
    return math.factorial(n) // math.factorial(n - r)

big_prime = 1000000007

"""
# 標準入力取得
## 文字列
 =  sys.stdin.readline().rstrip()
 =  list(sys.stdin.readline().rstrip())

## 数値
 =  int(sys.stdin.readline())
 =  map(int, sys.stdin.readline().split())
 =  list(map(int, sys.stdin.readline().split()))
 =  [list(map(int,list(sys.stdin.readline().split()))) for i in range(N)]
"""

N =  int(sys.stdin.readline())
L =  list(map(int, sys.stdin.readline().split()))

X = reduce(gcd, L)

cnt = 0
while True:
    if X == 1:
        print(cnt)
        exit()
    X = X >> 1
    cnt += 1

Submission status: Accepted

Solution code:
N = int(input())
As = list(map(int, input().split()))
i = 0
while True:
  for a in As:
   if a % pow(2, (i+1)) != 0:
    break
  else:
    i += 1
    continue
  break

print(i)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
ans = 0
while True:
    i = 0
    while i <= n -1:
        if a[i]%2:
            print(ans)
            exit()
        else:
            a[i] = a[i]//2
        i += 1
    ans += 1

Submission status: Accepted

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

m = float('inf')
for a in A :
    c = 0
    while a % 2 == 0 :
        a //= 2
        c += 1
    m = min(m, c)
    
print(m)

Submission status: Accepted

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

Submission status: Accepted

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

count = 10 ** 9
for i in range(N):
  tmp = As[i]
  tmp_count = 0
  while tmp % 2 == 0:
    tmp = tmp // 2
    tmp_count += 1
  count = min(count, tmp_count)
    
print(count)

Submission status: Accepted

Solution code:
import sys
import math
from fractions import gcd
# import queue
# from collections import Counter
# from itertools import accumulate
# from functools import reduce

def lcm(a, b):
    return a * b // gcd(a, b)

def combination_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def permutations_count(n, r):
    return math.factorial(n) // math.factorial(n - r)

big_prime = 1000000007

"""
# 標準入力取得
## 文字列
 =  sys.stdin.readline().rstrip()
 =  list(sys.stdin.readline().rstrip())

## 数値
 =  int(sys.stdin.readline())
 =  map(int, sys.stdin.readline().split())
 =  list(map(int, sys.stdin.readline().split()))
 =  [list(map(int,list(sys.stdin.readline().split()))) for i in range(N)]
"""

N =  int(sys.stdin.readline())
list_num = list(map(int, sys.stdin.readline().split()))
cnt_min = 100

for num in list_num:
    num_tmp = num
    cnt_tmp = 0
    # print(num_tmp)
    while(num_tmp % 2 == 0):
        num_tmp = num_tmp // 2
        cnt_tmp += 1
        # print(cnt_tmp)
        #if(num_tmp == 0):
        #    break

    if(cnt_tmp < cnt_min):
        cnt_min = cnt_tmp

    cnt_tmp = 0

print(cnt_min)

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

Submission status: Accepted

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


answer = 2

l = []*N
for value in A:
    count = 0
    while value % 2 == 0:
        value //= 2
        count+=1
    l.append(count)
ans = min(l)
print(ans)

Submission status: Accepted

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

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
            break
    count += 1
print(count-1)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import numpy as np

input()
A = np.array(list(map(int, input().split())))
count = 0
while all(A%2==0):
    count += 1
    A //= 2
print(count)

Submission status: Accepted

Solution code:
c=0;_,*l=map(int,open(0).read().split())
while all(map(lambda i:i&1==0,l)):l=list(map(lambda i:i>>1,l));c+=1
print(c)

Submission status: Accepted

Solution code:
N = input() 
A = input().split()
count = 0

flg = False
tmp = A

while flg == False:
    List = []
    for Number in tmp:
        if  int(Number) % 2 != 0:
            flg = True
        else:
            List.append(int(Number) / 2)
    
    if flg == False:
        count += 1
        tmp = List
    
print(count)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

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

    ans = int(1e10)
    for t in a:
        tmp = 0
        while not t&1:
            t //= 2
            tmp += 1
        ans = min(ans, tmp)
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

# solve
ans = 0
is_odd = False
while True:
    for i in range(N):
        if A[i] % 2 == 1:
            is_odd = True
    if not is_odd:
        for i in range(N):
            A[i] /= 2
        ans += 1
    else:
        break

# output
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

import numpy as np
a = np.array(list(map(int, input().split())))

cnt = 0
while 1 not in a % 2:
    cnt += 1
    a = a // 2

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

n = input()
input_nums = map(int, input().split())
print(min(map(how_many_times_divisible, input_nums)))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import numpy as np

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

for i in range(N):
  As[i] = int(As[i])
  
As = np.array(As)

flag = True
counter = 0
while flag:
  div = np.where(As%2==0,0,1)
  if div.sum()>0:
    flag = False
  else:
    As = As//2
    counter += 1
print(counter)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def devide(elements):
    cnt = 0
    while True:
        for i, element in enumerate(elements):
            if element % 2 != 0:
                return cnt
            elements[i] = element / 2
        cnt += 1
    return cnt

_ = raw_input()
elements = map(int, raw_input().split())
print devide(elements)

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(N):
    if blackboard[i] %2 == 1:
        print(ans)
        exit()

while card == True:
    for i in range(N):
        blackboard[i] = blackboard[i]/2
    ans += 1
    for i in range(N):
        if blackboard[i] %2 == 1:
            card = False

print(ans)

Submission status: Accepted

Solution code:
N=int(input())

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

e=[]
def a(c):
    count=0
    while c%2 == 0:
        c /=2
        count +=1
    return count
for i in data:
    d=a(i)
    e.append(d)
    
print(min(e))

Submission status: Accepted

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


if __name__ == "__main__":
    resolve()

Submission status: Accepted

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


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

Submission status: Accepted

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

Submission status: Accepted

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

ans = []
for a in A:
    k = 0
    for b in list(bin(a))[::-1]:
        if b != '0':
            break
        else:
            k += 1
    ans.append(k)

print(min(ans))

Submission status: Accepted

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

counter = 0
roop_checker = True
while roop_checker == True:
    for i in range(N):
        if kokuban[i] % 2 == 1:
            roop_checker = False
        else:
            kokuban[i] = kokuban[i] / 2
    if roop_checker == True:
        counter += 1
    else:
        next

print(counter)

Submission status: Accepted

Solution code:
_ = input()
a = input().split()
b = []
for i in a:
    minimum = 0
    while int(i)%2 == 0:
        i = int(i)/2
        minimum += 1
    b.append(minimum)
print(min(b))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = 100000000

for i in range(len(a)):
    tmp = 0
    while a[i] % 2 == 0 and tmp < ans:
        a[i] = a[i] / 2
        tmp += 1
    ans = tmp
print(ans)

Submission status: Accepted

Solution code:
from fractions import*;input();x=2**30;c=0
for i in input().split():x=gcd(x,int(i))
while x>1:x//=2;c+=1
print(c)

Submission status: Accepted

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

ans = 0
flag = False

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

print(ans)

Submission status: Accepted

Solution code:
import numpy as np

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

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

print(ans)