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:
import os
import sys

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(2147483647)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7

N = int(sys.stdin.readline())
A = list(map(int, sys.stdin.readline().split()))

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

Submission status: Accepted

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

flag = False
counter = 0

while True:
    for i, v in enumerate(l):
        if v % 2 == 0:
            l[i] = v / 2
        else:
            flag = True
            break
    if flag == False:
        counter += 1
    else:
        break

print(counter)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys

MOD = 2  # type: int

def solve(N: int, A: "List[int]"):
    ans = 0
    f = 0
    while(not f):
        t = [i%2==0 for i in A]
        if(t.count(True) == N):
            A = [i//2 for i in A]
            ans += 1
        else:
            f = 1
    print(ans)
    return


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    A = [ int(next(tokens)) for _ in range(N) ]  # type: "List[int]"
    solve(N, A)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

tmp = input()
tmp = input().split()
num = len(tmp)
min = int(tmp[0])
#print (min)
for j in tmp:
	d = int(j)
	n = 0
	while(d % 2 == 0):
		n=n+1
		d=d/2
	if(min>n):
		min=n
#	print(n)
print(min)

Submission status: Accepted

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

for i in range(n):
    num = 0
    x = lst[i]
    while x%2==0:
        x /= 2
        num += 1
    
    if i==0:
        ans = num
    elif num < ans:
        ans = num
print(ans)

Submission status: Accepted

Solution code:
n = input().split()
a = input().split()
N = int(n[0])
A = list(map(int, a))
Flag = 0
i = 0

while True:
    for j in range(N):
        if A[j] % 2 == 1:
            Flag = 1
            break
        A[j] = A[j] / 2
    if Flag == 1:
        print(i)
        break
    i += 1

Submission status: Accepted

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

ans = 0
cnt = True
while cnt:
    temp = [a[i]%2 for i in range(len(a))].count(1)
    if temp == 0:
        ans += 1
        a = [a[i]//2 for i in range(len(a))]
    else:
        cnt = False
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

counter = 0
for _ in range(210):
    if sum([n%2 for n in A]):
        break
    else:
        counter += 1
        A = [int(n/2) for n in A]
        
print(counter)

Submission status: Accepted

Solution code:
# coding: utf-8
len = int(input())
a = list(map(int, input().split()))
#print(a)
 
def main():
    flag = "TRUE"
    count = 0
    while flag == "TRUE":
        for i in range(0,len):
            if a[i] % 2 == 0:
                a[i] = a[i]/2
                #print(flag)
            else:
                flag = "FALSE"
 
        if flag == "TRUE":
            count = count + 1
        else:
            #print(a)
            print(count)
 
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import numpy as np
N = int(input())
A = np.array([int(i) for i in input().split()])
# 操作を行う回数
num = 0
# 奇数があるか否か
oddexist = 0
while True:
    for x in range(N):
        # １つでも奇数があればoddexistを1にする
        if A[x] % 2 != 0:
            oddexist = 1
    # oddexistが1なら操作回数を出力して終了
    if (oddexist == 1):
        print("{}".format(num))
        break
    A = A / 2
    num += 1

Submission status: Accepted

Solution code:
def helper(dataArr):
  minCount = 0
  for number in dataArr:
    num = int(number)
    count = 0
    while (num % 2 == 0):
      num = num / 2
      count += 1
      if (minCount >= 1 and count >= minCount):
      	break
    minCount = count
    if (minCount == 0):
      return 0
  return minCount;

input()
data = input()
toOut = helper(data.split(" "))
print(toOut)

Submission status: Accepted

Solution code:
N=int(input())
A=list(map(int, input().split()))
count = 0
while True:
  B=list(map(lambda x: x%2, A))
  if max(B)==1:
    break
  A=list(map(lambda x: x/2, A))
  count += 1
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

cnt = 0
min = 10**9

for i in n:
  cnt = 0
  while True:
    if i % 2 == 0:
      i = i / 2
      cnt += 1
    else:
      if min > cnt:
        min = cnt
      break

print(min)

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(round(ans))

Submission status: Accepted

Solution code:
n = int(input())
arr = [int(n1) for n1 in input().split()]

flg = True
count1 = 0
con1 = 0
i = 0

while flg == True:
    
    for num in arr:
        if int(num) % 2 == 0:
            arr[i] = num / 2
        else:
            flg = False
            break
        i += 1
        
    if flg == True:
        con1 += 1
        i = 0

print(con1)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(res)

Submission status: Accepted

Solution code:
n=int(input())

nums=list(map(int,input().split()))
#print(nums)
cnt=0

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

    if cnt2==n:
        cnt+=1

    else:
        break
print(cnt)

Submission status: Accepted

Solution code:
# !/usr/bin python3
# -*- coding: UTF-8 -*-

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

counter = 0

def is_all_odds(list):
    return [a % 2 for a in list] == [0] * n

while is_all_odds(As):
    As = [a / 2 for a in As]
    counter += 1

print(counter)

Submission status: Accepted

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

Submission status: Accepted

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

for i in a:
    while(i%2 == 0):
        count = count + 1
        i = i/2
    if (count < count_min):
        count_min = count
    count = 0
    
print(count_min)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
count_baff = 0
count = float("inf")
for i in a:
    p = i
    while(p % 2 == 0 ):
        p /= 2
        count_baff += 1
    if count > count_baff:
        count = count_baff
    count_baff = 0
print(count)

Submission status: Accepted

Solution code:
def div2(r):
    c = 0
    while r % 2 == 0:
        r //= 2
        c += 1
    return c


n = int(input())
a = list(map(int, input().split()))
ans = 1000000
for e in a:
    ans = min(ans, div2(e))
print(ans)

Submission status: Accepted

Solution code:
from sys import stdin

i = stdin.readline().rstrip().split()
arr = [int(x) for x in stdin.readline().rstrip().split()]

count = 0
flg = True
while True:
    for h,num in enumerate(arr):
        if num%2!=0:
            flg = False
            break
        else:
            arr[h] = num/2
    if(flg):
        count += 1
    else:
        break


print(count)

# 解答例とほぼ同じ

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = list(map(int, input().split()))
An = list(map(int,input().split()))
judge = True
count = 0
i = 0
while judge:
    if An[i]%2 == 0:
        An.append(An[i]/2)
        i += 1
    else:
        judge = False
        break
print(len(An)//N[0]-1)

Submission status: Accepted

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

print(ans)

Submission status: Accepted

Solution code:
nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(input())
s = lambda: input()

N = n()
A = nl()

res = 1000000000
for a in A:
    count = 0
    while a % 2 == 0:
        a //= 2
        count += 1
    if count < res:
        res = count
print(res)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
ans = 10**9
N = input()
A = list(map(int, input().split()))
for i in A :
  p = 0
  while i % 2 == 0 :
    i //= 2
    p += 1
  if ans > p :
    ans = p
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
alist = [int(a) for a in input().split()]
#print(alist)
def div2(b):
  return b//2
count = 0

f = 0
while(1):
  for i in alist:
    if i % 2 == 1:
      f = 1
  if f == 0:
    alist = list(map(div2,alist))
    count+=1
  else:
    break
  
print(count)

Submission status: Accepted

Solution code:
N = int(input())

a_list = [int(a) for a in input().split()]

def calc_div2(n):
    return n//2

c = 0
f = 0
while(1):
    for a in a_list:
        if a%2 == 0:
            pass
        else:
            f = 1
            break
    if f == 1:
        break
    else:
        a_list = list(map(calc_div2, a_list))
        c += 1
print(c)

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

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

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

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 = input()
a = list(map(int,input().split()))
ans = 0

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

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))
count=0
while(1):
    if list(map(lambda x:x%2,a)).count(0)!=n:
        print(count)
        break
    a = list(map(lambda x:x/2,a))
    count += 1

Submission status: Accepted

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

min=1000

for i in range(0,n):
    u=min
    ren=h[i]
    while 1:
        if ren%(2**u)!=0:
            u=u-1
            min=u
        else:
            break
    
print(min)

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys

MOD = 2  # type: int

def solve(N: int, A: "List[int]"):

    i = 0
    while True:
        m = 2**(i+1)
        bEnd = False
        for a in A:
            if a % m != 0:
                bEnd = True
                break
        if bEnd:
            break
        i += 1

    print(i)


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    A = [ int(next(tokens)) for _ in range(N) ]  # type: "List[int]"
    solve(N, A)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

ans = 10**9
for i in input().split():
    check = int(i)
    if check % 2 == 1:
        print(0)
        exit()
    
    count=0
    while check % 2 == 0:
        check /= 2
        count+=1
    ans=min(ans,count)
    
print(ans)

Submission status: Accepted

Solution code:
n = input()
list_num = [int(num) for num in input().split()]
 
count = 0
condition = False 
 
while condition == False :
    for num in list_num:
        if int(num % 2) == 1:
            condition = True
            break
            
    if condition == False :
        count += 1
        list_num = list(map(lambda x: int(x / 2), list_num ))

print(count)

Submission status: Accepted

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

cnt = 0
while True:
    if list(map(lambda x: x%2 ,INPUT)).count(0) == N:
        INPUT = list(map(lambda x: x/2 ,INPUT))
        cnt = cnt + 1
    else:
        break

print(cnt)

Submission status: Accepted

Solution code:
def divnum(x):
    y = 0
    while not x%2:
        x/=2
        y+=1
    return y
input();print(min([divnum(int(i)) for i in input().split()]))

Submission status: Accepted

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

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

    ans = float("inf")
    for i in range(N):
        ans1 = 0
        while True:
            if A[i]%2 == 0:
                A[i] /= 2
                ans1 += 1
            else:
                break
        ans = min(ans, ans1)
    
    print(ans)

if __name__ == "__main__":
    solve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
n = input()
a = list(map(int, input().split()))
b  = 0
cnt = 0
while "loop":
    for num in a:
        if num % 2 == 1:
            b= 1
    if  b == 0:
            a = [ i	/2 for i in a]
            cnt += 1
    else:
        break
print(cnt)

Submission status: Accepted

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

while(1):
  for num  in a:
    if num  % 2 == 1:
      bol = 1

  if bol == 0:
        a = [ i	/2 for i in a]
        count += 1
  else:
          break

print(count)

Submission status: Accepted

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):
                flag = False
    
    print(count)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:

N = int(input())
temp = [int(x) for x in input().split()]
ans = []
for t in temp:
  count = 0
  while t%2 == 0:
    t = t/2
    count += 1
  ans.append(count)

print(min(ans))

Submission status: Accepted

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

flg = 0
cnt = 0

while (flg == 0):
    for i in a:
        if i%2 == 1:
            flg = 1
    if flg == 1:
        break
    cnt += 1
    a = [i/2 for i in a]

print(cnt)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
# from pprint import pprint


N = int(sys.stdin.readline().rstrip())
li = [int(x) for x in sys.stdin.readline().rstrip().split()]

# print(li)

flag = True
count = 0
while flag:
  r = 0
  for i in li:
    r = r + int(i%2)

  if r > 0:
    break
  
  count = count + 1

  li = [x/2 for x in li]

print(count)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
# 全体の長さから右から数えて最初に出た1の箇所のインデックスを引く
# 後ろに続く0の数が2で割れる回数にあたる
# 例　全：6 インデックス 2 -1 
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:
def abc():
    n = int(input())
    a = list(map(int, input().split()))
    cnt = 0
    while True:
        if len([x for x in a if x % 2]) > 0:
            break
        for i in range(n):
            a[i] //= 2
        cnt += 1
    print(cnt)


abc()

