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

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
x = 'Y'
num = -1
while x == 'Y':
    l = []
    num += 1
    for i in a:
        if i%2 == 0:
            l.append(i//2)
        else:
            x = 'N'
            break
    a = l
print(num)

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

ans = 0

def func(array):
    for i in range(len(array)):
        if array[i]%2 != 0:
            return False
        else:
            array[i] = array[i]//2
    return True


while True:
    if len(A) == A.count(0):
        break
    if func(A):
        ans += 1
    else:
        break

print(ans)

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

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

Solution (Python):
import sys

N = int(input())
Ai = map(lambda x:int(x),input().split(" "))
 
def f(arg_list):
    even_arg_list = []
    for i in arg_list:
        if i % 2 == 0:
            even_arg_list.append(i/2)
        else:
            return False
    return even_arg_list


counter = 0
while True:
    Ai = f(Ai)
    if Ai == False:
        print(counter)
        sys.exit()
    counter+=1

Solution (Python):

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

ans = 0

_break = False

while _break == False:
    
    for i in range(n):

        

        
        if a_list[i] % 2 == 0 :

            a_list[i] = a_list[i] / 2

            
            if i == n - 1 :
                ans += 1
        
        else :
            _break = True
            break

print(ans)

Solution (Python):

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

def div_2():
    for i in range(N):
        if A[i] % 2 == 0:
            A[i] //=  2
        else :
            return False
    return A

count = 0
while True:
    if div_2() != False:
        count += 1
    else:
        break
print(count)

Solution (Python):
num = int(input())
vals = list(input().split())

ivals = []
for i in range(num):
  ival = int(vals[i])
  ivals.append(ival)

count = 0
check_flag=0

def is_odd(n):
    """ 奇数判定関数 """
    return (n%2) == 1

while check_flag==0:
  for i in range(num):
    if (ivals[i])%2 != 0:
      check_flag=1
      break
    else:
      ivals[i]=ivals[i]/2
  
  if check_flag==0:
    count+=1

print(count)

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

Solution (Python):
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np
from functools import reduce

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

n = ri()
li = rl()
cnt = 0
while all([i % 2 == 0 for i in li]):
    li = [i // 2 for i in li]
    cnt += 1
print(cnt)

Solution (Python):
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))

Solution (Python):
n=int(input())
A=list(map(int,input().split()))
cnt=0
for i in range(500000000):
  for j in range(n):
    if A[j]%2==1:
      print(cnt)
      exit();
    else:
      A[j]//=2
  cnt+=1
print(cnt)

Solution (Python):
import math

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

Solution (Python):
numLength = int(input())
numList = input().split()
count = 0
flag = True
while flag:
  for i in range(numLength):
    numList[i] = int(numList[i])
    if not numList[i] % 2 == 0:
      print(count)
      flag = False
      break
    numList[i] /= 2
  count += 1

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

t = True
x = -1

while t == True:
  x += 1
  for i in a:
    if i%2 == 0:
      continue
    else:
      t = False
  a = list(map(lambda x:x/2, a))  

      
print(x)

Solution (Python):









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

def func(a):
    rtn = 0
    while a % 2 == 0:
        a //= 2
        rtn+=1
    return rtn

for i in range(n):
    a[i] = func(a[i])
print(min(a))

Solution (Python):









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

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

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
ans = 30
for i in range(N):
  count = 0
  while A[i] % 2 == 0:
    A[i] //= 2
    count += 1
  if count < ans:
    ans = count
print(ans)

Solution (Python):
am = int(input())
arr = list(map(int,input().split()))
out = [0]*am
for i in range(am):
  while arr[i]&1 == 0:
    out[i]+=1
    arr[i]= arr[i]//2
print(min(out))

Solution (Python):
n=int(input())
a=[int(i)for i in input().split()]
d=lambda x:x/2

def devide(x,lst):
    global d
    for i in lst:
        if i%2 ==1:
            return x
    return devide(x+1,list(map(d,lst)))

print(devide(0,a))

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

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

Solution (Python):
import os, sys, math
if os.environ.get("DEBUG") is not None:
    sys.stdin = open("in.txt", "r")
rl = sys.stdin.readline

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

ans = math.inf
for it in a:
    cnt = 0
    while it > 0 and it % 2 == 0:
        it /= 2
        cnt += 1
    ans = min(ans, cnt)
