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

import sys

MOD = 2  


def solve(N: int, A: "List[int]"):
    count = 0
    def func(count, lists):
        B = []
        for n in lists:
            if n % 2 != 0:
                print(count)
                break
            else:
                B.append(n/2)
        else:
            count += 1
            func(count, B)
    
    func(count, A)

    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    A = [int(next(tokens)) for _ in range(N)]  
    solve(N, A)

if __name__ == '__main__':
    main()

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

Solution (Python):


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

def calc():
  cnt = 0
  while True:
    for i in range(len(nums)):
      num = nums[i]
      if num % 2 == 0 and num != 0:
        nums[i] = num / 2
      else:
        return cnt
    else:
      cnt += 1

print(calc())

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

count = 0
while True:
    sum = 0
    for i in range(N):
        if A[i] % 2 == 0:
            sum += 1
    if sum != N:
        print(count)
        break
    else:
        A = list(map(lambda x:x/2, A))
        count=count+1

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
ans=0
for i in range(100):
  for j in range(n):
    if a[j] % 2 ==0:
      a[j]=a[j]//2
      if j==n-1:
        ans+=1
    else:
      break
  else:
    continue
  break
print(ans)

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

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

for a in A:
    check = 0
    count = 0
    while check == 0:
        if a % 2 == 0:
            a = a / 2
            count += 1
        else:
            check = 1
    N.append(count)

ans = min(N)
print(ans)

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

cnt = [0]*n
j = 0
for i in a_int:
    m = i
    while m%2==0:
        m = m/2
        cnt[j] += 1
    j += 1
print(min(cnt))

Solution (Python):
num = int(input())

ls = list(map(int,input().split()))
cnt = 0

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

print(cnt)

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

n = int(input())
line = map(int , input().split())
answer = min(map(how_many , line))
             
print(answer)

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
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):
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()))
c = 0
while all(a%2==0 for a in A):
    A = [int(a/2) for a in A]
    c += 1
print(c)

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

count = 0
while True:
    flag = True
    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 += 1
    
print(count)

Solution (Python):
N = int(input())
A = [int(i) for i in input().split()]
ans = 0
can_div = True
while can_div:
    for i in range(N):
        if A[i] % 2 == 0:
            A[i] = A[i] // 2
        else:
            can_div = False
            break
    if can_div:
        ans += 1
print(ans)

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

def how_many_times_divisible(n):
    times = 0
    while n % 2 == 0:
        times += 1
        n /= 2
    return times

ans = min(list(map(how_many_times_divisible, A)))
print(ans)

Solution (Python):

def numConvertHalf(numbers):
    for i in range(len(numbers)):
        numbers[i] = int(numbers[i]/2)

def checkEven(numbers):
    for i in range(len(numbers)):
        if(numbers[i] % 2 == 1):
            return False
    return True

N = int(input())
numbers = list(map(int,input().split()))
count = 0
while checkEven(numbers):
    numConvertHalf(numbers)
    count += 1
print(count)

Solution (Python):
n=int(input())
l=list(map(int,input().split()))
m=0
flag=True
while(flag):
    for i in range(len(l)):
        if l[i]%2==0:
            l[i]=l[i]/2
        else:
            flag=False
            break
    m+=1
print(m-1)

Solution (Python):
input(); print(min(map(lambda c: bin(int(c))[::-1].index("1"), input().split())))

Solution (Python):
def kansu(x):
  ans = 0
  while x % 2 == 0:
    x = x / 2
    ans = ans + 1
  return ans

n = int(input())
x =map(int,input().split())
ans = min(map(kansu, x))
          
print(ans)

Solution (Python):
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):
input()
s = list(map(int, input().split()))
ans = 0
while all(a%2==0 for a in s):
    s = [a/2 for a in s]
    ans += 1
print(ans)

Solution (Python):
n=int(input())
l=list(map(int,input().split()))
ans=0
c=True

while c == True:
    for i in range(n):
        if l[i]%2==1:
            c = False
    if c == False:
        break
    else:
        for i in range(n):
            l[i]/=2
        ans+=1
print(ans)

Solution (Python):
N= int(input())
A =[int(x) for x in input().split()]
answer=float('inf')
for i in range(N):
  cut=len(bin(A[i]))-bin(A[i]).rfind('1')-1
  answer=min(answer,cut)
print(answer)

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

