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:
# -*- coding: utf-8 -*-

#############
# Libraries #
#############

import sys
input = sys.stdin.readline

import math
#from math import gcd
import bisect
from collections import defaultdict
from collections import deque
from functools import lru_cache


#############
# Constants #
#############

MOD = 10**9+7
INF = float('inf')

#############
# Functions #
#############

######INPUT######
def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]

######OUTPUT######
def Yes(): print("Yes"); return
def No(): print("No"); return

#####Inverse#####
def inv(n): return pow(n, MOD-2, MOD)

######Combination######
kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret

######Factorization######
def factorization(n):
    if n==1:
      return [[1,0]]
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])
    return arr

#####MakeDivisors######
def make_divisors(n):
  divisors = []
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      divisors.append(i)
      if i != n // i: 
        divisors.append(n//i)
  return divisors

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

#####BitCount#####
def count_bit(n):
  count = 0
  while n:
    n &= n -1
    count += 1
  return count

#####ChangeBase#####
def Base_10_to_n(X, n):
  if (int(X/n)):
    return Base_10_to_n(int(X/n), n)+[X%n]
  return [X%n]


#############
# Main Code #
#############

N = inputI()
print( min(factorization((x&(-x)))[0][1] for x in inputIL() ))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    A = list(map(int, input().split()))
    ans = float('inf')
    for a in A:
        cnt = 0
        if a%2 != 0:
            ans = 0
            break
        for _ in range(1, 31):
            a = a//2
            cnt += 1
            if a%2==1:
                break
        ans = min(ans, cnt)
    
    print(ans)

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
from collections import deque
from collections import defaultdict

#自作関数群
def readInt():
	return int(input())
def readInts():
	return list(map(int, input().split()))
def readChar():
	return input()
def readChars():
	return input().split()
def factorization(n):
	res = []
	if n%2==0:
		res.append(2)
	for i in range(3,math.floor(n//2)+1,2):
		if n%i==0:
			c = 0
			for j in res:
				if i%j==0:
					c=1
			if c==0:
				res.append(i)
	return res
def fact2(n):
	p = factorization(n)
	res = []
	for i in p:
		c=0
		z=n
		while 1:
			if z%i==0:
				c+=1
				z/=i
			else:
				break
		res.append([i,c])
	return res
def fact(n):#階乗
	ans = 1
	m=n
	for _i in range(n-1):
		ans*=m
		m-=1
	return ans
def comb(n,r):#コンビネーション
	if n<r:
		return 0
	l = min(r,n-r)
	m=n
	u=1
	for _i in range(l):
		u*=m
		m-=1
	return u//fact(l)
def combmod(n,r,mod):
	return (fact(n)/fact(n-r)*pow(fact(r),mod-2,mod))%mod
def printQueue(q):
	r=copyQueue(q)
	ans=[0]*r.qsize()
	for i in range(r.qsize()-1,-1,-1):
		ans[i] = r.get()
	print(ans)
class UnionFind():
	def __init__(self, n):
		self.n = n
		self.parents = [-1]*n

	def find(self, x): # root
		if self.parents[x]<0:
			return x
		else:
			self.parents[x] = self.find(self.parents[x])
			return self.parents[x]

	def union(self,x,y):
		x = self.find(x)
		y = self.find(y)

		if x==y:
			return

		if self.parents[x]>self.parents[y]:
			x,y = y,x

		self.parents[x]+=self.parents[y]
		self.parents[y]=x

	def size(self,x):
		return -1*self.parents[self.find(x)]

	def same(self,x,y):
		return self.find(x)==self.find(y)

	def members(self,x): # much time
		root = self.find(x)
		return [i for i in range(self.n) if self.find(i)==root]

	def roots(self):
		return [i for i,x in enumerate(self.parents) if x<0]

	def group_count(self):
		return len(self.roots())

	def all_group_members(self):
		return {r: self.members(r) for r in self.roots()} # 1~n
def bitArr(n):#ビット全探索
	x = 1
	zero = "0"*n
	ans = []
	ans.append([0]*n)
	for i in range(2**n-1):
		ans.append(list(map(lambda x:int(x),list((zero+bin(x)[2:])[-1*n:]))))
		x+=1
	return ans;
def arrsSum(a1,a2):
	for i in range(len(a1)):
		a1[i]+=a2[i]
	return a1
def maxValue(a,b,v):
	v2 = v
	for i in range(v2,-1,-1):
		for j in range(v2//a+1): #j:aの個数
			k = i-a*j
			if k%b==0:
				return i
	return -1
def copyQueue(q):
	nq = queue.Queue()
	n = q.qsize()
	for i in range(n):
		x = q.get()
		q.put(x)
		nq.put(x)
	return nq

n = readInt()
a = readInts()

ans=0

def inodd():
	global a
	for i in range(n):
		if a[i]%2==1:
			return 1
	return

while 1:
	if inodd():
		break
	ans+=1
	for i in range(n):
		a[i]=a[i]//2

print(ans)

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines


def contains_odd(A):
    for x in A:
        if x % 2 == 1:
            return True
    return False


def check(A, count):
    if contains_odd(A):
        return count

    count += 1
    return check([x / 2 for x in A], count)


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

print(check(A, 0))

Submission status: Accepted

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

c = 0
x = True
while x == True:
    if all([i%2 == 0 for i in a]) == True:
        c += 1
        for j in range(len(a)):
            a[j] = a[j]//2
    else:
        x = False

print(c)

Submission status: Accepted

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

Submission status: Accepted

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

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:
# coding: utf-8
N = int(input())
A = list(map(int, input().split()))
ans = 10**10
cnt = 0
for i in range(N):
    c = A[i]
    cnt = 0
    while c % 2 == 0:
        c //= 2
        cnt += 1
    ans = min(ans, cnt)
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
input()
nums = list(map(int, input().split()))
count = 0
while True:
    for i, n in enumerate(nums[:]):
        if n % 2 == 0:
            nums[i] = n // 2
        else:
            break
    else:
        count += 1
        continue
    break
print(count)

Submission status: Accepted

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

ans = 10**10

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)
import bisect
import numpy as np

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

num = 0
while True:
    if all((A+1) // 2 == A // 2):
        num += 1
        A = A // 2
    else:
        break
print(num)

Submission status: Accepted

Solution code:

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

tf=True
res=0
while tf:
    for i in range(n):
        if a[i]%2==0:

            #a[i]=a[i]//2
            a[i]//=2 
            
        else:
            tf = False
            break

    else:
        res+=1

print(res)

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(len(a)):
    if a[i] % 2 != 0:
      flag = 1
      break
    else:
      a[i] //= 2
  count += 1
print(count-1)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

  count += 1

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

flag = True
count = 0
while flag:
    # print(a_l)
    for i in range(n):
        if a_l[i]%2 == 0:
            a_l[i] //= 2
        else:
            flag = False
            break
    else:
        count += 1

print(count)

Submission status: Accepted

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

cnt = 0
while True:
    test = [a_%2 for a_ in a]
    if 1 in test:
        break
    else:
        cnt += 1
        a = [a_/2 for a_ in a]
        
print(cnt)

Submission status: Accepted

Solution code:
num = int(input())
line =[int(x) for x in input().split()]
count = 0
flag = True
while flag:
  for i in range(num):
    if line[i]%2 != 0:
      flag = False
      break
    else:
      line[i] = line[i]//2
  if flag:
    count += 1
  else:
    break
print(count)

Submission status: Accepted

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

def down(allNum: list, count: int):
    if len(list(filter(lambda n: n % 2 != 0, allNum))) >= 1: return count
    count += 1
    allNum = list(map(lambda x: x / 2, allNum))
    return down(allNum, count)

print(down(allNum, 0))

Submission status: Accepted

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

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=[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 = 0
while True:
    for i in range(N):
        if A[i]%2==1:
            break
        A[i] = A[i]//2
    else:
        cnt += 1
        continue
    break
print(cnt)

Submission status: Accepted

Solution code:
n = int(input())
li = list(map(int, input().split()))
minv = 1000000001
for n in li:
	count = 0
	while n % 2 == 0:
		n /= 2
		count += 1
	minv = min(minv, count)
print(minv)

Submission status: Accepted

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

print(ans)

Submission status: Accepted

Solution code:
number = int(input())

integers = list(map(int, input().split(" ")))

counter = 0

while True:
  if all(integer%2 == 0 for integer in integers):
    counter += 1
    integers = [pivot/2 for pivot in integers]
  else:
    break

print(counter)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

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


ans = 0

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


print(ans)

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())

import fractions
a = list(map(int, input().split()))
#最大公約数
ans = a[0]
for i in range(1, N):
    ans = fractions.gcd(ans, a[i])

cnt = 0

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

print(cnt)

Submission status: Accepted

Solution code:
import sys

N = int(input())
A = list(map(int, sys.stdin.readline().rsplit()))

res = 10 ** 9
for a in A:
    if a % 2 == 1:
        res = 0
        break
    cnt = 0
    while a % 2 == 0:
        a //= 2
        cnt += 1
    res = min(res, cnt)
print(res)

Submission status: Accepted

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

for i in range(100):
    for j in range(n):
        if a_list[j]%2 == 0:
            a_list[j] //= 2
        else:
            print(i)
            exit()

Submission status: Accepted

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

flg = True
cnt = 0

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

Submission status: Accepted

Solution code:
import numpy as np
#S= str(input())
#T= str(input())
N = int(input())
#A,B,M= map(int,input().split())
A = list(map(int,input().split()))
#B = list(map(int,input().split()))
A=np.array(A)
c=0
for i in range(10**6):
    for n in A:
        if n%2!=0:
            print(c)
            exit()
    A=A/2
    c+=1

Submission status: Accepted

Solution code:
#ABC081-B
n = int(input())
a = list(map(int,input().split()))
flg = True
cnt = 0

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

            
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
A=list(map(int,input().split()))
ans=0
while all(n%2==0 for n in A):
  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()))
t = 0
wareru = 0

while t==0:
    for j, i  in enumerate(A):

        c = i%2
        A[j] = A[j]/2
        if c == 1:
            t = 1
            break
    if c == 0:
        wareru += 1

print(wareru)

Submission status: Accepted

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

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

    if flag:
        ans += 1
    else:
        break

print(ans)

Submission status: Accepted

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

while True:
    b[:] = map(lambda i: i%2, a)
    if sum(b) == 0:
        ans += 1
        a[:] = map(lambda i: i//2, a)
    else:
        break
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
N = int(input())
A = list(map(int, input().split()))
c = 0
a = 1
while 2 ** a <= 1e9:
    for i in range(N):
        if A[i] % (2 ** a) != 0:
            print(c)
            sys.exit()
    c += 1
    a += 1
print(c)

Submission status: Accepted

Solution code:
def main():
    cnt = 0
    n = int(input())
    numlist = [int(x) for x in input().split()]
    while True:
        temp=0
        for i in range(n):
            if numlist[i]%2 == 0:
                temp+=1
                numlist[i]=numlist[i]/2
        if temp==n:
            cnt+=1
        else:
            break
    print(cnt)

if __name__=='__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import time
def py():
    print("Yes")
def pn():
    print("No")
def iin():
    x = int(input())
    return x

neko = 0
nya = 0
nuko = 0

n = iin()
a =  [int(x) for x in input().split()]
while all(x%2!=1 for x in a):
    a = [int(i/2) for i in a]
    neko+=1

print(neko)

Submission status: Accepted

Solution code:
n = int(input())
s = list(map(int, input().split()))
import numpy as np
s_array = np.array(s)
process = 0
while np.all(s_array%2 == 0):
    s_array = np.array(list(map(lambda x: x/2, s_array)))
    process += 1
else:
    print(process)

Submission status: Accepted

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


count = 0
while all([value % 2 == 0 for value in values]):
    count += 1
    values = [value // 2 for value in values]

print(count)

Submission status: Accepted

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

N = int(input())
A = map(int, input().split())
print(min(map(how_many, A)))

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

for shift in range(32):
    #print('Start outer loop')
    for i in a:
        #print(i>>shift)
        if (i>>shift) & 1 == 1:
            #print('-- BREAK inner loop')
            break
    else: #breakでループを抜けなかったとき
        #print('-- Finish inner loop without BREAK')
        ans += 1
        continue
    
    #print('BREAK outer loop')
    break

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

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

ans = 0

def cnt_div(A, ans):
    if np.where(A%2==0)[0].shape[0] != N:
        return ans
    else:
        A = A // 2
        ans += 1
        return cnt_div(A, ans)

print(cnt_div(A, ans))

Submission status: Accepted

Solution code:
# coding: utf-8
N = int(input())
A = list(map(int, input().split()))
c = 0

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

Submission status: Accepted

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

cnt = 0

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

print(cnt)

Submission status: Accepted

Solution code:
n = int(input())
xs = [int(i) for i in input().split()]
length = len(xs)
count = 0

while True:
  xs = [x // 2 for x in xs if x % 2 == 0]
  
  if length == len(xs):
    count += 1
  else:
    break
    
print(count)

Submission status: Accepted

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

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

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


def solve():
    minc = 1000
    for a in A:
        c = 0
        while (a & 1) == 0:
            a >>= 1
            c += 1
        minc = min(minc, c)
    return minc


if __name__ == "__main__":
    print(solve())

Submission status: Accepted

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


def check(n, li):
    count = 0
    odd = False
    while True:
        for i in range(n):
            if li[i] % 2 == 0:
                li[i] /= 2
            else:
                print(count)
                odd = True
                break
        if odd:
            break
        count += 1


check(n, li)

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()))
def count(x):
    c=0
    while c>=0:
        if x%2==0:
            x=x//2
            c+=1
        else:
            break
    return c
l=[0]*N
for i in range(N):
    l[i]+=count(A[i])
print(min(l))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
import bisect

def main():
    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))

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n=int(input())
temp=map(int,input().split())
A=list(temp)
count=0
odd_check=0
while odd_check==0:
    for s in A:
        if int(s)%2!=0:
            odd_check+=1
    if odd_check==0:
        count+=1
        for s in range(len(A)):
            A[s]=A[s]/2
print(count)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
input=lambda: sys.stdin.readline().rstrip()
YesNo=lambda b: bool([print('Yes')] if b else print('No'))
YESNO=lambda b: bool([print('YES')] if b else print('NO'))
int1=lambda x:int(x)-1

def main():
    N=int(input())
    A=list(map(int,input().split()))
    ans=INF
    for x in A:
        tmp=0
        while True:
            if x%2==0:
                tmp+=1
                x//=2
            else:
                break
        ans=min(ans,tmp)
    print(ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

for i in a:
    #右から連続する0の個数分になるように、
    #全体長からrfindのインデックスを引き、０開始なのでさらに１引く。
    #rfind("1")右から数えて1を見つけたインデックスを返す
    ans = min(ans, len(bin(i)) - bin(i).rfind("1") - 1)

print(round(ans))

Submission status: Accepted

Solution code:
n = int(input())
A = [0] * n
A = list(map(int, input().split()))
res = 0
flg = 0

while True:
  for j in range(n):
    if A[j]%2 == 1:
      flg = 1
      break
    A[j] = A[j]/2
 
  if flg == 1 : break
  res += 1

print(res)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
for i, a in enumerate(A):
  j = 0
  while a % 2 == 0:
    a = a / 2
    j += 1
  if i == 0:
    n = j
  n = min(n, j)
print(n)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

n = int(input())

a = [num for num in map(int, input().split())]

#print(n, a)

def t(i):
  ret = 0
  
  while True:
    if i % 2 == 0:
      ret += 1
      i = i / 2
    else:
      break
  
  return ret

ans = 1000000
for i in range(n):
  ret = t(a[i])
  #print(ret)
  if ret == 0:
    print(0)
    sys.exit(0)
  else:
    #print(ret, ans, min(ret, ans))
    ans = min(ret, ans)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())

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

count=0



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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

def main():
    #N個の入力はいつものmapをlistとして受け取る
    N = int(input())
    A = list(map(int, input().split()))

    #演算回数をカウントする変数を定義
    ct = 0
    #ループを回す。
    while True:
        for i in range(N):
            if A[i] % 2 == 0:
                A[i] = A[i] // 2
            else:
                print(ct)
                sys.exit()
        ct += 1


if __name__ == '__main__':
    main()

Submission status: Accepted

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

cnt = 0
flag = False
while True:
    for i in range(N):
        if A[i] % 2 == 1:
            flag = True
            break
    else:
        cnt += 1
    if flag:
        break
    A = list(map(lambda x:x//2,A))
print(cnt)

Submission status: Accepted

Solution code:
#print#!/usr/bin/env python3
#%% for atcoder uniittest use
import sys
input= lambda: sys.stdin.readline().rstrip()
sys.setrecursionlimit(10**9)
def pin(type=int):return map(type,input().split())
def tupin(t=int):return tuple(pin(t))
def lispin(t=int):return list(pin(t))
#%%code
from fractions import gcd
def resolve():
    N,=pin()
    A=lispin()
    temp=A[0]
    for i in range(1,N):
        temp=gcd(temp,A[i])
    for j in range(10**7):
        if temp%2:print(j);break
        temp//=2
        
#%%submit!    
resolve()

Submission status: Accepted

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