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: Wrong Answer

Solution code:
n = input()
num = []
num = input().split(" ")
 
t = 0 
a=0 
while True: 
  num2=[] 
  for i in num: 
    if not (int(i)%2):
      a =1
      break
    num2.append(int(i)%2)
  num = num2
  if a==1: 
     print(t) 
     break
  t+=1

Submission status: Wrong Answer

Solution code:
n = input()
num = []
num = input().split(" ")
 
t = 0 
a=0 
while True: 
  num2=[] 
  for i in num: 
    if not (int(i)%2):
      a =1
      break
    num2.append(int(i)%2)
  num = num2
  t+=1 
  if a==1: 
     print(t) 
     break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
lis = list(map(int,input().split()))
 
def counter(x):
  count = 0 
  while x%2 ==0:
    x = x/2
    count += 1
  return count
 
ans = counter(lis[0])
for i in lis:
  if counter(i) < ans:
    ans = counter(i)

Submission status: Wrong Answer

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

def counter(x):
  count = 0 
  while x%2 ==0:
    x = x/2
    count += 1
  return count

ans = 0
for i in lis:
  if counter(i) > ans:
    ans = counter(i)
print(counter(i))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
num = int(input())
a = list(map(int, input().split()))
av_count = 0
out_count = 0
for i in a:
    if i % 2 == 0:
        av_count += 1
    else:
        pass
if num == av_count:
    for j in a:
        j /= 2
        out_count += 1
