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: Runtime Error

Solution code:
N = input()
n=0
l=[]

list = [input() for i in range(int(N))]

for i in list:
    global n

    while i % 2 == 0:
        i = i//2
        n +=1
    
    else:
        l.append(n)

print(max(l))

Submission status: Runtime Error

Solution code:
INPUT = [input() for i in range(2)]
INPUT = list(map(int, INPUT))

def check_even(l):
    return sum([i % 2 for i in INPUT]) == 0

check_even(INPUT)

count = 0
while True:
    if check_even(INPUT):
        INPUT = [i / 2 for i in INPUT]
        count+=1
    else:
        break
print(count)

Submission status: Runtime Error

Solution code:
N = int(input())
A=[]
for i in range(N):
    A.append(int(input()))
c=0
while(True):
    b=0
    for i in A:
        if i%2==0:
            b=b+1
        if b==N:
            for j in range(N):
                A[j]=A[j]/2
            c=c+1
    if b!=N:
        break
print(c)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

count = 0
even = True

while even:
    for i, a in enumerate(number_list):
        if a % 2 != 0:
            even = False
            break
        else:
            number_list[i] = a / 2
    if even:
        count += 1
print(count)

Submission status: Runtime Error

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

count = 0
even = True

while even:
    for i, a in enumerate(number_list):
        if a % 2 != 0:
            even = False
        else:
            number_list[i] = a / 2
    if even:
        count += 1
print('{}'.format(count))

Submission status: Runtime Error

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

count = 0
even = True

while even:
    for i, a in enumerate(number_list):
        if a % 2 != 0:
            even = False
        else:
            number_list[i] = a / 2
    if even:
        count += 1
print(count)

Submission status: Runtime Error

Solution code:
import numpy as num
N = int(input())
A = list(map(int,input().split()))
ary = num.array(A)
b = len(A)
S=1
ans = 0
while True:
  for i in range(b):
    S*=A[i]
  if S %2 == 0:
    ans+=1
    ary = ary/2
    ary=A
    S=1
  else:
    print(ans)
    exit()

Submission status: Runtime Error

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: Runtime Error

Solution code:
a=input()
b=map(int,input().split())
ans=[]
max_b=max(b)
d=0
for i in b
 while i%2=0
   i=i/2
   d+=1
 ans.append(d)
print(ans)

Submission status: Runtime Error

Solution code:
a=input()
b=map(int,input().stlip())
ans=0

while True:
for s in b
 if b[s]%2!=0
  break
 else:
   b[s]=b[s]/2
   ans+=1
print(ans)

Submission status: Runtime Error

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

counter=0
while all(i%2==0 for i in n_list):
     n_list=[i/2 for i in n_list]

    #n_list=[i/2 for i in n_list]
    counter=+1
print(counter)

Submission status: Runtime Error

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

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

print(ans)

Submission status: Runtime Error

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

while all(a%2==0 for a in s):
  ans +=1
  for a in s:
    s = a/2

print(ans)

Submission status: Runtime Error

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

while all(a%2==0, for a in s):
  ans +=1
  for a in s:
    s = a/2

print(ans)

Submission status: Runtime Error

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

while all(a%2==0, for a in s):
  ans +=1
  for a in s:
    s = s/2

print(ans)

Submission status: Runtime Error

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

while all(a%2==0, for a in s):
  ans +=1
  
  for a in s:
    a = a/2

print(ans)

Submission status: Runtime Error

Solution code:
n = imput()
s = list(map(int, inpit.split()))
ans = 0

while all(a%2==0, for a in s):
  ans +=1
  
  for a in s:
    a = a/2

print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())
 
l = [int(input()) for _ in range(N)]
 
count = 0

while all([a == 0 for a in list(map(lambda x: x%2, l))]):
    l = list(map(lambda x: x/2, l))
    count += 1
print(count)

Submission status: Runtime Error

Solution code:
N = int(input().strip())

l = [_ for _ in int(input().strip())]

count = 0

while all([a == 0 for a in list(map(lambda x: x%2, l))]):
    l = list(map(lambda x: x/2, l))
    count += 1

print(count)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

print(min(A2num))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import numpy as np
input()
x = np.array(input().split(), dtype=np.int32)

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

Submission status: Runtime Error

Solution code:
import numpy as np
input()
x = np.array(input().split(), dtype=np.int32)

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

Submission status: Runtime Error

Solution code:
import numpy as np
input()
x = np.array(input().split(), dtype=np.int32)

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

Submission status: Runtime Error

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

cnt = 0
while True:
    if len(n for n in s if n % 2 != 0) != 0:
        print (cnt)
        break
    else:
        s = list(map(lambda n: n / 2, s))
        cnt = cnt + 1

Submission status: Runtime Error

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

cnt = 0
while True:
    if len(n for n in s if n % 2 != 0) != 0:
        print (cnt)
        break
    else:
        s = map(lambda n: n / 2, s)

Submission status: Runtime Error

Solution code:
N=int(input())
A=list(map(int,input().split()))
cnt=0
while True:
  if A%2==0:
    cnt+=1
  else:
    break
