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 sys
INF = 1_000_000_001
N = int(input())
A = input().split()
n = INF
for a in A:
    a = int(a)
    if a % 2 != 0:
        print(0)
        sys.exit()
    cnt = 0
    while a % 2 == 0:
        a = a >> 1
        cnt += 1
    n = min(n, cnt)
print(n)

Submission status: Accepted

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

Submission status: Accepted

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

cnt = 1001001001

for a in A:
    tmp = 0
    while a % 2 == 0:
        a //= 2
        tmp += 1
    
    if tmp < cnt:
        cnt = tmp

print(cnt)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
res = 10 ** 9
for a in A:
    if a % 2 == 1:
        print(0)
        exit()
    tmp = 0
    while a % 2 == 0:
        tmp += 1
        a //= 2
    res = min(res, tmp)
print(res)

Submission status: Accepted

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

    cnt += 1

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
N = int(input())
A = np.array(input().split(),dtype=np.int32)
a = 0

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

print(a)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

import math

flag = 0
count = 0
while flag == 0:
    for n in range(N):
        A[n] = A[n]/2
        if math.modf(A[n])[0] != 0:
            flag = 1
            break
    if flag ==0:
        count += 1
        
print(count)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))
A = list(map(str,list(map(bin,A))))
for i in range(N):
    if i ==0:
        ans =len(A[i])-A[i].rfind("1")-1
    else:
        ans = min(ans,len(A[i])-A[i].rfind("1")-1)
print(ans)

Submission status: Accepted

Solution code:
def count(x):
  if x % 2 == 1:
    return 0
  return count(x/2) + 1

n = int(input())
x = [int(i) for i in input().split()]
i = 0
while i < n:
  if i == 0:
    a = count(x[0])
  if a >count(x[i]):
    a = count(x[i])
  i+=1
    
print(a)

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

N = int(input())
lstA = []
line = input()
for s in line.split():
    lstA.append(int(s))

