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:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    N = int(input())
    S = list(map(int, input().split()))
    result = 0
    count = 2
    while all([s % count == 0 for s in S]):
        count *= 2
        result += 1

    print(result)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

cnt = 0
flag = 0

while flag == 0:
    for i in range(0,N):
        if lst[i]%2 == 0:
            lst[i] = lst[i]/2
        else:
            flag = 1
    cnt += 1
    

print("{}".format(cnt-1))

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]
    #print(A)
    count += 1
print(count)

Submission status: Accepted

Solution code:
# 入力 : 数字
N = int(input())
ListA = [int(x) for x in input().split()]

count = 0

while 1 :
    exist_odd = False

    for i in range(len(ListA)) :
        if ListA[i]%2 != 0 :
            exist_odd = True
    if exist_odd :
        break

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

    count += 1

print(count)

Submission status: Accepted

Solution code:
def shift_only(array):
    tmp = []
    counter = 0
    while True:
        flag = True
        # 全て偶数かを確認
        for num in array:
            if num%2 != 0:
                flag = False
        if flag == False:
            break
        array = [i/2 for i in array]
        counter +=1
    print(counter)
    
n = int(input())
a = list(map(int, input().split()))
shift_only(a)

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

Submission status: Accepted

Solution code:
def input_int():
    return map(int, input().split())

def one_int():
    return int(input())

def one_str():
    return input()

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

N=one_int()
A=many_int()

mins=100000000000
for i in A:
    temp=i
    count=0
    while temp%2==0:
        count+=1
        temp/=2
            
    if count < mins:
        mins = count

print(mins)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=input()
wb = list(map(int, input().split()))
num=0
while True:
#	print(num, wb)
	wb2 = list(map(lambda x: x%2, wb))
	if any(wb2) == 0:
		num += 1
		wb = list(map(lambda x: x/2, wb))
	else:
		break
print(num)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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())
l = list(map(int,input().split()))
ans = 0
flg = 1
while flg:
  for i in range(n):
    if l[i]%2 < 1:
      l[i] //= 2
    else:
      flg = 0
      break
  ans += flg
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
A=list(map(int,input().split()))
A.sort()
for i in range(N):
  A[i]=list(format(A[i],'320b'))
A=list(map(list,zip(*A)))
B=['0']*N
ret=0
A.reverse()
for i in A:
  if i==B:
    ret+=1
  else:
    break