print(out_count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
number = input().split()
number = [int(s) for s in number]
for i in range(1, 30):
   frag = 0
   for j in range(N):
      if number[j] % (2**i) != 0:
         frag = 1
         break
   if frag == 1:
      print(i - 1)
      break

Submission status: Wrong Answer

Solution code:
N = int(input())
number = input().split()
number = [int(s) for s in number]
for i in range(1, 28):
   frag = 0
   for j in range(N):
      if number[j] % (2**i) != 0:
         frag = 1
         break
   if frag == 1:
      print(i - 1)
      break

Submission status: Wrong Answer

Solution code:
N = int(input())
number = input().split()
number = [int(s) for s in number]
for i in range(1, 27):
   frag = 0
   for j in range(N):
      if number[j] % (2**i) != 0:
         frag = 1
         break
   if frag == 1:
      print(i - 1)
      break

Submission status: Wrong Answer

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

ans = 999999
for a in array:
  cnt = 0
  while(a % 2 == 1):
    cnt += 1
    a = a / 2
  ans = min(ans, cnt)
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
a = list(map(int,input().split()))
def f(x):
    return x//2
S = sum(map(f,a))
print(S)

Submission status: Wrong Answer

Solution code:
import math

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

isAllEven = len([x for x in arr if x % 2 == 0]) == n

if not isAllEven:
   print(0)
   exit()

arr.sort()
print(int(math.log2(arr[0])))

Submission status: Wrong Answer

Solution code:
import math

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

isAllEven = len([x for x in arr if x % 2 == 0]) == n

if not isAllEven:
   print(0)
   exit()

arr.sort()
print(math.log2(arr[0]))

Submission status: Wrong Answer

Solution code:
import math

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

max_even = 0
for x in arr:
   if x % 2 == 0 and x > max_even:
      max_even = x 

print(math.log2(max_even))

Submission status: Wrong Answer

Solution code:
N = input()
A = list(map(int,input().split()))
print(A)
res = 0
while True:
    result = 0
    for i in A:
        if i%2:
            result = 1
    if result:
        break

    A = [i/2 for i in A]
    res += 1

print(res)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def devide_counter(num):
    devide_count = 0
    while num%2==0:
        num /= 2
        devide_count += 1
    return devide_count

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

devide_count_list=[]
for a in A:
    devide_count_list.append(devide_counter(a))
    
print(min(devide_count_list))

Submission status: Wrong Answer

Solution code:
import numpy as np

N = int(input())
num = list(map(int, input().split()))
num = np.array(num)
print(num)
count = 0
judge = 0

for i in range(N):
    if (num[i] % 2) == 1:
        judge = 1
        
while judge == 0:
    for i in range(N):
        if (num[i] % 2) == 1:
            judge = 1
    num = num/2
    count += 1
print(count)

Submission status: Wrong Answer

Solution code:
import numpy as np

N = int(input())
num = list(map(int, input().split()))
num = np.array(num)
count = 0
judge = 0

while judge == 0:
    num = num/2
    count += 1
    for i in range(N):
        if (num[i] % 2) == 1:
            judge = 1
    
print(count)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
nums = list(map(int, input().split()))
count = 0
while not next((True for num in nums if num % 2 == 1 or num < 1), False):
    nums = list(map(lambda x: x // 2, nums))
    count += 1

print(count)

Submission status: Wrong Answer

Solution code:
n = int(input())
nums = map(int, input().split())
count = 0
while not next((True for num in nums if num % 2 == 1), True):
    nums = map(lambda x: x // 2, nums)
    count += 1

print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = list(map(int, input()))[0]
l = list(map(int, input().split()))
c = 0
# print(len(list(filter(lambda x: x % 2 == 0, l))))
# print(N)

while len(list(filter(lambda x: x % 2 == 0, l))) == N:
    l = list(map(lambda x: x / 2 ,l))
    # print(l)
    # print(list(filter(lambda x: x % 2 == 0, l)))
    c += 1

print(c)

Submission status: Wrong Answer

Solution code:
N = list(map(int, input()))[0]
l = list(map(int, input().split()))
c = 0
# print(len(list(filter(lambda x: x % 2 == 0, l))))
# print(N)

while len(list(filter(lambda x: x % 2 == 0, l))) == N:
    l = list(map(lambda x: x / 2 ,l))
    #print(l)
    c += 1

print(c)

Submission status: Wrong Answer

Solution code:
N = list(map(int, input()))[0]
l = list(map(int, input().split()))
c = 0
# print(len(list(filter(lambda x: x % 2 == 0, l))))
# print(N)

while len(list(filter(lambda x: x % 2 == 0, l))) == N:
    l = list(map(lambda x: x / 2 ,l))
    print(l)
    c += 1

print(c)

Submission status: Wrong Answer

Solution code:
N = list(map(int, input()))[0]
l = list(map(int, input().split()))
c = 0
# print(len(list(filter(lambda x: x % 2 == 0, l))))
# print(N)
while len(list(filter(lambda x: x % 2 == 0, l))) == N:
    l = list(map(lambda x: x // 2 ,l))
    c += 1

print(c)

Submission status: Wrong Answer

Solution code:

a=int(input())
b=[int(i) for i in input().split()]
d=-1
c=b
for i in range(1000000):
	if (2*sum(c)/2).is_integer()==True:
		c=[i/2 for i in c]
		d=d+1
	else:
		break

print(d)

Submission status: Wrong Answer

Solution code:
a=int(input())
b=[int(i) for i in input().split()]
c=-1
d=2*sum(b)/2
for i in range(10000000000):
	if d.is_integer()==False:
		break
	else:
		d=d/2
		c=c+1
print(c)

Submission status: Wrong Answer

Solution code:
a=int(input())
b=[int(i) for i in input().split()]
c=-1
d=2*sum(b)/2
for i in range(10000000):
	if d.is_integer()==False:
		break
	else:
		d=d/2
		c=c+1
print(c)

Submission status: Wrong Answer

Solution code:
def choise(n,s):
    k = 0
    str = s.split()
    str = list(map(lambda x: int(x), str))
    while (len(str) == 3):
        str = list(filter(lambda x: x % 2 == 0, str))
        if (len(str) == 3): k += 1
        str = list(map(lambda x: x / 2, str))
    return k

if __name__ == "__main__":
    n = input()
    s = input()

    print(choise(n,s))

Submission status: Wrong Answer

Solution code:
N = int(input())

numlist = input().split()
# numlist = map(int,input().split())

print(N,numlist)

def div(list):
    ret = []
    for i in list:
        ret.append(int(i)/ 2)
    return ret

def chkEven(list):
    for i in list:
        if not int(i) % 2 == 0:
            return False
    return True

cnt = 0


while chkEven(numlist):
    cnt += 1
    numlist = div(numlist)
    print('xxx: ',numlist)

print(cnt)

Submission status: Wrong Answer

Solution code:
input()
n=eval(input().replace(' ','|'))
print(len(bin(n))-3)

Submission status: Wrong Answer

Solution code:
n=int(input())
a=list(map(str,input().split()))
a=eval("+".join(a))
l=0
while a%2==0:
  a=a//2
  l+=1
print(l)

Submission status: Wrong Answer

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

for i in range(e[0][0]):
    tmp = e[1][i]
    count = 0

    while True:
        tmp, m = divmod(tmp, 2)
        if m == 1:
            break

        count += 1

    if count < max_count:
        max_count = count

print(max_count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = input()
c = []
c = list(map(int, input().split()))
minN = c[0]
for i in c:
    if(minN > i):
        minN = i
cnt = 0
while True:
    minN = int(minN / 2)
    if(minN%2==1):
        print(cnt)
        break
    elif(minN==0):
        print(cnt)
        break
    cnt = cnt + 1

Submission status: Wrong Answer

Solution code:
a = input()
c = []
c = list(map(int, input().split()))
print(c)
minN = c[0]
for i in c:
    if(minN > i):
        minN = i
cnt = 0
while True:
    minN = int(minN / 2)
    if(minN%2==1):
        print(cnt)
        break
    elif(minN==0):
        print(cnt)
        break
    cnt = cnt + 1

Submission status: Wrong Answer

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

while True:
  if sum(A) %2 !=0:
    print(count)
    exit()
  else:
    A=list(map(lambda x:x/2,A))
    count+=1

Submission status: Wrong Answer

Solution code:
n=int(input())
dat=list(map(int, input().split()))
      
re = 0
flag=True
#while (flag==True):
#       for e in dat:
#            if (e%2==1):
#                flag=False
#                break
#            else:
#                e = e/2
#        re = re+1

print(re)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())                                                            

a = []
a = list(map(int, input().split()))

product = 1

for i in range(n):
  product *= a[i]

while product % 2 == 0:
    for i in range(n):
      a[i] = a[i]/2
    for i in range(n):
      product = 1
      product *= a[i]
print(a)

Submission status: Wrong Answer

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

for e in dat:
       e = bin(e)[2:]
       e = list(e).reverse()
      
re = []

for e in dat:
      
      try:
          w=e.index('1')
          re.append(w)
      except Exception:
          re.append(0)

print(min(re))

Submission status: Wrong Answer

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

for e in dat:
       e = bin(e)[2:]
       e = list(e).reverse()

re = []

for e in dat:
      try:
          w=e.index('1')
          re.append(w)
      except Exception:
          re.append(0)

print(min(re))

Submission status: Wrong Answer

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

for e in dat:
       e = bin(e)[2:]
       e = list(e).reverse()

re = []

for e in dat:
      try:
          w=e.index(1)
          re.append(w)
      except Exception:
          re.append(0)

print(min(re))

Submission status: Wrong Answer

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

for e in dat:
       e = bin(e)[2:]
       e = list(e).reverse()

re = []

for e in dat:
      try:
          w=e.index('1')
          re.append(w)
      except Exception:
          re.append(0)

print(min(re))
         
       

print(1)

Submission status: Wrong Answer

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

for e in dat:
       e = bin(e)[2:]
       e = list(e).reverse()

#for e in dat:
       

print(1)

Submission status: Wrong Answer

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

for e in dat:
       e = bin(e)[2:]
       e = list(e).reverse()

Submission status: Wrong Answer

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

for e in dat:
       e = bin(e)[2:]

Submission status: Wrong Answer

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

flag=True
count = 0

#while flag==True:
  #   for i in range(n):
      #   if dat[i]%2==1:
       #      flag=False
      #       break
       #   else:
         #     dat[i] = dat[i]/2
       #count = count+1

print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
dat = list(map(int, input().split()))
dan = []
for e in dat:
    e = list(str(bin(e)))
    e.reverse()

re = 0
for e in dat:
     re=re+1
     
     
print(re)

Submission status: Wrong Answer

Solution code:
n=int(input())
dat = list(map(int, input().split()))
dan = []
for e in dat:
    e = list(str(bin(e)))
    e.reverse()

Submission status: Wrong Answer

Solution code:
n=int(input())
dat = list(map(int, input().split()))
dan = []
for e in dat:
    e = list(str(bin(e)))
    e.reverse()

Submission status: Wrong Answer

Solution code:
n=int(input())
dat = list(map(int, input().split()))
dan = []
for e in dat:
    e = list(str(bin(e)))

Submission status: Wrong Answer

Solution code:
n=int(input())
dat = list(map(int, input().split()))
dan = []
for e in dat:
    e = str(bin(e))
    e=e[2:]

Submission status: Wrong Answer

Solution code:
n=int(input())
dat = list(map(int, input().split()))
dan = []
for e in dat:
    e = str(bin(e))
    e=e[2:]
       
#for i in range(n):
#      j = -1
#     while j > -len(dat[i]):
#          if dat[i][j]=='1':
 #              dan.append(-j-1)
#               break
#          else:
#               j = j - 1

Submission status: Wrong Answer

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

for e in dat:
    e = str(bin(e))
    e=e[2:]
       

#print(min(dat)-1)

Submission status: Wrong Answer

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

for e in dat:
    e = str(bin(e))
    e=e[2:]


#print(min(dat)-1)

Submission status: Wrong Answer

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

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

for e in dat:
    print(e)

#print(min(dat)-1)

Submission status: Wrong Answer

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

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

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

#print(min(dat)-1)

Submission status: Wrong Answer

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

for e in dat:
    e = bin(e)

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

#print(min(dat)-1)

Submission status: Wrong Answer

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: Wrong Answer

Solution code:
input()
nums = input().split()
result = 18
for num in nums:
  num = int(num)
  div_times = 0
  while (num & 1) == 0:
    num = num >> 1
    div_times += 1
  if div_times < result:
    result = div_times
print(result)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(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: Wrong Answer

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

Submission status: Wrong Answer

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

while True:
    if A%2!=0:
        break
    A = A/2
    cnt+=1
    
print(cnt)

Submission status: Wrong Answer

Solution code:
n=int(input())
a=list(map(int,input().split()))
for i in range(n):
    if any([a[j]%2==1 for j in range(n)]):
        break
    for k in range(n):
        a[k]//=2
print(i)

Submission status: Wrong Answer

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

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

count = 0
flag = isEven(b)
if flag:
  while flag:
    flag = isEven(b)
    count = count + 1
    b = [c/2 for c in b]
  print(count)
else:
  print(0)

Submission status: Wrong Answer

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

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

count = 0
flag = isEven(b)
if flag:
  while flag:
    flag = isEven(b)
    count = count + 1
    b = [c/2 for c in b]
  print(count)
else:
  print(0)

Submission status: Wrong Answer

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 flag:
  while flag:
    flag = isEven(b)
    count = count + 1
    b = [c/2 for c in b]
  print(count)
else:
  print(0)

Submission status: Wrong Answer

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 flag:
  while flag:
    flag = isEven(b)
    count = count + 1
  print(count)
else:
  print(0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
a = int(input())
b = map(int, input().split())
d = 0
for c in range(a):
    d += c

print(d // 2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def b_shift_only(N, A):
    # 戦略: Aのうち最も値の小さな偶数が解に影響を与える。
    # Aに奇数が含まれているなら、解が0であることが確定
    a_min = float('inf')
    for a in A:
        if a % 2 == 1:
            return 0
        a_min = min(a_min, a)
    
    ans = 0
    while a_min % 2 == 0:
        a_min //= 2
        ans += 1
    return ans

N = int(input())
A = [int(i) for i in input().split()]
print(b_shift_only(N, A))

Submission status: Wrong Answer

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

res = []
for a in A:
    for i in range(12):
        if a % 2 != 0:
            break
        a = a // 2
    res.append(i)

print(min(res))

Submission status: Wrong Answer

Solution code:
n=int(input())
a=list(map(int,input().split()))
ans=float("inf")
for i in a:
    i=bin(i).count("0")
    if ans > i :
        ans=i
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
A = list(map(int,input().split()))
B = []
answer = 100
for i in range(N) :
    if A[i] % 2 == 0 :
        B.append(A[i])
if len(B) == 0 :
    print(0)
else :
    for i in range(N) :
        ans = 0
        for j in range(1,10) :
            if A[i] % 2**j == 0 :
                ans += 1
            else :
                answer = min(answer,ans)
                break
if answer != 100 :
    print(answer)

Submission status: Wrong Answer

Solution code:
N = int(input())
A = list(map(int,input().split()))
B = []
answer = 100
for i in range(N) :
    if A[i] % 2 == 0 :
        B.append(A[i])
if len(B) == 0 :
    print(1)
else :
    for i in range(N) :
        ans = 0
        for j in range(1,10) :
            if A[i] % 2**j == 0 :
                ans += 1
            else :
                answer = min(answer,ans)
                break
print(answer)

Submission status: Wrong Answer

Solution code:
N = int(input())
A = list(map(int,input().split()))
B = []
answer = 0
for i in range(N) :
    if A[i] % 2 == 0 :
        B.append(A[i])
if len(B) == 0 :
    print(1)
else :
    for i in range(N) :
        ans = 0
        for j in range(1,10) :
            if A[i] % 2**j == 0 :
                ans += 1
            else :
                answer = max(answer,ans)
                break
print(answer)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def answer(in0, in1):

    N = int(in0)
    A = [int(a) for a in in1.split()]

    print(N)
    print(A)
    cnt = 0

    while (True):
        for i in range(N):
            a = A[i]
            if a % 2 != 0:
                print(cnt)
                return
            A[i] = int(a / 2)
        cnt += 1


answer(input(), input())

Submission status: Wrong Answer

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

n = int(input())
a = []

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

cnt = 0
for i in range(3):
    flag = 0
    for j in a:
        if j%2 != 0:
            flag = 1
            break
        elif j == 0:
            flag = 1
            break

    if flag == 1:
        cnt = i
        break
    else:
        for k in range(n):
            a[k] = a[k]/2

print(cnt)

Submission status: Wrong Answer

Solution code:
N = int(input())
a = list(map(int,input().split()))
while all([e % 2 == 0 for e in a]) == True:
    for i in range(N):
        a[i] = a[i]/2

print(a)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math


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)


def main():
    ls = [int(num) for num in input().split()]
    a = ls[0]
    res = half(ls)
    b = ls[0]
    if b != 0:
        print("{:.0f}".format(math.log2(a / b)))
    else:
        print("0")


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

cnt=0
while n%2==0:
    n=n/2
    cnt=cnt+1
    
print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for x in range(20):
  for y in range(N):
    if  A[y]%2==0:
      A[y]=A[y]/2    
    else:
      print(x)
      flag=1
      break
  if flag==1:
    break

Submission status: Wrong Answer

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

for x in range(10):
  for y in range(N):
    if  A[y]%2==0:
      A[y]=A[y]/2    
    else:
      print(x)
      flag=1
      break
  if flag==1:
    break

Submission status: Wrong Answer

Solution code:
input()
print(bin(sum(map(int, input().split())))[::-1].find("1"))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

count = 0
for i in range(n):
    for j in a:
        if j % 2 **(i+1) != 0:
            print(i)
            break
    count += 1

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def SolveABC081B(array):
    print max(j for j in range(10) if all(i % 2**j == 0 for i in array))
    
input()
inputArray = map(int, raw_input().split())
SolveABC081B(inputArray)

Submission status: Wrong Answer

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

n=0
def power(figure):
    if figure%2==0:
        return True
    else:
        return False

while len(list(filter(power,l)))==N:
    k=map(lambda x: x/2,l)
    l=list(k)
    n=+1
print(n)

Submission status: Wrong Answer

Solution code:
n = int(input())
a_list = list(map(int, input().split()))
n_operation = 0
for i in range(n+1):
    even_len = len([a for a in a_list if a % 2 == 0])
    if len(a_list) != even_len:
        print(n_operation)
        exit()
    else:
        a_list = [a / 2 for a in a_list]
        n_operation += 1

print(n_operation)