ls_cnt = [0] * n

for i in range(n):
    for j in range(2**10):
        if ls_a[i] % 2 == 0:
            ls_a[i] = ls_a[i] / 2
            ls_cnt[i] += 1
        else:
            break

print(min(ls_cnt))

Solution (Python):
def divide2(n):
    return int(int(n)%2)

def divideT2(n):
    return int(int(n)/2)
    

N = int(input())
n_list = input().split()

flag = True
counter = 0
while flag == True:
    flag_list = list(map(divide2,n_list))
    if flag_list.count(1) == 0:
        n_list = list(map(divideT2,n_list))
        counter += 1
    else:
        flag = False

print(counter)

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

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

print(answer)

Solution (Python):
n = int(input())
lst = [int(i) for i in input().split()]
c = 0
while True:
    if sum([i % 2 for i in lst]) == 0:
        c += 1
        lst = [i // 2 for i in lst]
    else:
        print(c)
        quit()

Solution (Python):
N = int(input())
A = list(map(float,input().split()))
ans = 0
Flag = False
while not Flag:
    for i in range(N):
        A[i] /= 2
        if not A[i].is_integer():
            Flag = True
            break
    else:
        ans += 1
print(ans)

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

Solution (Python):
num = int(input())
val = input().split()
waru = [0] * len(val)

for i in range(num):
  while True:
    v = int(val[i])
    if v % 2 == 0:
      val[i] = str(int(v / 2))
      waru[i] += 1
    else:
      break
      
min = min(waru)

print(min)

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

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

print(cnt)

Solution (Python):
def devide(number, count):
  if number%2==0:
    count += 1
    return devide(number/2, count)
  else:
    return count

length = int(input())
str_arr = input().split(' ')
numbers = [int(s) for s in str_arr]

counts = [0 for s in str_arr]
for i in range(len(numbers)):
  counts[i] = devide(numbers[i], 0)

print(min(counts))

Solution (Python):
import numpy as np

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

ans = 0
while(all(A%2==0)):
    A = A/2
    ans += 1

print(ans)

Solution (Python):

def check(values):
  for i, value in enumerate(values):
    if (value == 0) or ((value % 2) == 1):
      return False, values
    else:
      values[i] = value / 2
  return True, values


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

cnt = 0
while True:
  flg, values = check(values)
  if not flg:
    break
  cnt += 1

print(cnt)

Solution (Python):
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):
import numpy as np

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

ans = 0
while(all(A%2==0)):
    A = A/2
    ans += 1

print(ans)

Solution (Python):
N=input()
A=[int(a) for a in input().split()]
c=0
while all(aa%2==0 for aa in A):
        c+=1
        A=[int(aaa/2) for aaa in A]
print(c)

Solution (Python):
N=input()
A=[int(a) for a in input().split()]
c=0
while True:
    if any(aa%2==1 for aa in A):
        break
    else:
        c+=1
        A=[int(aaa/2) for aaa in A]
print(c)

Solution (Python):
for_num = int(input())
nums = input()
nums = nums.split()

count = 0
Tf = True
while Tf:
    count += 1
    for i in range(0,for_num):
        num = int(nums[i])
        if num%2 == 0:
            nums[i] = int(num/2)
            Tf = True
        else:
            Tf = False
            break
print(count-1)

Solution (Python):

N = int(input())
A = list(map(int,input().split()))
n = 0
judge = 1
for i in range(40):
    if judge == 1:
        for i in range(N):
            if A[i] % 2 == 0:
                A[i] = A[i] // 2
            else:
                judge = 0
        if judge == 1:
            n += 1
    else:
        break
print(n)

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


ans = float("inf")
for a in al:
    point = 0
    while True:
        if a % 2 == 0:
            point += 1
            a = a // 2
        else:
            break
    if ans > point:
        ans = point

print(ans)

Solution (Python):
dbflag=0
def debug(*args):
	if dbflag: print(*args)

result = 0

N =  input() 
N=int(N)


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

flag= 1

while flag:
	for i in range(len(A)):
		debug(i, A[i])
		if A[i] %2 == 0:
			A[i] = A[i] //2
		else:
			flag = 0
			break
		
	if flag:
		result += 1

print(result)

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

count = 0
flag = True
while True:
    for i in range(N):
        if A_list[i] % 2 != 0:
            flag = False
            break
    if flag == False:
        break
    A_list = [A/2 for A in A_list]
    count+=1

