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 = input()
a = map(int,raw_input().split())
flag = 0
count = 0
while 1:
    for i in range(n):
        if a[i] % 2 != 0:
            flag = 1
            break
        else:
            a[i] /= 2
    if flag == 1: break
    count+=1
print count

Submission status: Accepted

Solution code:
# ABC081 B

def main():
    n = int(input())
    A = list(map(int, input().split()))

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

        result += 1
    
    print(result)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())

a_N = []
a_N = [int(i) for i in input().split(" ")]
# 別の標準入力
# a = list(map(int, input().split()))

num = 0

while(1):
	for i in range(N):
		if(a_N[i] % 2 != 0):
			break
		a_N[i] /= 2
	else:
		num += 1
		continue
	break

print(num)

Submission status: Accepted

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

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

Submission status: Accepted

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

INF = float('inf')


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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# coding: utf-8

N = int(input())
a = list(map(int, input().split())) #A_1,A_2…を入れる

sum = -1
b = 0

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

print(sum)

Submission status: Accepted

Solution code:
n = int(input())
*a, = 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()))
k=0
while True:
    for j in range(n):
        if a[j]%2==0:
            a[j]/=2
            if j==n-1:
                k+=1
            else:pass
        else:
            print(k)
            exit()

Submission status: Accepted

Solution code:
import numpy as np

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

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

print(ans)

Submission status: Accepted

Solution code:
n = int(input())

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

n_list = []
for a in a_list:
    if int(a) % 2 != 0:
        n_list.append(0)
        break
    else:
        i = 0
        while int(a) > 1 and int(a) % 2 == 0:
            a = int(a) / 2
            i += 1
    n_list.append(i)
print(min(n_list))

Submission status: Accepted

Solution code:
import numpy as np

n=int(input())
A=np.array(list(map(int,input().split())))
ans=0
while all((A%2)==0):
    ans+=1
    A//=2
print(ans)

Submission status: Accepted

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

ans = []

for i in range(n):
    tmp = a[i]
    cnt = 0
    for _ in range(1000):
        if tmp % 2 != 0:
            ans.append(0)
        tmp = tmp // 2
        cnt +=1
        if tmp % 2 != 0:
            ans.append(cnt)
            break
print(min(ans))

Submission status: Accepted

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

while True:
  for i in range(N):
    if A[i] % 2 == 0 and i != N-1:
      A[i] //= 2
    elif A[i] % 2 == 0 and i == N-1:
      A[i] //= 2
      cnt += 1
    else:
      print(cnt)
      exit()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = input()
nums = list(map(int, input().split()))
ans = float('inf')
for n in nums:
    bin_n = bin(n)
    ans = min(ans, len(bin_n) - bin_n.rfind('1') - 1)
print(ans)

Submission status: Accepted

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

iter_num_list = []
for a in A_list:
    count = 0
    while a%2 == 0:
        a = a/2
        count += 1
    iter_num_list.append(count)
ans = sorted(iter_num_list)[0]
print(ans)

Submission status: Accepted

Solution code:
#(問3)ANS-1
import sys
lines = sys.stdin.readlines()
N = lines[0]
N = N.strip()
A = lines[1]
A_iter = map(int,A.split()) #イテレータを生成
A_list = []
for i in A_iter:
    A_list.append(i)

iter_num_list = []
for a in A_list:
    count = 0
    while a%2 == 0:
        a = a/2
        count += 1
    iter_num_list.append(count)
ans = sorted(iter_num_list)[0]
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
A = list(map(int, input().split()))
ans = 1
flag = True

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

    if flag == False:
        break
    ans = ans + 1

print(ans - 1)

Submission status: Accepted

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

count=0
flag = False

while True:
    for j in range(N):
            if arr[j]%2 == 0:
                arr[j] /=2
            elif arr[j]%2 != 0:
                flag = True
                break

    if flag == True:
        break
    count += 1

print(count)

Submission status: Accepted

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

count=0
flag = False

while True:
    for j in range(N):
            if arr[j]%2 == 0:
                arr[j] /=2
            elif arr[j]%2 != 0:
                flag = True
                break
    count += 1
    if flag == True:
        break

print(count-1)

Submission status: Accepted

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

cnt = [ 0 for _ in range(n) ]
for i in range(n):
    c = 0
    while True:
        if a[i] & 1:
            break
        c += 1
        a[i] //= 2
    cnt[i] = c

