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

for i in a:
    if i % 2 != 0:
        print(ans)
        exit()
    if i % 2 == 0 and i % 3 == 0:
        minodd = i
        break

if minodd != 0:
    while minodd % 2 == 0:
        minodd = minodd // 2
        ans += 1
else:
    while x % 2 == 0:
        x = x // 2
        ans += 1
print(ans)

Submission status: Wrong Answer

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

for i in a:
    if i % 2 != 0:
        break
    if i % 2 == 0 and i % 3 == 0:
        minodd = i
        break

if minodd != 0:
    while minodd % 2 == 0:
        minodd = minodd // 2
        ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
import numpy as np

_ = input()
input_list = input().split()
input_list = np.array([int(num) for num in input_list])

cnt = 0
while int(sum(input_list) % 2) != 1:
  input_list = input_list / 2
  cnt+=1
print(cnt)

Submission status: Wrong Answer

Solution code:
_ = input()
input_list = input().split()
input_list = [int(num) for num in input_list]

cnt = 0
while int(sum(input_list) % 2) != 1:
  input_list = [num // 2 for num in input_list]
  cnt+=1
print(cnt)

Submission status: Wrong Answer

Solution code:
_ = input()
input_list = input().split()
input_list = [int(num) for num in input_list]

cnt = 0
while int(sum(input_list) % 2) == 1:
  input_list = [num // 2 for num in input_list]
  cnt+=1
print(cnt)

Submission status: Wrong Answer

Solution code:
input_list = input().split()
input_list = [int(num) for num in input_list]

cnt = 0
while int(sum(input_list) % 2) == 1:
  input_list = [num // 2 for num in input_list]
  cnt+=1
print(cnt)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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(N):
    B=A%2
    C=((A%2 == vector0).all())
    if C == False:
        break
    count=count+1
    A=A/2

print(count)

Submission status: Wrong Answer

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(3):
    B=A%2
    C=((A%2 == vector0).all())
    if C == False:
        break
    count=count+1
    A=A/2

print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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
    ans+=1
print(ans)

Submission status: Wrong Answer

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

# for i in a:
#   if i%2 == 1:
#     print(0)
#     exit()

r = 0

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

Submission status: Wrong Answer

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

for i in a:
  if i%2 == 1:
    print(0)
    exit()

r = 0

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

Submission status: Wrong Answer

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

for i in a:
  if i%2 == 1:
    print(0)
    exit()
r = 0
for i in a:
  r += 1
  if i//2%2 == 1:
    print(r)
    exit()

print(r)

Submission status: Wrong Answer

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

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

print(res)

Submission status: Wrong Answer

Solution code:
N = int(input()) #1行目を取得する
a = list(map(int,input().split()))

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

Submission status: Wrong Answer

Solution code:


def is_odd(num):
    return num % 2 != 0

def odd_in_list(num_list):
    for num in num_list:
        if is_odd(num):
            return True
    
    return False

def half(num):
    return num / 2

def shift_only(num_list, counter):
    if odd_in_list(num_list):
        print('its over')
        return counter
    else:
        new_list = list(map(half, num_list))
        counter += 1
        print('continue', num_list, counter)
        return shift_only(new_list, counter)


n = int(input())

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


counter = 0
flag = True

while flag:
    for i in range(n):
        print(a_list[i])
        if a_list[i] % 2 != 0:
            print('is odd')
            flag = False
            break
        else:
            continue
    
    if not flag:
        break
    
    for i in range(n):
        a_list[i] /= 2
    counter += 1

    print('-----loop------')
    print(a_list, counter)

print(counter)

Submission status: Wrong Answer

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

main()

Submission status: Wrong Answer

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

main()

Submission status: Wrong Answer

Solution code:
# 標準入力の読み込み（回数）
n=int(input())
# 標準入力の読み込み（数値列）
list_1=input().split()
list_2=list(range(len(list_1)))
for i in range(len(list_1)):
  list_1[i]=int(list_1[i])
# カウンタの定義
ctr = 0
# 判定プログラム
for i in range(n):
  for j in range(len(list_1)):
    list_2[j]=list_1[j]%2
    list_1[j]/=2
  s=sum(list_2)
  if(s!=0):
    break
  else:
    ctr+=1
print(ctr)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())
number = list(map(int,input().split()))
sum = 0
x = 0

while x == 0:
    for i in range(N):
        if(number[i] %2 != 0):
            x = 1
            break
        else:
            for j in range(N):
                 number[j] = number[j]/2
            
            sum += 1
            
print(sum)

Submission status: Wrong Answer

Solution code:
N=int(input())
number = list(map(int,input().split()))
sum = 0
x = 0

while x == 0:
    for i in range(N):
        if(number[i] %2 != 0):
            x = 1
            break
        else:
            for j in range(N):
                 number[j] = number[j]//2
            
            sum += 1
            
print(sum)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = 10 ** 6

for a in A:
  c = 0
  while a % 2 == 0:
    a //= 2
  ans = min(c,ans)
  
print(ans)

Submission status: Wrong Answer

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

even_counter = 0
for n in range(N):
  if num_list[n]%2 != 0:
    print('0')
    break
  else:
    even_counter += 1
  
  if even_counter == N:
    min_counter = float('inf')
    for i in range(N):
          num =  num_list[i]
          counter = 0
          while num%2 == 0:
            counter += 1
            num //= 2
          if counter <= min_counter:
            min_counter = counter
      
    print(counter)

Submission status: Wrong Answer

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

even_counter = 0
for n in range(N):
  if num_list[n]%2 != 0:
    print('0')
    break
  else:
    even_counter += 1
  
  if even_counter == N:
    num_min = min(num_list)
    counter = 0
    while num_min%2 == 0:
      counter += 1
      num_min //= 2
    print(counter)

Submission status: Wrong Answer

Solution code:
##81B
n = int(input())
a = [int(i) for i in input().split()]
count = 0

action = [i % 2 for i in a]
if action.count(0) == n:
    min = min(a)
    while min % 2 == 0:
        min = min / 2
        count += 1
    print(count)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
N = int(input())
A = map(int, input().split())
count = 0
for a in A:
    if a%2==0:
        count+=1
    else:
        print(count)
        break

Submission status: Wrong Answer

Solution code:
N = int(input())
As = [int(c) for c in input().split()]
counter = 0
w = 0


while w == 0:
    for i in range(N):
        if As[i] % 2 != 0:
            w = 1
        As[i] = int(As[i] / 2)
    counter += 1

print(counter)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = []
A = input().split()
f = False
for i in range(n):
    a.append(int(A[i]))
    if int(A[i]) % 2 != 0:
        f = True
ans = 0

if f:
    print(ans)
else:
    
    
    while True:
        print (a)
        for i in range(len(a)):
            nx = int(a[i]) / 2.0
            if nx % 2 != 0:
                f = True
            a[i] = nx
        if f:
            print (a)
            break
        else:
            ans += 1
    print(ans)
    ##3
    ##1: 8 12 40
    ##2: 4 6 20
    ##3: 2 3 10

Submission status: Wrong Answer

Solution code:

n = int(input())

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

count = 0

for i in range(n):
    if i + 1 != n:
        if a[i] % 2 == 0:
            continue
        else:
            break
    else:
        if a[i] % 2 == 0:
            count += 1

print(count)

Submission status: Wrong Answer

Solution code:
# For taking integer inputs.
def inp():
    return(int(input()))


# For taking List inputs.
def inlist():
    return(list(map(int, input().split())))


# For taking string inputs. Actually it returns a List of Characters, instead of a string, which is easier to use in Python, because in Python, Strings are Immutable.
def instr():
    s = input()
    return(list(s[:len(s)]))


# For taking space seperated integer variable inputs.
def invr():
    return(map(int, input().split()))


N = input()
A = inlist()

s = sum(A)
c = 0
while s % 2 == 0:
    c += 1
    s = s // 2
print(c)

Submission status: Wrong Answer

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

#############
# Libraries #
#############

import sys
input = sys.stdin.readline

import math
#from math import gcd
import bisect
from collections import defaultdict
from collections import deque
from functools import lru_cache


#############
# Constants #
#############

MOD = 10**9+7
INF = float('inf')

#############
# Functions #
#############

######INPUT######
def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]

######OUTPUT######
def Yes(): print("Yes"); return
def No(): print("No"); return

#####Inverse#####
def inv(n): return pow(n, MOD-2, MOD)

######Combination######
kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret

######Factorization######
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])
    return arr

