Problem:


Score : 200 points

Problem Statement

There are N positive integers written on a blackboard: A_1, ..., A_N.

Snuke can perform the following operation when all integers on the blackboard are even:

Replace each integer X on the blackboard by X divided by 2.

Find the maximum possible number of operations that Snuke can perform.

Constraints

1 \leq N \leq 200

1 \leq A_i \leq 10^9

Input

Input is given from Standard Input in the following format:

N
A_1 A_2 ... A_N

Output

Print the maximum possible number of operations that Snuke can perform.

Sample Input 1

3
8 12 40

Sample Output 1

2

Initially, [8, 12, 40] are written on the blackboard.
Since all those integers are even, Snuke can perform the operation.

After the operation is performed once, [4, 6, 20] are written on the blackboard.
Since all those integers are again even, he can perform the operation.

After the operation is performed twice, [2, 3, 10] are written on the blackboard.
Now, there is an odd number 3 on the blackboard, so he cannot perform the operation any more.

Thus, Snuke can perform the operation at most twice.

Sample Input 2

4
5 6 8 10

Sample Output 2

0

Since there is an odd number 5 on the blackboard already in the beginning, Snuke cannot perform the operation at all.

Sample Input 3

6
382253568 723152896 37802240 379425024 404894720 471526144

Sample Output 3

8



Sample input:
3
8 12 40


Sample output:
2

Submission status: Accepted

Solution code:
N=int(input())
a=list(map(int,input().split()))
odd = False
cnt=0
while True:
    for i in range(0,N):
        if a[i] % 2 != 0:
            odd=True
    if odd :
        break

    for i in range(0,N):
        a[i]/=2
    cnt+=1
print(cnt)

Submission status: Accepted

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

print(count)

Submission status: Accepted

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

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

print(res)

Submission status: Accepted

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

num = 0
flag = 0

while True:
  for k in range(n):
    if not r[k] % 2:
      r[k] /= 2
    else:
      flag = 1
  if flag:
    break
  num += 1

print(num)

Submission status: Accepted

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

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

print(res)

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:
import sys
input = lambda: sys.stdin.readline().rstrip()

def main():
    n = int(input())
    a = [int(i) for i in input().split()]
    ans = 0
    while True:
        for i in range(n):
            if a[i] % 2 == 0:
                a[i] //= 2
            else:
                print(ans)
                return
        ans += 1 

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#! env python
# -*- coding: utf-8 -*-

import os
import sys


# ac_py.main.py
# Date: 2020/06/08
# Filename: main.py 
# Author: acto_mini

def main():
    n = int(input())
    a = list(map(int, input().split()))
    result = 0
    loop = True

    while True:
        for i, v in enumerate(a):
            if v % 2 == 1:
                loop = False
                break
            else:
                a[i] = v / 2
        if not loop: break
        result += 1

    print(result)
    return


if __name__ == '__main__':
    main()

Submission status: Accepted

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

endflag=False
for i in range(10**9):
    for j in range(n):
        if A[j]%2==1:
            print(i)
            endflag=True
            break
        else:
            A[j]//=2
    if endflag:
        break

Submission status: Accepted

Solution code:
def waru(n):
  return int(n/2)

number = int(input())
line2 = input().split()
cnt = 0
cnt2 = 0
cnt3  =0
while cnt2 ==0:
  cnt = 0
  for i in range(len(line2)):
    line2[i] = int(line2[i])
    if int(line2[i])%2 ==0:
      cnt +=1
  if cnt == len(line2):
    line2 = list(map(waru,line2))
    
    cnt3 +=1
  else:
    cnt2 +=1
print(cnt3)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:


def is_odd(num):
    return num % 2 != 0

def odd_in_list(num_list):
    for num in num_list:
        if is_odd(num):
            return True
    
    return False

def half(num):
    return num / 2

def shift_only(num_list, counter):
    if odd_in_list(num_list):
        print('its over')
        return counter
    else:
        new_list = list(map(half, num_list))
        counter += 1
        print('continue', num_list, counter)
        return shift_only(new_list, counter)


n = int(input())

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


counter = 0
flag = True

while flag:
    for i in range(n):
        # print(a_list[i])
        if a_list[i] % 2 != 0:
            # print('is odd')
            flag = False
            break
        else:
            continue
    
    if not flag:
        break
    
    for i in range(n):
        a_list[i] /= 2
    counter += 1

    # print('-----loop------')
    # print(a_list, counter)

print(counter)

Submission status: Accepted

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

main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

def resolve():
    N = int(input())
    A = list(map(int, input().split()))
    ans = 10**5
    for a in A:
        a = prime_factorize(a)
        ans = min(ans, a.count(2))
    if (ans == 10 ** 5):
        ans = 0
    print(ans)
    return