print(count)

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

while(True):
    for i in range(len(A)):
        s += A[i]%2
    
    if s != 0:
        break
    else:
        A = list(map(lambda x:x/2,A))
        count +=1

print(count)

Solution (Python):


import numpy
import scipy

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


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

Solution (Python):
n = int(input())
an = list(map(int, input().split())) 
ans = 0
flg = 0

while not flg :
    for i, v in enumerate(an):
        if v % 2 == 0:
            v = int(v / 2)
            an[i] = v
            if i == len(an)-1:
                ans +=1
        else:
            flg = 1
            break

print(ans)

Solution (Python):

N = int(input())
s = list(map(int, input().split()))
a=[0]*N
total=0

for i in range(N):
 a[i]=int(s[i])

while 1==1:
 b=0
 for i in range(N):
  if a[i]%2==0:
        a[i]=a[i]/2
        b+=1
 if b==N:
  total+=1
 else: 
  break

print(total)

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

cou = []
for i in range(N):
    cc = 0
    while True:
        if x[i] % 2 == 0:
            x[i] /= 2
            cc+=1
        else:
            cou.append(cc) 
            break   
print(min(cou))

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

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

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

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


ans = float('inf')
for a in A:
    cnt = 0
    while a % 2 == 0:
        a //= 2
        cnt += 1
    ans = min(ans,cnt)
print(ans)

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

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

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

count = 0
ans = 0

while True:
	mo = list(map(lambda x: x % 2, A))
	if 1 in mo:
		ans = count
		break
	else:
		A = list(map(lambda x:x/2,A))
		count += 1

print(ans)

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
ans = 0
while a[0] > 1:
        for i in range(n):
                if a[i] % 2 != 0:
                        break
                else:
                        a[i] /= 2
        else:
                ans += 1
                continue
        break;

print(ans)

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):
import numpy as np

N=int(input())
A=np.asarray(list(map(int,input().split(" "))))
c=0 

while (A%2==0).all(): 
    A=A//2 
    c+=1 

print(c)

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

res = []
for a in aa:
    cnt = 0
    while a % 2 == 0:
        cnt += 1
        a = a/2
    res.append(cnt)

print(min(res))

Solution (Python):
n = int(input())
b = [int(i) for i in input().split()]
count = 0
ju = True
while(ju):
    for i in range(n):
        if b[i]%2 !=0:
            ju = False
            break
        b[i] = b[i]/2 
    if ju:
        count +=1
print(count)

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

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
c = 0
while 1:
  if any(i%2 for i in a):
    print(c)
    exit()
  c += 1
  a = [i/2 for i in a]

Solution (Python):
n=int(input())
a,b=list(map(int,input().split())),[]
for i in range(n):
    c=0
    while True:
        if a[i]//2==a[i]/2:
            a[i]//=2
            c+=1
        else:
            b.append(c)
            break
print(min(b))

Solution (Python):
import numpy as np

N = int(input())
data = np.array([int(i) for i in input().split()])


cout = 0
while 1:
    index = np.where(data%2 == 0)
    data_even = data[index]
    if len(data_even) == len(data):
        cout += 1
        data = data_even / 2
    else:
        break


print(cout)

Solution (Python):
N = int(input())
l = [i for i in map(int,input().split())]
 
iter = -1
while len(l) >= N:
    l = [i/2 for i in l if i % 2 == 0]
    iter += 1
 
print(iter)

Solution (Python):
n = input()
nums = list(int(x) for x in input().split())
a = 0
cont = True
while cont:
    for i,num in enumerate(nums):
        if num%2 == 0:
            nums[i] = num/2
        else:
            print(a)
            cont = False
            break
    a += 1

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

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

Solution (Python):
def is_all_even(ary, n):
    for i in range(n):
        if ary[i] % 2 == 1:
            return False
    return True

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

while is_all_even(A, N):
    for i in range(N):
        A[i] //= 2
    count += 1

print(count)

Solution (Python):
import numpy as np

N = int(input())
A = np.array([int(x) for x in input().split()])
ans = 0

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

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

Solution (Python):
import numpy as np

N = int(input())
A = np.array([int(x) for x in input().split()])
ans = 0

while np.all(A%2 == 0):
  A = A/2
  ans += 1

print(ans)

Solution (Python):
import numpy as np