print(ans)

Solution (Python):
import os, sys
if os.environ.get("DEBUG") is not None:
    sys.stdin = open("in.txt", "r")
rl = sys.stdin.readline

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

ans = 987654321
for it in a:
    cnt = 0
    while it > 0 and it % 2 == 0:
        it /= 2
        cnt += 1
    ans = min(ans, cnt)
print(ans)

Solution (Python):
def counter(s):
    return len(bin(s))-(bin(s).rfind("1")+1)

n = input()
a = input()
b = map(int,a.split(" "))
c = map(counter,b)
d = min(c)
print(d)

Solution (Python):

def resolve():
    import sys
    input = sys.stdin.readline
    
    
    n = int(input().rstrip())
    a_list = [int(x) for x in input().rstrip().split(" ")]

    def get_num(num, max_count):
        count = 0
        while num % 2 == 0 and count < max_count:
            num = num // 2
            count += 1
        return count

    first = True
    ans = float('inf')
    for a in a_list:
        count = get_num(a, ans)
        if ans > count:
            ans = count

    print(ans)


if __name__ == "__main__":
    resolve()

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
ans = 0
def yo(n):
    return n%2
def waru(n):
    return int(n / 2)

for i in range(200):
    B = list(map(yo, A))
    if sum(B) == 0:
        A = list(map(waru, A))
        ans += 1
print(ans)

Solution (Python):

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

def check_even(int_list):
    for i in int_list:
        if i % 2 == 1:
            return False
    else:
        return True

def half_list(int_list):
    return [i / 2 for i in int_list]
    
for i in range(50):
    if check_even(int_list):
        int_list = half_list(int_list)
    else:
        print(i)
        break

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
i,c=0,0
while True:
    if a[i]%2==0:
        a[i]=a[i]/2
        i=i+1
    else:
        print(c)
        break
    if i==n-1:
        i=0
        c+=1

Solution (Python):
N = int(input())
A = list(map(int,input().split()))
flag = False

for i in range(1,max(A)):
  a = 2 ** i
  for n in range(N):
    if A[n] % a != 0:
      flag = True
      break
  if flag:
    break
    
print(i-1)

Solution (Python):

n = input()
a = [int(s) for s in input().split()]
r = 0

def checkNum(l, c):
    for i in l:
        if (i % 2 != 0):
            return c

    c += 1
    return checkNum([j / 2 for j in l], c)

print(checkNum(a, r))

Solution (Python):
def d_2_c(n):
  a = 0
  while(n % 2 == 0):
    n = int(n/2)
    a += 1
  return a

N = input()
print(min(list(map(lambda a: d_2_c(int(a)), input().split(" ")))))

Solution (Python):
N=int(input())
a=list(map(int, input().split()))
ans = 100000000
for i in range(N):
  d = 0
  while (a[i] %2 == 0):
    d += 1
    a[i] //= 2
  ans = min(d,ans)
print(ans)

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

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

Solution (Python):
import numpy as np

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

count = 0
while np.all(a%2==0):
    count+=1
    a=a/2
print(count)

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

for i in range(n):
    count = 0
    for j in reversed(bin(a[i])):
        if j == '0':
            count+=1
        else:
            break
    a[i] = count

print(min(a))

Solution (Python):
import math 
N = int(input())
A = map(int,input().split())
B = map(bin,A)
def Y(x):
  y = len(x)-x.rfind("1")-1
  return y
C = map(Y,B)
print(min(C))

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
r = 0
while True:
    f = False
    for i, a in enumerate(A):
        if a%2 != 0:
            f = True
        A[i] = a//2
    if f: break
    r += 1
print(r)

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

ans = 0

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

print(ans)

Solution (Python):
N=int(input())
A=list(map(int,input().split()))
MIN=10**9
for i in range(N):
  count=0
  while 1:
    if A[i] % 2 == 0:
      A[i] //= 2
    else:
      break
    count += 1
  MIN = min(MIN,count)
  if MIN==0:
    print(0)
    exit()
print(MIN)

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

Solution (Python):
from math import gcd
n = int(input())
a = list(map(int, input().split()))
ans = a[0]
for i in range(1, n):
    ans = gcd(ans, a[i])
cnt = 0
while ans % 2 == 0:
    ans //= 2
    cnt += 1
print(cnt)

