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()))
ans=[]
for i in a:
    ct=0
    big=10**5
    while i%2==0:
        i=i/2
        ct+=1
    big=min(ct,big)
    ans.append(big)
b=sorted(ans)
print(b[0])

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())

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

res = 10 ** 9

for a in A:
    t = 0
    while a % 2 == 0:
        t += 1
        a //= 2

    res = min(res, t)

print(res)

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:
# coding: utf-8
import math
N = input()
A = list(map(int, input().split()))

count = 0
while True:
    for i, a in enumerate(A):
        if a % 2 == 0:
            A[i] = a / 2
        else:
            print(count)
            exit()
    count = count + 1

Submission status: Accepted

Solution code:
import sys 
n = int(input())
num = [int(x) for x in input().split()]
t = 0 
while True: 
  for i in range(n):
    if num[i]%2 == 0:
      num[i] //= 2 
    else:
      print(t)
      sys.exit()
  t += 1

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

def roop(N,x):
    global check
    global NEW_x
    for i in x:
        s = i//2
        if i%2==0:
            check +=1
            
            NEW_x.append(s)


        else:
            NEW_x.append(s)

roop(N,x)

while True:
  
    x = NEW_x
    NEW_x = []
    if check ==N:
        check=0
        count+=1
        roop(N,x)
    else:
        break

print(count)

Submission status: Accepted

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

ans = 10 ** 16
cnt = 0
for A in A:
    while A % 2 == 0:
        A = int(A / 2)
        cnt += 1
    ans = min(cnt, ans)
    cnt = 0

print(ans)

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    N, *A = map(int, read().split())

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

    print(ans)
    return


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def T(N,A):
    t = 1
    for i in range(N):
        if A[i]%2 == 1:
            t = 0
    return t

def W(b):
    return b/2

N = int(input())
A = list(map(int,input().split()))
count = 0
t = T(N,A)
while t == 1:
    A = list(map(W,A))
    count += 1
    t = T(N,A)
print(count)

Submission status: Accepted

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

ans = 99

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

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,input().split()))
mina=32
for aa in a:
  for i in range(31):
    if aa % (2**i) !=0:
      mina=min(mina,i-1)
print(mina)

Submission status: Accepted

Solution code:
import numpy as np

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

a = np.array(A)
cnt = 0
end = 0

while cnt >= 0:
    for i in a:
        if i % 2 != 0:
            print(cnt)
            end += 1
            break
    if end == 1:
        break
    a = a/2
    cnt += 1

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
Ali = list(map(int,input().split()))
res = 10**10

for i in range(N):
  r = 0
  while Ali[i]%2 == 0:
    Ali[i] //= 2
    r += 1
  res = min(res,r)
  
print(res)

Submission status: Accepted

Solution code:
N=int(input())
A=input().split()
A=list(map(int,A))
def can_divide_by_2():
    for i in range(N):
        a=A[i]
        if a%2==0:
            a=a//2
            A[i]=a
        else:
            return False
for u in range(1000000):
    x=can_divide_by_2()
    if x==False:
        break
print(u)

Submission status: Accepted

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

ans = 100000000000000
for a in A:
    ans = min(ans, (a ^ (a-1)).bit_length())
print(ans-1)

Submission status: Accepted

Solution code:
n=int(input())
L=list(map(int,input().split()))
cnt=0
ok=1
while ok:
  for i in range(n):
    if L[i]%2==1:
      ok=0
      break
    L[i]/=2
  if ok:cnt+=1

print(cnt)

Submission status: Accepted

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

cnt = 0

while all([i % 2 == 0 for i in A]):
    A = list(map(lambda x: x/2,A))
    #print(A)
    cnt += 1    
    
print(cnt)

Submission status: Accepted

Solution code:
n = int(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) # (1)…2で割った回数が最小のものを探索
print(ans)

Submission status: Accepted

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

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

main()

Submission status: Accepted

Solution code:
def Divide2Count(N):
    Count = 0
    while True:
        if N%2==0:
            Count += 1
            N //= 2
        else:
            break
    return Count

N = int(input())
A = [Divide2Count(int(X)) for X in input().split()]
print(min(A))

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int, input().split()))
for i in range(32):
    x=2**i
    res=0
    for j in a:
        if j%x !=0:
            res=1
    if res==1:
        print(i-1)
        break

Submission status: Accepted

Solution code:
import copy
 
kaisu = int(input())
 
