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 = [int(i) for i in input().split()]
cnt = 0

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

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
l=list(map(int,input().split()))
num=0
for i in range(100):
    for j in range(n):
        if l[j]%2==0:
            num+=1
            l[j]=l[j]/2
        else:
            break
print(num//n)

Submission status: Accepted

Solution code:
import numpy as np
N = int(input())
A = np.array(list(map(int, input().split())), np.int32)

ans = 0
while True:
    flg = 0
    for a in A:
        if a % 2 != 0:
            flg = 1
            break
    if flg:
        break
    else:
        A = A/2
        ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from functools import reduce
from itertools import count

input()
print(min(map(lambda e: filter(lambda i: e % (2 ** i) != 0, count(0, 1)).__next__() - 1, map(int, input().split()))))

Submission status: Accepted

Solution code:
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()))
res = 0
for i in range(N):
    while True:
        exist_odd = False
        for j in range(N):
            if A[j] % 2 != 0:
                exist_odd = True

        if exist_odd:
            break

        for k in range(N):
            A[k] /= 2

        res += 1

print(res)

Submission status: Accepted

Solution code:
n = int(input())
a = []
counter = 0
a = input().split()
success_result = [0] * n
while True:
    for index, item in enumerate(a):
        if int(item) % 2 == 0:
            a[index] = int(item) / 2
            success_result[index] = True
        else:
            continue
    if all(success_result):
        counter += 1
        success_result = [None for _ in range(n)]
    else:
        break
print(counter)

Submission status: Accepted

Solution code:
# Problem
# Python 2nd Try
import sys


def solver(allNumber, eachNum, useRange):
    answer = sys.maxsize
    counter = [0]*allNumber
    for j in useRange:
        while True:
            if eachNum[j] % 2 == 0:
                counter[j] = counter[j] + 1
                eachNum[j] = eachNum[j] / 2
            else:
                break

    for j in useRange:
        if counter[j] <= answer:
            answer = counter[j]
    return answer


if __name__ == "__main__":
    N = int(input())
    Ai = list(map(int, input().split(' ')))
    print(solver(N, Ai, range(0, N)))

Submission status: Accepted

Solution code:
num_input=int(input())
vals=[int(str1) for str1 in input().split()]
counter=0
#print(vals)
#print(sum([1 for val in vals if val%2==0]))
while True:
    if sum([1 for val in vals if val%2==0])==num_input:
        vals=[val/2 for val in vals]
        #print(vals)
        counter+=1
    else:
        break
print(counter)

Submission status: Accepted

Solution code:
count = int(input())
ns = []*count
ns = input().split()
numcnt = 0
divcnt = [0]*count

for i in ns:
    num = int(i)
    while num%2 == 0:
        num = num/2
        divcnt[numcnt] += 1
    numcnt += 1
print(min(divcnt))

Submission status: Accepted

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

num=0
while True:
    for i in range(n):
        if a[i]%2==0:
            a[i]=a[i]/2
        else:
            print(num)
            exit()
    num+=1

Submission status: Accepted

Solution code:
# Problem https://atcoder.jp/contests/abc081/tasks/abc081_b
# Python 1st Try
import sys


def solve(allNumber,eachNum):
    answer = 0
    counter = [0]*allNumber
    for j in range(len(eachNum)):
        cnt = 0
        while eachNum[j] % 2 == 0:
            counter[j] = counter[j] + 1
            eachNum[j] = eachNum[j] / 2
#    print(counter)


#   TODO: ここに最大値を設定してcounter配列を回す
#   NOTE: 最小値はどこか→Python3で整数型の最大値はsys.maxsizeとして定義

    answer = sys.maxsize
    for j in range(0, allNumber):
        if counter[j] <= answer:
            answer = counter[j]
    return answer

if __name__ == "__main__":
    input=sys.stdin.readline
    N = list(map(int, input().split()))
    Ai = list(map(int, input().split()))
    print(solve(N[0], Ai))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def 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(divisible,a))