Solution (Python):
import sys


inint = lambda: int(sys.stdin.readline())
inintm = lambda: map(int, sys.stdin.readline().split())
inintl = lambda: list(inintm())
instrm = lambda: map(str, sys.stdin.readline().split())
instrl = lambda: list(instrm())

n = inint()
A = inintl()

ans = 10**6

for a in A:
    cnt = 0
    while a % 2 == 0:
        a /= 2
        cnt += 1
    if cnt < ans:
        ans = cnt

print(ans)

Solution (Python):
def dev(n):
    return int(n / 2)

N = int(input())
li = list(map(int, input().split()))
flag = True
an = 0
while True:
 for i in range(N):
    if li[i] % 2 != 0:
      flag = False
 if flag:
  li = list(map(dev, li))
  an += 1
 else:
     break
print(an)

Solution (Python):
n=int(input())
a= list(map(int, input().strip().split()))
def how_many_times_divisible(n):
	ans = 0
	while n % 2 == 0:
		n /= 2
		ans += 1
	return ans
ans = min(map(how_many_times_divisible, a))
print(ans)

Solution (Python):
import sys

read=sys.stdin.read
n, *a=map(int,read().split())

f=1
c=0
while f:
  for i,x in enumerate(a):
    if x%2:
      f=0
      break
    a[i]=x//2
  else:
    c+=1
print(c)

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

Solution (Python):
n = int(raw_input())
ais = map(int, raw_input().split())
c = 0
while(all([(ai % 2 ==0) for ai in ais ])):
	ais = [ai/2 for ai in ais]	
	c +=1
print c

Solution (Python):
N=int(input())
a=[int(x) for x in input().split()]
b=a
t=-1
s=0
while s==0:
  for i in range(N):
    if b[i]%2!=0:
      s=1
    b[i]=b[i]/2
  t=t+1
    
print(t)

Solution (Python):
N=int(input())
a=[int(x) for x in input().split()]
b=a
t=-1
s=0
while s==0:
  for i in range(N):
    if b[i]%2!=0:
      s=1
    b[i]=b[i]/2
  t=t+1
print(t)

Solution (Python):
N=int(input())
a=[int(x) for x in input().split()]
b=a
t=-1
s=0
while s==0:
  for i in range(N):
    if b[i]%2!=0:
      s=1
    b[i]=b[i]/2
  t=t+1
print(t)

Solution (Python):

n=int(input())
a=list(map(int,input().split()))
def f(x):
    m=0
    while x%2==0:
        m+=1
        x=x//2
    return m
print(min(f(a[i]) for i in range(n)))

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

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

Solution (Python):
n = input()
a = input()
a = list(map(int, a.split()))
i = 0
cont_flg = True
while cont_flg:
  if sum(list(map(lambda x: x % 2, a))) == 0:
  	i += 1
  	a = list(map(lambda x: x / 2, a))
  else:
    cont_flg = False
print(i)

Solution (Python):
N = int(input())
A = [int(s) for s in input().split()]

def func_half(x):
    result = 0
    if x % 2 == 0:
        i = 1
        while x % (2**i) == 0:
            result = i
            i += 1
    return result

ans = 10**9
for a in A:
    buf = func_half(a)
    if buf == 0:
        ans = 0
        break
    ans = min(ans, buf)

print(ans)

Solution (Python):
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)

Solution (Python):
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])

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):

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

Solution (Python):
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

Solution (Python):
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)

Solution (Python):

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)

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
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()

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
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

Solution (Python):
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))

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
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))
    
    cnt += 1    
    
print(cnt)

Solution (Python):
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) 
print(ans)

Solution (Python):
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()

Solution (Python):
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))

Solution (Python):
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

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
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

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
'''
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)

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
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())

Solution (Python):




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


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


print(ans)

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):



from fractions import gcd
from itertools import combinations,permutations,accumulate 

from collections import deque,defaultdict,Counter
import decimal
import re












import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7

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

Solution (Python):
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)

Solution (Python):
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())

Solution (Python):
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)

Solution (Python):

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)

Solution (Python):
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)

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

def div(x):
    return x/2

count = 0
while 1:
    flag = 0
    for num in numbers:
        if num % 2:
            flag=1
            break
    if flag==1:
        break
    count += 1
    numbers = list(map(div,numbers))

print(count)

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
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()

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
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)