N = int(input())
A = np.array([int(x) for x in input().split()])
ans = 0

while np.sum(A%2 == 0) == N:
  A = A/2
  ans += 1
  if np.sum(A == 0) > 0:
    break
print(ans)

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

Solution (Python):
n = input()
A= set(map(int, input().split()))

result = []
for i in A:
  r = 0
  while i %2 == 0 :
    i = i/2
    r += 1
  result.append(r)

print(min(result))

Solution (Python):

n=int(input())
cou = 0

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

while sum([i%2 for i in a_list]) == 0:
    a_list = [i/2 for i in a_list]
    cou += 1
print(cou)

Solution (Python):
import numpy as np
N = int(input())
arr =  np.array([int(i) for i in input().split()])

count = 0
while(True):
    exits_odd = False
    for i in range(N):
        if arr[i] % 2 != 0:
            exits_odd = True
        else:
            continue
    if exits_odd:
        break
    else:
        count += 1
        arr = arr / 2


print(count)

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

count = 0
while(True):
    exits_odd = False
    for i in range(N):
        if arr[i] % 2 != 0:
            exits_odd = True
        else:
            continue
    if exits_odd:
        break
    else:
        count += 1
        for i in range(N):
            arr[i] = arr[i] / 2


print(count)

Solution (Python):
input_n = int(input())
input_a = list(map(int, input().split()))

def calc_divtwo(n):
    return n / 2

count = 0

while (all([x%2 == 0 for x in input_a]))&(all([x != 0 for x in input_a])):
    count +=1
    input_a = list(map(calc_divtwo, input_a))
print(count)

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

Solution (Python):
N = int(input())
x = list(map(int, input().split()))
flag = True
count = 0

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

print(count)

Solution (Python):

num = int(input())
input_list = input().split()
list = []
for one in input_list:
    list.append(int(one))

count = 0
out = True
lists = [list]
while out:
    new_list = []
    for one in lists[count]:
        div = one % 2
        if div != 0:
            out = False
            break
        new_list.append(one/2)
    lists.append(new_list)
    if out:
        count = count + 1
print(count)

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
ans = 0
for i in range(10**9):
    x=0
    for j in range(N):
        tmp = 0
        if A[j] % 2 == 0:
            A[j] /= 2
            x = j
        else:
            x = j
            break
    if A[x] % 2 == 0:
        ans += 1
    else:
        if x == (N-1):
            ans += 1
            print(ans)
            exit()
        print(ans)
        exit()

Solution (Python):
n = int(input())
a_list = list(map(int, input().split()))
ans = 0
while True:
  if [i for i in a_list if i % 2 == 1]:
      break
  a_list = list(map(lambda x:x/2 , a_list))
  ans += 1
print(ans)

Solution (Python):
from sys import stdin

n = int(stdin.readline().rstrip())

mi = 10**6
li = list(map(int,stdin.readline().rstrip().split()))
def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

for i in li:
    lin = prime_factorize(i)
    mi = min(mi,lin.count(2))

print(mi)

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

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

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

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

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")

def main():
    n = input()
    aa = list(map(int, input().split()))
    ans = 0
    b = 2
    while 1:
        for a in aa:
            if a % b:
                print(ans)
                exit()
        ans += 1
        b *= 2

main()

Solution (Python):
x=int(input())
x_lst=list(map(int,input().split()))
count = 0
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

if x==1:
    print(x[0])
else:
    element = gcd(x_lst[0], x_lst[1])
    if x==2:print(element)
    else:
        for i in range(2,x):
            element=gcd(element,x_lst[i])
while element % 2 == 0:
  element = element / 2
  count += 1
print(count)

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

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

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

Solution (Python):
def calc(list_, len_list):
    def check_even():
        for l in list_:
            if l % 2 == 1:
                return False
        return True
    def half():
        for i in range(len_list):
            list_[i] //= 2

    counter = 0
    while True:
        if check_even():
            half()
            counter += 1
        else:
            print(counter)
            break

N = int(input())
A = [int(a) for a in input().split(" ")]
calc(A, N)

Solution (Python):

import collections

N = int(input())
A_list = [int(e) for e in input().split()]


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

counted_list = [prime_factorize(A*2).count(2)-1 for A in A_list] 
print(min(counted_list))

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

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

print(ans)