print(ans)

Submission status: Accepted

Solution code:
input()
A = list(map(int, input().split()))
print(min(len(bin(a&-a))-3 for a in A))

Submission status: Accepted

Solution code:
import numpy as np

N = int(input())

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

count = 0
while(1):
  if np.mod(lis, 2).sum() != 0:
    print(count)
    break
  else:
    lis = lis // 2
  count = count + 1

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def times_divisible(n):
    ans = 0 
    while n%2 ==0:
        n/=2
        ans +=1
    return ans
n= int(input())
A=[int(a) for a in input().split()]
ans = min(times_divisible(a) for a in A)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
li = list(map(int, input().split()))
cnt = 0
for _ in range(10**9):
    if all(x%2==0 for x in li):
        cnt += 1
        li = list(map(lambda x: (x+1)//2, li))
    else:
        break
print(cnt)

Submission status: Accepted

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

m = 0
l = 2

while True:
  for a in lista:
    if a % l == 0:
      continue
    else:
      print(m)
      exit()
  else:
    m += 1
    l *= 2

Submission status: Accepted

Solution code:
import numpy as np
N = input()
count = 0

data=np.array(input().split(),dtype=np.int64)

while(data%2==0).all():
    data //= 2
    count += 1
    
print(count)

Submission status: Accepted

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

for k in range(32):
  for i in range(N):
    if A[i] % 2 == 0:
      A[i] //= 2
    else:
      print(k)
      exit()

Submission status: Accepted

Solution code:
# #! /usr/bin/env python
# # -*- coding: utf-8 -*-
def main():
    unko_ans = 0
    is_unko = True
    unko_n = int(input())
    unko_a = list(map(int, input().split()))
    while is_unko:
        for j in range(len(unko_a)):
            if unko_a[j] % 2 == 0:
                unko_a[j] = unko_a[j] / 2
            else:
                is_unko = False
                print(unko_ans)
                break
        unko_ans = unko_ans + 1
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:


import numpy as np

input()
a=np.array(input().split(),dtype=np.int64)
ans=0

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

Submission status: Accepted

Solution code:


import numpy as np

n=int(input())
a=[int(k) for k in input().split()]
ans=0
for _ in range(100):
    for i in range(n):
        if(a[i]%2==1):
            print(ans)
            exit(0)
        a[i]//=2
    ans+=1

Submission status: Accepted

Solution code:
import sys

if __name__ == "__main__":
    args = sys.stdin.read().split()
    N, A = int(args[0]), list(map(int, args[1:]))  # N = len(A)

    cnt = 0
    while True:
        if any(map(lambda x: x % 2 == 1, A)):    
            break

        cnt += 1
        A = list(map(lambda x: x / 2, A))

    print(cnt)

Submission status: Accepted

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

count = 0
while True:
  for i in range(len(nList)):
    nList[i] = nList[i]/2
    if not(nList[i].is_integer()):
      print(count)
      exit(0)
  count += 1

Submission status: Accepted

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

cnt = 0
while True:
    if sum(list(1 for x in a if x % 2 == 1)) != 0:
        print(cnt)
        exit()  
    a = list(x // 2 for x in a)
    cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,input().split()))
ans=30
for i in a:
  for j in range(30):
    if i&(1<<j):
      if j<ans:
        ans=j
      break
print(ans)

Submission status: Accepted

Solution code:
#!/usr/bin/env python
"""AtCoder Beginner Contest 081: B - Shift only
https://atcoder.jp/contests/abc081/tasks/abc081_b
"""

__author__ = 'bugttle <bugttle@gmail.com>'


def are_evens(array):
    for x in array:
        if x % 2 != 0:
            return False
    return True


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

    count = 0
    while are_evens(As):
        As = [int(a/2) for a in As]
        count += 1
    print(count)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())

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