print(ret)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input()
arr = [int(s) for s in input().split(" ")]
cnt = 0
while (1):
    all_even = all([i % 2 == 0 for i in arr])
    if all_even:
        arr = [i // 2 for i in arr]
        cnt += 1
    else:
        break
print(cnt)

Submission status: Accepted

Solution code:
n=int(input())
s=list(map(int,input().split()))
f=False
c=0
while True:
    for x in range(n):
        if s[x]%2==0:s[x]=s[x]//2
        else:f=True
    if f:
        print(c)
        break
    c+=1

Submission status: Accepted

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

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

print(min_div)

Submission status: Accepted

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

def even_judgement(A):
  count = 0
  for a in A:
    if a%2 == 0:
      count += 1
  if count == N:
    return True
  else:
    return False

S_COUNT = 0
while even_judgement(A):
  A = list(map(lambda x: x/2, A))
  S_COUNT += 1
print(S_COUNT)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

while True:
    if any([i%2 for i in a]):
        break
    else:
        a = [i/2 for i in a]
        cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
import fractions
from functools import reduce

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

buf=reduce(fractions.gcd,a)

print(format(buf,'b')[::-1].find('1'))

Submission status: Accepted

Solution code:
n =int(input())
input_line=input().split(" ")
#print(input_line,type(input_line))
#print(b)
#print(c)
flag="ture"
count=0
while flag=="ture":
    for i in range(n):
        if int(input_line[i]) % 2 != 0:
            flag="false"
        else:
            input_line[i]=int(input_line[i])/2
    if flag=="false":
        break
    count +=1
print(count)

Submission status: Accepted

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

#all(): 全ての要素がTrueならTrue
#any(): 一つでもTrueならTrue
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 = list(map(int, input().split()))
s = 0

def count(A, n):
    for i in range(n):
        if (A[i] % 2 == 1) or (A[i] == 0):
            return False
        A[i] = A[i] // 2
    return True

while True:
    if count(A, n):
        s += 1
    else:
        break
    
print(s)

Submission status: Accepted

Solution code:
n = int(input())

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

def waru(a,n):
    for i in range(n):
        if a[i]%2==1:
            return False
        else:
            a[i] = a[i]//2
    return True

con = 0
while True:

    if waru(a,n):
        con += 1
    else:
        break

print(con)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import fractions
from functools import reduce

def gcd_list(num):
  return reduce(fractions.gcd,num)
  
n = int(input())
a = list(map(int,input().split()))
count = 0

gcd = gcd_list(a)
while gcd % 2 == 0:
  gcd = gcd / 2
  count += 1
print(count)

Submission status: Accepted

Solution code:
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())
l=list(map(int,input().split()))
ans=1000
for i in l:
  t=0
  while(i%2==0):
    i=i//2
    t+=1
  ans=min(ans,t)
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
l = list(map(int,input().split()))
ans = max(l)
for i in l:
  count = 0
  while i % 2 == 0:
    count += 1
    i //= 2
  ans = min(ans,count)
  if ans == 0:
    print(0)
    exit()
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
nums = [int(x) for x in input().split()]
ops = 0
cont = 1
while cont:
	for x in range(n):
		if nums[x] % 2 == 0:
			nums[x] = nums[x]/2
		else:
			cont = 0
			break
	ops += cont
print(ops)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))
def keta2(n):
    b = 0
    if n%2 == 0:
        b += 1
        while(1):
            n = n//2
            if n==0 or n==1:
                break
            if n % 2 == 0:
                b += 1
            else:
                break

    return b

ans = 1000
for i in range(N):
    b = keta2(A[i])
    ans = min(ans,b)


print(ans)

Submission status: Accepted

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

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 = list(map(int,input().split()))
count = 0
flag = False

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

check1 = 0
count1 = 0
while check1 == 0:
    for i in range(len(A)):
        if(A[i]%2 == 0):
            A[i] = A[i]/2
        else:
            check1 = 1
            break
    count1 += 1
        
count1 -= 1
print(count1)

Submission status: Accepted

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

Submission status: Accepted

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

cnt = 0

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

Submission status: Accepted

Solution code:
N = int(input())
arr = [int(n) for n in input().split()]
n_operation = 0
possible = True
while possible:
    for i, n in enumerate(arr):
        if n % 2 == 1:
            possible = False
            break
        arr[i] /= 2
    else:
        n_operation += 1
print(n_operation)

Submission status: Accepted

Solution code:
a = int(input())
n = [int(i) for i in input().split()]
count = 0
flag = True
while flag==True:
    for i in range(len(n)):
        if n[i]%2==1:
            flag = False
    
    if flag==False:
        break
    
    count += 1
    for i,j in enumerate(n):
        n[i]=j//2
    #print(n)
print(count)

Submission status: Accepted

Solution code:
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    n=INT()
    A=LIST()
    ct=0
    flg=1
    while flg==1:
        for i in range(n):
            if A[i]%2==1:
                flg=0
            else:
                A[i]=A[i]//2
        if flg==1:
            ct+=1
    print(ct)
            
        
if __name__ == '__main__':
    do()

Submission status: Accepted

Solution code:
import sys

n=int(input())
a=list(map(int,input().split()))
count=0
for j in range(100000):
	for i in range(n):
		if a[i]%2==1:
			print(count)
			sys.exit()
		a[i]=a[i]/2
	count+=1

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
list = list(map(int, input().split()))
b = -1
cont = True

while cont:
  b += 1
  for i in range(n):
    if(list[i] % 2 == 0):
      list[i] = list[i] / 2
    else:
      cont = False
     
print(b)

Submission status: Accepted

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