print(min(cnt))

Submission status: Accepted

Solution code:
def nyu():
    num1= input()
    num1 = int(num1)
    num2 = list(map(int,input().split()))
    #num2 = int(num2)
    return num1,num2


def check(A):
    max = 999999
    count = 0
    flg = 0
    for x in list(A):
        flg = 0
        count = 0
        while flg == 0:
            if x % 2 == 0:
                x = x/2
                count +=1
            else:
                if count<max:
                    max =count
                flg =1
                break   
    print(max)
             

N,A = nyu()
check(A)

Submission status: Accepted

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

s = 0
while 0 not in a:
    for i,elem in enumerate(a):
        if elem % 2 != 0:
            print(s)
            sys.exit()
        else:
            a[i] /= 2

    s += 1

print(s)

Submission status: Accepted

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

cnt = 0
endflag = False

while(True):
  for i in range(0,a):
    if ((b[i] %2 ) == 0):
      b[i] = b[i] / 2
    else:
      endflag = True
      break
  if (endflag):
    break
  cnt = cnt + 1

print(cnt)

Submission status: Accepted

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

_ = input()
print(min(map(lambda x: how_many_times_divisible(int(x)), input().split())))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()) )
n = -1
COND = True


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

print(n)

Submission status: Accepted

Solution code:
def wari(x):
    x=x/2
    if x%1==0:
        return x
    else:
        return -1
n=int(input())
a=list(map(int,input().split()))
s=0
while True:
    a=list(map(wari,a))
    if -1 in a:break
    else:
      s+=1
      
print(s)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 入力
n = int(input())
a = [int(num) for num in input().split()]

# 主処理
count = 0
isEven = True
while isEven:
  for num in a:
    isEven = num % 2 == 0 and isEven
  if isEven:
    a = [num/2 for num in a]
    count += 1

# 出力
print(count)

Submission status: Accepted

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

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


print(count)

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,input().split()))
cnt=0
count=0
for i in range(n):
            if a[i]%2 !=0:
                        print(0)
                        exit()
            else:
                        for k in range(10**6):
                                    for i in range(n):
                                                if a[i]%2 ==0:
                                                            cnt+=1
                                                            #print('cnt1',cnt)
                                                            a[i]=a[i]//2
                                                            #print(a)
                                                            if cnt==n:
                                                                        count+=1
                                                                        cnt=0
                                                                        #print('cnt',cnt,'count',count)
                                                else:
                                                            print(count)
                                                            exit()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# B: Shift Only
# 標準入力の取得
N = int(input())
A_list = list(map(int, input().split()))

# 操作回数の算出
operation_count = 0 # 操作回数
can_operate = True # 操作可能であるかどうか
while can_operate:
    operation_count += 1
    # リスト内の各要素に操作を実施
    for i in range(len(A_list)):
        remainder = A_list[i] % 2
        if remainder == 0:
            # 偶数の場合、要素を更新
            A_list[i] /= 2
        else:
            # 奇数の場合、操作不可能とし、操作回数を1引いておく
            can_operate = False
            operation_count -= 1
            break

print(operation_count)

Submission status: Accepted

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

while(True):
    if(any(x%2==1 or x==0 for x in A)): break
    A = list(int(x/2) for x in A)
    count += 1
print(count)

Submission status: Accepted

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

ans = 0
B = []
for a in A:
    cnt = 0
    while a % 2 == 0:
        a //= 2
        cnt += 1
    B.append(cnt)

print(min(B))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

def bisect_array(array):
    for i in range(len(array)):
        array[i] = array[i] / 2
    return array

while boolean:
    for i in A:
        if i % 2 != 0:
            boolean = False
    if boolean == True:count += 1
    A = bisect_array(A)

print(count)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

    if temp != 1:
        arr.append([temp, 1])

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

    return arr


def main():
    n = int(input())
    As = list(map(int, input().split()))

    ans = float("inf")
    for i in range(n):
        if factorization(As[i])[0][0] != 2:
            ans = 0
            break
        else:
            ans = min(ans, factorization(As[i])[0][1])
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

i = 0
ans = 0

even_count = N

while even_count == N:
  even_count = 0
  i = 0

  while i < N:
    a = int(A[i])
    if a % 2 == 0:
      even_count += 1
      A[i] = a // 2
      i += 1
    else:
      break

  if even_count == N:
    ans += 1
  else:
    break

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input()

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

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

