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:
total = int(input())
numbers = input().split()
time = 0
flag = False
while True:
  for number in numbers:
    if int(number)%2 != 0:
      flag = True
      break;
  else:
    numbers = [(int(j) / 2) for j in numbers]
    time = time + 1
  if flag:
    break
print(time)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=input()
A=list(map(int,input().split()))
ans=float('inf')
for i in A:
      ans=min(ans,len(bin(i))-bin(i).rfind('1')-1)
print(ans)

Submission status: Accepted

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

flag = False
count = 0

while True:
  
  for num in A:
    if (num % 2) == 1:
      flag = True
      
  A = list(map(lambda x: int(x / 2), A))
  
  if flag:
    break
  
  count += 1
  
print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def calc(n):
    ret = 0
    while (n & 1) == 0:
        n >>= 1
        ret += 1
    return ret

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

Submission status: Accepted

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

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

print(i)

Submission status: Accepted

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

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

print(cnt)

Submission status: Accepted

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

for num in a:
  tmp = 0
  while num % 2 == 0:
    num /= 2
    tmp += 1
  ans = min(tmp, ans)

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

ans = 0
while True:
    if [i % 2 for i in A].count(1) > 0:
        break
    A = [j // 2 for j in A]
    ans += 1
print(ans)

Submission status: Accepted

Solution code:
import numpy as np

line_len = int(input())
num_list = []
num_list = input().rstrip().split(' ')
np_num_list = np.array(num_list).astype(int)
div = [2]*line_len
np_div = np.array(div)
counter = 0
flag = False
while True:
    for i in range(line_len):
        if np_num_list[i]%2 != 0:
            flag = True
    if flag:
        print(counter)
        break
    np_num_list =  np_num_list/np_div
    counter = counter + 1

Submission status: Accepted

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

i = 0
while True:
    if [_%2 for _ in A].count(1) > 0:
        break
    A = [_/2 for _ in A]
    i += 1

print(i)

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int, input().split()))
count=0 
def h(L):
  for i in range(len(L)):
    if L[i] % 2 != 0:
      return(1)
  return(0)
while h(a) == 0:
  for j in range(n):
    a[j]=a[j]/2
  count=count+1
  
print(count)

Submission status: Accepted

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

def hantei(L):
  for i in range(len(L)):
    if L[i] % 2 != 0:
      return(1)
  return(0)

count = 0
while hantei(A) == 0:
  for j in range(N):
    A[j] = A[j] / 2
  count = count + 1
  
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

ans=100
for l in A_list:
    cnt=0
    while l%2==0:
        l/=2 
        cnt+=1

    ans=min(cnt, ans)

print(ans)

Submission status: Accepted

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

for i in range(1, 10**9):
  tmp = [A[j]/2 if A[j]%2 == 0 else -1 for j in range(N)]
  A = tmp[:]
  if A.count(-1) != 0:
      break

print(i-1)

Submission status: Accepted

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

ans=100
for l in List:
    cnt=0
    while l%2==0:
        l/=2
        cnt+=1
    ans=min(ans,cnt)
print(ans)

Submission status: Accepted

Solution code:
import numpy as np
 
n = int(input())
a = np.array(list(map(int, input().split())))
ans_count = 0
 
while(1):
  count = len(np.where(a % 2 == 1)[0])
  if count > 0:
    break
  a = a / 2
  ans_count += 1
print(ans_count)

Submission status: Accepted

