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: Time Limit Exceeded

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

cnt = 0
for i in range(n):
    memo = 0
    while(a[i]%2==0):
        a[i]%=2
        memo += 1
    cnt = max(memo,cnt)
print(cnt)

Submission status: Time Limit Exceeded

Solution code:
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)
      break
  ans += 1

Submission status: Time Limit Exceeded

Solution code:
#coding:utf-8

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

cnt = 0
while True:
  for num in nums:
    if num % 2 == 0:
      continue
    else:
      break
    break
  else:
    cnt += 1

Submission status: Time Limit Exceeded

Solution code:
#coding:utf-8

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

cnt = 0
while True:
  for num in nums:
    if num % 2 != 0:
      break
    else:
      continue
    break
  else:
    cnt += 1

Submission status: Time Limit Exceeded

Solution code:
input_n = int(input())
num_list = [int(i) for i in (input().split())]

count = 0
while True:
    if all(i % 2 == 0 for i in num_list):
        nom_list = map(lambda x: x / 2, num_list)
        count += 1
    else:
        break
print(count)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N=int(input())
A=list(map(int,input().split()))
 
flg=1
count=0
while True:
    for i in A: #全て偶数か確かめる
        if i%2==1:
            break
        
    if flg==1:
        for i in A:
            i=i//2
        count+=1
    else:
        break
print(count)

Submission status: Time Limit Exceeded

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

flg=1
count=0
while True:
    for i in A: #全て偶数か確かめる
        if i%2==1:
            break
    if flg==1:
        for i in A:
            i=i//2
        count+=1
    else:
        break
print(count)

Submission status: Time Limit Exceeded

Solution code:
N=int(input())
A=list(map(int,input().split()))
flg=1
count=0
while(0==0):
    for i in A: #全て偶数か確かめる
        if i%2!=0:
            flg=0
            break
    if flg==1:
        for i in A:
            i=i%2
        count+=1
    else:
        break
print(count)

Submission status: Time Limit Exceeded

Solution code:
N=int(input())
A=list(map(int,input().split()))
flg=1
count=0
while(0==0):
    for i in A:
        if i%2!=0:
            flg=0
    if flg==1:
        for i in A:
            i=i%2
        count+=1
    else:
        break
print(count)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

  num_of_operation = 0
  
  while True:
    for num in li:
      if num % 2 == 1:
        break
    
    for i in range(N):
      li[i] /= 2
    num_of_operation += 1
  
  print(num_of_operation)

if __name__ == '__main__':
  main()

Submission status: Time Limit Exceeded

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

cnt = 0
while True:
  if 1 in map(lambda x: x % 2, li):
    break
  else:
    cnt += 1
    li = map(lambda x: x / 2, li)
print(cnt)

Submission status: Time Limit Exceeded

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

cnt = 0
while True:
  if 1 in map(lambda x: x % 2, li):
    break
  else:
    cnt += 1
print(cnt)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
def checkCanHalf(ary):
  for item in ary:
    if(item % 2 != 0):
      return False
  return True

n = range(int(input()))
ary = map(int, input().split())
cnt = 0

while checkCanHalf(ary) == True:
  ary = map(lambda x: x / 2, ary)
  cnt += 1

print(cnt)

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
input()
x=np.array(input().split(),dtype=np.int32)

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

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
input()
x=np.array(input().split(),dtype=np.int32)
ans=0
while (x%2==0).all():
  x//2
  ans +=1
print(ans)

Submission status: Time Limit Exceeded

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

cnt = 0
while all(map(lambda x: x%2 == 0, list_a)):
    list_a = list(map(lambda x: x%2, list_a))
    cnt +=1

print(cnt)

Submission status: Time Limit Exceeded

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

    temp_list = []
    count = 0
    is_ongoing = True
    while is_ongoing:
        for a in a_list:
            if a % 2 == 0:
                temp_list.append(a/2)
            else:
                is_ongoing = False
                print(count)
                break
        else:
            count += 1
        a_list = temp_list[:]


if __name__ == '__main__':
    main()

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

DA = []
for v in A:
    d = 0
    while v & 1 == 0:
        v = v << 2
        d += 1
    DA.append(d)