s_suji_list = input().split(' ')
suji_list = []
count = 1
continue_flg = True
for suji in s_suji_list:
  i_suji = int(suji)
  if i_suji % 2 == 0:
    suji_list.append(i_suji / 2)
  else:
    continue_flg = False
    count = 0
    break
 
while(continue_flg):
  temp_list = copy.copy(suji_list)
  suji_list.clear()
  count += 1
  for suji in temp_list:
    if suji % 2 == 0:
      suji_list.append(suji / 2)
    else:
      count -= 1
      continue_flg = False
      break
 
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

count=0
while 1:
    k=0
    for i in a_int:
        k = k + i%2
    if k == 0:
        a_int = [i/2 for i in a_int]
        count=count+1
    else:
        print(count)
        break

Submission status: Accepted

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

n = int(input())
a = map(int, input().split())
ans = min(map(irritation, a))

print(ans)

Submission status: Accepted

Solution code:
s = int(input())
s = input().rstrip().split(' ')

result = 0


def half(num):
    count = 0
    while ((num % 2) == 0) :
        num = num / 2
        count += 1
    return count


for num in s:
    num = int(num)
    count = half(num)
    if not result:
        result = count

    if count == 0:
        result = 0
        break

    if count < result:
        result = count

print(result)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
l = list(map(int,input().split()))
ans = 0
mini = 10**8
for i in range(n):
    num = 0
    while l[i] %2==0:
        num += 1
        l[i] /= 2
    mini = min(mini,num)
print(mini)

Submission status: Accepted

Solution code:
import sys

readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)
INF = float('inf')

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


ans = INF
for a in A:
    cnt = 0
    while True:
        q, mod = divmod(a, 2)
        if mod != 0:
            break
        cnt += 1
        a = q
    ans = min(ans, cnt)
print(ans)

Submission status: Accepted

Solution code:
'''
allの定義
iterable の全ての要素が真ならば (もしくは iterable が空ならば)True を返します。
以下のコードと等価です:
def all(iterable):
    for element in iterable:
        if not element:
            return False
    return True
「イテラブル」は「iterable」で「反復可能な」です。
for文などで反復できるものだと考えてください。
'''

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())
A = list(map(int, input().split()))
ans = 10**18
for a in A:
    cnt = 0
    while a%2 == 0:
        a //= 2
        cnt += 1
    ans = min(cnt, ans)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))
ans = 0
y = []
x = 0
z = 1
while x == 0:
    for i in range(N):
        a = str(A[i] % (2 ** z))
        y.append(a)
    if y.count('0') == N:
        ans += 1
        y = []
        z += 1
    else:
        x =+ 3
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 2020/07/24
# AtCoder Beginner Contest 081 - B

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

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

# Output
print(ans)

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

A = [i for i in A if i%2==0]
if len(A) != n:
    print(0)
    exit()
cnt = 0
while len(A) == n:
    A = [i//2 for i in A if i%2==0]
    cnt += 1
print(cnt-1)

Submission status: Accepted

Solution code:
#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations,permutations,accumulate # (string,3) 3回
#from collections import deque
from collections import deque,defaultdict,Counter
import decimal
import re
#import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#
# my_round_int = lambda x:np.round((x*2 + 1)//2)
# 四捨五入
import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7
#mod = 9982443453
def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
n = I()
A = readInts()
cnt = 0
while True:
    for i in range(n):
        if A[i] % 2 == 0:
            A[i] //= 2
        else:
            print(cnt)
            exit()
    cnt += 1

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 8)
ini = lambda: int(sys.stdin.readline())
inm = lambda: map(int, sys.stdin.readline().split())
inl = lambda: list(inm())
ins = lambda: sys.stdin.readline().rstrip()
debug = lambda *a, **kw: print("\033[33m", *a, "\033[0m", **dict(file=sys.stderr, **kw))

n = ini()
a = inl()


def solve():
    mincnt = 100000
    for x in a:
        cnt = 0
        while x % 2 == 0:
            x //= 2
            cnt += 1
        mincnt = min(mincnt, cnt)

    return mincnt


print(solve())

Submission status: Accepted

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

Submission status: Accepted

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

N = int(input()) #使用しない

maxn = 1000000000
for a in input().split():

    count = 0
    b = int(a)
    while( b % 2 == 0):
        b = b // 2
        count += 1

    maxn = min(maxn, count)

print(maxn)

Submission status: Accepted

Solution code:
num = int(input())
a = input().split()
ans = 200
for i in a:
    n = int(i)
    count = 0
    while n%2==0:
        count += 1
        n /= 2
    ans = min(ans, count)

