Problem:


Score : 200 points

Problem Statement

There are N positive integers written on a blackboard: A_1, ..., A_N.

Snuke can perform the following operation when all integers on the blackboard are even:

Replace each integer X on the blackboard by X divided by 2.

Find the maximum possible number of operations that Snuke can perform.

Constraints

1 \leq N \leq 200

1 \leq A_i \leq 10^9

Input

Input is given from Standard Input in the following format:

N
A_1 A_2 ... A_N

Output

Print the maximum possible number of operations that Snuke can perform.

Sample Input 1

3
8 12 40

Sample Output 1

2

Initially, [8, 12, 40] are written on the blackboard.
Since all those integers are even, Snuke can perform the operation.

After the operation is performed once, [4, 6, 20] are written on the blackboard.
Since all those integers are again even, he can perform the operation.

After the operation is performed twice, [2, 3, 10] are written on the blackboard.
Now, there is an odd number 3 on the blackboard, so he cannot perform the operation any more.

Thus, Snuke can perform the operation at most twice.

Sample Input 2

4
5 6 8 10

Sample Output 2

0

Since there is an odd number 5 on the blackboard already in the beginning, Snuke cannot perform the operation at all.

Sample Input 3

6
382253568 723152896 37802240 379425024 404894720 471526144

Sample Output 3

8



Sample input:
3
8 12 40


Sample output:
2

Submission status: Accepted

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

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

print(k)

Submission status: Accepted

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

k = 0

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

print(k)

Submission status: Accepted

Solution code:
N=int(input())
A=[int(x) for x in input().split()]
ans=0
for j in range(1,10**9):
    if all(A[i]%(2**j)==0 for i in range(N)):
        ans+=1
    else:
        print(ans)
        exit()

Submission status: Accepted

Solution code:
n = int(input())
data = input().split(" ")
m = []

for i in range(n):
  count = 0
  number = int(data[i])
  bit = True
  while bit:
    if number % 2 == 0:
      count += 1
      number /= 2
    else:
      bit = False
  m.append(count)

print(min(m))

Submission status: Accepted

Solution code:
ll = []

n = int(input())

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

for e in l:
    cnt = 0
    while e % 2 == 0:
        e //= 2
        cnt += 1
    ll.append(cnt)

print(min(ll))

Submission status: Accepted

Solution code:
def resolve():
    n = int(input())
    a = [int(i) for i in input().split()]
    counter = 0
    while True:
        if sum([i % 2 for i in a]) != 0:
            break
        a = [i / 2 for i in a]
        counter += 1
        # print(f'list: {a} | counter: {counter}')
    print(counter)

resolve()

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