Submission status: Accepted

Solution code:
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:
a = input();
s = input().split()
b = 0;
c = True;
d = 0;
while c:
    d = 0
    for i in range(len(s)):
        if int(s[i]) % 2 == 0:
            s[i] = int(s[i]) / 2
            d = d + 1
        else:
            c = False
            break;
        if d == len(s):
            b = b + 1
print(b)

Submission status: Accepted

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

ans = 100

for i in A:
    tmp = i
    cnt = 0
    while tmp%2 == 0 and tmp > 0:
        tmp //= 2
        cnt += 1
    ans = min(ans,cnt)

print(ans)

Submission status: Accepted

Solution code:
import sys
INF = 10 ** 9
MOD = 10 ** 9 + 7
from collections import deque
sys.setrecursionlimit(100000000)

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

def main():
    n = int(input())
    a = list(map(int,input().split()))
    ans = INF
    for num in a:
        ans = min(ans,cnt2(num))
    
    print(ans)

if __name__=='__main__':
    main()

Submission status: Accepted

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

cout=0
while True:

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

	cout+=1
	for i in range(n):
		a[i]=a[i]/2


print(cout)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input()
l = list(map(int, input().split()))
count = 0
while True:
  t = list(filter(lambda x:x % 2 != 0, l))
  if len(t) > 0:
    break
  l = list(map(lambda x:x/2, l))

  count += 1

print(count)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))
ans = 10**9  # テキトーに大きな値入れておく
for i in range(n):
    if a[i] % 2 == 1:
        print(0)
        quit()

    count = 0
    while a[i] % 2 == 0:
      a[i] //= 2
      count += 1
    ans = min(ans, count)

print(ans)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))
ans = 10**9  # テキトーに大きな値入れておく
for i in range(n):
    count = 0
    while a[i] % 2 == 0:
      a[i] //= 2
      count += 1
    ans = min(ans, count)

print(ans)

Submission status: Accepted

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

print(min(counter))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
a=map(int,input().split())
ans=float("inf")
for i in a:
    ans=min(ans,len(bin(i))-bin(i).rfind("1")-1)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# ABC 081 B - Shift only
# https://atcoder.jp/contests/abc081/tasks/abc081_b

# cf. [AtCoder に登録したら解くべき精選過去問 10 問を Crystal で解いてみた](https://qiita.com/tomerun/items/23ce2a2ed6ead291d222)
# 第3問

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
n = input()
a = list(map(int, input().split()))
ans = float('inf')
for i in a:
  ans = min(ans, len(bin(i)) - bin(i).rfind('1') - 1)
print(round(ans))

Submission status: Accepted

Solution code:
import math
import string


def readints():
    return list(map(int, input().split()))


