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: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import sys

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

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

main()

Submission status: Time Limit Exceeded

Solution code:
import sys

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

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

main()

Submission status: Time Limit Exceeded

Solution code:
n = int(input())

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

counter = 0
check = 0

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



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

Submission status: Time Limit Exceeded

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

n = 0
A = map(int, A)

B = 2
if sum(A) % 2 == 0:
    while B % 2 == 0:
        A = [x // 2 for x in A]
        B = sum(A)
        n += 1 
print(n)

Submission status: Time Limit Exceeded

Solution code:
import sys
n = int(input())
a = list(map(int, input().split()))
i = 0
while(True):
  for x in a:
    if x%2!=0:
      print(i)
      sys.exit()
    else:
      x = x//2
  i += 1

Submission status: Time Limit Exceeded

Solution code:
n = input()
nums = map(int, input().split())
flag = True
counter = 0
while flag:
  for num in nums:
    if num % 2 == 1:
      flag = False
    if flag:
      nums = map(lambda x: x/2, nums)
      counter += 1
print(counter)

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
A=map(int,input().split())
c=0
loop=True
while(loop):
  for a in A:
    if a%2!=0:
      loop=False
      break
  if loop:
      A = map(lambda i:i//2, A)
      c+=1
  else:
      break
print(c)

Submission status: Time Limit Exceeded

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
        else:
            a[i] = a[i]/2
    cnt += 1

print(cnt)

Submission status: Time Limit Exceeded

Solution code:
#くじ引き

import numpy
import re
import math

def calc_max_num(int_list):
	"""
	listから最大操作回数を算出
	:param int_list:
	:return:
	"""
	count = 0
	even_flag = False
	while True:
		for i in int_list:
			if i % 2 == 1:
				even_flag = True
		if even_flag is True:
			break
		else:
			for i in int_list:
				i /= 2
			count += 1
	return count


def main():
	"""
	テストコード実行
	:return:
	"""
	line = input()
	int_num = int(line)
	line = input()
	line_list = re.split(" +", line)
	int_list = [int(s) for s in line_list]
	print(calc_max_num(int_list))


if __name__ == '__main__':
	main()

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
l = list(map(int,input().split()))
k = 0
while True:
    for i in l :
        if i % 2 != 0:
            break
        elif i == 2:
            break
        i = i/2
    k += 1
print(k)

Submission status: Time Limit Exceeded

Solution code:
ignore = input()
num = map(int,input().split())
count = 0
while True:
    if(sum([0 if i%2 == 0 else 1 for i in num]) == 0):
        num = [i/2 for i in num]
        count += 1
    else:
        print(count)
        break

Submission status: Time Limit Exceeded

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

#b, c = map(int, input().split())

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


flg = 0
while True:
	for i in range(M):
		if N[i]%2==0:
			N[i] = N[i]/2
		else:
			break
	flg += 1

print(flg)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
Astr = input().split()
An = []
for A in Astr:
    An.append(int(A))
count = 0
end = 0
while end == 0:
    for A in An:
        if A%2==1:
            print(count)
            end = 1
            break
        else:
            A /= 2
    count += 1

Submission status: Time Limit Exceeded

Solution code:
N=int(input())
a=input().split()
count =0
ans=0
j=0

for i in range(N):
  a[i]=int(a[i])

while(count%N==0):
 j+=1
 for i in range(N):
  if(a[i]%2**j==0):
    count +=1
ans=int(count/N)
print(ans)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
if __name__=="__main__":
    count = 0
    idx = int(input())
    n = list(map(int,input().split(" ")))
    while True:
        for i in range(idx):
            if n[i]|1 ==n[i]:
                print(count)
                exit()
        count+=1

Submission status: Accepted

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

for n in A:
    temp = n
    count = 0
    while temp % 2 == 0:
        temp /= 2
        count = count + 1
    ans_list.append(count)
    
print(min(ans_list))

Submission status: Accepted

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

ans_list = []
temp_ans = 0

for value in A_list:
    temp_value = value
    temp_ans = 0
    while temp_value%2 == 0:
        temp_value /= 2
        temp_ans += 1

    ans_list.append(temp_ans)

print(min(ans_list))

Submission status: Accepted

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

Submission status: Accepted

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

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

print(cnt)

Submission status: Accepted

Solution code:
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:
n = int(input())
l = list(map(int, input().split()))
result = 0
loop = 0
while True:
    if all(x % 2 == 0 for x in l):
        result += 1
        for data in range(len(l)):
            l[data] = l[data]//2
    else:
        print(result)
        exit()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,input().split()))