con = 0

while all(i % 2 == 0 for i in A):
  A = list(map(lambda x: int(x / 2), A))
  con += 1

print(con)

Submission status: Accepted

Solution code:
import numpy as np

n = input()
a = list(map(int, input().split()))
cnt=0
cnt_list = np.zeros(int(n))
for i in range(len(a)):
    while a[i]%2 == 0:
        cnt+=1
        a[i] = a[i]/2
    cnt_list[i]=cnt
    cnt=0


print(int(min(cnt_list)))

Submission status: Accepted

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

cnt = 0
for i in range(100):

    if sum(list(1 for x in a if x % 2 == 1)) != 0:
        print(cnt)
        exit()
    
    a = list(x // 2 for x in a)
    cnt += 1

print(cnt)

Submission status: Accepted

Solution code:

n=input()
ans=0
i=0
b=list(map(int,input().split()))

end=True
while end:
    for x in b:
        if x%2!=0:
            print(ans)
            end=False
            break
    b=list(map(lambda x:x/2,b))
    ans+=1

Submission status: Accepted

Solution code:
iterate = 0
n = int(input())
num_list = input().split()
flag = 0
while True:
  i = 0
  while i <= n-1:
    if int(num_list[i])%2 == 1:
      flag = 1
      break
    num_list[i] = int(num_list[i])/2
    i += 1
  if flag == 1:
    break
  iterate += 1

print(iterate)

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from itertools import permutations
import sys
import math
import bisect
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

def solve():
    n = I()
    a = LI()
    ans = float("inf")
    for i in a:
        k = 0
        while not i&1:
            i >>= 1
            k += 1
        if ans > k:
            ans = k
    print(ans)
    return

#Solve
if __name__ == "__main__":
    solve()

Submission status: Accepted

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

count = [0]*n

for i in range(n):
    a = al[i]
    for _ in range(30):
        if a%2 == 0:
            a = a/2
            count[i] += 1
        else:
            break

print(min(count))

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

tf = True

while tf:
    for i in range(0, len(A)):
        if A[i] % 2 == 1:
            tf = False
        A[i] = A[i] / 2
    if not tf:
        break
    count += 1
print(count)

Submission status: Accepted

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

even = True
while even:
  for i in range(N):
    b = list(map(lambda x: x % 2 == 0, a))
    if False in b:
      even = False
      break
    a = list(map(lambda  x: int(x/2), a))
    n += 1

print(n)

Submission status: Accepted

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

count = 0

while True:
    #リストの中をすべて2で割る
    odd_cnt = 0
    for i in range(N):
        if a[i] % 2 == 1:
            odd_cnt += 1
        a[i] = a[i] / 2
    
    #奇数が一つでもあればbreak. そうでなければカウント追加してループ続行
    if odd_cnt > 0:
        break
    else:
        count += 1

print(count)

Submission status: Accepted

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

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


print(ans-1)

Submission status: Accepted

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

    count = 0
    flag = True

    while(flag):
        for num in nums:
            if num % 2 == 0:
                continue
            else:
                flag = False
                break
        nums = [n/2 for n in nums]
        count += 1

    print(count-1)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

for i in range(1, max(A)):
  if not all(list(map(lambda x: x % 2**i == 0, A))):
    print(i - 1)
    break

Submission status: Accepted

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

count = 0
while(1):
   check = [x % 2 for x in a]
   if (sum(check) == 0):
      count += 1
      a = [x/2 for x in a]
   else:
      break

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
count = 0
n = int(input())
lst = list(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: Accepted

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


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


print(count)

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:
import math
n = input()
a = list(map(int, input().split()))
ans = float("inf")
for i in a:
  ans = min(ans, len(bin(i)) - bin(i).rfind("1")-1)
print(round(ans))

Submission status: Accepted

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

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

Submission status: Accepted

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

flag=1
c=0
while flag==1:
  for i in range(0,n):
    if a[i]%2!=0:
      flag=0
      break
  if flag==1:
    c+=1
    for j in range(0,n):
      a[j]//=2
print(c)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,input().split()))
ans=99999999999999999
for ai in a:
    c=0
    while(ai%2==0):
        ai//=2
        c+=1

    if(ans>c):
        ans=c