resolve()

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

N = input()
B = map(int, input().split())

answer = float("inf")
for i in B:
    answer = min(answer, len(bin(i)) - bin(i).rfind("1") - 1)
print(answer)

Submission status: Accepted

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

def calc(n):
  return n / 2
  
  
while not B:
  for i in array:
    if i % 2 == 1:
      B = True
  if not B:
    array = list(map(calc, array))
    count += 1
  else:
    break
        
print(count)

Submission status: Accepted

Solution code:
N = int(input())
B = False
kaisu = 0
array = list(map(int,input().split()))

def calc(n):
  return int(n) / 2
  
  
while not B:
  for i in array:
    if i % 2 == 1:
      B = True
  if not B:
    array = list(map(calc, array))
    kaisu += 1
  else:
    break
        
print(kaisu)

Submission status: Accepted

Solution code:
N = int(input())
B = False
kaisu = 0
array = list(map(int,input().split()))

def calc(n):
  return int(n) / 2
  
  
while not B:
  for i in range(N):
    if array[i] % 2 == 1:
      B = True
  if not B:
    array = list(map(calc, array))
    kaisu += 1
  else:
    break
        
print(kaisu)

Submission status: Accepted

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

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

print (C-1)

Submission status: Accepted

Solution code:
import numpy as np
N = int(input())
arr1 = np.array(list(map(int,input().split())))
arr2 = arr1 % 2
s = 0
while 1 not in arr2:
  arr1 = arr1 // 2
  arr2 = arr1 % 2  
  s += 1