def nCr(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor


# coordinates
dx = [-1, -1, -1, 0, 0, 1, 1, 1]
dy = [-1, 0, 1, -1, 1, -1, 0, 1]

n = int(input())
a = readints()

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

Submission status: Accepted

Solution code:
N = int(input())
nums = [int(i) for i in input().split()]
count = 0
while all(n % 2 == 0 for n in nums):
  nums = [n/2 for n in nums]
  count = count + 1
print(count)

Submission status: Accepted

Solution code:
#例題3
x = 100000

N = int(input())
if N <=200:
    A = list(map(int,input().split()))
    for i in range(N):
            y = 0
            #print('A' + str(i+1) +'='+ str(A[i]))
            while A[i] % 2 == 0:
                y += 1
                A[i] = A[i]//2
            if x > y:
                x = y

else:
    print('error')
    
print(x)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

n = 0

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

print(n)

Submission status: Accepted

Solution code:
N = int(input())
A = [int(x) for x in input().split()]
cnt = 0
while True:
    if len(A) == A.count(0):
        break
    if len([x for x in A if x%2 == 0]) == len(A):
        A = [x//2 for x in A]
        cnt += 1
    else:
        break
print(cnt)

Submission status: Accepted

Solution code:
n = int(input())
a_list = [int(num) for num in list(input().split(" "))]

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

print(ope_count)

Submission status: Accepted

Solution code:
import sys
from math import sqrt

input = sys.stdin.readline


def I():
    return int(sys.stdin.readline())


def MI():
    return map(int, sys.stdin.readline().split())


inf = float("inf")
mod = 10 ** 9 + 7


def main():
    _ = I()
    a_list = MI()

    min = inf
    for a in a_list:
        c = 0
        while a % 2 == 0 and c < min:
            c += 1
            a /= 2

        if min > c:
            min = c

    print(min)
    pass


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N = int(input())
box = list(map(int, input().split()))
mcnt = float('inf')
for b in box:
    cnt = 0
    while b % 2 == 0:
        b = b // 2
        cnt += 1
        if cnt > mcnt:
            break
    if cnt < mcnt:
        mcnt = cnt
print(mcnt)

Submission status: Accepted

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

Submission status: Accepted

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

while True:
  if[i for i in a if i%2==1]:
    break
  a=[i/2 for i in a]
  ans+=1
print(ans)

Submission status: Accepted

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

cnt = 0
flag = False
while True:
    for a in arr:
        if a == 0 or a == 1 or a % 2 == 1:
            flag = True
            break

    if flag:
        break

    arr = [a // 2 for a in arr]
    cnt += 1

print(cnt)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math
n = input()
a = list(map(int,input().split()))
ans = float("inf")
for i in a:
    ans = min(ans,len(bin(i))-bin(i).rfind("1") - 1)
print(round(ans))

Submission status: Accepted

Solution code:
N = 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())
num = list(map(int, input().split(" ")))
oparation = 10 ** 8

for i in range(N):
    temp = 0
    while(1):
        if(num[i] % 2 or num[i] == 0):
            break
        else:
            num[i] /= 2
            temp += 1
    if(oparation > temp):
        oparation = temp
        
print(oparation)

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())
nums = [int(i) for i in input().split()]
ans = 0
while True:
  if [i for i in nums if i % 2 == 1]:
  	break
  nums = [i//2 for i in nums]
  ans += 1 
print(ans)

Submission status: Accepted

Solution code:
import math
n = input()
a = list(map(int, input().split()))
ans = float("inf")
for i in a:
  ans = min(ans, len(bin(i)) -bin(i).rfind("1") - 1)
print(round(ans))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

count = 0

while True:
  for d in data:
    if d % 2 != 0:
      print(count)
      exit()
  data = [i/2 for i in data]
  count += 1

Submission status: Accepted

Solution code:
N = int(input())
list = list(map(int, input().split()))
c = 0
b = True

while b == True:
    for i in range(0,len(list)):
        if list[i] % 2 != 0:
            b = False
        else:
            list[i] = list[i] / 2
    if b == False:
        break
    c += 1

print(c)

Submission status: Accepted

Solution code:
import sys

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

cnt=0
while 1:
  for i in range(n):
    if aa[i]%2>0:
      print(cnt)
      sys.exit()
    aa[i]=aa[i]//2
  cnt+=1

Submission status: Accepted

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

while not any([n%2 for n in num]):
    num = [n/2 for n in num]
    count += 1
print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve():
    N = int(input())
    A = list(map(int, input().split()))
    
    ans = 10 ** 9
    for i in range(N):
        cnt = 0
        ai = A[i]
        while 1:
            if ai % 2 == 0:
                ai //= 2
                cnt += 1
            else:
                break
        ans = min(ans, cnt)
    print(ans)


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
ans = 0
def even(x):
    return x%2 == 0
 
def loop(ans, a):
    while(True):
        #print(a)
        for i in range(n):
            if even(a[i]):
                a[i] = a[i]//2
            else:
                return ans
        ans += 1
    return ans
 
ans = loop(ans, a)
print(ans)

Submission status: Accepted

Solution code:
n = input()
a = [bin(int(x))[2:] for x in input().split()]
a = [len(x) - (x.rfind('1') + 1) for x in a]
print(min(a))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

def devision(num_list, count):
    new_num_list = []
    for num in num_list:
        if num%2 ==0:
            new_num_list.append(num//2)
        else:
            print(count)
            return
    count += 1
    return devision(new_num_list, count)

devision(num_list, 0)

Submission status: Accepted

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

c = 0

def is_even(n):
    if n % 2 == 0:
        return True
    
    else:
        return False

while True:
    if list(map(is_even, a)).count(True) == n:
        c += 1
    
    else:
        break
    
    a = list(map(lambda x: int(x/2), a))
    
print(c)