print(ans)

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 != 0, A))
    if True in b:
        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()))

count = 0
even_bool = True
while(even_bool):
    b = list(map(lambda x: x%2 != 0, A))
    if True in b:
        even_bool = False
        break

    A = list(map(lambda x: int(x/2), A))
    count += 1
    
print(count)

Submission status: Accepted

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

def main():
    count = 0
    flg = 1
    while(flg):
        for i in range(len(T)):
            if T[i] % 2 == 0:
                T[i] = T[i]/2
            else:
                flg = 0
                break
        count +=1
    print(count-1)
    
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:


N=int(input())
L=input().split()
L = [int(s) for s in L]
n=0
tem=0
# print(L)

for i in range(1000000000):

    for j in L:
        # print(j%2)
        tem+=j%2
    # print(tem)

    if tem!=0:
        break
    else:
        for k in range(len(L)):
            L[k]=L[k]/2
        n+=1
    # print(L)

# print("end")
print(n)

Submission status: Accepted

Solution code:

def division(array, base, num):
    for i in range(num):
        if array[i] % base != 0:
            return False
    return True


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

count = 0
base = 2
while division(array, base, num):
    base *= 2
    count += 1

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = input().split()
count = 0
count_min = 0
for i in range(N):
    count = 0
    Ai = int(A[i])
    if Ai % 2 != 0:
        count_min = 0
        break
    while Ai % 2 == 0:
        count += 1
        Ai = Ai / 2
    if count_min == 0:
        count_min = count
    elif count_min > count:
        count_min = count

print(count_min)

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

Submission status: Accepted

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

Submission status: Accepted

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

c = 0 

while True:
  exist_odd = False
  for a in A:
    if a % 2 != 0:
      exist_odd = True
    
  if exist_odd: break

  for i in range(N):
    A[i] = A[i] / 2
  
  c = c + 1
print(c)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
n=int(input())
a=list(map(int,input().split()))
cnt=0
flg=True
while flg:
    for i in range(n):
        if a[i]%2==0:
            a[i]//=2
        else:
            flg=False
            break

    cnt+=1
print(cnt-1)

Submission status: Accepted

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

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


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

Submission status: Accepted

Solution code:
n = int(input())
A = list(map(int, input().split()))
cont = 0
cont_list =[]

for a in A:
    if a % 2 != 0:
      cont_list.append(cont)
      break
    else:
        while a % 2==0:
            a //= 2
            cont += 1
        cont_list.append(cont)
        cont=0

print(min(cont_list))

Submission status: Accepted

Solution code:
N = int(input())
A = [int(s) for s in input().split()]
count = 0
flag = True

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

Submission status: Accepted

Solution code:
number=input()
number=int(number)
subject=input().rstrip().split()
#print(subject)
subject=list(map(int,subject))
subject1=[0 for i in range(number)]
count=0
j=0
while j < 1:
    for i in range(number):
        if subject[i]%2!=0:
            j+=1
            break
    if j==1:
        break
    for i in range(number):
        subject[i]=subject[i]/2
    count+=1

print(count)

Submission status: Accepted

Solution code:
n=int(input())
l=list(map(int,input().split()))
Flag=1
cnt=0
for i in range(10**9):
    for j in range(n):
        if l[j]%2==0:
            l[j]//=2
        else:
            Flag=0
    if Flag==0: break
    cnt+=1
print(cnt)

Submission status: Accepted

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

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

count = [0 for _ in range(len(A))]

for i in range(len(A)):
    amari = 0
    while not (A[i] % 2):
        if not (A[i] % 2):
            A[i] //= 2
            count[i] += 1