Solution code:
N = int(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:
input()
strs = input().split(' ')
nums = [int(i) for i in strs]

ct = 0
b_flag = False
while(1):
  for i, num in enumerate(nums):
    if num % 2 == 0:
      nums[i] = num/2
      continue
    else:
      b_flag = True
      break
  if b_flag:
    break
  ct += 1
print(ct)

Submission status: Accepted

Solution code:
input()
strs = input().split(' ')
nums = [int(i) for i in strs]

ct = 0
b_flag = False
while(1):
  for i, num in enumerate(nums):
    if num % 2 == 0:
      nums[i] = num/2
      continue
    else:
      b_flag = True
      break  
  if b_flag:
    break
  ct += 1
print(ct)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

i = 0
while True:
    l = [j for j, x in enumerate(A) if int(x) % 2 == 0]
    A = list(map(lambda x : x / 2, A))
    if len(l) == len(A):
        i += 1
    else:
        print(i)
        break

Submission status: Accepted

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

while 1:
  flag=0
  for i in range(n):
    if(hoge[i]%2==1):
      flag=1
    else:
      hoge[i]=hoge[i]/2

  if(flag==0):
    ans+=1
  else:
    break

print(ans)

Submission status: Accepted

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

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

def check(ar):
    b = True
    for i in range(len(ar)):
        if ar[i] % 2 != 0:
            b = False
            break
    return b

answer = 0

for i in range(1000000000):
    if check(a) == True:
        for j in range(len(a)):
            a[j] = int(a[j]/2)
        answer += 1
    else:
        break;

print(answer)

Submission status: Accepted

Solution code:
def solve(string):
    n, *a = map(int, string.split())
    ans = 0
    while all([_a % 2 == 0 for _a in a]):
        a = [_a // 2 for _a in a]
        ans += 1
    return str(ans)


if __name__ == '__main__':
    print(solve('\n'.join([input(), input()])))

Submission status: Accepted

Solution code:
def isEven(num):
    if num % 2 == 0:
        return 0
    else:
        return 1

def isAllEven(l):
    allEven = 0
    for i in l:
        allEven += isEven(i)
    
    if allEven == 0:
        return True
    else:
        return False

def countDivide(n, l):
    if isAllEven(l):
        newl = list(map(lambda x: int(x/2), l))
        n += 1
        return countDivide(n, newl)
    else:
        return n

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

print(countDivide(0, A))

Submission status: Accepted

Solution code:
a = int(input())
num = [int(a) for a in input().split()]
counter = 0
while True:
    b = list(map(lambda x: x % 2, num))
    if b.count(0) == a:
        num = list(map(lambda x: x>>1, num))
        counter += 1
    else:
        print(counter)
        break

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# input
a = int(input())
num = list(map(int,input().split(" ")))
# Odd or Even
counter = 0
while True:
    b = list(map(lambda x: x % 2, num))
    if b.count(0) == a:
        num = list(map(lambda x: x/2, num))
        counter += 1
    else:
        print(counter)
        break

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# input
a = int(input())
num = [int(a) for a in input().split()]
# Odd or Even
counter = 0
while True:
    b = list(map(lambda x: x % 2, num))
    if b.count(0) == a:
        num = list(map(lambda x: x/2, num))
        counter += 1
    else:
        print(counter)
        break

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# input
a = input()
num = [int(a) for a in input().split()]
# Odd or Even
counter = 0
while True:
    b = list(map(lambda x: x % 2, num))
    if sum(b) == 0:
        num = list(map(lambda x: x/2, num))
        counter += 1
    else:
        print(counter)
        break

Submission status: Accepted

Solution code:
N = int(input())
A = list(int(x) for x in input().split())

count = []
for Ai in A:
  count_i = 0
  while Ai % 2 == 0:
    Ai /= 2
    count_i += 1
  count.append(count_i)

print(min(count))

Submission status: Accepted

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

def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

from functools import reduce

def gcd_list(numbers):
    return reduce(gcd, numbers)

ct = 0
num = gcd_list(li)
while num != 1:
    num /= 2
    ct += 1
print(ct)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input_num = int(input())
nums = input().split()
ope_cnt = 0
def division_nums(input_num, nums, ope_cnt):
  for i in range(input_num):
    if int(nums[i]) % 2 != 0:
      return ope_cnt
    else:
      nums[i] = int(nums[i]) / 2
  ope_cnt = ope_cnt + 1
  return division_nums(input_num, nums, ope_cnt)
      
print(division_nums(input_num, nums, ope_cnt))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

count = 0
while True:
    for i in range(N):
        q, mod = divmod(An[i], 2)
        if mod != 0:
            break
        An[i] = q
    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:
  count +=1
  for i in range(n):
    if a[i]%2 == 0:
      a[i] = int(a[i]/2)
    else:
      print(count - 1)
      exit()

Submission status: Accepted

Solution code:
def gu(n,a):
  ans=[0]*n
  for i in range(len(a)):
    ii=a[i]
    while True:
      if ii%2==0:
        ans[i]+=1
        ii=ii/2
      else:
        break
  return min(ans)
n=int(input())
a=list(map(int,input().split()))
print(gu(n,a))

Submission status: Accepted

Solution code:
def func(li, c):
    for i, n in enumerate(li):
      if n % 2 != 0:
        return c
      else:
        li[i] = n/2
    c+= 1
    return func(li, c)
    
input()
li = list(map(int, input().split()))
print(func(li, 0))

Submission status: Accepted

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

print(min([format(a[i], 'b')[::-1].find('1') for i in range(N)]))

Submission status: Accepted

Solution code:
N=int(input())
input_seisu=input()

temp=input_seisu.split(" ")
seisu = [int(s) for s in temp]

i = 0
exec_con=0
rerun_flg=True

while(rerun_flg == True):
    for atai in seisu:
        if atai % 2 == 0:
            seisu[i]= atai / 2
            i+=1
        ##奇数
        else:
            rerun_flg=False
            break
    if N == i:
        exec_con+=1
        i=0

print("{}".format(exec_con))

Submission status: Accepted

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


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

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

Submission status: Accepted

Solution code:
import sys
from sys import stdin
n = int(stdin.readline().rstrip())
al = [int(_) for _ in stdin.readline().rstrip().split()]
count=0
while True:
    for i,a in enumerate(al):
        if a%2 != 0:
            print(count)
            sys.exit()
        al[i]=a/2
    count+=1

Submission status: Accepted

Solution code:
import numpy as np


N= int(input())
A = np.array([int(i) for i in input().split()])
count = 0
while 1:
    if all([x % 2 == 0 for x in A]):
        count += 1
        A = A / 2
    else:
        break

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
tmp=input()
tmp=tmp.split(' ')
a=[]
for i in range(N):
  a.append(int(tmp[i]))
  
if all(x % 2 == 0 for x in a) == False:
  print(0)
else:
  count=0
  while all(x % 2 == 0 for x in a) == True:
    a=[x/2 for x in a]
    count+=1
    
  print(count)

Submission status: Accepted

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

n = int(input())
#a = map(int, input().split())
a = input().split()
count = 0
odd = False
while(odd == False):
    for i,v in enumerate(a):
        if int(v) % 2 != 0:
            odd = True
            break
        a[i] = int(v) // 2
    if odd is not True:
        count += 1

print(count)

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

Submission status: Accepted

Solution code:
import sys
def p(s):
  sys.stderr.write(str(s)+"\n")

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

ans=1000000000

for i in a:
  p(i)
  count=0
  while i%2==0:
    count+=1
    if count>ans:
      break
    i /= 2
    p("i="+str(i))
  
  ans = min(ans, count)

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
n=int(input())
a=list(map(int,input().split()))
ans=0
flg=True

for i in range(1,32):
    for j in range(n):
        if a[j]%2==1:
            flg=False
        else:
            a[j]=int(a[j]/2)
    if flg==True:
        ans=i
print(ans)

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = SR()
    return l
sys.setrecursionlimit(1000000)
mod = 1000000007


#A
def A():
    a,b = LI()
    if not (a*b)%2:
        print("Even")
    else:
        print("Odd")
    return

#B
def B():
    s = S()
    print(s.count("1"))
    return

#C
def C():
    n = I()
    a = LI()
    f = 0
    for j in range(100000):
        for i in range(n):
            if a[i]%2:
                f = 1
                break
            a[i] //= 2
        if f:break
    print(j)
    return

#D
def D():
    return

#E
def E():
    return

#F
def F():
    return

#G
def G():
    return

#H
def H():
    return

#Solve
if __name__ == "__main__":
    C()

Submission status: Accepted

Solution code:
N = int(input())
def calc(n):
    if n % 2:
        return 0
    else:
        return calc(n//2) + 1

A = [int(a) for a in input().split()]
mi = 9999
for a in A:
    mi = min(mi, calc(a))
print(mi)

Submission status: Accepted

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

def div(x):
    ans = 0
    while x%2 ==0:
        x = x/2
        ans +=1
    return ans

li = [div(x) for x in a]
print(min(li))

Submission status: Accepted

Solution code:
# B
n = int(input())
a = [int(i) for i in input().split()]
count = 0
flag = True
while flag:
    for i in range(len(a)):
        if a[i] % 2 == 0:
            continue
        else:
            flag  = False
            break
    if flag:
        count += 1
        a = list(map(lambda x: x / 2, a))
print(count)

Submission status: Accepted

Solution code:
n = input()
x = [int(i) for i in input().split()]
min_n = 100
c = 0
for i in x:
    while i%2==0:
        i = i/2
        c+=1
    if c < min_n:
        min_n=c
    c=0
print(min_n)

Submission status: Accepted

Solution code:
N = input()
a_list = list(input().split())
result = float("inf")

for a in a_list:
  b = int(a)
  count = 0
  while b%2 == 0:
    b = b/2
    count += 1
  else:
    if  result > count:
      result = count
print(result)

Submission status: Accepted

Solution code:
N = int(input())
As = list(map(int,input().split()))
min = 0
for i, a in enumerate(As):
    cnt = 0
    if i == 0:
        while a % 2 == 0:  
            a /= 2
            cnt += 1
        min = cnt
    else:
        while a % 2 == 0 and cnt < min:  
            a /= 2
            cnt += 1
        min = cnt
print(min)

Submission status: Accepted

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

import numpy as np
a = np.array(a)
count = 0
while (True):
    exist_odd = False
    for i in a:
        if i % 2 != 0:
            exist_odd = True
    if exist_odd:
        break
    #割り算操作
    a = a / 2
    count += 1
print(count)

Submission status: Accepted

Solution code:
from functools import reduce

def main():
    # 一文字のみを読み込み
    # s = input().rstrip().split(' ')
    
    # スペース区切りで標準入力を配列として読み込み
    # s = input().rstrip().split(' ')
    
    # 位置文字ずつ標準入力を配列として読み込み
    # s = list(input().rstrip())

    n = input().rstrip()
    slist = input().rstrip().split(' ')
    c = 0
    flag = True
    while(flag):
        i = 0
        for s in slist:
            if int(s)%2 == 1:
                flag = False
                continue            
            slist[i] = int(int(s)/2)
            i = i+1
        if flag == True:
            c = c +1
    print(c)    
   
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import numpy as np

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

x = np.array(a)
cnt = 0
for i in range(1,100):
    if (x % 2 == 0).sum() == int(n):
        x = x/2
        cnt += 1
    else:
        break
print(cnt)

Submission status: Accepted

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

count = 0
while True:
    isEven = True
    for i in range(n):
        isEven &= (inputList[i] % 2 == 0)

    if isEven:
        count = count + 1
        for i in range(n):
            inputList[i] /= 2
    else:
        break

print(count)

Submission status: Accepted

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

if (nums[0] % 2 == 1):
  print('0')
else:
  tmp = nums[0] / 2
  tmp_ans = 1
  while(tmp % 2 == 0 and tmp > 1):
    tmp_ans += 1
    tmp = tmp / 2

  min_ans = tmp_ans
  
  for num in nums[1:]:
    if (num % 2 == 1):
      min_ans = 0
      break
    tmp = num / 2
    tmp_ans = 1
    while (tmp % 2 == 0 and tmp_ans <= min_ans):
      tmp_ans += 1
      tmp = tmp / 2

    if (tmp_ans < min_ans):
      min_ans = tmp_ans
      
  print(min_ans)

Submission status: Accepted

Solution code:
N = input()
An = input().split()
number_of_devided = []
n = 0


def get_number_of_devided(val):
    tmp = int(val)
    count = 0
    while tmp % 2 == 0:
        tmp = tmp / 2
        count += 1
    return count


for val in An:
    number_of_devided.append(get_number_of_devided(val))
    n += 1

print(min(number_of_devided))

Submission status: Accepted

Solution code:
n,a=int(input()),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

Submission status: Accepted

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

flag = True
counter = 0

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

print(counter - 1)

Submission status: Accepted

Solution code:
import numpy as np
N = int(input())
A = np.array([input().split()], dtype=int)
count = 0
while np.all(A%2==0):
    count+=1
    A = A/2
print(count)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))
def gcd(x,y):
    if x<y:
        z = x
        x = y
        y = z
    if y==0:
        return x
    return gcd(y, x%y)
for i in range(N):
    if i==0:
        all_gcd = gcd(A[i],A[i+1])
    else:
        all_gcd = gcd(all_gcd,A[i])
for i in range(50):
    if all_gcd<2**i:
        print(i-1)
        break

Submission status: Accepted

Solution code:
# https://qiita.com/_-_-_-_-_/items/34f933adc7be875e61d0
# abcde	s=input()	s='abcde'
# abcde	s=list(input())	s=['a', 'b', 'c', 'd', 'e']
# 5(1つだけ)	a=int(input())	a=5
# 1 2	| x,y = s_inpl()   |	x=1,y=2
# 1 2 3 4 5 ... n 　	li = input().split()	li=['1','2','3',...,'n']
# 1 2 3 4 5 ... n 　	li = inpl()	li=[1,2,3,4,5,...,n]
# FFFTFTTFF 　	li = input().split('T')	li=['FFF', 'F', '', 'FF']

# INPUT
# 3
# hoge
# foo
# bar
# ANSWER
# n=int(input())
# string_list=[input() for i in range(n)]

import math
import copy
from collections import defaultdict, Counter
from itertools import product
from bisect import bisect_left, bisect_right
import numpy as np

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

N = int(input())

A = np.array(inpl())

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

print(ans)

Submission status: Accepted

Solution code:
import itertools
import numpy as np
import sys
MAX_INT = int(10e10)
MIN_INT = -MAX_INT
mod = 1000000007
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

N = I()
A = np.array(IL())

cnt = 0
for i in range(40):
    if 1 in (A%2):
        print(cnt)
        exit()
    else:
        A //= 2
        cnt += 1

Submission status: Accepted

Solution code:
N = int(input())
A_list = [int(x) for x in input().split(" ")]
ans = 0
for i in range(N):
    num = 0
    while ans == 0:
        ans = A_list[i] % 2
        A_list[i] = A_list[i] / 2
        num += 1
    A_list[i] = num - 1
    ans = 0
print(min(A_list))

Submission status: Accepted

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

cnt = 0
inf = 10 ** 18

def rest_2(n):
    return n % 2

def div_2(n):
    return n / 2
  
for i in range(inf):
  B = list(map(rest_2, A))
  A = list(map(div_2, A))

  if 1 in B:
    print(cnt)
    break
  
  cnt += 1

Submission status: Accepted

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

count_list = []
for a in a_list:
    count = 0
    q,mod = divmod(a,2)
    while True:
        if mod != 0:
            break
        else:
            q,mod = divmod(q,2)
            count += 1
    count_list.append(count)
print(min(count_list))

Submission status: Accepted

Solution code:
def gcd(x,y):
  if y==0:
    return x
  else:
    return gcd(y,x%y)
n=int(input())
a=list(map(int,input().split()))
ans=0
for i in a:
  ans=gcd(i,ans)
count=0
while ans%2==0:
  count+=1
  ans=ans//2
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):
    for i, a in enumerate(A):
        A[i] = a/2
    ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