print(cnt)

Submission status: Runtime Error

Solution code:
from typing import List

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):
        if a_list[i] % 2 != 0:
            flag = False
            break
        else:
            continue

    
    for i in range(n):
        a_list[i] /= 2
    counter += 1

print(counter)

Submission status: Runtime Error

Solution code:
from typing import List

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):
        return counter
    else:
        return shift_only(list(map(half, num_list)), counter + 1)


n = int(input())

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

counter = 0

result = shift_only(a_list, counter)
print(result)

Submission status: Runtime Error

Solution code:
from typing import List

def is_odd(num: int) -> bool:
    return num % 2 != 0

def odd_in_list(num_list: List[int]) -> bool:
    for num in num_list:
        if is_odd(num):
            return True
    
    else:
        return False

def half(num: int) -> int:
    return num / 2

def shift_only(num_list, counter):
    if odd_in_list(num_list):
        return counter
    else:
        return shift_only(list(map(half, num_list)), counter + 1)


n = int(input())

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

counter = 0

result = shift_only(a_list, counter)
print(result)

Submission status: Runtime Error

Solution code:
from typing import List

def is_odd(num: int) -> bool:
    return num % 2 == 0

def odd_in_list(num_list: List[int]) -> bool:
    for num in num_list:
        if is_odd(num):
            return True
    
    else:
        return False

def half(num: int) -> int:
    return num / 2

def shift_only(num_list, counter):
    if odd_in_list(num_list):
        return counter
    else:
        return shift_only(list(map(half, num_list)), counter + 1)


n = int(input())

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

counter = 0

result = shift_only(a_list, counter)
print(result)

Submission status: Runtime Error

Solution code:
from typing import List

def is_odd(num: int) -> bool:
    return num % 2 == 0

def odd_in_list(num_list: List[int]) -> bool:
    for num in num_list:
        if is_odd(num):
            return True
    
    else:
        return False

def half(num: int) -> int:
    return num / 2

def shift_only(num_list, counter):
    if odd_in_list(num_list):
        return counter
    else:
        return shift_only(list(map(half, num_list)), counter += 1)


n = int(input())

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

counter = 0

result = shift_only(a_list, counter)
print(result)

Submission status: Runtime Error

Solution code:
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: Runtime Error

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

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

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

Submission status: Runtime Error

Solution code:
N = 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 = map(calc, array)
    kaisu += 1
  else:
    break
        
print(kaisu)

Submission status: Runtime Error

Solution code:
import matplotlib
import matplotlib.pyplot as plt
import numpy as np

N = input()
B = False
kaisu = 0
array = 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 = map(calc, array)
    kaisu += 1
  else:
    break
        
print(kaisu)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

def calc(n):
  retuen n/2
  
  
while !B:
	for i in range(N):
  		if array[i]/2 == 1:
    		B = True
  	if B == False:
    	array = map(calc, array)
    	kaisu += 1
  	else:
    	break
        
print(kaisu)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
N = input()
B = False
kaisu = 0
array = map(int,input().split())
while B:
	for i in range(N):
  		if array[i]/2 == 1:
    	B = True
  	if B == False:
    	array = map(calc ,array)
    	kaisu += 1
  	else:
    	break
        
print(kaisu)

def calc(n):
  retuen n/2

Submission status: Runtime Error

Solution code:
N = input()
B = False
kaisu = 0
array = map(int,input().split())
while !B:
	for i in range(N):
  		if array[i]/2 == 1:
    	B = True
  	if B == False:
    	array = map(calc ,array)
    	kaisu++
  	else:
    	break
        
print(kaisu)

def calc(n):
  retuen n/2

Submission status: Runtime Error

Solution code:
N = input()
B = False
kaisu = 0
array[] = map(int,input().split())
while !B:
	for i in range(N):
  		if array[i]/2 == 1:
    	B = True
  	if B == False:
    	array = map(calc ,array)
    	kaisu++
  	else:
    	break
        
print(kaisu)

def calc(n):
  retuen n/2

Submission status: Runtime Error

Solution code:
N = input()
B = False
kaisu = 0
array[] = map(int,input().split())
while !B:
	for i in range(N):
  		if array[i]/2 == 1:
    	B = True
  	if B == False:
    	array[] = map(calc ,array[])
    	kaisu++
  	else:
    	break
        
print(kaisu)

def calc(n):
  retuen n/2

Submission status: Runtime Error

Solution code:
N = input()
B = False
kaisu = 0
array[] = map(int,input().split())
while !B:
	for i in range(N):
  		if array[i]/2 == 1:
    	B = True
  	if B == False:
    	array[] = map(calc ,array[])
    	kaisu++
  	else:
    	break
        
print(kaisu)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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: Runtime Error

Solution code:
n = int(input())
lst = map(str, input().split())
res = 0
while True:
  for i in lst:
    if int(i[-1]) % 2 == 1:
      return res
  lst = [int(j) / 2 for j in lst]
  res += 1

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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: Runtime Error