Submission status: Accepted

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

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

ans = min(map(x, A))

print(ans)

Submission status: Accepted

Solution code:
def main():
    N = input()
    A = list(map(int, input().split()))
    count = 0
    flag = False
    while True:
        for x in A:
            if x % 2 != 0:
                flag = True

        if flag:
            print(count)
            break

        A = [x / 2 for x in A]
        count += 1

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

def input():
    return sys.stdin.readline().rstrip()

if __name__ == "__main__":
    n = int(input())
    alist = list(map(int, input().split()))
    
    res = float("inf")
    for a in alist:
        b = format(a, "b")
        res = min(res, (len(b)-1) - b.rfind("1"))
    
    print(int(res))

Submission status: Accepted

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

Submission status: Accepted

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

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

cnt = 0

while is_even(a):
    a = [num / 2 for num in a]
    cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
n=int(input())
a=input().split()
l=[None]*n
b=[None]*n
for i in range(n):
    l[i]=int(a[i])
s=0
while 1:
    for i in range(n):
        b[i]=l[i]%2
    if 1 in b:
        break
    for j in range(n):
        l[j]=l[j]/2
    s+=1
print(s)

Submission status: Accepted

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

divide_num = 0

def all_even(s):
    for i in s:
        # 奇数
        if i % 2 == 1:
            return False
    return True