#####MakeDivisors######
def make_divisors(n):
  divisors = []
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      divisors.append(i)
      if i != n // i: 
        divisors.append(n//i)
  return divisors

#####LCM#####
def lcm(a, b):
    return a * b // gcd (a, b)

#####BitCount#####
def count_bit(n):
  count = 0
  while n:
    n &= n -1
    count += 1
  return count

#####ChangeBase#####
def Base_10_to_n(X, n):
  if (int(X/n)):
    return Base_10_to_n(int(X/n), n)+[X%n]
  return [X%n]


#############
# Main Code #
#############

N = inputI()
print( min(factorization(x&(-x))[0][1] for x in inputIL()))

Submission status: Wrong Answer

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

#############
# Libraries #
#############

import sys
input = sys.stdin.readline

import math
#from math import gcd
import bisect
from collections import defaultdict
from collections import deque
from functools import lru_cache


#############
# Constants #
#############

MOD = 10**9+7
INF = float('inf')

#############
# Functions #
#############

######INPUT######
def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]

######OUTPUT######
def Yes(): print("Yes"); return
def No(): print("No"); return

#####Inverse#####
def inv(n): return pow(n, MOD-2, MOD)

######Combination######
kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret

######Factorization######
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])
    return arr

#####MakeDivisors######
def make_divisors(n):
  divisors = []
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      divisors.append(i)
      if i != n // i: 
        divisors.append(n//i)
  return divisors

#####LCM#####
def lcm(a, b):
    return a * b // gcd (a, b)

#####BitCount#####
def count_bit(n):
  count = 0
  while n:
    n &= n -1
    count += 1
  return count

#####ChangeBase#####
def Base_10_to_n(X, n):
  if (int(X/n)):
    return Base_10_to_n(int(X/n), n)+[X%n]
  return [X%n]


#############
# Main Code #
#############

N = inputI()
print( min(x&(-x) for x in inputIL()))

Submission status: Wrong Answer

Solution code:
print(input().count("1"))

Submission status: Wrong Answer

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

while True:
  flag = True
  for i in range(n):
    if aList[i] % 2 != 0:
      flag = False
    aList[i] /= 2
   
  if flag == False:
    break

  count += 1

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
number = int(input())

integers = list(map(int, input().split(" ")))

counter = 0

while True:
  if integers[0]%2 == 0 and integers[1]%2 == 0 and integers[2]%2 == 0:
    counter += 1
    integers = [pivot/2 for pivot in integers]
  else:
    break

print(counter)

Submission status: Wrong Answer

Solution code:
a = int(input())
b = list(map(int,input().split()))
b.sort()
ans = 0
n = b[0]
while n % 2 ==0:
	ans +=1
	n = n/2
print(ans)

Submission status: Wrong Answer

Solution code:
a = int(input())
b = list(map(int,input().split()))
b.sort()
ans = 0
n = b[0]
while n % 2 ==0:
	ans +=1
	n = n//2
print(ans)

Submission status: Wrong Answer

Solution code:
number = int(input())

integers = list(map(int, input().split(" ")))

counter = 0

while True:
  if integers[0]%2 == 0 \
  and integers[1]%2 == 0 \
  and integers[2]%2 == 0:
    counter += 1
    integers = [pivot/2 for pivot in integers]
  else:
    break

print(counter)

Submission status: Wrong Answer

Solution code:
number = int(input())

integers = list(map(int, input().split(" ")))

counter = 0

while True:
  if integers[0]%2 == 0 \
	  and integers[1]%2 == 0 \
	  and integers[2]%2 == 0:
    counter += 1
    integers = [pivot/2 for pivot in integers]
  else:
    break

print(counter)

Submission status: Wrong Answer

Solution code:
number = int(input())

integers = list(map(int, input().split(" ")))

counter = 0

while True:
  if integers[0]%2 == 0 \
	  and integers[1]%2 == 0 \
	  and integers[2]%2 == 0:
    integers = [pivot/2 for pivot in integers]
    counter += 1
  else:
    break

print(counter)

Submission status: Wrong Answer

Solution code:
number = int(input())

integers = list(map(int, input().split(" ")))

counter = 0

while integers[0]%2 == 0 \
	  and integers[1]%2 == 0 \
	  and integers[2]%2 == 0:
  integers = [pivot/2 for pivot in integers]
  counter += 1

print(counter)

Submission status: Wrong Answer

Solution code:
import numpy as np

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


ans = 0

while(1):
    if(sum(a)%2==0):
        ans += 1
        a = a/ 2
    else:
        break

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

while t==0:
    for j, i  in enumerate(A):

        c = i%2
        A[j] = A[j]/2
        if c == 1:
            t = 1
            break
        
    wareru += 1

print(wareru)

Submission status: Wrong Answer

Solution code:
import sys
N = int(input())
A = list(map(int, input().split()))
c = 0
if 0 in A:
    print(c)
    sys.exit()
a = 1
while 2 ** a <= 1e9:
    for i in range(N):
        if A[i] % (2 ** a) != 0:
            print(c)
            sys.exit()
    c += 1
    a += 1

Submission status: Wrong Answer

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

c = 0
a = 1
while 2 ** a <= 1e9:
    for i in range(N):
        if A[i] % (2 ** a) != 0:
            print(c)
            sys.exit()
    c += 1
    a += 1

Submission status: Wrong Answer

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

c = 0
a = 1
while 2 ** a < 1e9:
    for i in range(N):
        if A[i] % (2 ** a) != 0:
            print(c)
            sys.exit()
    c += 1
    a += 1

Submission status: Wrong Answer

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

A.sort()
minval = A[0]
count = 0

while minval % 2 == 0:
  minval /= 2
  count += 1
  
print(count)

Submission status: Wrong Answer

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

for i in range(N):
  a = A[i]
  t = 0
  while (a & 1)==0:
    a = a >> 1
    t += 1
  ans = max(ans,t-1)

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

def main():
    #N個の入力はいつものmapをlistとして受け取る
    N = int(input())
    A = list(map(int, input().split()))

    #演算回数をカウントする変数を定義
    ct = 0
    #ループを回す。
    while True:
        for i in range(N):
            if A[i] % 2 == 0:
                A[i] = A[i] // 2
            else:
                print(ct)
                sys.exit()
    ct += 1


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

while all(i//2 == 0 for i in A):
    A = [i/2 for i in A]
    k += 1

print(k)

Submission status: Wrong Answer

Solution code:
s = input()
ans = 1000000

for i in range(len(s) - 2):
  ans = min(ans , abs(int(s[i : i + 3]) - 753))

print(ans)

Submission status: Wrong Answer

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

for i in a:
  print(math.floor(math.log(i , 2)))
  ans = min(ans , math.floor(math.log(i , 2)))

print(ans)

Submission status: Wrong Answer

Solution code:
import sys

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

loop = 1

while (1):
  for i in l:
    if (i % (2 ** (loop + 1)) != 0):
      print(loop )
      sys.exit(0)
  loop = loop + 1

Submission status: Wrong Answer

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

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

loop = 0

while (1):
  for i in l:
    if i % (2 ** loop + 1) != 0:
      print(loop)
      sys.exit(0)
  loop = loop + 1

Submission status: Wrong Answer

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

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

loop = 0

while (1):
  for i in l:
    print('loop', loop)
    if i % (2 ** loop + 1) != 0:
      print(loop)
      sys.exit(0)
  loop = loop + 1

Submission status: Wrong Answer

Solution code:
n = int(input())
l = list(map(int, input().split()))
 
def hoge(x):
    for i in range(20):
        if x % 2 == 0:
            x = x//2
        else:
            break
    return i
print(min([hoge(x) for x in l]))

Submission status: Wrong Answer

Solution code:
n = int(input())
l = list(map(int, input().split()))
 
def hoge(x):
    for i in range(11):
        if x % 2 == 0:
            x = x//2
        else:
            break
    return i

print(min([hoge(x) for x in l]))

Submission status: Wrong Answer

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

def hoge(x):
    for i in range(10):
        if x % 2 == 0:
            x = x//2
        else:
            break
    return i

print(min([hoge(x) for x in l]))

Submission status: Wrong Answer

Solution code:
import sys

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

loop = 0

while (1):
  for i in l:
    if (i % (2 ** loop) != 0):
      print(loop)
      sys.exit(0)
  loop = loop + 1

Submission status: Wrong Answer

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

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

print(count)

Submission status: Wrong Answer

Solution code:
def prod(List):
    result = 1
    for i in range(len(List)):
        result *= List[i]

    return result

n= int(input())
list_x = list(map(int, input().split(' ')))
count = 0
while  (prod(list_x) % 2 == 0):
    count += 1
    for i in range(n):
        list_x[i] /= 2

print(count)

Submission status: Wrong Answer

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

print(count)

Submission status: Wrong Answer

Solution code:
from fractions import gcd
from functools import reduce

n = int(input())

a = tuple(map(int,input().split()))
t = reduce(gcd,a)

for i in range(t):
  if t%2**i!=0:
    print(i-1)
    break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main():
    N = int(input())
    A = list(map(int, input().split()))
    cnt = 0
    odd_num = 0
    print(A)
    while odd_num == 0:
        for Ai in A:
            if Ai%2 != 0:
                odd_num+=1
        if odd_num == 0:
            cnt +=1
            print(list(A))
            A = list(map(lambda x: x/2,A))
    print(cnt)
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

a = []
i = 0
for i in range(N):
    a.append(int(0))
    while list[i] % 2 == 0:
        a[i] = a[i] + 1
        list[i] = int(list[i]/2)
print(min(a))

Submission status: Wrong Answer

Solution code:
#import numpy as np
def main():
    N = int(input()) #count of numbers
    A = list(map(int,input().split())) # array of imput numbers

    countor, flag = 0, 0
    while flag == 0:
        #print("iteration start")
        A = list(map(lambda x: x/2, A))
        countor += 1
        if (1 in list(map(lambda x: x%2, A))) == True: flag = 1 
        #print(flag)
    print(countor)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

can_devide = sum([a%2 for a in a_list])==0
count = 0
while can_devide:
    count += 1
    for i, a in enumerate(a_list):
        a_list[i] = a//2
        
    can_devide = sum([a%2 for a in a_list])==0

print(count)

Submission status: Wrong Answer

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

can_devide = sum([a%2 for a in a_list])==0
count = 0
while can_devide:
    count += 1
    for i, a in enumerate(a_list):
        a_list[i] = a//2
        
    can_devide = sum([a%2 for a in a_list])==0

print(count)

Submission status: Wrong Answer

Solution code:
n = int(input())
n_list = [int(x) for x in input().split()]
s = 0
def calc(n):
    return n / 2
for i in range(n):
  if n_list[i] % 2 == 1:
    break
  elif n_list[i] % 2 == 0 and i == n-1:
    s += 1
    n_list = map(calc, n_list)
  else:
    continue
print(s)

Submission status: Wrong Answer

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


while (bool):
    for i in range(N):
        if a[i] % 2 == 0:
            a[i] = a[i] / 2
        else:
            bool = False
            break    
    else:
        c += 1

Submission status: Wrong Answer

Solution code:
n=int(input())
a=list(map(int,input().split()))
n=0
if all(aa%2==0 for aa in a):
  n+=1
print(n)

Submission status: Wrong Answer

Solution code:
input()
num_list = list(map(int, input().split()))
if(not all(x % 2 == 0 for x in num_list)):
    print(0)
else:
    min_num = min(num_list)
    cnt = 0
    while min_num % 2 == 0:
        cnt = cnt + 1
        min_num = int(min_num / 2)
    print(cnt)

Submission status: Wrong Answer

Solution code:
input()
num_list = map(int, input().split())
if(all(x % 2 == 0 for x in num_list)):
    print(0)
else:
    min_num = min(num_list)
    cnt = 0
    while min_num % 2 == 0:
        cnt = cnt + 1
        min_num = int(min_num / 2)
    print(cnt)