print(s)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    As = [int(v) for v in input().split()]
    count = 0
    while all(x % 2 == 0 for x in As):
        count += 1
        As = [x // 2 for x in As]

    print(count)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n = int(input())

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

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

print(res)

Submission status: Accepted

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


count = 0

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

  if even_count == len(a):
    a = list(map(lambda x : x // 2, a))
    count += 1

  else:
    break

print(count)

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,input().split()))
ans=30
for i in a:
  x=0
  while True:
    if i%2==1:
      break
    else:
      x+=1
      i=i//2
      continue
  ans=min(ans,x)
print(ans)

Submission status: Accepted

Solution code:
# 標準入力の読み込み（回数）
n=int(input())
# 標準入力の読み込み（数値列）
list_1=input().split()
list_2=list(range(len(list_1)))
for i in range(len(list_1)):
  list_1[i]=int(list_1[i])
# カウンタの定義
ctr = 0
# 判定プログラム
while True:
  for j in range(len(list_1)):
    list_2[j]=list_1[j]%2
    list_1[j]/=2
  s=sum(list_2)
  if(s!=0):
    break
  else:
    ctr+=1
print(ctr)

Submission status: Accepted

Solution code:
N = int(input())
# A = list(map(int, input().split()))
A = [int(x) for x in input().split()]

c = 0

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

Submission status: Accepted

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

c = 0

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

Submission status: Accepted

Solution code:
import sys
n = int(input())
lst = list(map(int, input().split()))
res = 0
for p in range(200):
  for i in range(n):
    if lst[i] % 2 == 1:
      print(res)
      sys.exit()
  lst = [int(j / 2) for j in lst]
  res += 1

Submission status: Accepted

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

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

ans = 1e10
for i in range(n):
    # 各N_list[i]について2の素因数をカウント
    j = 0
    while N_list[i] % 2 == 0:
        N_list[i] = N_list[i] / 2
        j += 1
    if ( j < ans):
        ans = j

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 = input()
a = list(map(int, input().split()))
j = 0
while not 1 in (map(lambda x: x % 2, a)):
    a = [i // 2 for i in a]
    j = j + 1
print(j)

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    A = list(map(int, input().split()))
    c = 0
    ans = 0
    while c < 1:
        for i in range(len(A)):
            if A[i] % 2 != 0:
                print(ans)
                return
            A[i] = A[i] // 2
        ans += 1
main()

Submission status: Accepted

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

Submission status: Accepted

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

for i in a:
  x=i
  two=0
  while not x%2:
    x/=2
    two+=1
  if ans>two:
    ans=two

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

print(count)

Submission status: Accepted

Solution code:
n = int(input())

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

flag = 1
count = 0

while flag == 1:
    for i in range(n):
        if a[i] % 2 != 0:
            flag = 0
        
    if flag == 1:
        for i in range(n):
            a[i] = a[i] / 2
        count += 1
        
print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
def solve():
    N = int(input())
    A = np.array(list(map(int, input().split())),dtype=np.int64)
    count = 0
    while True:
        if np.sum(A%2) ==0:
            A = A//2
            count += 1
        else:
            return print(count)

if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# coding: utf-8

# In[6]:


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


# In[7]:


ans = 0
while 1:
    mylist = [x%2**(ans+1) for x in A]
    if sum(mylist) > 0:
        break
    else:
        ans += 1
print(ans)


# In[ ]:

Submission status: Accepted

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

ans = 10**10

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

print(ans)

Submission status: Accepted

Solution code:
count= -1
flag = 1

num_list = [0]*int(input())
num_list = [int(x) for x in input().split()]

while 1:
    i=0
    for x in num_list:
        if x%2==1:
            flag = 0
            break
        else:
            num_list[i]=num_list[i]/2
        i=i+1
    count = count + 1
    if flag==0:
        break


print(count)

Submission status: Accepted

Solution code:
N = input()
n = int(eval(input().replace(' ', '|')))
print(len(str(bin(n&-n))[3:]))

Submission status: Accepted

Solution code:
from fractions import gcd
from functools import reduce
n=int(input())
a=list(map(int,input().split()))

g=reduce(gcd,a)
ans=0
while g%2==0:
    g//=2
    ans+=1
print(ans)

Submission status: Accepted

Solution code:
def check_mod(target_list):
    for target in target_list:
        if int(target) % 2 != 0:
            return False
    else:
        return True


def replace_target(target_list):
    new_list = list()
    for target in target_list:
        new_list.append(int(target) / 2)
    return new_list


def main():
    target_num = input()
    target_list = input().split()

    repeat_count = 0

    while True:
        repeat_flg = check_mod(target_list)
        if repeat_flg:
            target_list = replace_target(target_list)
            repeat_count += 1
        else:
            print(repeat_count)
            break


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def calc_waru(n):
    return n/2
N = int(input())
A = list(map(int, input().split()))
cnt = 0
flag = 0
while True:
    for i in A:
        if i % 2 != 0:
            flag = 1
    if flag == 0:
        A = list(map(calc_waru, A))
        cnt += 1
    else:
        break
print(cnt)

Submission status: Accepted

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

cnt = 0
flg = True

while flg == True:
    for i in range(N):
        if A[i]%2 == 1:
            flg = False
            break
    if flg == True:
        cnt += 1
        A = [a/2 for a in A]

print(cnt)

Submission status: Accepted

Solution code:
n = int(input())
# A = {i for i in map(int, input().split())}
A = [i for i in map(int, input().split())]
# print(A)
# B = set()
B = []

for e in A:
    cnt = bin(e)[::-1].find('1')
    # print(cnt)
    # B.add(cnt)
    B.append(cnt)
# print(B)
print(min(B))

Submission status: Accepted

Solution code:
n = int(input())
A = {i for i in map(int, input().split())}
# print(A)
B = set()
for e in A:
    cnt = bin(e)[::-1].find('1')
    # print(cnt)
    B.add(cnt)
# print(B)
print(min(B))

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
d = 0
while all(b % 2 == 0 for b in a):
    d += 1
    a = list(c / 2 for c in a)
print(d)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

ans = 10 ** 6

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

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=list(map(int,input().split()))
ans=-1
for i in range(max(a)):
    for j in range(len(a)):
        if a[j]%2==1:
            ans=i
            break
        else:
            a[j]=a[j]//2
    if ans!=-1:
        break
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
even = lambda x: True if x % 2 == 0 else False
div2 = lambda x: x/2
isContinue = True
c = 0
while isContinue:
    for i, v in enumerate(A):
        if even(v):
            A[i] = div2(v)
        else:
            isContinue = False
    if isContinue:
        c += 1
print(c)

Submission status: Accepted

Solution code:
N = int(input())

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

flag = True
count = 0

while(flag):
  for num in nums:
    if(num % 2 == 1):
      flag = False
  
  if(flag):
    nums = list(map(lambda x:x//2,nums))
    count += 1

print(count)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
input_line1 = input()
str_list = input().split()
num_list = [int(a) for a in str_list]
flag = True
count = -1
while flag:
    for i in range(len(num_list)):
        if num_list[i] % 2 == 0:
            num_list[i] = num_list[i] // 2
        else:
            flag = False
    count += 1

print(count)

Submission status: Accepted

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

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

print(cnt)

Submission status: Accepted

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

even_counter = 0
for n in range(N):
  if num_list[n]%2 != 0:
    print('0')
    break
  else:
    even_counter += 1
  
  if even_counter == N:
    min_counter = float('inf')
    for i in range(N):
          num =  num_list[i]
          counter = 0
          while num%2 == 0:
            counter += 1
            num //= 2
          if counter <= min_counter:
            min_counter = counter
      
    print(min_counter)

Submission status: Accepted

Solution code:
N = int(input())

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

count = 0

def judge(L):
    global count
    for i in range(N):
        if L[i]%2 == 0:
            L[i] = L[i]/2
        elif L[i]%2 != 0:
            return count
    count += 1
    judge(L)

judge(A)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import fractions
from functools import reduce
N = int(input())
A = list(map(int,input().split()))
num = reduce(fractions.gcd,A)
ans = 0
for i in range(10000):
    if num%2 == 1:
        print(ans)
        exit()
    num /= 2
    ans += 1

Submission status: Accepted

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

MOD = 2  # type: int


def solve(N: int, A: "List[int]"):
    ans = 0
    while not any([a & 1 for a in A]):
        for i in range(len(A)):
            A[i] //= 2
        ans += 1
    print(ans)
    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    A = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, A)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:



N = int(input())

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


ans = int(1e9)
for i in range(N):
    cnt = 0
    while(A[i]%2 == 0):
        A[i] = A[i] // 2
        cnt = cnt + 1
        
    ans = min(ans,cnt)

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

ans = int(1e9)
for i in range(N):
    cnt = 0
    while(A[i]%2 != 1):
        A[i] = A[i] // 2
        cnt = cnt + 1
    ans = min(ans, cnt)
    
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def li():
    return list(map(int, input().split()))
def mi():
    return map(int, input().split())
def ii():
    return int(input())

N = ii()
A = li()
cnt = 0
while all(e % 2 == 0 for e in A):
    cnt += 1
    A = list(map(lambda x: x // 2, A))

print(cnt)

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

Submission status: Accepted

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

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

    ans = min(map(count, A))
    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def ABC_81_B():
    N=int(input())
    A = input().split()
    A = [int(s) for s in A]
    c=0

    for i in range(100):
        for j in range(N-1):
            if A[j]%2 != 0:
                break
            A[j] = A[j]/2
        else:
            c+=1
            continue
        break

    print(c)

if __name__ == '__main__':

    ABC_81_B()

Submission status: Accepted

Solution code:
import numpy as np

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

A = np.array(A)
counter = 0
while True:
    if all( i%2==0 for i in A):
        counter  += 1
        A = A/2
    else:
        print(counter)
        break

Submission status: Accepted

Solution code:
from sys import stdin
from math import log2
def I(): return int(stdin.readline().rstrip())
def LI(): return list(map(int,stdin.readline().rstrip().split()))
    
n = I()
a = LI()

ans = int(log2(a[0]))
for i in a: 
    if i%2: 
        print(0)
        exit()
    else:
        for j in range(1,ans+1):
            if i&(1<<j):
                if not ans:
                    ans = j
                elif j<ans:
                    ans = j
                break

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

n = int(input())
a = list(map(int,input().split()))
count = 0
status = True

while status:
    for i in range(n):
        if a[i] % 2 == 1:
            print(count)
            exit()
        a[i] = int(a[i] / 2)
    count += 1

Submission status: Accepted

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

Submission status: Accepted

Solution code:

def calc_times_divided_by_two(num):
  """
  Args:
    num (int)
  >>> calc_times__divided_by_two(8)
  3
  >>> calc_times__divided_by_two(7)
  0
  """
  cnt = 0
  while num % 2 == 0:
     num //= 2
     cnt += 1
  return cnt


n = int(input())
L = list(map(int, input().split()))
print(min(map(calc_times_divided_by_two, L)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import bisect,collections,copy,heapq,itertools,math,numpy,string
import sys
def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def SS(): return map(str,sys.stdin.readline().rstrip().split())
def II(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())

N = I()
A = LI()
cnt = 0
if len(A) != len([a for a in A if a % 2 == 0]):
  print(0)
  exit()

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

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#-*-coding:utf8;-*-
#qpy:console

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

dmax=0
for v in l:
   if v > dmax :
      dmax=v

dmin = dmax
for v in l:
   ct=0
   tmp = v
   while tmp%2 == 0:
      tmp /=2
      ct += 1
   if ct < dmin:
      dmin=ct

print(dmin)

Submission status: Accepted

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

Submission status: Accepted

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

num = int(input())
s = list(map(int,input().split()))

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

print(count)

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    nums = list(map(int, input().split())) 
    exist_odd = False
    result = 0
    while True:
        for i in range(n):
            if nums[i] % 2 != 0:
                exist_odd = True
        if exist_odd:
            break
        nums = list(map(lambda x: x / 2, nums))
        result += 1
    print(result)
if __name__ == '__main__':
    main()