Submission status: Accepted

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

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())
A = list(map(int,input().split()))
ans = 0
while True:
    if sum(list(map(lambda x: x%2, A))) == 0:
        ans += 1
        A = list(map(lambda x: x//2, A))
    else:
        break
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:
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(round(ans))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A=input()
B=list(map(int,input().split()))
le = len(B)
for j in range(30):
    B=[i // 2 for i in B if i % 2 == 0]
    if len(B) == le:
        continue
    else:
        print(j)
        exit()

Submission status: Accepted

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

while fail==0:
    for i in range(n):
        if A[i]%2==1:
            fail=1
    if fail==1:
        break
    else:
        for i in range(n):
            A[i]/=2
        ans+=1

print(ans)

Submission status: Accepted

Solution code:
import sys

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

loop = 0

while (1):
  for i in l:
    if i % (2 ** (loop + 1)) != 0:
      print(loop)
      sys.exit(0)
  loop = loop + 1

Submission status: Accepted

Solution code:
n = int(input())
l = list(map(int, input().split()))
 
def hoge(x):
    for i in range(50):
        if x % 2 == 0:
            x = x//2
        else:
            break
    return i

print(min([hoge(x) for x in l]))

Submission status: Accepted

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

def hoge(x):
    for i in range(100):
        if x % 2 == 0:
            x = x//2
        else:
            break
    return i

print(min([hoge(x) for x in l]))

Submission status: Accepted

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

aa = [int (i) for i in a]
check = 0
count = -1

while check == 0:
    for i in range(n):
        if aa[i] % 2 == 0:
            aa[i] = aa[i] / 2
        else:
            check = 1
    count += 1
    if count > 100:
        break

print(count)

Submission status: Accepted

Solution code:
import sys
N=int(sys.stdin.readline().strip())
A=map(int, sys.stdin.readline().split())

def func(n):
    cnt=0
    while n%2==0:
        cnt+=1
        n/=2
    return cnt

ans=float("inf")
for x in A:
    ans=min(ans,func(x))
if ans==float("inf"):
    print 0
else:
    print ans

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin
n = int(stdin.readline().rstrip())
a = list(map(int, stdin.readline().rstrip().split()))
#A, B, C = map(int, stdin.readline().rstrip().split())
ans = 0

def calc_double(n):
    return n * 0.5

for i in range(10**9):
    for i in range(n):
        if a[i] <= 0 or a[i] % 2 == 1:
            print(ans)
            exit()
        else:
            pass
    a = list(map(calc_double, a))
    ans = ans + 1

Submission status: Accepted

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

    if c==N:
        for i in range(0, N):
            A[i] = A[i]/2

        ans+=1

print(ans)

Submission status: Accepted

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

cnt=0
okFlg = True

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

Submission status: Accepted

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

count = 0
while True:
    for i in range(n):
        if A[i]%2 == 0:
            A[i] = A[i]//2
        else:
            print(count)
            sys.exit()
    count += 1

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
ans = int(1e9)
for a in map(int, input().split()):
    res = 0
    while True:
        if a % 2 == 0:
            res += 1
            a //= 2
        else:
            break
    ans = min(ans, res)
print(ans)

Submission status: Accepted

Solution code:
c = input()
a = set(map(int, input().split()))

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

Submission status: Accepted

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

for i in range(n):
    num=a[i]
    cnt=0
    while num%2==0:
        num/=2
        cnt+=1
    ans=min(ans, cnt)

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

count = 0
ans = 0

while 1:
    for x in range(0, n):
        if A[x] % 2 == 0:
            count += 1
    if count == n:
        count = 0
        ans += 1
        for y in range(0, n):
            A[y] /= 2
    else:
        break

print(ans)

Submission status: Accepted

Solution code:
def isValid(List):
    for num in List:
        if num % 2 != 0:
            return False
    return True

n = int(input())
list_x = list(map(int, input().split(' ')))
count = 0
while  (isValid(list_x)):
    count += 1
    for i in range(n):
        list_x[i] /= 2

print(count)

Submission status: Accepted

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

print(count-1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from fractions import gcd
from functools import reduce

n = int(input())

a = tuple(map(int,input().split()))
t = reduce(gcd,a)

for i in range(t):
  if t%2**i!=0:
    print(i-1)
    break
    
if t==1:
  print(0)

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,input().split()))
ans=0
flg=0
while flg==0:
    for i in a:
        if i%2 != 0:
            flg=1
    a=list(map(lambda x: x/2,a))
    ans+=1
print(ans-1)

Submission status: Accepted

Solution code:
n = int(input())
*a, = map(int, input().split())
cnt = 0
f = True

while f:
    for j, k in enumerate(a):
        if k%2 != 0:
            f = False
        a[j] = a[j]/2
    cnt += 1 if f else 0

print(cnt)

Submission status: Accepted

Solution code:
import numpy as np
input()
print(list(reversed(np.binary_repr(np.bitwise_or.reduce(np.array(input().split(), dtype=np.int32))))).index("1"))

Submission status: Accepted

Solution code:
n = int(input())
a = map(int, input().split())
cnt = -1
flg = False
while True:
    cnt += 1
    tmp_a = []
    for ai in a:
        if ai%2 == 0:
            tmp_a.append(ai//2)
        else:
            flg = True
            break
    if flg:
        break
    a = tmp_a
print(cnt)

Submission status: Accepted

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

count = -1
stop = True
while stop:
    count = count + 1
    for i in range(v1):
        if v2[i] % 2 != 0:
            stop = False
            break
        v2[i] = v2[i] / 2
print(count)

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    A = list(map(int, input().split()))
    cnt = 0
    odd_num = 0
    #print(A)
    while odd_num == 0:
        for Ai in A:
            if Ai%2 != 0:
                odd_num+=1
        if odd_num == 0:
            cnt +=1
            #print(list(A))
            A = list(map(lambda x: x/2,A))
    print(cnt)
if __name__ == '__main__':
    main()

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 = count + 1


print(count)

Submission status: Accepted

Solution code:
# region header
import sys
import math
from bisect import bisect_left, bisect_right, insort_left, insort_right
from collections import defaultdict, deque, Counter
from copy import deepcopy
from fractions import gcd
from functools import lru_cache, reduce
from heapq import heappop, heappush
from itertools import accumulate, groupby, product, permutations, combinations, combinations_with_replacement
from math import ceil, floor, factorial, log, sqrt, sin, cos
from operator import itemgetter
from string import ascii_lowercase, ascii_uppercase, digits
sys.setrecursionlimit(10**7)
rs = lambda: sys.stdin.readline().rstrip()
ri = lambda: int(rs())
rf = lambda: float(rs())
rs_ = lambda: [_ for _ in rs().split()]
ri_ = lambda: [int(_) for _ in rs().split()]
rf_ = lambda: [float(_) for _ in rs().split()]
INF = float('inf')
MOD = 10 ** 9 + 7
PI = math.pi
# endregion
N = ri()
A = ri_()
ans = INF
for a in A:
    tmp = 0
    while a % 2 == 0:
        tmp += 1
        a = a // 2
    ans = min(tmp, ans)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = input()
A = list(map(int,input().split()))
ans=float("inf")

for i in A:
  ans = min(ans, len(bin(i))-bin(i).rfind("1")-1)
  
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

for a in A:
    ans.append(format(a, 'b')[::-1].find('1'))
print(min(ans))

Submission status: Accepted

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

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

print(count - 1)

Submission status: Accepted

Solution code:
N,A = [input() for i in range(2)]
A = list(map(int, A.split()))

EvenCount = int(N)
OperationCount = 0

while EvenCount == int(N): #リスト内が全て偶数の時
    EvenCount = 0
    for i in range(int(N)):
        if A[i] % 2 == 0:
            EvenCount += 1
            if EvenCount == int(N):
                A = [a / 2 for a in A]
                OperationCount += 1

print(OperationCount)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#import numpy as np
def main():
    N = int(input()) #count of numbers
    A = list(map(int,input().split())) # array of imput numbers

    countor = 0
    while True:
        if (1 in list(map(lambda x: x%2, A))) == True: break
        A = list(map(lambda x: x/2, A))
        countor += 1
    print(countor)

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
#import numpy as np
def main():
    N = int(input()) #count of numbers
    A = list(map(int,input().split())) # array of imput numbers

    # countor, flag = 0, 0
    # while flag == 0:
    #     #print("iteration start")
    #     A = list(map(lambda x: x/2, A))
    #     countor += 1
    #     if (1 in list(map(lambda x: x%2, A))) == True: flag = 1 
    #     #print(flag)
    # print(countor)

    countor = 0
    while True:
        #print("iteration start")
        if (1 in list(map(lambda x: x%2, A))) == True: break
        A = list(map(lambda x: x/2, A))
        countor += 1
        #print(flag)
    print(countor)

if __name__ == "__main__":
    main()

Submission status: Accepted

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

can_devide = sum([a%2 for a in a_list])==0
count = 0
while can_devide:
    count += 1
    for i, a in enumerate(a_list):
        a_list[i] = a//2
        
    can_devide = sum([a%2 for a in a_list])==0

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

print(c)

Submission status: Accepted

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

t = 0
f = False

while True :
    for i in range(n):
        if a[i] % 2 == 0 :
            a[i] //= 2
        else :
            f = True
            break

    if f == True :
        print(t)
        break
    else :
        t += 1

Submission status: Accepted

Solution code:
a = int(input())
list = list(map(int, input().split()))
cnt=0
ok = True
while ok:
    for i in list:
        if not i%2==0:
            ok = False
            break

    if ok : cnt += 1
    list = [int(i / 2) for i in list]
print(cnt)

Submission status: Accepted

Solution code:
def calc_shift_count(num):
    shift_count = 0
    while True:
        if num % 2 == 0:
            num >>= 1
            shift_count += 1
        else:
            return shift_count


N = int(input())
num_list = [int(n) for n in input().split()]

shift_count = -1
for num in num_list:
    if shift_count == -1:
        shift_count = calc_shift_count(num)
    else:
        if num % (2 << shift_count) == 0:
            continue
        else:
            shift_count = min(shift_count, calc_shift_count(num))
    if shift_count == 0:
        break

print(shift_count)

Submission status: Accepted

Solution code:
N = int(input())
*A, = 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)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import numpy as np

count=0
num_of_nums=input()
nums=np.array(input().split())
nums=nums.astype(int)

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

print(count)

Submission status: Accepted

Solution code:
def get(x):
  count=0
  while x%2==0:
    count+=1
    x=x/2
  return count
N=int(input())
A=input().split()
a=100000000000
for i in range(N):
  a=min(a,get(int(A[i])))
  
print(a)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(result)

Submission status: Accepted

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

while (bool):
    for i in range(N):
        if a[i] % 2 == 0:
            a[i] = a[i] // 2
        else:
            bool = False
            print(c)
            break    
    else:
        c += 1

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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

    t = 0
    while True:
        for i in range(N):
            if A[i] % 2 == 0:
                A[i] //= 2
            else:
                print(t)
                sys.exit()
        t += 1

main()

Submission status: Accepted

Solution code:
import sys

def main():
    N = int(input())
    A = [int(_) for _ in input().split()]

    t = 0
    while True:
        for i in range(N):
            if A[i] % 2 == 0:
                A[i] //= 2
            else:
                print(t)
                sys.exit()
        t += 1

main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
count = int(input())

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

Submission status: Accepted

Solution code:
n = input()
n = int(n)
list = [0] * n

list = input().split()

for i in range(n):
    list[i] = int(list[i])
bool = True
count = 0
while(bool):
    for i in range(len(list)):
        if(list[i]%2 == 0):
            list[i] /= 2
        else:
            bool = False
    count += 1

print(count-1)

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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


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

print(ans)

Submission status: Accepted

Solution code:
import numpy as np

def main():
    N = int(input())
    lst = np.array(list(map(int, input().split())))
    cnt = 0
    while (lst%2==0).all():
        cnt += 1
        lst = lst/2
    print(cnt)

main()

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil,sqrt
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7
#s=input().rstrip()

n=I()
A=LI()
for i in range(40):
    #print(i)
    #print(A)
    for j in range(n):
        if A[j]%2==0:
            A[j]//=2
            continue
        else:
            print(i)
            sys.exit()

Submission status: Accepted

Solution code:
input()
num_list = list(map(int, input().split()))
cnt = 1
while all(x % 2**cnt == 0 for x in num_list):
    cnt += 1
print(cnt - 1)

Submission status: Accepted

Solution code:
n = int(input())

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

ans = 1000000
for i in range(n):
  c = 0
  while a[i]%2==0:
    a[i] = a[i]/2
    c += 1
  if (c<ans):
    ans = c

print(ans)

Submission status: Accepted

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


def all_even(A):
    for a in A:
        if a % 2 != 0:
            return False
    return True


count = 0
while all_even(A):
    A = [i // 2 for i in A]
    count += 1

print(count)

Submission status: Accepted

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


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


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

print(num)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))
b = [bin(i) for i in a]
print(min([len(i)-i.rfind("1")-1 for i in b]))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())

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