answer = 0



while True:
  if sum([a%2 for a in A])==0:
    answer +=1
    A = [a//2 for a in A]
    continue
  else:
    break

print(answer)

Submission status: Accepted

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

count=0

while True:
  for i in range(len(l)):
    if l[i]%2==0:
        l[i] //= 2
    else:
        print(count)
        exit()
    
  count += 1

Submission status: Accepted

Solution code:
N=input()
A=input()
ai=A.split(" ")
m=0
c=0
for a in ai:
    m = m|int(a)
for n in reversed(bin(m)):
    if n=="1":
        break
    c += 1
print(c)

Submission status: Accepted

Solution code:
# coding: utf-8
n = int(input())
a = input().split()
stop=0
for i in range(n):
  a[i] = int(a[i])
m = int(min(a)/2)
b=0
for j in range(m):
  for i in range(n):
    if a[i]%2 == 0:
      a[i] = a[i]/2
    else:
      stop = 1
  if stop==1:
    break
  b = b+1
print(b)

Submission status: Accepted

Solution code:
N = int(input())
As = [ int(x) for x in input().split() ]

ans = 0
while True:
    finished = False
    for i, A in enumerate(As):
        if A % 2 == 1:
            finished = True
            break
        As[i] /= 2
    if finished:
        break
    ans += 1

print(ans)

Submission status: Accepted

Solution code:
N = int(input())
List=[int(j) for j in input().split()]
final_ans = 10 ** 10
for i in range(0,N):
    ans=0
    
    while List[i] % 2==0:
        List[i] /=2
        ans +=1

    if final_ans > ans:
        final_ans = ans
print(final_ans)

Submission status: Accepted

Solution code:
_ = input()
lst = [int(x) for x in input().split()]
ret = 0
while all(x % 2 == 0 for x in lst):
    lst = [x / 2 for x in lst]
    ret += 1
print(ret)

Submission status: Accepted

Solution code:
a = int(input())
A = list(map(int,input().split() ) )
count = 0
flag = 0
while flag == 0 and count < 10000:
    for i in range(len(A)):
        if A[i] %2 !=0 or A[i] == 0:
            flag = 1
    if flag == 0:        
        for i in range(len(A)):
            A[i] = int(A[i]/2)
        count += 1
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(cnt)