print(min(count))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A_list = list(map(int, input().split()))
times = 0
exist_odd = True

while True:
    for i in range(N):
        if A_list[i] % 2 != 0:
            exist_odd = False
            break
        else:
            A_list[i] /= 2
    if exist_odd:
        times += 1
    else:
        break
print(times)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
N = int(input())
A = [int(x) for x in input().split()]
ans = 10 ** 10
for i in A:
    a = 0
    while i % 2 == 0:
        a += 1
        i //= 2
    ans = min(ans, a)
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
res = 1000000000000
x = list(map(int, input().split()))
for x in x:
    count = 0
    while x%2==0:
        x /= 2
        count += 1
    if res > count: res = count
print(res)

Submission status: Accepted

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

cnt = 0

flag = True

while flag == True:
    for i in range(n):
        if a[i]%2:
            flag = False
            cnt -= 1
            break
        a[i] = a[i]//2
    cnt += 1
print(cnt)

Submission status: Accepted

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

print(count)

Submission status: Accepted

Solution code:
# coding: utf-8

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

count = 0
while True:
	flag = True

	for A_i in A:
		if A_i % 2 != 0:
			flag = False
			break

	if flag == False:
		break

	for index in range(N):
		A[index] = A[index] / 2

	count += 1

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

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

aor = 0
for a in A:
    aor |= a

r = 0
while aor > 0:
    b = aor & 1
    if b:
        break
    aor >>= 1
    r += 1

print(r)

Submission status: Accepted

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

Solution code:
N = input()
if N == '0':
  print(0)

  
def fac(num):
  if num % 2 == 0:
    return 1 + fac(num / 2)
  else:
    return 0

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


Fs = [fac(a) for a in As]

print(int(min(Fs)))

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc081/tasks/abc081_b

def div_list(list_num):
    _div_list = []
    can_iter = True
    for k in range(len(list_num)):
        if list_num[k] % 2 != 0:
                can_iter = False
        _div_list.append(list_num[k] / 2)
    return can_iter, _div_list


n_input = int(input())
list_number = input().split()
list_number = list(map(int, list_number))

n_iter = 0
can_iter = True

while can_iter == True:
    can_iter, list_number = div_list(list_number)
    if can_iter == True:
        n_iter += 1

print(n_iter)

Submission status: Accepted

Solution code:
f=lambda n:format(n, 'b')[::-1].find('1')
n=int(input())
L = list(map(int, input().split()))
c=0
C=[0]*n
for i in range(n):C[i]=f(L[i])
print(min(C))

Submission status: Accepted

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

count=0
flag=True
while flag:
  for x in i:
    if x%2 != 0:
      flag=False

  count+=1
  i=list(map(lambda x:x//2, i))
print(count-1)

Submission status: Accepted

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

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

np_a = np.array(a)

count = 0
while(True):
    if sum(np_a%2!=0) >= 1: #Falseがあるなら
        break
    else:
        count += 1
        np_a = np_a//2

print(count)

Submission status: Accepted

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

count = 0

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

Submission status: Accepted

Solution code:
def function(N):
    cnt=0
    while N%2==0:
        N/=2
        cnt+=1
    return cnt

N=int(input())
a=map(int, input().split())
cnt=min(map(function, a))
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
 
import math
import itertools
import sys
import copy
 
# 入力
#A, B, C, D = map(int, input().split())
#L = list(map(int, input().split()))
N = int(input())
A = list(map(int, input().split()))

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

print (cnt)

Submission status: Accepted

Solution code:
N = int(input())

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

count = 0
flg = 0

while flg!=1:
    for i in range(len(A)):
        if A[i]%2!=0:
            flg = 1
            break
        A[i] = A[i]//2
    if flg==0:
        count = count + 1

print(count)

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

Submission status: Accepted

Solution code:

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

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

print(cnt)