while True:
  K = 0
  for i in range(N):
    if D[i] % 2 == 0:
      K += 1
  if K == N:
    for j in range(N):
      D[j] = D[j] / 2
    A += 1
  else:
    break

print(A)

Submission status: Accepted

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

min = 100000000000000000
for i in range(n):
  tmp = kokuban[i]
  atta = 0
  while tmp%2==0:
    atta += 1
    tmp //= 2
  if min > atta:
    min = atta
print(min)

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    a = list(map(int, input().split()))
    div = [0]*n
    ans = format(a[0], 'b')[::-1].find('1')
    for i, aa in enumerate(a):
        tmp = format(aa, 'b')[::-1].find('1')
        if tmp < ans:
            ans = tmp
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

def check(la):
    c = 0
    for i in range(len(la)):
        if la[i] % 2 == 0:
            c += 1
    if c == len(la):
        return True
    else:
        return False
        
ans = 0
while check(l):
    for i in range(N):
        l[i] = l[i]/2
    ans += 1

print(ans)

Submission status: Accepted

Solution code:
from sys import stdin


if __name__ == "__main__":
    _in = [_.rstrip() for _ in stdin.readlines()]
    N = int(_in[0])  # type:int
    A_arr = list(map(int,_in[1].split(' ')))  # type:list(int)
    # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
    A_arr_bin = list(map(bin,A_arr))
    cnt = -1
    for A_bin in A_arr_bin:
        _ = len(A_bin.rsplit('1',1)[-1])
        if cnt > _ or cnt==-1:
            cnt = _
    # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    print(cnt)

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