Solution (Python):
def division_nankai_2(n):
  answer = 0
  while n % 2 == 0:
    answer += 1
    n = n // 2
  return answer
 
total = int(input())
div = []
numbers = map(int, input().split())
for i in numbers:
  div.append(division_nankai_2(i))
print(min(div))

Solution (Python):
N=int(input())
A=list(map(int,input().split()))
 
flg=1
count=0
while True:
    for i in A: 
        if i%2==1:
            flg=0
            break

    if flg==1:
        for i in range(N):
            A[i]=A[i]//2
        count+=1
    else:
        break
print(count)

Solution (Python):
def examB():
    N = I()
    A = LI()
    cur = -1
    flag=True
    while(flag):
        for i in range(N):
            if A[i]%2==1:
                flag = False
                break
            A[i]=A[i]//2
        cur +=1
    print(cur)

import sys,copy,bisect,itertools
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def S(): return sys.stdin.readline().strip()
mod = 10**9 + 7
inf = float('inf')

examB()

Solution (Python):

N = int(input())

numbers = list(map(int, input().split()))
counter = 0

while all(number % 2 == 0 for number in numbers):
    numbers = [number / 2 for number in numbers]
    counter += 1

print(counter)

Solution (Python):
def main():
    _ = input()
    li = list(map(int, input().split()))

    cnt = 0
    while True:
        if 1 in [x % 2 for x in li]:
            break
        else:
            cnt += 1
            li = [x // 2 for x in li]
    print(cnt)


if __name__ == '__main__':
    main()

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

Solution (Python):
def main():
    N = int(input())
    li = list(map(int, input().split()))

    num_of_operation = 0
    is_dividable = True

    while True:
        for num in li:
            if num % 2 != 0:
                is_dividable = False
                break

        if not is_dividable:
            break

        for i in range(N):
            li[i] //= 2
        num_of_operation += 1

    print(num_of_operation)


if __name__ == '__main__':
    main()

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

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

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

max_trial = 99999999
for a in A:
    trial = 0
    while a % 2 == 0:
        trial += 1
        a /= 2
        
    max_trial = min(max_trial, trial)

print(max_trial)

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


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

print(a)

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

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

Solution (Python):
N = int(input())
As = input().split()
As = [int(A) for A in As]
count = 0
terminate = False
for _ in range(100):
    new_As = []
    for A in As:
        if A % 2 == 1:
            terminate == True
            break
        else:
            new_As.append(int(A/2))
    if len(new_As) == len(As):
        As = new_As
        count += 1
    else:
        break
print(count)

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

counter = 0

while all(number % 2 == 0 for number in numbers):
    numbers = [number / 2 for number in numbers]
    counter += 1

print(counter)

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

c = 0

while True:
  f = False
  for i in a:
    if i % 2 == 1:
      f = True
  if f == True:
    break

  for index, i in enumerate(a):
    a[index] /= 2

  c += 1

print(c)

Solution (Python):
N= int(input())
A =[int(x) for x in input().split()]
answer=float('inf')
for i in range(N):
  cut=len(bin(A[i]))-bin(A[i]).rfind('1')-1
  answer=min(answer,cut)
print(answer)

Solution (Python):
def divide_all(a):
    success = True
    for i, n in enumerate(a):
        if n % 2 != 0:
            success = False
            break
        a[i] = n / 2
    if success is False:
        return (a, False)
    return (a, True)

n = int(input())
a = list(map(int, input().split()))
c = 0
while True:
    a, r = divide_all(a)
    if r is False:
        break
    c += 1


print(c)

Solution (Python):
import numpy as np



def f():
    i = int(input())
    nums = np.array(list(map(int, input().split())))
    
    c = 0
    while True:
        if any(nums % 2 == 1):
            break
        c += 1
        nums = nums / 2
    print(c)


f()

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

while judge==True:
    A=[int(i/2) if i%2==0 else i/2 for i in A]
    for j in A:
        if isinstance(j,int)==False:
            judge=False
            break
    count=count+1
print(count-1)

Solution (Python):

a = input()
b = input()
count = int(a)
num = []

for k in range(count):
    num.append(int(b.split()[k]))

result = 0
division = True
while division:
    div = 0
    for i in range(count):
        if num[i]%2 == 0:
            div += 1
    if div == count:
        for j in range(count):
            num.append(num.pop(0)/2)
        result += 1
    else:
        division = False

print(result)