print(ans)

Submission status: Accepted

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

def div(x):#各要素を2で割って返す関数
    return x/2

count = 0
while 1:
    flag = 0
    for num in numbers:
        if num % 2:#2で割り切れない
            flag=1
            break
    if flag==1:
        break
    count += 1
    numbers = list(map(div,numbers))

print(count)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import numpy as np
n = int(input())
a_list = np.array(list(map(int, input().split())))

counter = 0
while True:
    if np.sum(a_list % 2) > 0:
        break
    counter += 1
    a_list = a_list / 2
print(counter)

Submission status: Accepted

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

import numpy as np
A_np = np.array(A)

ans = 0

while True:
    A_np = A_np / 2
    if len(np.nonzero(A_np%1)[0]) > 0:
        break
    else:
        ans += 1
        
print(ans)

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()

def pow_two(n):
    ret = 0
    while n % 2 == 0:
        n //= 2
        ret += 1
    return ret

def main():
    n = int(input())
    A = list(map(int, input().split()))
    ans = 10**10
    for a in A: ans = min(ans, pow_two(a))
    print(ans)

if __name__ == "__main__":
    main()

Submission status: Accepted

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

def cnt(n):
    x = 0
    while n%2 == 0:
        x += 1
        n = n//2
    return x
    
ans = 10**9

for i in a:
    ans = min(ans,cnt(i))
    
print(ans)

Submission status: Accepted

Solution code:
from sys import stdin

n = stdin.readline().rstrip()
a = [int(x) for x in stdin.readline().rstrip().split()]

minc = 10**9

for b in a:
    count = 0
    while True:
        if b % 2 == 1: break
        b = b//2
        count = count + 1

    minc = min([minc, count])

print(minc)

Submission status: Accepted

Solution code:
nn = int(input())
dd = list(map(int,input().split()))
nof_op = 0
finish = 0
while True:
    for ind in range(nn):
        if (dd[ind] % 2) == 1:
            finish = 1
            break
        else:
            dd[ind] = dd[ind] / 2
    if finish == 1:
        break
    else:
        nof_op += 1
print(nof_op)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

cnt =0
flag = 0
while True:
  a = list(map(lambda x: x/2, a))
  for i in range(n):
    print
    if not a[i].is_integer():
      flag = 1
      break
  if flag == 1:
    break
  cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
def input_list():
    n = int(input())
    return n, [int(x) for x in input().split()]


def main(values):
    count = 0
    while all([x % 2 == 0 for x in values]):
        values = [x / 2 for x in values]
        count += 1
    print(count)


if __name__ == "__main__":
    _, x = input_list()
    main(x)

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
mini = 2**30
LL = input().split()
for i in LL:
  x = 0
  
  while int(i)%(2**x) ==0:
      x += 1
      
  
  if mini > (x-1):
    mini = (x-1)
    
print(mini)

Submission status: Accepted

Solution code:
def 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
n = int(input())
li = list(map(int,input().split()))
lia = []
for i in range(n):
    fac = factorize(li[i])
    count = fac.count(2)
    lia.append(count)
print(min(lia))

Submission status: Accepted

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

Submission status: Accepted

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

C = 10 ** 9
for a in A:
    c = 0
    while a % 2 == 0:
        a = a // 2
        c += 1
    C = min(C, c)