Solution code:
num = int(input())

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

ans = 0

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


print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

print(cnt)

Submission status: Accepted

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

counter = 0
while (len(listName) == num):
    listName = [i /  2 for i in listName if i%2 == 0]

    counter += 1
print(counter - 1)

Submission status: Accepted

Solution code:
N = int(input())
A = [int(x) for x in input().split()]

cnt = []
for i in range(N):
    tmp = 0
    while A[i]%2 == 0:
        tmp += 1
        A[i] //= 2
    cnt.append(tmp)

print(min(cnt))

Submission status: Accepted

Solution code:
num = int(input())
a = input().split(" ")

count = 0
ans = -1

while count == 0:
  ans = ans + 1
  for i in range(num):
    if int(a[i])%2 == 1:
      count = count + 1  
    a[i] = int(a[i])/2
  
print(ans)

Submission status: Accepted

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

while True:
    if any((x % (2 ** n) != 0 for x in num)):
        break
    else:
        n += 1

print(n-1)

Submission status: Accepted

Solution code:
cnt = input()
numlist = list(map(int, input().split())) 
flg = True
num = 0

while True:

    for x in range(len(numlist)):
    
        if numlist[x] % 2 != 0:
            flg = False
            break

        numlist[x] = (numlist[x] / 2)
    
    if flg == False:
        break

    num  += 1

print(num)