num_dvd = 0
 
can_devide = True
temp_list = []
while can_devide:
  for num in nums:
    if num % 2 == 1:
      can_devide = False
      print(num_dvd)
      break
    else:
      temp_list.append(num // 2)
  num_dvd += 1
  nums, temp_list = temp_list, []

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())

AS = list(map(int,input().split()))
count = 0

while True:
  for i in range(n):
    a = AS[i]
    if a %2:
      break
    AS[i] = int(a/2)
  else:
    count += 1
    continue
  break
print(count)

Submission status: Accepted

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

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

    if flag == False:
        break
    else:
        count += 1
        for i in range(n):
            a[i] = a[i] // 2

print(count)

Submission status: Accepted

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

for i in range(n):
    count = 0
    while A[i]%2 == 0 :
        count +=1
        A[i] = A[i]//2
    B.append(count)

print(min(B))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
n = int(readline())
lst1 = list(map(int,readline().split()))
ans = 10**9
for i in lst1:
    res = 0
    while True:
        if i%2 == 0:
            i //= 2
            res += 1
        else:
            ans = min(ans,res)
            break

print(ans)

Submission status: Accepted

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


    

if __name__ == "__main__":
    main()

Submission status: Accepted

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

# n = 5
# A = [2,4, 6]

cnt = 0

while True:
    exist_odd = False
    for a in A:
        if a % 2 == 0:
            continue
        else:
            exist_odd = True
            break 
    if exist_odd: 
        break
    A = [a/2 for a in A]
    cnt = cnt + 1
print(cnt)

Submission status: Accepted

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

# n = 5
# A = [2,4, 6]

cnt = 0

flag=True
while flag:
    for a in A:
        if a % 2 == 0:
            continue
        else:
            flag=False
            break 
    if not flag: 
        break
    A = [a/2 for a in A]
    cnt = cnt + 1
print(cnt)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

count = 0
i = 0
j = 0

while i == 0:
    for a in A:
        if a % 2 == 1:
            i = 1
            break
        else:
            a = a / 2
            A[j] = a
            j += 1
    j = 0
    if i == 0:
        count += 1

print(count)

Submission status: Accepted

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

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

print(output)

Submission status: Accepted

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

Submission status: Accepted

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

ans = 9999
for i in A:
  tmp = i
  count = 0
  while tmp % 2 == 0:
    tmp = tmp // 2
    count += 1
  ans= min(ans, count)
print(ans)

Submission status: Accepted

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

c = 0
isOdd = False
while True:
    for i in range(N):
        if args[i] % 2 == 1:
            isOdd = True
        args[i] /= 2
    if isOdd:
        break
    c += 1

print(c)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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

s = []
a = A
i = 0

f = list(map(lambda x: x % 2, A))
if f.count(1):
    print(i)
    sys.exit()

