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()))
counter = [0 for _ in range(N)]

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

print(min(counter))

Submission status: Accepted

Solution code:
n = int(input())
lst = list(map(int, input().split()))
ans = 1000000000
for x in lst:
  c = 0
  while x % 2 == 0:
    x //= 2
    c += 1
  if ans > c:
    ans = c
print(ans)

Submission status: Accepted

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

import itertools
import collections
import bisect

# 素因数分解
def prime_dic(n):
    ans = 0

    while n % 2 == 0:
        ans += 1
        n //= 2

    return ans

def main():
    N = int(input())
    A = list(map(int, input().split()))
    A = list(map(lambda x: prime_dic(x), A))
    print(min(A))

if __name__ == '__main__':
    main()

Submission status: Accepted

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

for i in a:
    tmp = 0
    for j in range(1, 30):
        if i % 2 == 0:
            i /= 2
            tmp += 1
        else:
            break
    arr.append(tmp)
print(min(arr))

Submission status: Accepted

Solution code:
N = input()
A = [int(x) for x in input().split()]
Alist=[]
count=0
for a in A:
    while(True):
        if a%2==0:
            count+=1
            a/=2
        else:
            Alist.append(count)
            count=0
            break
print(min(Alist))

Submission status: Accepted

Solution code:
from math import log2 as log

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

Submission status: Accepted

Solution code:
def num_2pow(n: int) -> int:
    '''素因数分解した際の 2 の指数を求める。
    '''
    count = 0
    while n & 1 == 0:
        count += 1
        n >>= 1
    return count


def shift_only(N: int, A: list) -> int:
    return min(num_2pow(a) for a in A)


if __name__ == "__main__":
    N = int(input())
    A = [int(s) for s in input().split()]
    ans = shift_only(N, A)
    print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
count = 0
shift = True
while True:
    for i in range(0,N):
        if A[i]%2==1:
            shift = False
    if shift==True:
        for i in range(0,N):
            A[i] = A[i]/2
        count = count+1
    else:
        break
print("{}".format(count))

Submission status: Accepted

Solution code:
import fractions
from functools import reduce
def gcd(*numbers):
    return reduce(fractions.gcd, numbers)

def gcd_list(numbers):
    return reduce(fractions.gcd, numbers)
def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)

def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)
n = int(input())
a = list(map(int,input().split()))
co = 0

a = gcd_list(a)

while a % 2 == 0:
    co += 1
    a //= 2
print(co)

Submission status: Accepted

Solution code:
import sys

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

    ans = 10**9
    for a in A:
        i = 0
        while a % 2 == 0:
            a //= 2
            i += 1
        ans = min(ans, i)

    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

count = 0
can = True
while can:
  for i in range(0, int(n)):
    a = list[i]
    if a % 2 == 0:
      list[i] = a / 2
    else:
      can = False
  if can == True:
    count += 1
print(count)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

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

def log2(i):
	cnt = 0
	while i % 2 == 0:
		i = i // 2
		cnt += 1
	return cnt


minimum = 1000

for i in A:
    minimum = min(minimum, log2(i))
	
print(minimum)

Submission status: Accepted

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

for i in range (n) :
    number = 0
    odd = a[i] % 2
    a[i] = a[i] // 2    
    while odd <= 0 :
        number += 1
        odd = a[i] % 2
        a[i] = a[i] // 2
    answer.append(number)

print(min(answer))

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))
#A1~An
cnt = 0
#conunt_trialを試行回す度に増やしていく
#奇数が出るまで割り続ける


def devision():
    global cnt
    for i in range(N):
        count = A[i]
        if count % 2 != 0:
            print(cnt)
            break
        else:
            count = count // 2
            A[i] = count

        if i == N-1:
            cnt += 1
            devision()

devision()

Submission status: Accepted

Solution code:
def check_n(list_n, count = 0):
    new_list_n = [x/2 for x in list_n if x % 2 == 0]
    if len(new_list_n) != len(list_n):
        return count
    else:
        new_count = count + 1
        return check_n(new_list_n, new_count)
      
      
n = int(input())
nums = [int(x) for x in input().split()]
print(check_n(nums))

Submission status: Accepted

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

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

Submission status: Accepted

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