count=-1
for j in range(10**5):
  count+=1
  for i in range(n):
    if a[i]%2!=0:
      print(count)
      exit()
    a[i]//=2
  
print(count)

Submission status: Accepted

Solution code:
N = int(input())
a = list(map(int,input().split()))
dev = lambda x : x/2
amari = lambda x : x % 2
for i in range(1000):
    amari_a = list(map(amari, a))
    if amari_a.count(1) > 0: break
    a = list(map(dev,a))
print(i)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# atcoder 
# Türkler var mı?
# Herkese memnün oldum
import sys
#from heapq import heapify, heappush, heappop
#from heapq import nlargest, nsmallest

iimr = lambda: map(int, sys.stdin.readline().rstrip().split())
readline = sys.stdin.readline
# puorquoi le sys.stdin.buffer.readline() ne fonctionne plus sur atcoder?
#sys.setrecursionlimit(10 ** 7)
#INF = 1 << 30 # 大体 1e9


def debug(*x):
    print(*x, file=sys.stderr)


# s == self
class atcoder():
    def __init__(s):
        f = open(0)
        s.N = int(f.readline())
        s.A = list(map(int, f.readline().split()))

    def çözmek(s):
        res = []
        res.append(s.関数(s.N, s.A))
        print(*res)	
    
    def 関数(self, n, a):
        guusuu = True
        cnt = 0
        while(guusuu):
            for i in range(n):
                if(a[i] % 2 != 0):
                    guusuu = False
                    break;
                else:
                    a[i] /= 2
            if(guusuu): cnt += 1
        return cnt 

if __name__ == "__main__":
    ima = atcoder()
    ima.çözmek()

Submission status: Accepted

Solution code:
import numpy as np

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

ans = 0

def func1(n):
  return n/2

def func2(n):
  return n%2

i = 0
while i == 0:
  
  x = list(map(func2,A))
  
  if sum(x) == 0:
    ans += 1
    A = list(map(func1,A))
  else:
    break

print(ans)

Submission status: Accepted

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

def check(list):
    for i in range(n):
        if(n_list[i]%2!=0):
            return False
    return True

    

while(check(n_list)):
    n_list=[k/2 for k in n_list]
    count+=1
print(count)

Submission status: Accepted

Solution code:
from typing import List


def answer(n: int, a: List[int]) -> int:
    count = 1
    while all(i % 2 ** count == 0 for i in a):
        count += 1
    return count - 1