print(min(DA))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

n = int(input())
a = (input().split())
b = 1

while True:
    for i in range(n-1):

        if int(a[i]) % 2 == 1:
            break

        a[i] = int(a[i]) / 2
        b +=1


print(b)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
N = int(input())
A = list(map(int, input().split()))
ans = []
for i in range(N):
    cnt = 0
    while A[i]%2==0:
        cnt+=1
    ans.append(cnt)

print(min(ans))

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
N = int(input())
A = np.prod(list(map(int, input().split())))
cnt = 0
while A%2==0:
    cnt+=1

print(int(cnt//N))

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
a = list(map(int, input().split()))
point = 0
while True:
	A =[x % 2 for x in a]
	if A.count(0) != len(a):
		break
	A = [x // 2 for x in a]
	point += 1
print(point)

Submission status: Time Limit Exceeded

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

s = 0
while True :
  f = [ i%2 == 0 for i in nums]
  if all(f) :
    s+=1
    nums = [ i%2 for i in nums]
  else :
    break
print(s)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
a = 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: Time Limit Exceeded

Solution code:
num = input()
listt = input().split()

def hoge(fuga):
    new_list = []
    for i in fuga:
        if int(i) % 2 == 0:
            new_list.append(i)
        else:
            return False
    return new_list


count = 0
while True:
    listt = hoge(listt)
    if listt == False:
        break
    count += 1

print(count)

Submission status: Time Limit Exceeded

Solution code:
inputt = [input() for i in range(2)]
num = inputt[0]
listt = list(map(int, inputt[1].split()))

def hoge(listt):
  new_list = []
  for i in listt:
    if i % 2 == 0:
      new_list.append(i)
    else:
      return False
  return new_list

count = 0
while True:
  listt = hoge(listt)
  if listt == False:
    break
  count += 1

print(count)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
an = list(map(int,input().split()))
i = 1
while len(set(x%(2**i) for x in an)) == 1:i += 1
print(i-1)

Submission status: Time Limit Exceeded

Solution code:

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

count = 0
while True:
  x = 0
  for i in A:
    if i % 2 == 1:
      x = 1
  if x == 1:
    break
  else:
    for i in A:
      i /= 2
    count += 1

print(count)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
a_list = map(int, input().split())
b_list = [int(a % 2) for a in a_list]
i = 0
while not(1 in b_list):
    a_list = [int(a / 2) for a in a_list]
    b_list = [int(a % 2) for a in a_list]
    i += 1
print(i)

Submission status: Time Limit Exceeded

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

count_list = []
for i in AList:
	count = 0
	odd_flag = True
	while odd_flag:
		i = i / 2
		count += 1
		if i % 2 == 1:
			odd_flag = False
	count_list.append(count)

print(min(count_list))

Submission status: Time Limit Exceeded

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

count = 0
roop = 0
while True:
	for i in range(N):
		AList[i] = AList[i] / 2
		if AList[i] % 2 == 0:
			break
		count += 1
roop = count // N
print(roop)

Submission status: Time Limit Exceeded

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

count = 0
roop = 0
while True:
	for i in range(N):
		if AList[i] % 2 == 0:
			AList[i] = AList[i] / 2
		else:
			break
		count += 1
	if count % N == 0:
		roop += 1
	else:
		break
print(roop)

Submission status: Time Limit Exceeded

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

kaisu = 0

while True:
  for i in range(n):
    if nums[i] %2 == 0:
      nums[i] = nums[i]/2
      kaisu += 1
    else:
      break

print(kaisu)

Submission status: Time Limit Exceeded

Solution code:
a = input()
b = list(int(i) for i in input().split())
flg = 0
res = 0

def waru2(n):
  return n / 2

while True:
  if flg == 0:
    cnt = 0
    c = []
    
    for bb in b:
      if bb % 2 == 0:
        cnt += 1
        c.append(bb / 2)
        if a == cnt:
          res += 1
          b = c
          break
      else:
        flg = 1
        break
    
  else:
    break
      
print(res)

Submission status: Time Limit Exceeded

Solution code:
n = input()
list = [int(i) for i in input().split()]
count = 0
flg = False

while True:
    for num in list:
        if num % 2 != 0:
            flg = True
            break
    if flg:
        break
    else:
        #奇数がなければリスト丸ごと半分にする
        count += 1
        list = map(lambda x: x / 2, list)
print(count)

Submission status: Time Limit Exceeded

Solution code:
import math
N = int(input())
a = list(map(int, input().split()))
number = 0
sign = True
while sign:
  for x in a:
    if x % 2 != 0:
      sign = False
      print(number)
      break
    else:
      pass
    number += 1

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
nums = list(map(int, input().split()))
ans = 10**9
for num in nums:
  div_num = num
  cnt = 0
  while True:
    if num%2 == 0:
      div_num = num//2
      cnt += 1
    else:
      ans = min(ans, cnt)
      break
print(ans)

Submission status: Time Limit Exceeded

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

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

ans = 0
while 1:
    new_a = [a // 2 if a % 2 == 0 else -1 for a in A]
    if -1 in new_a:
        break
    ans += 1

print(ans)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
answer = []
num = int(input())
line = list(map(int, input().split()))
for n in range(num):
    kazu = 0
    while line[n] % 2 == 0:
        kazu += 1        
        if line[n] // 2 == 0:
            line[n] = line[n] // 2
        else:
            answer.append(kazu)
print(min(answer))

Submission status: Time Limit Exceeded

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

min_n = 10**9

 
for i in l:
  num = 0
  while num < min_n:
    if i % 2 == 0:
      i = i//2
      num += 1
  min_n = num

print(min_n)

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

while True:
    judge = False
    for i in A:
        if i % 2 != 0:
            judge = True
    if judge:
        break
    
    for i in A:
        i /= 2
    count += 1
print(count)

Submission status: Time Limit Exceeded

Solution code:
a=int(input())
b=[int(j) for j in input().split()]
c=True
d=0
while c==True:
  for i in b:
    if i%2!=0:
      c=False
    else :
      i=i//2
  if c==True:
    d+=1
    
print(d)

Submission status: Time Limit Exceeded

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

ans = 0
flag = True

while flag:
    for i in A:
        if i % 2 == 0 and i != 0:
            i //= 2
        else:
            flag = False
    if flag == True:
        ans += 1
print(ans)

Submission status: Time Limit Exceeded

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

ans = 0
flag = True

while flag:
    for i in A:
        if i % 2 == 0 and i != 0:
            i %= 2
        else:
            flag = False
    if flag == True:
        ans += 1
print(ans)

Submission status: Time Limit Exceeded

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

ans = 0
flag = True

while flag:
    for i in A:
        if i % 2 == 0:
            i %= 2
        else:
            flag = False
    if flag == True:
        ans += 1
print(ans)

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

    flag = True
    count = 0
    for i in a:
        if(i%2 == 1):
            flag = False

    while flag == True:
        count += 1
        a = list(map( lambda x: int(x/2), a))
        for i in a:
            if(i%2 != 0):
                False
    
    print(count)

if __name__ == '__main__':
    main()

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
x = list(map(int, input().split()))
def div(i):
    cnt = 0
    while i % 2 == 0:
        cnt += 1
        i <<= 1
    return cnt

print(min(list(map(div, x))))

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
x = list(map(int, input().split()))
cnt = 0
mn_lst = []
for i in x:
    cnt = 0
    while i % 2 == 0:
        cnt += 1
        i <<= 1
    mn_lst.append(cnt)
print(min(mn_lst))

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
x = list([int(i) for i in input().split()])
cnt = 0
mn_lst = []
for i in x:
    cnt = 0
    while i % 2 == 0:
        cnt += 1
        i <<= 1
    mn_lst.append(cnt)
print(min(mn_lst))

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
x = list([int(i) for i in input().split()])
cnt = 0
while True:
    flag = False
    for i in x:
        if i & 1:
            flag = True
            break
        else:
            i >>= 1
    else:
        cnt += 1
    if flag:
        break
print(cnt)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
x = list([int(i) for i in input().split()])
cnt = 0
while True:
    flag = False
    for i in x:
        if i & 1:
            flag = True
            break
        else:
            i <<= 1
    else:
        cnt += 1
    if flag:
        break
print(cnt)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = input()
data = list(map(lambda x :int(x)%2,input().strip().split()))
res = sum(data)
if res >=1:
  print(0)
else:
  data.sort()
  tmp = data[0]
  cnt = 0
  while tmp!=1:
    tmp/=2
    cnt+=1
  print(cnt)

Submission status: Time Limit Exceeded

Solution code:
N = input()
data = list(map(lambda x :int(x)%2,input().strip().split()))
res = sum(data)
if res ==1:
  print(0)
else:
  data.sort()
  tmp = data[0]
  cnt = 0
  while tmp!=1:
    tmp/=2
    cnt+=1
  print(cnt)

Submission status: Time Limit Exceeded

Solution code:
import sys

_ = input()
a = map(int, input().split())
cnt = 0
 
while(1):
  flg = 0
  for i in a:
    if(i%2 == 1):
      flg = 1
      print(cnt)
      sys.exit()
      
  if(flg == 0):
    a = map(lambda x:x/2, a)
    cnt += 1
  else:
    break

Submission status: Time Limit Exceeded

Solution code:
_ = input()
a = map(int, input().split())
cnt = 0
 
while(1):
  flg = 0
  for i in a:
    if(i%2 == 1):
      flg = 1
      break
      
  if(flg == 0):
    a = map(lambda x:x/2, a)
    cnt += 1
  else:
    break
 
print(cnt)

Submission status: Time Limit Exceeded

Solution code:
loop = input()
a = map(int, input().split())
cnt = 0
 
while(1):
  flg = 0
  for i in a:
    if(i%2 == 1):
      flg = 1
      
  if(flg == 0):
    a = map(lambda x:x/2, a)
    cnt += 1
  else:
    break
 
print(cnt)

Submission status: Time Limit Exceeded

Solution code:
loop = input()
a = map(int, input().split())
cnt = 0
 
while(1):
  flg = 0
  for i in a:
    if(i%2 == 1):
      flg = 1
    else:
      i = i/2
      
  if(flg == 0):
    cnt += 1
  else:
    break
 
print(cnt)

Submission status: Time Limit Exceeded

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

odd = False
count = 0

while True:
    for i in A:
        if i%2 != 0:
            odd = True
        else:
            i = int(i/2)
    if odd:
        break

    # for i in A:
    #     i = int(i/2)

    count += 1

print(count)

Submission status: Time Limit Exceeded

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

odd = False
count = 0

while True:
    for i in A:
        if i%2 != 0:
            odd = True

    if odd:
        break

    for i in A:
        i = int(i/2)

    count += 1

print(count)

Submission status: Time Limit Exceeded

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

odd = False
count = 0

while True:
    for i in A:
        if i%2 != 0:
            odd = True

    if odd:
        break

    for i in A:
        i = int(i/2)

    count += 1

print(count)

Submission status: Time Limit Exceeded

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

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

print(cnt)

Submission status: Time Limit Exceeded

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

def half(n,z):
	exist_odd = False
	count = 0
	while True: 
		for i in z:
			if i % 2 != 0:
				exist_odd = True

		if exist_odd:
			print(count)
			break
		
		for i in z:		
			i /= 2
		
		count += 1

half(n,z)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
a = list(input().split())
b = [int(i) for i in a]
c=0
print(a)
ans=0
def cal2(k):
    return k /2

while True:
    for i in range(len(a)):
        c+=int(a[i][-1])
        if  c% 2 == 0:
            b = list(map(cal2,b))
            ans+=1
        else:
            print(ans)
print(ans)

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
a = list(input().split())
b = [int(i) for i in a]
ans=0
def cal2(k):
    return k /2

while True:
    if  sum(b)% 2 == 0:
        b = list(map(cal2,b))
        ans+=1
else:
    print(ans)
print(ans)

Submission status: Time Limit Exceeded

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

ans = 0

while len(A) == N:
  A = [a for a in A if a % 2 == 0]
  if len(A) == N:
    ans += 1
    
print(ans)

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
data=list(map(int, input().split()))
count = 0
while(True):
  data = list(filter(lambda x: x%2==0, data))
  if len(data) < n:
    print(count)
    break
  else:
    count+=1

Submission status: Time Limit Exceeded

Solution code:
input()
strs = input().split(' ')
nums = [int(i) for i in strs]

ct = 0
b_flag = False
while(1):
  for num in nums:
    if num % 2 == 0:
      continue
    else:
      b_flag = True
      break
  if b_flag:
    break
  ct += 1
print(ct)

Submission status: Time Limit Exceeded

Solution code:
input()
strs = input().split(' ')
nums = [int(i) for i in strs]

ct = 0
b_flag = False
while(1):
  for num in nums:
    if num % 2 == 0:
      continue
    else:
      b_flag = True
      break
  if b_flag:
    break
  ct += 1
print(ct)

Submission status: Time Limit Exceeded

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

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

def check(ar):
    b = True
    for i in range(len(ar)):
        if ar[i] % 2 != 0:
            b = False
            break
    return b

answer = 0

for i in range(1000000000):
    if check(a) == True:
        for j in range(len(a)):
            a[j] = int(a[j]/2)
        answer += 1

print(answer)

Submission status: Time Limit Exceeded

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

count = 0
odd = ""

while True:
    for i, n in enumerate(a):
        if n % 2 == 0:
            a[i] == n / 2
            count += 1
        else:
            odd = "finish"
            break
    if odd == "finish":
        break
print(count)

Submission status: Time Limit Exceeded

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

ans=1000000000

for i in a:
  count=0
  while i%2==0:
    count+=1
    if count>ans:
      break
  
  ans = min(ans, count)

print(ans)

Submission status: Time Limit Exceeded

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

ans=1000000000

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

print(ans)

Submission status: Time Limit Exceeded

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

def mod2(num):
    return num%2==0

def div2(num):
    return num//2

count = 0
while True:
    if len(set(map(mod2,a_list))) != 1 :
        break
    else:
        a_list = list(map(div2, a_list))
        count += 1
print(count)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
s = list(map(int,input().split()))
count = 0
while len(set(list(map(lambda x: x % 2, s)))) == 1:
    s = list(map(lambda x: x/2, s))
    count += 1
print(count)

Submission status: Time Limit Exceeded

Solution code:
count = 0
def check(xs):
    return list(map(lambda x: int(x / 2), xs))

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

while len(set(list(map(lambda x: x % 2, s)))) == 1:
    s = check(s)
    count += 1
print(count)

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
lst = list(map(int, input().split()))
ans = 0
f = 0
while 1:
  for x in lst:
    if x % 2:
      f = 1
    else:
      x /= 2
  if f:
    break
  ans += 1
print(ans)

Submission status: Time Limit Exceeded

Solution code:
def check(a,cnt):
  b = [int(x)%2 for x in a]
  if 1 in b:
    return 0,cnt
  else :
    cnt +=1
    b = [int(x)/2 for x in a]
    return 1,cnt
 
N = input()
a = input().split()
cnt = 0
m = 1
while(m != 0):
  m,cnt = check(a,cnt)
  if m == 0:
    print(cnt)
  else :
    continue

Submission status: Time Limit Exceeded

Solution code:
input()
vals = map(int, input().split())
count = 0
is_odd = False
while True:
    for val in vals:
        if val % 2 == 1:
            is_odd = True
    if is_odd:
        break
    vals = map(lambda x: x/2, vals)
    count += 1
print (count)

Submission status: Time Limit Exceeded

Solution code:
input()
vals = map(int, input().split())
count = 0
start_val = sum(vals)
while True:
    if start_val % 2 == 1:
        break
    count += 1
print (count)

Submission status: Time Limit Exceeded

Solution code:
N = input()
vals = map(int, input().split())
count = 0
is_odd = False
while True:
    for val in vals:
        if val % 2 == 1:
            is_odd = True
    if is_odd:
        break
    vals = map(lambda x: x/2, vals)
    count += 1
print (count)

Submission status: Time Limit Exceeded

Solution code:

N = input()
vals = map(int, input().split())
count = 0
is_odd = False
while True:
    for val in vals:
        if val % 2 == 1:
            is_odd = True
    if is_odd:
        break
    count += 1
    vals = map(lambda x: x/2, vals)
print (count)

Submission status: Time Limit Exceeded

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