while all_even(s):
    for i in range(n):
        s[i] /= 2
    divide_num += 1

print(divide_num)

Submission status: Accepted

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

num=0
while max([i%2 for i in b])!=1: 
    b=[i/2 for i in b]
    num+=1

print(num)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
N = int(input())
counter = 0
arr = [int(i) for i in input().split(" ")]
flag = True
while flag:
    ret = []
    for i in range(len(arr)):
        if arr[i] % 2 == 1:
            flag = False
            break
        arr[i] = arr[i] >> 1
        if arr[i] % 2 == 1:
            counter = counter + 1
            flag = False
            break
    if flag:
        counter = counter + 1

print(counter)

Submission status: Accepted

Solution code:
input()
n = 0
x = list(map(int, input().split()))
r = True
while r:
    for i, s in enumerate(x):
        if s % 2 == 0:
            x[i] = s / 2
        else:
            r = False
            break
    else:
        n += 1
print(n)

Submission status: Accepted

Solution code:
# 整数の入力
length = int(input())
numbers = map(int, input().split())
#リストを使うと下記のように出力される。
#print(list(numbers))
#[5, 6, 8, 10]

#これをこのままmap関数で一つずつ処理をしてあげたい

#引数が配列、何回処理できるか返す関数を作る 
def how_many_times_divisible(n):
	#回数をまずは０で定義
	count = 0
    #一つずつ処理される入ってきた値が割り切れなくなるまで
	while n % 2 == 0:
		#2でわる
		n = n / 2
		#回数を一上げる
		count = count + 1
    #割れなくなったら返す
	return count
  
#最大で何回操作を行うことができるかなので、帰ってきた値の中で一番小さい数を出力する
ans = min(map(how_many_times_divisible,numbers))

#答え
print(ans)

Submission status: Accepted

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

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

print (ans)

Submission status: Accepted

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

Submission status: Accepted

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

def gusu(a):
    if a % 2 == 0:
        return a // 2
    else:
        return -1

flag = True
cnt = 0

while flag:
    atai_lis = list(map(gusu,atai_lis))
    if -1 in atai_lis:
        flag = False
    else:
        cnt += 1


print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import bisect
import os
from collections import Counter, deque
from fractions import gcd
from functools import lru_cache
from functools import reduce
import functools
import heapq
import itertools
import math
import numpy as np
import re
import sys

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(2147483647)
INF = float("inf")

N = int(sys.stdin.readline())
A = np.array(list(map(int, sys.stdin.readline().split())))

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

Submission status: Accepted

Solution code:
# coding: utf-8
N = int(input())
list = input().split(" ")

num_list = []

for num in list:
    num_list.append(int(num))

count = 0
end_flg = 0
while True:
    for i in range(len(num_list)):
        if num_list[i] % 2 == 1:
            end_flg = 1
        else:
            num_list[i] = int(num_list[i]/2)
    if end_flg == 1:
        break
    count += 1

print(count)

Submission status: Accepted