Solution code:
ans=0
while(1):
  try:
  	A=A /2
    ans=ans+1
  except ValueError as e:
    print(ans)
    break

Submission status: Runtime Error

Solution code:
def resolve():
	n = int(input())
	ws = [input() for _ in range(n)]
	cnt = []
	for w in ws:
		if w in cnt:
			print('No')
			return
		if len(cnt) and cnt[-1][-1] != w[-1]:
			print('No')
			return
		cnt.append(w)
	print('Yes')
resolve()

Submission status: Runtime Error

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

for i in range(10**10):
  for j in range(n):
    if a[j]%2 != 0:
      print(count)
      exit()
    else:
      a[j] = a//2
  count += 1

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
A_list = [map(int, input().split())]
count = 0

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

    if exist_odd:
        break
    
    for i in range(N):
        A_list[i] = A_list[i] / 2

    count = count + 1

print(count)

Submission status: Runtime Error

Solution code:
import fractions
from functools import reduce

def gcd(*numbers):
    return reduce(fractions.gcd, numbers)

def gcd_list(numbers):
    return reduce(fractions.gcd, numbers)
tmp =gcd_list(A)
for i in range(100):
    if tmp == 2**i:
        print(i)
        break

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
(lambda f: int(input()) == print(min([f(f, i, 0) for i in list(map(int, input().split()))])))(lambda f, i, c: f(i // 2, c + 1) if i % 2 == 0 else c)

Submission status: Runtime Error

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

count = 0
flag = True

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

print(count)

Submission status: Runtime Error

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

count = 0
flag = True

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

Submission status: Runtime Error

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

count = 0
flag = True

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

Submission status: Runtime Error

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

count = 0
flag = True

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

print(count)

Submission status: Runtime Error

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

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

import sys
input = sys.stdin.readline

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

def Base_n_to_10(X, n):
  return sum(int(str(X)[-i])*n**i for i in range(len(str(X))))

#####IntLog#####
def int_log(n, a):
  count = 0
  while n>=a:
    n //= a
    count += 1
  return count

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

N = inputI()
print( min(int_log((x&(-x))) for x in inputIL() ))

Submission status: Runtime Error

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

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

import sys
input = sys.stdin.readline

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

  count += 1

Submission status: Runtime Error

Solution code:
N = int(input())

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

cnt = 0

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

print(cnt)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

print(count)

Submission status: Runtime Error

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 in a in A]
    count = count + 1


print(count)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
list=[]
for i in range(N):
    list.append(int(input()))

a = []
i = 0
for i in range(N):
    a.append(int(0))
    while list[i] > 0 and list[i] % 2 == 0:
        a[i] = a[i] + 1
        list[i] = int(list[i]/2)
print(min(a))

Submission status: Runtime Error

Solution code:
N = int(input())
list=[]
for i in range(N):
    list.append(int(input()))

a = []
i = 0
for i in range(N):
    a.append(int(0))
    while list[i] % 2 == 0:
        a[i] = a[i] + 1
        list[i] = int(list[i]/2)
print(min(a))

Submission status: Runtime Error

Solution code:
n=int(input())
a=list(map(int,input().split()))
n=0
while n>=0:
  if all(aa%2==0):
    for b in a:
      b=b//2
    n+=1
  else:
    break
print(n)

Submission status: Runtime Error

Solution code:
n=int(input())
a=list(map(int,input().split()))
n=0
while n>=0:
  if all(aa%2==0 for aa in a):
    aa%=2
    n+=1
  else:
    break
print(n)

Submission status: Runtime Error

Solution code:
n=int(input())
a=list(map(int,input().split()))
n=0
if all(aa%2==0 for aa in a):
  aa%=2
  n+=1
print(n)

Submission status: Runtime Error

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

Submission status: Runtime Error

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


num = 0
for j in range(100):
    count = 0
    for i in range(a):
        if b[i] % 2 == 0:
            count = 1 + count


    if count == a:
        b = [c/2 for c in b]
        num = 1 + num

print(num)

Submission status: Runtime Error

Solution code:
a = int(input())
b = [int(input()) for x in range(a)]


num = 0
for j in range(100):
    count = 0
    for i in range(a):
        if b[i] % 2 == 0:
            count = 1 + count


    if count == a:
        b = [c/2 for c in b]
        num = 1 + num

print(num)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
A = list(map(int,input().split()))
k = 0
for i in range(0:len(A)):
  if A[i] == 0:
    k = k + 1
  else:
    k
print(k)

Submission status: Runtime Error

Solution code:
N = int(input())
A = list(map(int,input().split()))
k = 0
for i in range(0:N-1):
  if A[i] == 0:
    k = k + 1
  else:
    k
print(k)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = list(map(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: Runtime Error

Solution code:
a = list(map(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: Runtime Error

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

count = 0

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

Submission status: Runtime Error

Solution code:
N = int(input())
A = input()
X = 1000000000
count = 0
for i in range(N):
  while A[i] % 2 ==0:
    A[i] = A[i]//2
    count +=1
  if count < X:
    X = count
  count =0
print(X)