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: Runtime Error

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

for e in dat:
    e = str(byte(e))

for e in dat:
    e = e.rfind('1')

print(min(dat)-1)

Submission status: Runtime Error

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

for e in dat:
     e = str(bit(e))

#for e in dat:
#     e = rfind('1')

#print(min(dat)-1)

Submission status: Runtime Error

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

for e in dat:
     e = str(bit(e))

for e in dat:
     e = rfind('1')

print(min(dat)-1)

Submission status: Runtime Error

Solution code:
6
382253568 723152896 37802240 379425024 404894720 471526144

Submission status: Runtime Error

Solution code:
input_n = int(input())
input_a = map(int,input().split())
cnt = 0
end_flg = True

while end_flg:
    for i in range(input_n):

        if input_a[i] % 2 == 0:
            input_a[i] = input_a[i]/2

        else:
            end_flg = False
            break
    if end_flg == False:break
    cnt+=1

print(cnt)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math
n = input()
a = list(map(int, input().split()))
ans = float("inf")
for _ in a:
    ans = min(len(bin(_) - bin(_).rfind("1") - 1)
print(round(ans))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

def isEven(c):
  flag = True
  for i in c:
    if i%2 != 1:
      flag = False
      break
  return flag

count = 0
flag = isEven(b)
if isEven(b)
  while flag:
    flag = isEven(b)
    count = count + 1
  print(count)
else:
  print(0)

Submission status: Runtime Error

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

def isEven(c):
  flag = True
  for i in c:
    if i%2 != 1:
      flag = False
  return flag

count = 0
if isEven(b)
  while flag:
    flag = isEven(b)
    count = count + 1
  print(count)
else:
  print(0)

Submission status: Runtime Error

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

count = 0
while True:
  for i in b:
    if i%2 != 0 && count==0:
      print(0)
      break
    elif i%2 != 0:
      print(count)
      break
    else:
      pass
  count = count+1
  b = [c/2 for c in b]

Submission status: Runtime Error

Solution code:

a = int(input())
# スペース区切りの整数の入力
b = input().split()
b = [int(i) for i in b]

c = len(b)
d = 0


while c == len(b):
  c=0
  for i in b:
    if b %2 == 0:
      c +=1
  if(c == len(a)):
    d += 1
    b = [b /2 for i in b]
print (d)

Submission status: Runtime Error

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

count = 0
while True:
  for i in b:
    if i%2 != 0 && count==0:
      print(0)
      break
    elif i%2 != 0:
      print(count)
      break
    else:
      count = count+1

Submission status: Runtime Error

Solution code:


a = int(input())
# スペース区切りの整数の入力
b = input().split()
b = [int(i) for i in b]


//a = 4
//b=[5, 6, 8, 10]

c = len(b)
d = 0


while c == len(b):
  c=0
  for i in b:
    if b %2 == 0:
      c +=1
  if(c == len(a)):
    d += 1
    b = [b /2 for i in b]
print (d)

Submission status: Runtime Error

Solution code:


a = int(input())
# スペース区切りの整数の入力
b = map(int, input().split())


//a = 4
//b=[5, 6, 8, 10]

c = len(b)
d = 0


while c == len(b):
  c=0
  for i in b:
    if b %2 == 0:
      c +=1
  if(c == len(a)):
    d += 1
    b = [b /2 for i in b]
print (d)

Submission status: Runtime Error

Solution code:
a = int(input())
b = list(map(int, input().split()))
if sum(b)%2 == 0 && sum(b) != 0:
  v = min(b)
  i = 0
  while v != 1:
    v = v/2
    i = i+1
  print(i)
else:
  print(0)

Submission status: Runtime Error

Solution code:
a = input()
b = map(int, input().split())
d = 0
for c in range(a):
    d += c
 
print(d // 2)

Submission status: Runtime Error

Solution code:
n = int(input())
a = []

for i in range(n):
    a.append(int(input()))

count = 0

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


print(count)

Submission status: Runtime Error

Solution code:
n = int(input())
a = []

for i in range(n):
    a.append(int(input()))

count = 0

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a, b, c, x = map(int, [input() for i in range(4)])
ans = 0
for i in range(a+1):
    for j in range(b+1):
        for k in range(c+1):
            if 500*i + 100*j + 50*k == x:
                ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
N = input()
A = input().split(",")
count = 0

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


print(count)

Submission status: Runtime Error

Solution code:
N = input()
A = input().split(",")
count = 0

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


print(count)

Submission status: Runtime Error

Solution code:
N = input()
A = input().split(",")
count = 0
roop = False

while True:
    for i in range(0, int(N)):
        if int(A[i]) % 2 != 0:
            roop = True
            break
        A[i] = int(A[i]) / 2
    if roop:
        break
    count+=1


print(count)

Submission status: Runtime Error

Solution code:
def half(xs):
  for x in xs:
    if x % 2 == 0:
      return xs
  for i in range(len(xs)):
    xs[i] /= 2
  return half(xs)


ls = [int(num) for num in input().split()]
print(half(ls))

Submission status: Runtime Error

Solution code:
N,K=map(int,input().split())
A=list(map(int,input().split()))
L=[]
A.sort()
A.append(200001)
for i in range(N):
  if A[i]==A[i+1]:
    continue
  else:
    x=A.count(A[i])
    L.append(x)
L.sort(reverse=True)
S=0
for i in range(K):
  S+=L[i]
print(N-S)

Submission status: Runtime Error

Solution code:
i = int(input())
num = map(int, input().split())
count = 0
while True:
  for k in range(i):
    num[k] /= 2
    if type(num[k]) is float:
      break
  count += 1
print(count)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
i = int(input())
num = map(int, input().split())
count = 0
while True:
  for k in range(i):
    num[k] =/ 2
    if type(num[k]) is float or num[k] == 0:
      break
    count += 1
print(count)

Submission status: Runtime Error

Solution code:
i = int(input())
num = map(int, input().split())
count = 0
while True:
  for k in range(i):
    num[k] = num[k] / 2
    if type(num[k]) is float:
      break
    count += 1
print(count)

Submission status: Runtime Error

Solution code:
i = int(input())
num = map(int, input().split())
count = 0
while True:
  if type(sum(num/2)) is float:
    break
  count += 1
print(count)

Submission status: Runtime Error

Solution code:
i = int(input())
num = map(int, input().split())
count = 0
while True:
  if(type(sum(num/2)) == "float"):
    break
  count += 1
print(count)

Submission status: Runtime Error

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

#関数は気持ち上に書いておきたい
def check_num():
    for i in range(N):
        if A[i] % 2 != 0:
            return False
        else:
            A[i] = A[i] / 2
    return True

#C++のmain関数みたいな
if __name__ == '__main__':
    N = int(input())
    A = list(map(int, input().split()))
    ans = 0 #counterと同じ

　#check_num == Trueの間実行する
    while True:
        if check_num() == False:
            break
        ans += 1

    print(str(ans))

Submission status: Runtime Error

Solution code:
N=int(input())
A=list(input().split())
num=int(A[0])
while num%2!=1 and num>0:
    num=num/2
    cnt+=1
mini=cnt
for i in range(N):
    cnt=0
    num=int(A[i])
    while num%2!=1 and num>0:
        num=num/2
        cnt+=1
    if cnt<mini:
        mini=cnt
print(mini)

Submission status: Runtime Error

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

t = 0
bool = True
while bool:
    t += 1
    for j in l:
        if j % 2 == 1:
            bool = False
            break
        else:
            l /= 2
print(t-1)

Submission status: Runtime Error

Solution code:
i = int(input())
l = [int(i) for i in list(input())]

j = 0
t = 0
while True:
  k = l[j] % 2
  if k == 1:
    break
  else:
    l[j] /= 2
    
  j = j + 1 % i
  if j == 0:
    t += 1
print(t)

Submission status: Runtime Error

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: Runtime Error

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: Runtime Error

Solution code:
#include "bits/stdc++.h"
using namespace std;

int div_count(int);

int main(void) {
    int N;
    cin >> N;

    // 割れる最大回数の計算
    int count = 0, tmp;
    for (int i=0; i < N; i++) {
        int A_i;
        std::cin >> A_i;

        tmp = div_count(A_i);
        // 2の倍数の判定 2の倍数でなければ 0 を出力
        if (tmp >= 1) {
            if (i == 0) {
                count = tmp;  // i==0 の時、ひとまず格納
            }

            if (tmp < count) {
                // div_count(割れる数) が小さければcount を更新
                // 因数に一番少なく2が入っているものの割れる回数を抽出
                count = tmp;
            }
        } else {
                count = 0;
                break;
        }
    }
    std::cout << count << std::endl;

    return 0;
}

int div_count(int num) {
    int count = 0;
    while(num % 2 == 0) {
        num /= 2;
        count++;
    }
    return count;
}

Submission status: Runtime Error

Solution code:
n=int(input())
A=map(int,input().split())
c=0
loop=True
while(loop):
  for a in A:
    if a%2!=0:
      loop=False
      break
  a = map(lambda a//2, a)
  count+=1
print(c)

Submission status: Runtime Error

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

while True:
    if a%2 == 0 and b%2 == 0 and c%2 == 0:
        a = a/2
        b = b/2
        c = c/2
        num += 1
    else:
        print(num)
        break

Submission status: Runtime Error

Solution code:
N=int(raw_input())
A=map(int,raw_input().split())
def f(x):
  cnt = 0
  while x >= 2:
    x /= 2
    cnt += 1
  return cnt
C=map(f,A)
pritn min(C)

Submission status: Runtime Error

Solution code:
from math import gcd
from functools import reduce
input()
print(len(bin(reduce(gcd,list(map(int,input().split())))))-3)

Submission status: Runtime Error

Solution code:
#codigng: utf-8
from sys import stdin

N = int(stdin.readline().rstrip())
num = stdin.readline().rstrip().split()
i = 0
Flag = True
while Flag:
    for x in num:
        if x % 2 == 0:
            x /= 2
        else:
            print(i)
            Flag = False
            break
    else:
        i += 1

Submission status: Runtime Error

Solution code:
#codigng: utf-8
from sys import stdin

N = int(stdin.readline().rstrip())
num = stdin.readline().rstrip().split()
i = 0
Flag = True
while Flag:
    for i, x in enumerate(num):
        if x % 2 == 0:
            num[i] /= 2
        else:
            print(i)
            Flag = False
            break
    else:
        i += 1

Submission status: Runtime Error

Solution code:
#codigng: utf-8
from sys import stdin

N = int(stdin.readline().rstrip())
num = stdin.readline().rstrip().split()
i = 0
Flag = True
while Flag:
    for x in num:
        if x % 2 == 0:
            x /= 2
        else:
            print(i)
            Flag = False
            break

Submission status: Runtime Error

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

numbers = e[0]

def has_odd(numbers):
    odds = [number for number in numbers if number%2 == 1]
    if len(odds) > 0:
        return True
    else:
        return False

divid_count = 0
while True:

    if not has_odd(numbers):
        print("all even")
        numbers = [int(number/2) for number in numbers]
        divid_count += 1
    else:
        break

print(divid_count)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
input_num = input()
input = input().split()

times = 0
i = 0

while True:
  if int(input[i]) % 2 == 0:
    i += 1
    if i == input_num:
      i = 0
      times += 1
  else:
    break

print(times)

Submission status: Runtime Error

Solution code:
input_num = input()
input = input().split()

times = 0
i = 0

while true:
  if input % 2 == 0:
    i += 1
    if i % input_num == 0:
      times += 1
  else:
    break

print(times)

Submission status: Runtime Error

Solution code:
import fraction
from functools import reduce

def factorize(n):
    fct = []  # prime factor
    b, e = 2, 0  # base, exponent
    while b * b <= n:
        while n % b == 0:
            n = n // b
            e = e + 1
        if e > 0:
            fct.append((b, e))
        b, e = b + 1, 0
    if n > 1:
        fct.append((n, 1))
    return fct


def reduce_gcd(numbers):
    return reduce(fraction.gcd, numbers)


def main():
    N = int(input())
    A_N = list(map(int, input().rstrip().split()))
    gcd = reduce_gcd(A_N)
    factorized = factorize(gcd)
    if factorized:
        print(factorized[0][1])
    else:
        print('0')


if __name__ == '__main__':
    main()

Submission status: Runtime Error

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

def cnt(arr):
    g = c = 0
    for i in arr: g = math.gcd(g,i)
    while g%2==0:
        g/=2
        c += 1
    return c

print(cnt(a))

Submission status: Runtime Error

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: Runtime Error

Solution code:
import sympy as sp
x=[]
N =int(input())
array=list(map(int, input().split()))
for i in array:
    if i%2==0:
        x.append(sp.factorint(i)[2])
    else:
        x.append(0)
print(min(x))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a=input()
b=list(map(int,input().split())
count=0
for i in b:
  if b%2==0:
    count+=1
    continue
  else:
    break

Submission status: Runtime Error

Solution code:
import re;
import sys;
import math;
from functools import reduce;
sys.stdin.readline()
a=reduce(math.gcd,map(int, sys.stdin.readline()[:-1].split()))
m=re.search(r'.*?1?(0+)$','{0:b}0'.format(a))
print(len(m[1])-1)

Submission status: Runtime Error

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).refind('1') - 1)

Submission status: Runtime Error

Solution code:
N = int(input())
As = [int(input()) for _ in range(N)]

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

Submission status: Runtime Error

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

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

print(count)

Submission status: Runtime Error

Solution code:
input();print(max(int(i) for i in input().split() if int(i) in [1 << i for i in range(9)]))

Submission status: Runtime Error

Solution code:
n = [1 << i for i range(9)]
print(max(int(i) for i in input().split() if int(i) in n))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

for i in range(n):
 if a[i] & 1: break
 a[i] = x//2
print(i)

Submission status: Runtime Error

Solution code:
import math as m
n = int(input())
numbers = map(int,input().split())
order = []
 
for i in range(n):
  if numbers[i] == 0:
    a = 0
  else:
    a = m.floor(m.log(numbers[i],2))
  order.append(a)
print(min(order))

Submission status: Runtime Error

Solution code:
import math as m
n = int(input())
numbers = map(int,input().split())
order = []

for i in range(6):
  if numbers[i] == 0:
    a = 0
  else:
    a = m.floor(m.log(numbers[i],2))
  order.append(a)
print(min(order))

Submission status: Runtime Error

Solution code:
n = int(input())
nums = [i for i in map(int, sys.stdin.readline().split())]
cnt = 0
while True:
    for num in nums:
        if num % 2 == 0:
            num /= 2
        else:
            break
    cnt += 1
print(cnt)

Submission status: Runtime Error

Solution code:
s = input()
t = input()

s_2 = "".join(sorted(s))
t_2 = "".join(sorted(t,reverse = True)

if(s_2 < t_2):
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
    import numpy as np
    N = list(input())
    a = list(map(int,input().split()))
     
    for i in range(1,10):
      b = np.array([n/2 if n%2==0 else 0 for n in a])
      a = b
      if 0 in list(b):
        print(i-1)
        exit()

Submission status: Runtime Error

Solution code:
n=int(input())
num=[]
i=0
while n>0
  num.add(int(input()))
  n -= 1
while True:
  for j in num:
    if j%2==1:
      print(i)
      break
    else:
      j=j/2
  i += 1

Submission status: Runtime Error

Solution code:
raw_input()
t=map(int, raw_input().split(" "))
count=0

while True:
    for i in t:
        flag=True
        if i % 2 != 0:
            flag=False
    if !flag:
        break
    else:
        t = [x / 2 for x in t]
        count+=1
        
print count

Submission status: Runtime Error

Solution code:
n = input()
b = [int(x) for x in input().split()]
c = 0
while True:
    for i,x in enumerate(b):
        if x%2 != 0:
            break
        b[x] = int(x/2)
    c += 1
print(c)

Submission status: Runtime Error

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

N = input()
array = map(int,input().split())
resalt = []

if array[0] != (array[0]/2==0):
	print("0")
else:
	flg = 0
	while 1:
		array = array/2
		flg += 1
		for i in range(N):
			if array[i]/2 != 0:
				break
	print(flg)

Submission status: Runtime Error

Solution code:
n = input()
b = ['{0:b}'.format(int(x)) for x in input().split()]
a = 0
for c in b:
    m = re.match(r'.*(10*)$',c)
    if m is None:
      continue
    a = max(a,len(m[1])-1)
print(a)

Submission status: Runtime Error

Solution code:
n = input()
b = ['{0:b}'.format(int(x)) for x in input().split()]
a = 0
for c in b:
    m = re.match(r'.*(10*)$',c)
    print(m[1])   
    if m is None:
      continue
    a = max(a,len(m[1])-1)
print(a)

Submission status: Runtime Error

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

ans=0
while True:
    for i in range(N):
        if(a[i]%2 == 1):
            break:
    ans = ans+1

    for i in range(N):
        a[i] = a[i]/2

print(ans)

Submission status: Runtime Error

Solution code:
import functools
import math

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

x = functools.reduce(math.gcd, A)

flag = 0
i = 0

while flag == 0:
    if x % pow(2,i) == 0:
        i += 1
    else :
        flag = 1

print(i-1)