print(C)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0
while all(i % 2 == 0 for i in L):
    L = list(map(lambda el: el//2, L))
    ans += 1

print(ans, flush=True)

Submission status: Accepted

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

Submission status: Accepted

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

result = 0

def judge(nums, result):
    l = []
    index = 0
    false = 'False'
    for num in nums:
        if num % 2 == 0:
            l.append(num)
            index += 1
            if index == len(nums):
                result += 1
                return l, result
        else:
            return false, result

def divide(nums):
    l = []
    for num in nums:
        a = num / 2
        l.append(a)
    return l


j_l, result = judge(num_l, result)

while True:
    if j_l == 'False':
        print(result)
        break
    else:
        re_l = divide(j_l)
        j_l, result = judge(re_l, result)

Submission status: Accepted

Solution code:

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

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

print(count)

Submission status: Accepted

Solution code:
# --- cofing: utf-8 ---

n = int(input())

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

def mod2(a, cnt):
    if sum([i % 2 for i in a]) == 0:
        a = [i / 2 for i in a]
        cnt += 1
        return mod2(a, cnt)
    else:
        return cnt

print(mod2(a, 0))

Submission status: Accepted

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

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

Submission status: Accepted

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

while True:
    for i in range(N):
        ss=a[i]%2
        if ss==0:
            a[i]=a[i]/2 
        else:
            print(j)
            exit()
    j+=1

Submission status: Accepted

Solution code:
s = input()

n = int(s)

numbers = []
answer = 0
check = True

v  =input().split()

for i in range(n):
    numbers.append(int(v[i]))

while (check):
    for i in range(len(numbers)):
        if numbers[i] % 2 == 1:
            check = False
        else:
            numbers[i] /= 2
    if check:
        answer += 1

print(answer)

Submission status: Accepted

Solution code:
import numpy as np

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

while True:
  if np.all(A%2==0):
    A=A//2
    ans+=1
  else:
    print(ans)
    break

Submission status: Accepted

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

ans = 0;
l = len(A)
while(True):
  A = list(filter(lambda x: x%2==0, A))
  if len(A) is not l:
    break
  A = list([x//2 for x in A])
  ans += 1
  
print(ans)

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int, input().split()))
ans=10**9
for ai in a:
    tmp=0
    while ai%2==0:
        ai//=2
        tmp+=1
    ans=min(ans,tmp)
print(ans)

Submission status: Accepted

Solution code:
import math

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

result = 10 ** 10
for i in A:
    count = 0
    for _ in range(result):
        if i % 2 == 0:
            i /= 2
            count += 1
        else:
            break
    result = min(result, count)

print(int(result))

Submission status: Accepted

Solution code:
a = input()
suuziretu = input().split(' ')
record_times = []
for n in range(int(a)):
    times = 0
    while True:
        if int(suuziretu[n])%2 != 0 or int(suuziretu[n]) == 0:
            record_times.append(times)
            break
        if times == 0:
            b = int(suuziretu[n])
        if b % 2 == 0:
            b = b /2
            times += 1
        else:
            record_times.append(times)
            break
print(min(record_times))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

count = 0

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

    count = 0
    while True:
        for i in range(n):
            a = li[i]
            if a % 2 == 1:
                print(count)
                return 0
            li[i] = int(a/2)
        count += 1
resolve()

Submission status: Accepted

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

n = int(input())

mod2 = lambda x: x%2
div2 = lambda x: x//2

l_a = list(map(int, input().split()))
odd_flgs = list(map(mod2, l_a))

cnt = 0

while sum(odd_flgs) == 0:
    cnt += 1
    l_a = list(map(div2, l_a))
    odd_flgs = list(map(mod2, l_a))

print(cnt)

Submission status: Accepted

Solution code:
N = int(input())
num = list(map(int,input().split()))
ans = []
for i in num:
  a = format(i,('b'))[::-1].find("1")
  ans.append(a)
print(min(ans))

Submission status: Accepted

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

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

ans = min(map(divis,BB))
  
print(ans)

Submission status: Accepted

Solution code:
_ = input()
num_list = list(map(int, input().split()))
 
count = 0
 
while(True):
  is_even_list = [False if num % 2 else True for num in num_list]
  if False in is_even_list:
    break
  num_list = list(map(lambda num: num / 2, num_list))
  count += 1
 
print(count)

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

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
def main():
    n, *a = map(int, read().split())
    r = 0
    num = 2
    while True:
        c = [not (i % num) for i in a]
        if all(c):
            r += 1
            num *= 2
        else:
            break
    print(r)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n=int(input())
#a,b=map(int,input().split())
al=list(map(int,input().split()))
#l=[list(map(int,input().split())) for i in range(n)]

def chk(A):
    if all([ai%2==0 for ai in A]):
        return True
    else:
        return False
count=0
while chk(al):
    count+=1
    for i in range(n):
        al[i]=al[i]//2
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

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: Accepted

Solution code:
def div(A):
    div_A = []
    for a in A:
        if a % 2 == 1:
            return 0
        else:
            div_A.append(a // 2)
    return div_A


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

cnt = 0
while True:
    A = div(A)
    if A == 0:
        break
    else:
        cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
Array1 = int(input())
Array2 = input().split()
 
Number = 0
times = 0
 
while True:
    if int(Array2[Number ]) % 2 == 0:
        Array2[Number] = int(Array2[Number]) // 2
        Number += 1
        if Number == Array1:
            Number = 0
            times += 1
    else:
        print(times)
        break

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

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

    res = 1000
    for i in A:
        tmp = i
        cnt = 0
        while(tmp%2==0):
            tmp//=2
            cnt+=1
        res = min(res,cnt)
    print(res)
if __name__ == '__main__':
    main()