def main():
    n = int(input())
    a = list(map(int, input().split()))
    print(answer(n, a))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def main():

    n = int(input())
    nums = list(map(int, input().split()))
    ans = 0
    flg = True
    while flg:
        for i in range(len(nums)):
            if nums[i] % 2 == 0:
                num = nums[i] / 2
                nums[i] = num
            else:
                flg = False
                break
        if flg:
            ans += 1

    print(ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
ans = 0
for ans in range(31):
    for i,A in enumerate(a):
        if A%2:
            print(ans)
            exit()
        a[i] //= 2

Submission status: Accepted

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

Submission status: Accepted

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

flag=True
ans=-1

while(flag):
    ans+=1
    newlist=[]
    for i in li:
        newlist.append(i//2)
        if i%2!=0:
            flag=False
    li=newlist
print(ans)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import math
import sys
sys.setrecursionlimit(10**6)


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

ans = 10**10

for i in a:
    tmp = 0
    while(i % 2 != 1):
        tmp += 1
        i = i//2
    # print(tmp)
    ans = min(ans, tmp)

print(ans)

Submission status: Accepted

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

count = 0
exist_odd = False

while True:
  for i in range(N):
    if A[i] % 2 != 0:
      exist_odd = True

  if exist_odd:
    break

  for i in range(N):
    A[i] /=2

  count +=1

print(count)

Submission status: Accepted

Solution code:
n = int(input())
a_list = list(map(int, input().split()))
new_list = []
ans = 0
while True:
    for i in a_list:
        if i % 2 == 1:
            break
        else:
            a = i // 2
            new_list.append(a)
    if len(new_list) < n:
        break
    ans += 1
    a_list = new_list
    new_list = []

print(ans)

Submission status: Accepted

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

cnt = 0

while True:
  exist_odd = False
  for index in range(len(a)):
    if a[index] % 2 != 0:
      exist_odd = True
    a[index] /= 2
    
  if exist_odd: break
    
  cnt = cnt + 1

print(cnt)

Submission status: Accepted

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

cnt_arr = []

for ele in arr:
    cnt = 0
    while ele % 2 == 0:
        ele /= 2
        cnt += 1
    cnt_arr.append(cnt)
print(min(cnt_arr))

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:
            print(cnt)
            exit()
    else:
        cnt+=1
        for i in range(n):
            a[i]//=2

Submission status: Accepted

Solution code:
N = int(input())

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

counter = 0
flag = 1

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

print(counter)

Submission status: Accepted

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

def devide(a,c,n):
    even = True
    for i in range(n):
        if a[i] % 2 != 0:
           even = False
        else:
            a[i] = int(a[i] / 2)
    return devide(a,c+1,n) if even else c
print(devide(a,0,n))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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

cnt = [0] * n

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

Submission status: Accepted

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

cnt = 0
for i in range(n):
    cnt = cnt | a[i]

j = 0
ans = 0
while 1:
    if (cnt >> j & 1 == 0):
        ans += 1
        j += 1
    else:
        break
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def divide(l):
	for i in range(len(l)):
		if l[i] % 2 == 0:
			l[i] = int(l[i] / 2)
		else:
			return False
			
	return True


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

count = 0
while divide(l):
	count += 1
		
print(count)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

def cnt(x):
  ret = 0
  while x%2 == 0:
    ret += 1
    x //= 2
  return ret

ans = 30
for a in A:
  ans = min(ans, cnt(a))

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num = int(input())
nu_list = [int(v) for v in input().split()]
count = 0
#print(nu_list)
bool = True
while bool == True:
  for i in range(len(nu_list)):
    if nu_list[i] % 2 != 0:
      bool = False
      break
    else:
      nu_list[i] = nu_list[i] // 2
  if bool == True:
    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:
      A[i] //= 2
    else:
      print(ans)
      quit()
  ans += 1

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def resolve():
    _ = int(input())
    a = list(map(int, input().split()))
    res = 0
    while all(i % 2 == 0 for i in a):
        res += 1
        a = list(map(lambda x: x / 2, a))
    print(res)

resolve()

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
count = 0
# list a[i]が偶数かどうかをチェック。ループはとりあえず省略する

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

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
# count = 0
# list a[i]が偶数かどうかをチェック。ループはとりあえず省略する

exist_odd = False
# in_if = 0
in_for = 0
# in_while = 0
while exist_odd == False:
    for i in range(n):
        if a[i] % 2 != 0:
            exist_odd = True
            if n != i:
                in_for -= 1
            break
        else:
            a[i] = a[i] / 2
        # in_if += 1
        # print(in_if)
    in_for += 1
print(in_for)

Submission status: Accepted

Solution code:
N = int(input())
A = [int(i) for i in input().split()]
B = A.copy()
OK = True
count = 0
while OK:
    for c in range(N):
        if A[c] % 2 == 0:
            A[c] = A[c] // 2
            if A[-1] == (B[-1] / (2 ** (count+1))):
                count += 1
        else:
            OK = False
            break
print(count)

Submission status: Accepted

Solution code:

def div_by_2(n):
    res = 0
    while n % 2 == 0:
        n //= 2
        res += 1
    return res

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

Submission status: Accepted

Solution code:
import re
input()
An=input().split()
print(min(len((re.findall("0+$",bin(int(a)))+[""])[0]) for a in An))

Submission status: Accepted

Solution code:
N = int(input())
A = input().split()
l=list()
for i in range(N):
    A[i] = int(A[i])
    if A[i] % 2 == 1:
        l.append(0)
        break
    else:
        for j in range(30):
            A[i] = A[i] / 2
            if A[i] % 2 == 1:
                l.append(j+1)
                break
print(min(l))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
hoge = input()
int_line = [int(i) for i in input().split()]

cnt = 0
flag = False

while True:
    for m, i in enumerate(int_line):
        if i % 2 == 0:
            int_line[m] = i/2
        else:
            flag = True
    if flag == True:
        print(cnt)
        break
    else:
        cnt += 1

Submission status: Accepted

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

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

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:
n = int(input())
A = [0]*n
L = list(map(int,input().split()))
for i in range(n):
  cnt = 0
  while L[i] % 2 == 0:
    L[i] = L[i]/2
    cnt += 1
  A[i] = cnt
print(min(A))

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#81B
N=int(input())
data=map(int,input().split())
def wareru(n):
    p=0
    while n%2==0:
        n=n//2
        p=p+1
    return p
print(min(map(wareru,data)))

Submission status: Accepted

Solution code:
n = int(input())
li = list(map(int, input().split()))
b = float('inf')
for a in li:
    c = 0
    while a%2 == 0:
      a = a/2
      c += 1
    b = min(b,c)
print(b)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#-*-coding:utf-8-*-
import sys
input=sys.stdin.readline
import numpy as np

def main():
    n = input()
    A = np.array(input().split(),dtype=np.int32)
    answer=0

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

if __name__=="__main__":
    main()

Submission status: Accepted

Solution code:
# 28
N = int(input())
An = list(map(int, input().split(' ')))

ans = -1
flag = 0
while True:
    ans += 1
    for i in An:
        if i % 2 != 0: 
            flag = 1
            break
        An[An.index(i)] /= 2
    if flag != 0: break

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import numpy as np
N = int(input())
A = [int(x) for x in input().split()]
A = np.array(A)
ans = list()
for i in range(N):
  a = A[i]
  num = 0
  while a%2==0:
    a /= 2.0
    num += 1
  ans.append(num)
print(min(ans))

Submission status: Accepted

Solution code:
mycode = r'''
# distutils: language=c++
# cython: language_level=3
# cython: boundscheck=False
# cython: wraparound=False
# cython: infer_types=True
# cython: cdivision=True
# False:Cython はCの型に対する除算・剰余演算子に関する仕様を、(被演算子間の符号が異なる場合の振る舞いが異なる)Pythonのintの仕様に合わせ、除算する数が0の場合にZeroDivisionErrorを送出します。この処理を行わせると、速度に 35% ぐらいのペナルティが生じます。 True:チェックを行いません。

# cythonライブラリよみこみ
from libcpp.vector cimport vector as Vec

# define 
ctypedef long long LL
ctypedef Vec[LL] VLL #vector[long long]
ctypedef LL[::1] Arr

import numpy as np


# 読み込みはpython側で行う
import sys
readline = sys.stdin.buffer.readline
read = sys.stdin.readline #文字列読み込む時はこっち

cdef LL a_int(): return int(readline())

def ints(): return np.fromstring(readline(), sep=' ', dtype=np.int64)

cdef LL N=a_int()
#この問題ではnumpyも使える柔軟さを紹介しよう
# 一括に処理する際は生のnumpyで良いが、indexアクセスに関しては非常に低速である。
# そういうときはtyped memoryviewという形式にする。
# といっても実態はnumpyと同じなので、numpyの関数の引数にする事ができる。ただし、ファンシーインデックスとメソッドの利用はできない。

cdef Arr A = ints() 
# せっかくなのでAの各要素は何回割れるか記録しておこう
cdef VLL candi =VLL()
cdef LL cnt, a, i
#for a in A: #この書き方はかなり遅くなるので注意が必要 #Cっぽい書き方が基本的に早いことを押さえていれば大丈夫
for i in range(len(A)):
    a=A[i]
    cnt=0
    while a%2==0: #まだ2で割れるなら
        a//=2
        cnt+=1
    candi.push_back(cnt)
#print(candi) #vectorをpython objectとして扱う場合、cythonは自動的にlistとして変換してくれる
print(min(candi))

'''

import sys
if sys.argv[-1] == 'ONLINE_JUDGE':  # コンパイル時
    import os
    with open('mycode.pyx', 'w') as f:
        f.write(mycode)
    os.system('cythonize -i -3 -b mycode.pyx')

import mycode

Submission status: Accepted

Solution code:
import sys
import copy
import math
import itertools
N = int(input())
A = [int(c) for c in input().split()]
cnt = 0

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

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import gcd
N = int(input())
A = list(map(int, input().split()))
g = A[0]
for i in range(1, N):
  g = gcd(g, A[i])
ans = 0
while g % 2 == 0:
  g //= 2
  ans += 1
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
a_l = list(map(int, input().split()))
ans = float('inf')
for a in a_l:
    c = 0
    while a%2 == 0:
        a = a/2
        c += 1
    ans = min(ans,c)
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
b = [bin(i)[2:] for i in a]
c = [0] * n
for i,v in enumerate(b):
  for j in v[::-1]:
    if j == '0':
      c[i] += 1
    else:
      break
print(min(c))

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
for i in range(1 , 10 ** 20):
  for j in range(N):
    a = A[j] % (2 ** i)
    if a != 0:
      break
  if a != 0:
    break
print(i - 1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
def f():
    for i in range(100):
        for j in range(n):
            if a[j]%2 == 0:
                a[j] = a[j]//2
            else:
                return i
print(f())