while not s.count(1):
    a = list(map(lambda x: x // 2, a))
    s = list(map(lambda x: x % 2, a))
    i += 1

print(i)

Submission status: Accepted

Solution code:
"""
author : halo2halo
date : 29, Jan, 2020
"""

import sys

# import itertools
import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

N = int(readline())
A = np.array(readline().split(), dtype=np.int64)

ans=0
while np.all(A%2==0):
    A//=2
    ans+=1
print(ans)

Submission status: Accepted

Solution code:
import numpy as np
input()
x = np.array(input().split(),dtype=np.int32)
 
answer = 0
while np.all(x%2==0):
  x //= 2
  answer += 1
print(answer)

Submission status: Accepted

Solution code:
"""
author : halo2halo
date : 29, Jan, 2020
"""

import sys

# import itertools
# import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)


def num(n):
    cnt = 0
    while n:
        if n % 2 == 0:
            cnt += 1
            n /= 2
        else:
            break
    return cnt


N, *A = map(int, read().decode('utf8').split())

ans = num(A[0])
for i in A:
    ans =min(ans, num(i))
print(ans)

Submission status: Accepted

Solution code:
def check_odd(li):
    for i in li:
        if i % 2 != 0:
            return False
    return True


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

ans = 0

while 1:
    if check_odd(A):
        A = list(map(lambda x: x / 2, A))
        ans += 1
    else:
        break
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
A = [int(i) for i in 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())
li= list(map(int,input().split())) 	
Ans=30
ans=0

for i in range(N):
	if li[i]%2==1:
		Ans=0
		break
	else:
		n=li[i]
		ans=0
		while n%2==0:
			n=n/2
			ans= ans+1
		if Ans>ans:
			Ans =ans

print(Ans)

Submission status: Accepted

Solution code:
def solve(n, A):
    for i in range(1, 30):
        tmp = 2 ** i
        for a in A:
            if a % tmp != 0:
                return i - 1
    return 29

_n = int(input())
_A = list(map(int, input().split()))
print(solve(_n, _A))

Submission status: Accepted

Solution code:
n = int(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:
#!/usr/bin/env python3
n = int(input())
a = list(map(int,input().split()))
ans = 0
while True:
    if sum([a[i]%(2**(ans+1)) for i in range(n)]) == 0:
        ans += 1
    else: break
print(ans)

Submission status: Accepted

Solution code:
import numpy as np
n = int(input())
count = 0
val_list = np.array(list(map(int, input().split())))

while True:
    # 偶数の数算出
    even_cnt = len(list(filter(lambda x:x % 2 == 0, val_list)))
    
    # 配列の値の偶数判定
    if n == even_cnt:
        # 配列の割り算
        val_list = val_list/2
        # 上記繰り返しの回数保存
        count += 1
    else:
        break
print(count)

Submission status: Accepted

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

Submission status: Accepted

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


def two(n):
    ans = 0
    while n % 2 == 0:
        n //= 2
        ans += 1
    return ans


print(min([two(a) for a in Alist]))

Submission status: Accepted

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

Submission status: Accepted

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

#整数値入力 1文字の入力
def input_one_number():
    return int(input())

#整数値龍力　複数の入力
def input_multiple_number():
    return map(int, input().split())

#整数値龍力　複数の入力(配列)
def input_multiple_number_as_list():
    return list(map(int, input().split()))

#2次元配列入力
def input_map():
    return [list(map(int,list(input()))) for i in range(h)]

#リスト出力
def print_list(list):
    print(*list)
    return

#2次元配列出力
def print_map(maplist):
    for i in maplist:print(*i, sep='')
    return

#素数生成
def generate_primenums():
    n = 100
    primes = set(range(2, n+1))
    for i in range(2, int(n**0.5+1)):
        primes.difference_update(range(i*2, n+1, i))
    primes=list(primes)
    return primes

def memo():
    a=[0]*5
    b=a  #良くない配列のコピー
    b2=a[:]  #1次元のときはコピーはこれで良い
    a[1]=3
    print('b:{}, b2:{}'.format(b,b2))  #b:[0, 3, 0, 0, 0], b2:[0, 0, 0, 0, 0]
    
    import copy
    a= [[0]*3 for i in range(5)] #2次元配列はこう準備、[[0]*3]*5だとだめ
    b=copy.deepcopy(a)  #2次元配列はこうコピーする
    
    #内包表記奇数のみ
    odd=[i for i in range(100) if i%2==1] #[1, 3, 5, 7, 9, 11, 13, 15, 17, 19]
    
    #二部探索
    import bisect
    a = [1, 2, 3, 5, 6, 7, 8, 9]
    b=bisect.bisect_left(a, 8)
    
    #combinations、組み合わせ、順列
    from itertools import permutations, combinations,combinations_with_replacement,product
    a=['a','b','C']
    print(list(permutations(a)))
    print(list(combinations(a,2)))
    print(list(combinations_with_replacement(a,3)))


#階乗
def kaijo(n):
    import math
    return math.factorial(n)

#選び方（コンビネーション nCr）
def num_combination(n,r):
    import math
    return math.factorial(n) // math.factorial(n - r)


#最大公約数、最小公倍数
def calc_gcd_lcm(a,b):
    import fractions
    GCD=fractions.gcd(a,b)
    lcm=a*b//gcd
    return gcd,lcm

#複数の最大公約数
def calc_gcd_list(l):
    import numpy as np
    return np.gcd.reduce(l)

N = input_one_number()
lst_A = input_multiple_number_as_list()

min = 1000000000

for i in range(N):
    cnt = 0
    a = lst_A[i]
    while a % 2 == 0:
        cnt +=1
        a //= 2
    if min > cnt:
        min = cnt
print(min)

Submission status: Accepted

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

Submission status: Accepted

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

res = True
cnt = 0

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

        a[i] = a[i]/2

    if not res:
        break

    cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
def calc(c, cnt):
    r = [i % 2 for i in c]
    if sum(r) > 0:
        print(cnt)
        return 1
    else:
        for k, num in enumerate(c):
            c[k] = num / 2
        cnt += 1
        if calc(c, cnt) == 1:
            return 1
        

N = int(input())
c = [int(i) for i in input().rstrip().split(' ')]
calc(c, 0)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
N = int(input())
A = [int(i) for i in input().split()]

ans = []
for i in range(N):
    count = 0
    while True:
        if A[i] % 2 != 0:
            ans.append(count)
            break
        else:
            A[i] /= 2
            count += 1
print(min(ans))

Submission status: Accepted

Solution code:
n = input()
a = list(map(int, input().split()))
even = True
count = 0
while even:
    for ai in range(len(a)):
        if a[ai] % 2 != 0:
            even = False
            break

    if even:
        a = list(map(lambda num: num / 2, a))
        count += 1
    else:
        break
print(count)

Submission status: Accepted

Solution code:
import numpy as np

n = int(input())
a = np.array(list(map(int, input().split())))
#a_ = np.array()

count=0
cont=1

#print(a)
#print(a[2])

while cont :
  a_ = np.unique(a % 2)
  if a_[0]==0 and len(a_) == 1 :
    count += 1
  else :
    break

  a = a / 2

print(count)

Submission status: Accepted

Solution code:
n = int(input())
lis = list(map(int, input().split()))
odd_flag = 0
#count = 0
ans = 0

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from functools import reduce
from operator import mul

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

while reduce(mul, [i+1 for i in A]) % 2 == 1:
    A = [int(i/2) for i in A]
    L += 1

print(L)

Submission status: Accepted

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

while True:
    if [i for i in alist if i%2==1]:
        break
    alist = [i//2 for i in alist]
    ans+=1
print(ans)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import numpy as np
# 整数の入力
N = int(input())
# スペース区切りの整数の入力
line = np.array(list(map(int, input().split())))

num = 0
while True:
    l = np.mod(line, 2)
    if 1 in l:
        print(num)
        break
    else:
        num += 1
        line = line / 2

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
mod = [0]*n
check = 0
    
for ii in range(1000):
    for i in range(n):
        mod[i] = a[i] % 2
        check = check + mod[i]
        a[i] = a[i]/2
    if (check>=1):
        print(ii)
        break

Submission status: Accepted

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

count=0
f=0

while 1:
    for i in arr:
        if i%2==1:
            f=f+1
    if f==0:
        arr=arr//2
        count+=1
        f=0
    else:
        break
print(count)

Submission status: Accepted

Solution code:
# Problem https://atcoder.jp/contests/abc081/tasks/abc081_b
# Python 3rd Try
import math


def solve(N, Ai):
    answer = int(math.log2(10**9)) + 1
    eachCounter = [0] * N
    for j in range(0, N):
        counter = 0
        while True:
            if Ai[j] % 2 == 0:
                counter = counter + 1
                Ai[j] = Ai[j] / 2
            else:
                break
        eachCounter[j] = counter
    for j in range(0, N):
        if eachCounter[j] < answer:
            answer = eachCounter[j]

    return answer


if __name__ == "__main__":
    N = int(input())
    Ai = list(map(int, input().split(' ')))
    print(solve(N, Ai))