cnt = 0
success = True
while success:
    lstB = []
    for x in lstA:
        if x % 2 == 0:
            lstB.append(x // 2)
        else:
            success = False
            break
    if success:
        lstA = lstB
        cnt += 1
print(cnt)

Submission status: Accepted

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

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

def round():
    for i in range(len(lstA)):
        if lstA[i] % 2 == 0:
            lstA[i] //= 2
        else:
            return False
    return True

cnt = 0
while round():
    cnt += 1
print(cnt)

Submission status: Accepted

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

result = float('inf')
for a in A:
    count = 0
    tmp = a
    while tmp % 2 == 0:
        tmp /= 2
        count += 1
    if count < result:
        result = count

print(result)

Submission status: Accepted

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

Submission status: Accepted

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

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

    if temp == n:
        count += 1
    else:
        break

print(count)

Submission status: Accepted

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

for i in range(n):
    tmp=format(a[i],'b')[::-1].find('1')
    if m>tmp:
        m=tmp
print(m)

Submission status: Accepted

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

while boolean:
  for i in range(n):
    if a[i] % 2 != 0:
      boolean = False
    else:
      a[i] = a[i] / 2
  if boolean:
    count += 1

print(count)

Submission status: Accepted

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

N = [0]*len(A)

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

print(min(N))

Submission status: Accepted

Solution code:
b=[]
a=input()
b=map(int,input().split())
ans=[]
f_ans=0
for i in b:
 d=0
 while i % 2 == 0:
   i=i/2
   d+=1
 ans.append(d)
 f_ans=min(ans)
print(f_ans)

Submission status: Accepted

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

from sys import stdin

data = stdin.read().splitlines()

a = int(data[0])

b = [int(s) for s in data[1].split()]

print(min(map(count_how_many_divide, b)))

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
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:
def calc(a):
  ans=0
  
  while a%2==0:
    a/=2
    ans+=1
    
  return ans

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

print(min(map(calc, A)))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

ct = 0
flg = False

while True:
  for item in a:
    if(item%2 == 1):
      flg = True

  if(flg == True):
    break
  else:
    a = [int(i/2) for i in a]
    ct += 1
  
print(ct)

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

Submission status: Accepted

Solution code:
def solve(a, minA):
    cnt = 0
    while cnt < minA:
        if a % 2 == 1:
            break
        cnt += 1
        a = a // 2
    return cnt


def resolve():
    N = int(input())
    A = [int(i) for i in input().split()]
    minA = 10**9
    for a in A:
        minA = min(minA, solve(a, minA))
    print(minA)


resolve()

Submission status: Accepted

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

halfableCount = 0

while(True):
    # すべての数が割れるか確認する
    existOdd = False
    for i in range(len(aList)):
        if aList[i] % 2 != 0:
            existOdd = True

    # 割れない数があったので操作終了
    if existOdd:
        break

    # 割る
    for i in range(len(aList)):
        aList[i] = aList[i] >> 1

    halfableCount += 1

print(halfableCount)

Submission status: Accepted

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

halfableCount = 0

while(True):
    for i in range(len(aList)):
        # 割れるか確認する
        if aList[i] % 2 == 1:
            break

        # 割る
        aList[i] = aList[i] >> 1
    else:
        halfableCount += 1
        continue

    # 2で割れない数があったのでループ終了
    break

print(halfableCount)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
ans = float('inf')
for ai in A:
    c = 0
    while ai % 2 == 0:
        ai //= 2
        c += 1
    
    ans = min(ans, c)

print(ans)

Submission status: Accepted

Solution code:
N=int(input())
A=list(map(int,input().split()))
ans=list()
for i in A:
    num=i
    j=0
    while num%2==0:
        num=num/2
        j+=1
    ans.append(j)
print(min(ans))

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    a = list(map(int, input().split()))
    for i in range(200):
        if all(i % 2 == 0 for i in a):
            a = [i // 2 for i in a]
        else:
            print(i)
            break

if __name__ == "__main__":
    main()

Submission status: Accepted

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

for i in range(10**5):
    for j in range(n):
        if a[j]%2==0:
            a[j]=a[j]//2
        else:
            print(i)
            exit()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

c = 0
while True:
    if all(a% 2 ==0 for a in A):
        c += 1
        A = list(map(lambda x:x//2, A))
    else:
        break
print(c)

Submission status: Accepted

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

while True:
   if [i for i in a if i % 2 == 1]:
       break
   a = [i/2 for i in a]
   cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
def func():
    n = int(input())
    a = [str(bin(int(x))) for x in input().split()]
    cnt = float('inf')
    for i in range(n):
        cnt = min(cnt, len(a[i]) - 1 - a[i].rfind('1'))
    print(cnt)


if __name__ == "__main__":
    func()

Submission status: Accepted

Solution code:
n = int(input())

nums = list(map(int, input().split()))
count = 0
is_div = True

while is_div:
    for i in range(n):
        q, m = divmod(nums[i], 2)
        if m:
            is_div = False
            break
        else:
            nums[i] = q

    if is_div:
        count += 1
    else:
        break

print(count)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))
ans = 0
for i in a:
  ans |= i
n = ans&(-ans)
print(n.bit_length()-1)

Submission status: Accepted

Solution code:
import re

N = int(input())
A = [a for a in map(int,input().split())]

result = []

for a in A:
    m = re.search(r'0+$',bin(a))
    if m==None:
        result.append(0)
        break
    else:
        result.append(len(str(m.group())))

print(min(result))

Submission status: Accepted

Solution code:
n = int(input())
ls = list(map(int,input().split()))
lsb = [0 for i in range(n)]

for i in range(n):
    a = 0
    while  a == 0:
        if ls[i] % 2 == 0:
            lsb[i] += 1
            ls[i] = ls[i] // 2
        else:
            a = 1

ans = min(lsb)
print(ans)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

count=0
for i in range(min(A)):
   for ii in A:
      if ii % 2 != 0 :
         print(count)
         exit()

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

Submission status: Accepted

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

while(1):
    odd = False
    for i, v in enumerate(a):
        if a[i] % 2 == 1:
            odd = True
    if odd:
        break
    ans += 1
    for i, v in enumerate(a):
        a[i] //= 2

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

    c += 1

Submission status: Accepted

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

Submission status: Accepted

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

count = 0
list_count = []

for i in range(n):
    a = list[i]
    while a % 2 == 0:
        count += 1
        a /= 2
    list_count.append(count)
    count = 0

print(min(list_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 = [j/2 for j in a]
  count += 1

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

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:
n = input()
A = list(map(int,input().split()))

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

Submission status: Accepted

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


def calc(A):
    for i in range(len(A)):
        if A[i] == 0:
            return False
        if A[i] % 2 == 1:
            return False
        A[i] = A[i] // 2
    return True

cnt = 0
while True:
    if calc(A) == False:
        break
    cnt += 1
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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

while 1:
    for a in A:
        if a % 2 != 0:
            print(div_times)
            sys.exit()
    A = list(map(lambda x: x // 2, A))
    div_times += 1

Submission status: Accepted

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

cnt = 0
while all(map(lambda x: int(x%2)==0, input_list)):
  input_list = list(map(lambda x: x/2, input_list))
  cnt+=1
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

def update(a):
    na = [0] * n
    for i in range(len(a)):
        v = a[i]
        if v % 2 != 0:
            return False
        else:
            na[i] = v / 2
    return na

k = 0
while True:
    a = update(a)
    if not a:
        break
    k += 1
print(k)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
num = int(input())
s = list(map(int,input().split()))
count = 0
while all(i % 2 == 0 for i in s):
    s = [i // 2 for i in s]
    count += 1
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

n = 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 = [int(x) for x in input().split()]
ans = 30
for a in a_list:
    temp = 0
    while True:
        a, mod = divmod(a, 2)
        if mod == 0:
            temp += 1
            if temp >= ans:
                break
        else:
            if temp < ans:
                ans = temp
            break
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
a_list = [int(x) for x in input().split()]
ans = 30
for a in a_list:
    ba = bin(a)
    temp = len(ba) - ba.rfind("1") - 1
    if temp < ans:
        ans = temp
print(ans)

Submission status: Accepted

Solution code:
import sys
from sys import stdin

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

count = 0

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

print(count)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

while k:
    for i in range(n):
        if a[i] % 2 == 0:
            a[i] = a[i] // 2
        else:
            k = False

    if k:
        c += 1

print(c)

Submission status: Accepted

Solution code:
# coding-utf8 #

n = int(input())

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

count = 0
result = 0
flag = True

while flag:
  for index, num in enumerate(li):
    if num % 2 == 0:
      count += 1
      li[index] = num / 2

  if count == n:
    count = 0
    result += 1
  else:
    flag = False

print(result)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
"""
B- Shift Boy
"""

#出力すべき回数の定義
i = 0

#入力される整数の個数
a = int(input())

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

#数値を半分にする関数
def half(n):
    return n/2

#数値の余りを調べる関数
def mod(n):
    return n%2


#上記関数が動かせるかの確認
#c = list(map(half, b))
d = list(map(mod, b))

while d.count(1)<1:
    b = list(map(half, b))
    d = list(map(mod, b))
    i += 1

print(i)

Submission status: Accepted

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

Submission status: Accepted

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

for i in a:
  while i%2 == 0:
    i = i/2
    count += 1
  if count < mincount:
    mincount = count
  count = 0

print(mincount)

Submission status: Accepted

Solution code:
n = int(input())
a = [int(i) for i in input().split()]
for i in range(len(a)):
    a[i] = bin(a[i])
c = 10 ** 9
for i in a:
    b = 0
    for j in range(len(i)):
        if i[- 1 - j] == "0":
            b += 1
        else:
            break
    if b < c:
        c = b
print(c)

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    n = int(input())
    a = [int(i) for i in input().split()]
    min = -1

    for i in a:
        now = i
        count =0
        while now >1:
            if now %2 ==0:
                now=now//2
                count+=1
            else:
                break
        if min == -1 or min > count:
            min=count
    print(min)

Submission status: Accepted

Solution code:
import numpy as np
# 複数個格納
# A B = map(int, input().split())
# 行列化
# A = np.array(A)
# A=A.reshape(1,-1)
# A=A.T

N = int(input())
A = list(map(int, input().split()))
A = np.array(A)
A=A.reshape(1,-1)
vector0=A*0
count=0
i=0
flg=False

for i in range(100):
    B=A%2
    C=((A%2 == vector0).all())
    if C == False:
        break
    count=count+1
    A=A/2

print(count)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import numpy as np
# 複数個格納
# A B = map(int, input().split())
# 行列化
# A = np.array(A)
# A=A.reshape(1,-1)
# A=A.T

N = int(input())
A = list(map(int, input().split()))
A = np.array(A)
A=A.reshape(1,-1)
vector0=A*0
count=0
i=0
flg=False

for i in range(19999):
    B=A%2
    for k in range(N-1) :
        if B[0,k] != 0:
            flg = True
            break
    if flg:
        break
    count=count+1
    A=A/2

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    from builtins import int, map, list, print, len
    import sys
    sys.setrecursionlimit(10 ** 6)

    input = (lambda: (sys.stdin.readline()).rstrip())
    input_list = (lambda: input().split())
    input_number = (lambda: int(input()))
    input_number_list = (lambda: list(map(int, input_list())))

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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=input()
A=list(map(int,input().split()))
count = 0
while all([False if i%2!=0 else True for i in A ]):
  A=[i/2 for i in A]
  count+=1
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

r = 0

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

cnt = 0
while True:
    if len([n for n in s if n % 2 != 0]) != 0:
        print (cnt)
        break
    else:
        s = list(map(lambda n: n / 2, s))
        cnt = cnt + 1

Submission status: Accepted

Solution code:
import sys
from itertools import combinations
import math


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


def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))


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


def LS(): return list(sys.stdin.readline().rstrip().split())


n = I()
A = LI()
ans = 0
isEven = True
while 1:
    for a in A:
        if a % 2 == 1:
            isEven = False
    if isEven == False:
        break
    for a in range(len(A)):
        A[a] = A[a] // 2
    ans += 1
print(ans)

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())
A = list(map(int, input().split()))
flag = 1
cnt = 0
while(flag == 1):
  for i in range(N):
    if(A[i] % 2 == 1):
      flag = 0
  if(flag == 1):
    cnt += 1
    for i in range(N):
      A[i] = A[i] // 2
print(cnt)

Submission status: Accepted

Solution code:
#

import sys
input=sys.stdin.readline

def main():
    N=int(input())
    A=list(map(int,input().split()))
    cnt=0
    for i in range(1,36):
        d=2**i
        for Ai in A:
            if Ai%d!=0:
                print(cnt)
                exit()
        cnt+=1
    print(cnt)
    
    
    
if __name__=="__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

counter = 0
while (A%2 == 0).all():
    A //= 2
    counter += 1
print(counter)

Submission status: Accepted

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

ans = 1234567890
for i in range(N):
    counter = 0
    while A[i]%2 == 0:
        A[i] //= 2
        counter += 1
    ans = min(ans, counter)

print(ans)

Submission status: Accepted

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