Solution code:
N = int(input())
lst = [int(x) for x in input().split()]
i = -1
tmp = 0
while tmp == 0:
  tmp = sum([x%2 for x in lst])
  lst = [x/2 for x in lst]
  i += 1
print(i)

Submission status: Accepted

Solution code:
ccc = int(input())
aaa = list(map(int,input().split()))
           
def hantei(xxx):
    count = 0
    while True:
        for i in range(len(xxx)):
            if xxx[i]% 2 != 0:
                return count
            else:
                xxx[i] = xxx[i] // 2
        count += 1
print(hantei(aaa))

Submission status: Accepted

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

ans_count = 0
while(True):
    flag = True
    for x in li:
        if x % 2 != 0:
            flag = False

    if flag:
        li = list(map(lambda x: int(x/2), li))
        ans_count += 1
    else:
        break

print(ans_count)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0
while True:
    for i in range(N):
        # print(data[i])
        if data[i] % 2 == 0:
            data[i] = int(data[i]/2)
        else:
            print(ans)
            exit()
    ans += 1

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
import re  # 正規表現, findall('正規表現', 文字列), search('正規表現', 文字列)
import sys # プログラム終了：sys.exit()
# sys.setrecursionlimit(10**6) # 再帰呼び出しの上限を上げる

def i_input(): return int(input())
def s_input(): return map(int,input().split())
def l_input(): return list(map(int, input().split()))
# 文字列のまま受け取りたいときはinput()

n = i_input()
current_a_list = l_input()
count = 0

while 1:
    # print(current_a_list)
    new_a_list = []
    for a in current_a_list:
        if a % 2 == 0:
            new_a_list.append(a // 2)
        else:
            print(count)
            sys.exit()

    count += 1
    current_a_list = new_a_list

Submission status: Accepted

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

a = set(a)
cnt = 10**10
for i in a:
    c = 0
    while i%2 == 0:
        i /=2
        c +=1
    cnt = min(cnt,c)

print(cnt)

Submission status: Accepted

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

ans = 0

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

Submission status: Accepted

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

def check(i):
    count = 0
    while i%2 == 0:
        i = i//2
        count += 1
    return count

ans = 10**9
for i in A:
    ans = min(ans, check(i))

print (ans)

Submission status: Accepted

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

Submission status: Accepted

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

n = int(input())

a = list(map(int, input().split()))
ans = 0
tmp = 0
while tmp == 0:
    for i in range(n):
        a[i] = a[i]//2
        if a[i] % 2 == 1:
            tmp += 1
    if tmp >= 1 and ans == 0:
        break
    ans += 1

print(ans)

Submission status: Accepted

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

res = 1000000

for num in num_list:
  count = 0
  
  while(num % 2  == 0):
    num /= 2
    count += 1
  
  if count < res:
    res = count
    
print(res)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    N = int(input())
    A = list(map(int, input().split(' ')))
    count = 0
    while True:
        A_b = [x%2 == 0 for x in A]
        if not False in A_b:
            A = list(map(lambda x: x//2, A))
            count += 1
        else:
            print(count)
            break

Submission status: Accepted

Solution code:
N = int(input())
A = [int(i) for i in input().split()]
ans = [0]*N
for i in range(N):
    while A[i] % 2 == 0:
        A[i] //= 2
        ans[i] += 1
print(min(ans))

Submission status: Accepted

Solution code:
#
# 　　  ⋀_⋀　 
#　　  (･ω･)  
# .／ Ｕ ∽ Ｕ＼
#  │＊　合　＊│
#  │＊　格　＊│ 
#  │＊　祈　＊│ 
#  │＊　願　＊│ 
#  │＊　　　＊│ 
#      ￣
#
import sys
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial
from heapq import heappop, heappush, heappushpop
inf=float('inf')
mod = 10**9+7
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    from functools import reduce
    from fractions import gcd
    N = I()
    A = LI()
    GCD = reduce(gcd, A)
    ans=0
    while GCD % 2 == 0:
        ans += 1
        GCD //= 2
    print(ans)

if __name__ == '__main__':
    main()