count=0
while True:
    check = list(map(lambda x:x%2, a))
    if check.count(1) > 0:
        break
    else:
        a = list(map(lambda x:x//2, a))
        count+=1

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

    res_count = 0
    while(1):
        for i, a in enumerate(As):
            if a % 2 == 1:
                break
        if i != (N-1):
            break

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

    print(res_count)

            
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
def count2(number):
    count = 0
    while True:
        if number % 2 == 0:
            count = count + 1
            number = number / 2
        else:
            break
    return count

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

answer = min(list(map(count2, A_list)))
    
print(answer)

Submission status: Accepted

Solution code:
import numpy as np
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(np.min(count))

Submission status: Accepted

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

result = 0
while True:
    num = [A[i] % 2**(result + 1) for i in range(N)]
    if num.count(0) != N:
        break
    result += 1
 
print(result)

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0
for i in range(30):
  if 1 in [n % 2 for n in A]:
    break
  A = [n >> 1 for n in A]
  ans += 1
print(ans)

Submission status: Accepted

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

ans = 0
for i in range(30):
  if 1 in [n % 2 for n in A]:
    break
  A = [n // 2 for n in A]
  ans += 1
print(ans)

Submission status: Accepted

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

ans = 0
for i in range(30):
  if 1 in [n - ((n >> 1) << 1) for n in A]:
    break
  A = [n // 2 for n in A]
  ans += 1
print(ans)

Submission status: Accepted

Solution code:
import numpy as np

N = int(input())
numbers_org = input().split()
numbers = np.zeros([1, N])
count = 0
finish = 0

for j in range(35):
    for i in range(N):
        if int(numbers_org[i]) % 2 == 0:
            numbers_org[i] = int(numbers_org[i]) / 2
        else:
            finish += 1
            break

    if finish == 1:
        break

    count += 1

print(count)

Submission status: Accepted

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

    for a in A:
        if a%2 != 0:
            flag = 1
    if flag == 1:
        break

    else:
        count += 1
        A = [a/2 for a in A]
print(count)

Submission status: Accepted

Solution code:
N = int(input())
li = list(map(int,input().split()))
num=-1
x=0

while(1):
    num+=1
    for i in li:
        if i%2==1:
            print(num)
            x+=1
            break
    if x==1:
        break
    for j in range(N):
        li[j]=li[j]/2

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))
i = float('inf')
for x in A:
    tmp = 0
    while x % 2 != 1:
        tmp += 1
        x = x >> 1
    i = min(tmp,i)
print(i)

Submission status: Accepted

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

flag=1
number=0

while(flag):
    for i in range(N):
        if a[i]%2==1:
            flag=0
            break
        else:
            a[i]=a[i]/2
    if flag==1:
        number=number+1

print(number)

Submission status: Accepted

Solution code:
number = input()
l = list(input().split(" "))

loop_count = 0
count = 0
min_count = 0

for n in l:
    loop_count = loop_count + 1
    while int(n) % 2 == 0:
        n = int(n)/2
        count = count + 1
    if loop_count == 1:
        min_count = count
    elif min_count > count:
        min_count = count
    count = 0

print(min_count)

Submission status: Accepted

Solution code:
n = input()
s = list(map(int, input().split()))
c = 0
while True:
        exist = False
        #print(s)
        for i in range(len(s)):
                #print(i)
                if s[i]%2 != 0:
                        exist = True

        if exist:
                print(c)
                break
        for i in range(len(s)):
                s[i] = s[i]/2
        c += 1

Submission status: Accepted

Solution code:
# coding: utf-8

cntNum = input() # 要素数の取得
numList = [int(num) for num in input().split()] #コマンドライン入力数値の取得

cntDivision = 0 # 割り算回数の初期化
isOdd = False # 奇数判定フラグの初期化

while True:
    # 入力数値を1つずつ２で除算して余りが0でなかったら、奇数判定フラグをTrueにする
    for num in numList:
        if (num % 2 != 0):
            isOdd = True
    # 奇数判定フラグがFalseなら（除算した結果奇数が含まれていなかったら）除算を実行
    # 奇数判定フラグがTrueなら、whileループを抜ける
    if (isOdd == False):
        numList = [ (num/2) for num in numList ]
        cntDivision += 1
    else:
        break

print(cntDivision)

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:
def main():
    N = int(input())
    A = map(int, input().split())
    ans = float("inf")
    for a in A:
        tmp = 0
        while a % 2 == 0:
            a //= 2
            tmp += 1
        ans = min(ans, tmp)
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

count = 0
while(True):
	if all([ a%2 == 0 for a in aList]):
		aList = list(map(lambda a:a/2, aList))
		count += 1
	else:
		break

print(count)

Submission status: Accepted

Solution code:
N=int(input())
A=list(map(int, input().split()))
t=0
i=0
while i < N:
    if A[i] % 2 == 0:
        A[i] = A[i]//2
        if i == N - 1:
            t += 1
            i = -1
        i += 1
    else:
        break
print(t)

Submission status: Accepted

Solution code:
a=int(input())
b=list(map(int,input().split()))
counter=0
exist_odd=False
while True:
  count=0
  while count<=a-1:
    if b[count]%2==1:
      exist_odd=True
      break
    else:
      b[count]=b[count]//2
      count+=1
  if exist_odd:
    break
  else:
    counter+=1
print(counter)

Submission status: Accepted

Solution code:
##いろいろやってみよう
import functools
def mod(a,b):
  c=a%b
  return c
N=int(input())
*A,=map(int,input().split())
count=0
for j in range(len(bin(max(A)))-2):
  if 1 in map(functools.partial(mod,b=2),A):
    break
  else:
    A=[A[i]//2 for i in range(N)]
    count+=1
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

a = []

for row in list:
    cnt = 0
    while True:
        if row % 2 == 0:
            row = row / 2
            cnt += 1
        else:
            a.append(cnt)
            break

print(min(a))

Submission status: Accepted

Solution code:
 ### ABC081B - Shift only
n = int(input())
a = list(map(int, input().split()))
cnt_list = []

for i in range(n):
    countTemp = 0
    while a[i]%2 == 0:
        a[i] //= 2    
        countTemp += 1
    cnt_list.append(countTemp)
print(min(cnt_list))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = input()
A = input()
n = []
arr = [N]
i = 0
cnt = -1
arr = A.split(" ")
while "".join(n).replace("o","") == "":
	for num in arr:
		if int(num)%2 == 0:
			n.append("o")
			arr[i] = int(arr[i])/2
		else:
			n.append("x")
		i += 1
	i = 0
	cnt += 1
print(cnt)

Submission status: Accepted

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

is_all_even = True
counter = 0
while True:
    for i, v in enumerate(A):
        if v % 2 == 0:
            A[i] = A[i] // 2
        else:
            is_all_even = False
    if is_all_even:
        counter += 1
    else:
        break
print(counter)

Submission status: Accepted

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


for t in range(40):

    for i,j in enumerate(a):
        if j%2 == 0:
            a[i] = j/2

        else:
            flag = 1
            break

    if flag == 1:
        break

print(t)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
def f(x):
    ret = 0
    while x % 2 == 0:
        ret += 1
        x //= 2
    return ret
b = list(map(f, a))
print(min(b))

Submission status: Accepted

Solution code:
def check(a,cnt):
  c = [int(x)%2 for x in a]
  if 1 in c:
    return 0,cnt,a
  else :
    cnt +=1
    b = [int(x)/2 for x in a]
    return 1,cnt,b
 
N = input()
a = input().split()
cnt = 0
m = 1
while(m != 0):
  m,cnt,a = check(a,cnt)
  if m == 0:
    print(cnt)
  else :
    continue

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num = int(input())
input_list = input().split()

cnt = 0
flag = True
while(flag):
    for i in range(num):
        if int(input_list[i]) % 2 == 1 or int(input_list[i]) == 0:
            flag = False
        else:
            input_list[i] = int(input_list[i]) / 2
    if flag == True:
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:

INF=1e18
MOD=1e9+7

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

ans=INF

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

print(ans)

Submission status: Accepted

Solution code:
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:
def hanbun(a):
    return a//2
n=int(input())
a=list(map(int,input().split()))
judge=1
ans=0
while judge:
    for i in a:
        if i%2!=0:
            judge=0
            break
    if judge:ans+=1
    a=list(map(hanbun,a))
print(ans)

Submission status: Accepted

Solution code:
# coding: utf-8
N = int(input())
A = list(map(int, input().split()))
ans = [0] * N
for i in range(N):
    s = bin(A[i])
    for j in range(1, len(s) - 1):
        if s[-j] == '0':
            ans[i] += 1
        else:
            break
print(min(ans))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin

def mod(n):
    return n % 2

def div(n):
    return n / 2

n = int(stdin.readline().rstrip() )
a = list(map(int, stdin.readline().rstrip().split()))
ans = 0

while True:
    if sum(list(map(mod, a))) == 0:
        a = list(map(div, a))
        ans = ans + 1
    else:
        break

print(ans)

Submission status: Accepted

Solution code:
n=int(input())
l=list(map(int,input().split(" ")))
ans=0
j=0
while j==0:
    i=0
    while i <len(l):
        if l[i]%2!=0:
            j=1
        else:
            l[i]=int(l[i]/2)
        i+=1
    ans+=1
print(ans-1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
N=input()
a=list(map(int,input().split()))
a=np.asarray(a)
b=0
while True:
    if all(a%2==0):
        a=a/2
        b+=1
    else:
        break
print(b)

Submission status: Accepted

Solution code:
n=int(input())

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

print(cnt//n)

Submission status: Accepted

Solution code:
n = int(raw_input())
in_s = raw_input()
arr = map(int, in_s.split())
ans = 1<<30
for a in arr:
        cand = 0
        buf = a
        while True:
                if (buf%2) ==1:
                        break
                buf = buf/2
                cand+=1
        ans = min(ans,cand)
print ans

Submission status: Accepted

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

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

for i in range(n):
    cnt = 0
    while a[i] % 2 == 0:
        a[i] //= 2
        cnt += 1
    cnt_list.append(cnt)
    
print(min(cnt_list))

Submission status: Accepted

Solution code:
N=int(input())
A=list(map(int,input().split()))
f=True
ans=0
while f:
  for i in range(N):
    if A[i]%2==0:
      A[i]=A[i]//2
    else:
      f=False
    
  if f:
    ans+=1
    
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 = list(map(lambda x: x / 2, A))
    count += 1
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
N =int(input())
x=input().split(" ")
flag=1
count =0
while flag==1:
    for i,k in enumerate(x):
        a =int(k)
        if a%2==0:
            x[i]=a/2
        else:
            flag=0
    if flag ==1:
        count +=1
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

A_amari = [0]*N
cnt = 0

while(not(1 in A_amari)):
    for i in range(len(A)):
        A_amari[i] = A[i] % 2        
        A[i] = A[i] / 2
    if(not(1 in A_amari)):cnt += 1

print(cnt)

Submission status: Accepted

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

ans = 1e+9
for i in A:
    numDivided = 0
    while i % 2 == 0:
        i /= 2
        numDivided += 1
    ans = min( ans, numDivided )

print( ans )

Submission status: Accepted

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


n = int(input())
a = map(int, input().split())
ans = min(map(div, a))
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = input().split()
judge = 1 #1:継続, 0:終了
count = 0

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

print(int(count/N))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Mon Feb 25 01:41:52 2019

@author: yuta
"""
     
def shift(n,s):
    a = [0]*int(n)
    for i in range(0,int(n)):
        count = 0
        b = int(s[i])
        while b % 2 == 0:
            count += 1
            b = b/2
        a[i] = count
    print(min(a))            

kosuu = input()
seisuu = input().split()
shift(kosuu,seisuu)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))
def f(i):
    n = 0
    while True:
        if i%2==0:
            i//=2
            n+=1
        else:
            break
    return n
ans = 10**9
for a_ in a:
    ans = min(ans,f(a_))
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
N=int(input())
a=[int(i) for i in 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

Submission status: Accepted

Solution code:
N = input()

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

ans = 0

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math
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()))
count = 0
det = True
while det:
    for i in range(N):
        if A[i] % 2 == 0:
            A[i] = A[i] // 2
        else:
            det = False
            break
    if det != False:
        count += 1
print(count)

Submission status: Accepted

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

while check==0:
    
    
    for i in range(len(li)):
        if li[i]%2==1:
            check=1
        else:
            li[i]=li[i]/2
    
    

    count+=1

print(count-1)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
cnt = 0
b = a[0]
for i in range(1, n):
    b = b|a[i]
while not b&1:
    cnt += 1
    b = b>>1
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()
str_lis = input().split()
num_lis = [int(x) for x in str_lis]
mod2_lis = [x % 2 for x in num_lis]
i = 0

while not sum(mod2_lis):
    num_lis = [x / 2 for x in num_lis]
    mod2_lis = [x % 2 for x in num_lis]
    i += 1

print(i)

Submission status: Accepted

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

while isAllEven:
    for i in range(n):
        if a[i]%2 == 1:
            isAllEven = False
        else:
            a[i] = a[i]/2
    if isAllEven == False:
        break
    cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
N = input()
An = [int(i) for i in input().split()]
isOdd = False
count = 0
while True:
    for num in An:
        if num % 2 == 1:
            isOdd = True
    if isOdd == False:
        for num in An:
            An[An.index(num)]  = int(num/2)
        count += 1
    else:
        break
print(count)

Submission status: Accepted

Solution code:
input();a,b=list(map(int,input().split())),0
while True:
  c,b=a,b+1
  a=[i//2 for i in a if i%2==0]
  if len(a)<len(c):print(b-1);break

Submission status: Accepted

Solution code:
N = int(input())
bb = [int(x) for x in input().split()]
cnt = 0
while True:
    c = [x % 2 for x in bb]
    if c != [0 for x in range(N)]:
        break
    bb = [x/2 for x in bb]
    cnt += 1
print(cnt)