ZhenlongDai/ACPR huggingface dataset:
Problem: p03964
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
t_list = []
a_list = []
for i in range(n):
    t, a = map(int, input().split())
    t_list.append(t)
    a_list.append(a)

t_num = t_list[0]
a_num = a_list[0]
for i in range(1, n):
    t, a = t_list[i], a_list[i]
    for m in range(10000):
        if m * t >= t_num and m * a >= a_num:
            t_num = m * t
            a_num = m * a
            break
print(t_num + a_num)


Failing test case input:
3
4 1
1 2
-2 2

Expected output:
0


Actual output:
12


Fixed submission (verdict: Accepted):
n = int(input())
t_list = []
a_list = []
for i in range(n):
    t, a = map(int, input().split())
    t_list.append(t)
    a_list.append(a)

t_num = t_list[0]
a_num = a_list[0]
for i in range(1, n):
    t, a = t_list[i], a_list[i]
    num = max((a_num+a-1)
    t_num = num * t
    a_num = num * a
print(t_num + a_num)

Problem: p03964
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from math import ceil

n = int(input())
ratio = [list(map(int, input().split())) for _ in range(n)]

t_voted, a_voted = ratio[0][0], ratio[0][1]
for t, a in ratio[1:]:
    if t < t_voted and a < a_voted:
        t_voted = t
        a_voted = a
    else:
        val = max(ceil(t_voted / t), ceil(a_voted / a))
        t_voted = t * val
        a_voted = a * val

print(t_voted + a_voted)


Failing test case input:
5
2 1
41 1
31 203
289 40
6 2

Expected output:
4240


Actual output:
8


Fixed submission (verdict: Accepted):
from decimal import Decimal
from math import ceil

n = int(input())
ratio = [list(map(int, input().split())) for _ in range(n)]

t_voted = a_voted = 1
for t, a in ratio:
    val = max(ceil(Decimal(t_voted) / Decimal(t)), ceil(Decimal(a_voted) / Decimal(a)))
    t_voted = t * val
    a_voted = a * val

print(t_voted + a_voted)

Problem: p03964
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

import math

N = int(input())

votes = []

for _ in range(N):
    votes.append([float(n) for n in input().split()])

befa = 1
befb = 1

for a, b in votes:
    kakeru = max(math.ceil(befa / a), math.ceil(befb / b))
    befa = a * kakeru
    befb = b * kakeru
    

print((befa+befb))

Failing test case input:
3
4 1
1 2
-2 2

Expected output:
0


Actual output:
0.0


Fixed submission (verdict: Accepted):

import math
from decimal import Decimal

N = int(input())

votes = []

for _ in range(N):
    votes.append([Decimal(n) for n in input().split()])

befa = 1
befb = 1

for a, b in votes:
    kakeru = Decimal(max(math.ceil(befa / a), math.ceil(befb / b)))
    befa = a * kakeru
    befb = b * kakeru

print(int(befa)+int(befb))
Problem: p03964
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
import math as m
tt , aa = map(int,input().split())
vote = tt + aa
for i in range(n-1):
    t, a = map(int,input().split())
    n = m.ceil(max(tt/t,aa/a))
    tt = t * n
    aa = a * n
    vote = vote * n
print(vote)

Failing test case input:
5
3 11
11 28
18 63
300 23
3 2

Expected output:
1500


Actual output:
12600


Fixed submission (verdict: Accepted):
n = int(input())
import math as m
t1 , a1 = map(int,input().split())
tt = t1
aa = a1
for i in range(n-1):
    t, a = map(int,input().split())
    n = ((max((tt
    if tt > t*n or aa> a*n:
        n = n + 1
    tt = t * n
    aa = a * n
print(tt + aa)

Problem: p03964
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
ansT = 1
ansA = 1
for i in range(N):
    T, A = map(int,input().split())
    if int(ansT / T) > int(ansA / A):
        ansT = T * int((ansT + T - 1) / T)
        ansA = A * int((ansT + T - 1) / T)
    else:
        ansT = T * int((ansA + A - 1) / A)
        ansA = A * int((ansA + A - 1) / A)

print(int(ansT + ansA))


Failing test case input:
3
4 3
2 2
3 4

Expected output:
14


Actual output:
7


Fixed submission (verdict: Accepted):
N = int(input())
ansT = 1
ansA = 1
for i in range(N):
    T, A = map(int,input().split())
    if int(ansT / T) > int(ansA / A):
        ansT = T * int((ansT + T - 1) 
        ansA = A * int((ansT + T - 1) 
    else:
        ansT = T * int((ansA + A - 1) 
        ansA = A * int((ansA + A - 1) 

print(int(ansT + ansA))
Problem: p03047
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n, k = map(int, input().split())

print(13 - 3 + 1)

Failing test case input:
0 -159

Expected output:
160


Actual output:
11


Fixed submission (verdict: Accepted):
n, k = map(int, input().split())

print(n - k+ 1)

Problem: p03047
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
k,n = map(int, input().split())
print(n-k+1)

Failing test case input:
112 0

Expected output:
113


Actual output:
-111


Fixed submission (verdict: Accepted):
n,k = map(int, input().split())
print(n-k+1)

Problem: p03047
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
h = list(map(int, input().split()))



print(h[0]-h[1])

Failing test case input:
163 2

Expected output:
162


Actual output:
161


Fixed submission (verdict: Accepted):
h = list(map(int, input().split()))



print(h[0]-h[1]+1)

Problem: p03047
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
inputdata=input().split()
n=int(inputdata[0])
k=int(inputdata[1])
pointer=1
while pointer +k <= n:
  pointer = pointer +1

if n > k:
  print("0")
else:
  print(pointer)



Failing test case input:
82 0

Expected output:
83


Actual output:
0


Fixed submission (verdict: Accepted):

inputdata=input().split()
n=int(inputdata[0])
k=int(inputdata[1])
pointer=1
while pointer +k <= n:
  pointer = pointer +1

if n < k:
  print("0")
else:
  print(pointer)

Problem: p03047
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,K= map(int, input().split())
print(N-K)

Failing test case input:
0 -45

Expected output:
46


Actual output:
45


Fixed submission (verdict: Accepted):
N,K= map(int, input().split())
print(N-K +1)

Problem: p03047
Buggy submission (Python (3.4.3), verdict: Wrong Answer):



n,k = map(int,input().split())

answer = n-k+1
if n > k :
        answer = 0
print( answer )

Failing test case input:
2 -66

Expected output:
69


Actual output:
0


Fixed submission (verdict: Accepted):



n,k = map(int,input().split())

answer = n-k+1
if n < k :
        answer = 0
print( answer )

Problem: p03047
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
[a,b]=map(int,input().split())
print(b-a+1)

Failing test case input:
1 -66

Expected output:
68


Actual output:
-66


Fixed submission (verdict: Accepted):
[a,b]=map(int,input().split())
print(a-b+1)

Problem: p03047
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, k = map(int, input().split())
print(n + k -1)

Failing test case input:
1 -52

Expected output:
54


Actual output:
-52


Fixed submission (verdict: Accepted):
n, k = map(int, input().split())
print(n - k + 1)

Problem: p03047
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, k = map(int, input().split())
c = (n - k) * k
print(c)

Failing test case input:
2 -107

Expected output:
110


Actual output:
-11663


Fixed submission (verdict: Accepted):
n, k = map(int, input().split())
c = n - k + 1
print(c)
Problem: p03047
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, K = map(int, input().split())

print(N-K)

Failing test case input:
-1 -29

Expected output:
29


Actual output:
28


Fixed submission (verdict: Accepted):
N, K = map(int, input().split())

print(N-K+1)

Problem: p03047
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,k = map(int, input().split())
print(n-2)

Failing test case input:
3 -41

Expected output:
45


Actual output:
1


Fixed submission (verdict: Accepted):
n,k = map(int, input().split())
print(n-k+1)

Problem: p03047
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

N, K = input().split()


print(int(N) + int(K) - 1)


Failing test case input:
112 -2

Expected output:
115


Actual output:
109


Fixed submission (verdict: Accepted):
n, k =input().split()
print(int(n) - int(k) + 1)

Problem: p03047
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, K= map(int, input().split())

print(N+1+K)

Failing test case input:
0 -45

Expected output:
46


Actual output:
-44


Fixed submission (verdict: Accepted):
N, K= map(int, input().split())

print(N+1-K)

Problem: p03047
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,k=map(int, input().split())
print(n-k)

Failing test case input:
89 2

Expected output:
88


Actual output:
87


Fixed submission (verdict: Accepted):
n,k=map(int, input().split())
print(n-k+1)

Problem: p03047
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, K = [int(x) for x in input().split(' ')]

output = N - K + 1

Failing test case input:
112 -2

Expected output:
115


Actual output:

Fixed submission (verdict: Accepted):
N, K = [int(x) for x in input().split(' ')]

output = N - K + 1

print(int(output))

Problem: p03047
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,k = map(int,input().split())
print(n-k-1)

Failing test case input:
3 -66

Expected output:
70


Actual output:
68


Fixed submission (verdict: Accepted):
n,k = map(int,input().split())
print(n-k+1)

Problem: p03047
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(int,input().split())
print(b-a + 1)

Failing test case input:
163 0

Expected output:
164


Actual output:
-162


Fixed submission (verdict: Accepted):
a,b = map(int,input().split())
print(a-b + 1)

Problem: p03047
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, k = [int(i) for i in input().split()]
print(n - k + 2)

Failing test case input:
89 2

Expected output:
88


Actual output:
89


Fixed submission (verdict: Accepted):
n, k = [int(i) for i in input().split()]
print(n - k + 1)

Problem: p03047
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,k =  [int() for i in input().split()]
print(n-k+1)

Failing test case input:
1 -159

Expected output:
161


Actual output:
1


Fixed submission (verdict: Accepted):
n,k = [int(i) for i in input().split()]
print(n-k+1)

Problem: p03047
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, K = map(int, input().split())
print(K - N + 1)

Failing test case input:
2 -66

Expected output:
69


Actual output:
-67


Fixed submission (verdict: Accepted):
N, K = map(int, input().split())
print(N - K + 1)
Problem: p03047
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,K = map(int,input().split())
ans = K-N+1
print(ans)

Failing test case input:
8 -66

Expected output:
75


Actual output:
-73


Fixed submission (verdict: Accepted):
N,K = map(int,input().split())
ans = N-K+1
print(ans)

Problem: p03047
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n,k=map(int,input().split())
print(n-k-1)

Failing test case input:
3 -41

Expected output:
45


Actual output:
43


Fixed submission (verdict: Accepted):
n,k=map(int,input().split())
print(n-k+1)
Problem: p03373
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,x,y=map(int,input().split())
print(min(i*c+a*max(x-i,0)+b*max(y-i,0) for i in range(max(x,y)+1)))

Failing test case input:
1500 2000 1600 3 2

Expected output:
7900

Actual output:
4700


Fixed submission (verdict: Accepted):
a,b,c,x,y=map(int,input().split())
print(min([i*c*2+a*max(x-i,0)+b*max(y-i,0) for i in range(max(x,y)+1)]))

Problem: p03373
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B,C,X,Y = map(int,input().split())

C2 = C * 2
diff = abs(X - Y)

ans = 0

if C2 <= min(A,B):
  ans += C2 * max(X,Y)

elif C2 > A + B:
  ans += (A * X) + (B * Y)

elif C2 <= A + B:
  if A > B:
    ans += C2 * Y + A * diff

  else:
    ans += C2 * X + B * diff
    
print(ans)

Failing test case input:
1500 2000 1600 3 2

Expected output:
7900

Actual output:
11600


Fixed submission (verdict: Accepted):
A,B,C,X,Y = map(int,input().split())

C2 = C * 2
diff = abs(X - Y)

ans = 0


if C2 > A + B:
  ans = (A * X) + (B * Y)

elif C2 <= A + B:
  if X > Y:
    ans = min(C2 * Y + A * diff,C2 * X)

  else:
    ans = min(C2 * X + B * diff,C2 * Y)
    
print(ans)

Problem: p03373
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B,C,X,Y = map(int,input().split())

C2 = C * 2
diff = abs(X - Y)

ans = 0

if C2 <= min(A,B):
  ans = C2 * max(X,Y)

elif C2 > A + B:
  ans = (A * X) + (B * Y)

elif C2 <= A + B:
  if A > B:
    ans = C2 * Y + A * diff

  else:
    ans = C2 * X + B * diff
    
print(ans)


Failing test case input:
1500 2000 1600 3 2

Expected output:
7900

Actual output:
11600


Fixed submission (verdict: Accepted):
A,B,C,X,Y = map(int,input().split())

C2 = C * 2
diff = abs(X - Y)

ans = 0


if C2 > A + B:
  ans = (A * X) + (B * Y)

elif C2 <= A + B:
  if X > Y:
    ans = min(C2 * Y + A * diff,C2 * X)

  else:
    ans = min(C2 * X + B * diff,C2 * Y)
    
print(ans)

Problem: p03373
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,x,y = map(int, input().split() )



cost = a*x + b*y

for i in range( max(x,y) +1):
  tmp = i * 2*c + max(0, x-i)*a + max(0, x-i)*b
  if tmp < cost:
    cost = tmp
    
print( cost )

Failing test case input:
1500 2000 1600 3 2

Expected output:
7900

Actual output:
8500


Fixed submission (verdict: Accepted):
a,b,c,x,y = map(int, input().split() )



cost = a*x + b*y

for i in range( max(x,y) +1):
  tmp = i * 2*c + max(0, x-i)*a + max(0, y-i)*b
  if tmp < cost:
    cost = tmp
    
print( cost )

Problem: p03373
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
A, B, C, X, Y = map(int,input().split())

min = sys.maxsize
X1 = X
Y1 = Y


for i in range(0, max(X,Y)+1):
    price = (X1-i)*A+(Y1-i)*B+2*i*C
    if min > price:
        min = price


print(min)


Failing test case input:
1500 2000 1600 3 2

Expected output:
7900

Actual output:
7600


Fixed submission (verdict: Accepted):
import sys
A, B, C, X, Y = map(int,input().split())

minf = sys.maxsize
X1 = X
Y1 = Y


for i in range(0, max(X,Y)+1):
    price = max(0,(X1-i))*A+max(0,(Y1-i))*B+2*i*C
    if minf > price:
        minf = price


print(minf)
Problem: p03373
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

a, b, c, x, y = map(int, input().split())
m = min(x, y)
ans = 0
if (a + b) >= c * 2:
    ans += c * 2 * min(x, y)
    print(ans)
    x -= m
    y -= m

if a >= c * 2:
    ans += c * 2 * x
    x = 0
if b >= c * 2:
    ans += c * 2 * y
    y = 0
print(ans + x*a + y*b)


Failing test case input:
1500 2000 1600 3 2

Expected output:
7900

Actual output:
6400
7900


Fixed submission (verdict: Accepted):

a, b, c, x, y = map(int, input().split())
m = min(x, y)
ans = 0
if (a + b) >= c * 2:
    ans += c * 2 * min(x, y)
    x -= m
    y -= m

if a >= c * 2:
    ans += c * 2 * x
    x = 0
if b >= c * 2:
    ans += c * 2 * y
    y = 0
print(ans + x*a + y*b)

Problem: p03373
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

A, B, C, X, Y = map(int, input().split())

result = []

n = A*X + B*Y 
result.append(n) 

n = C*min([X,Y])
if X >= Y:
    n += (X-Y)*A 
else:
    n += (Y-X)*B 
result.append(n) 

n = C*max(X,Y)
result.append(n)

print(min(result))


    
        

Failing test case input:
1500 2000 1600 3 2

Expected output:
7900

Actual output:
4700


Fixed submission (verdict: Accepted):

A, B, C, X, Y = map(int, input().split())

result = []

n = A*X + B*Y 
result.append(n) 

n = C*min([X,Y])*2
if X >= Y:
    n += (X-Y)*A 
else:
    n += (Y-X)*B 
result.append(n) 

n = C*max(X,Y)*2
result.append(n)

print(min(result))

Problem: p03373
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, C, X, Y = tuple(map(int, input().split()))


TOTAL_MIN = A * X + B * Y + C * (X+Y) * 2

for a in range(X + 1):
    c = (X - a) * 2
    b = Y - c 
    total_tmp = A * a + B * b + C * c
    if total_tmp < TOTAL_MIN:
        TOTAL_MIN = total_tmp

print(TOTAL_MIN)


Failing test case input:
1500 2000 1600 3 2

Expected output:
7900

Actual output:
1600


Fixed submission (verdict: Accepted):
A, B, C, X, Y = tuple(map(int, input().split()))


TOTAL_MIN = A * X + B * Y + C * (X+Y) * 2

for a in range(X + 1):
    c = (X - a) * 2
    if c 
        if B < 2 * C:
            b = Y - c 
        else:
            b = 0
            c = max(c, Y * 2) 
    else:
        b = 0
    
    total_tmp = A * a + B * b + C * c
    if total_tmp < TOTAL_MIN:
        TOTAL_MIN = total_tmp
        

print(TOTAL_MIN)

Problem: p03373
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
a,b,c,x,y=map(int,input().split())
if x>y:
  ans=a*(x-y)+c*y
else:
  ans=b*(y-x)+c*x
ans=min(ans,a*x+b*y)

print(ans)

Failing test case input:
1500 2000 1600 3 2

Expected output:
7900

Actual output:
4700


Fixed submission (verdict: Accepted):
a,b,c,x,y=map(int,input().split())
if x>y:
  ans=min(a*(x-y)+c*2*y,c*2*x)
else:
  ans=min(b*(y-x)+c*2*x,c*2*y)
ans=min(ans,a*x+b*y)

print(ans)
Problem: p03373
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B,C,X,Y = map(int,input().split())
p=5000000000
for i in list(range(0,max([X+1,Y+1]))):
    if p > max([X-i,0])*A+max([Y-i,0])*B+2*C*i:
        p=p
print(p)

Failing test case input:
1500 2000 1600 3 2

Expected output:
7900

Actual output:
5000000000


Fixed submission (verdict: Accepted):
A,B,C,X,Y = map(int,input().split())
p=5000000000
for i in list(range(0,max([X+1,Y+1]))):
    if p > max([X-i,0])*A+max([Y-i,0])*B+2*C*i:
        p=max([X-i,0])*A+max([Y-i,0])*B+2*C*i
print(p)

Problem: p03373
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,x,y=map(int,input().split())

if x<y:
    x,y=y,x
    a,b=b,a

print(min(a*x+b*y, 2*c*x, 2*c*y-a*(x-y)))

Failing test case input:
1500 2000 1600 3 2

Expected output:
7900

Actual output:
4900


Fixed submission (verdict: Accepted):
a,b,c,x,y=map(int,input().split())

if x<y:
    x,y=y,x
    a,b=b,a

print(min(a*x+b*y, 2*c*x, 2*c*y+a*(x-y)))

Problem: p03373
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,x,y=map(int,input().split())
print(min([i*c+a*max(x-i,0)+b*max(y-i,0) for i in range(max(x,y)+1)]))

Failing test case input:
1500 2000 1600 3 2

Expected output:
7900

Actual output:
4700


Fixed submission (verdict: Accepted):
a,b,c,x,y=map(int,input().split())
print(min([i*c*2+a*max(x-i,0)+b*max(y-i,0) for i in range(max(x,y)+1)]))

Problem: p03373
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c, x, y = map(int, input().split())
possible_minimum_sum1 = a * x + b * y
possible_minimum_sum2 = c * max(a, b)
print(min(possible_minimum_sum1, possible_minimum_sum2))

Failing test case input:
1500 2000 1600 3 2

Expected output:
7900

Actual output:
8500


Fixed submission (verdict: Accepted):
a, b, c, x, y = map(int, input().split())
possible_minimum_sum1 = a * x + b * y
possible_minimum_sum2 = c * x * 2 + max(y-x, 0) * b
possible_minimum_sum3 = c * y * 2 + max(x-y, 0) * a

print(min(possible_minimum_sum1, possible_minimum_sum2, possible_minimum_sum3))

Problem: p03373
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,x,y=map(int, input().split())

if x>=y :l=min(x,y)*2*c+(x-y)*a
else: l=l=min(x,y)*2*c+(y-x)*b

min(a*x+b*y, l, max(x,y)*2*c)

Failing test case input:
1500 2000 1600 3 2

Expected output:
7900

Actual output:

Fixed submission (verdict: Accepted):
a,b,c,x,y=map(int, input().split())

if x>=y :l=min(x,y)*2*c+(x-y)*a
else: l=l=min(x,y)*2*c+(y-x)*b

print(min(a*x+b*y, l, max(x,y)*2*c))

Problem: p03373
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a, b, c, x, y = map(int, input().split(" "))
ab = a * x + b * y

abc = min(c * 2 * y + a * (x - y), c * 2 * x + b * (y - x))

cc = c * 2 * max(x, y)
print(min(ab, abc, cc))

Failing test case input:
1500 2000 1600 3 2

Expected output:
7900

Actual output:
7600


Fixed submission (verdict: Accepted):
a, b, c, x, y = map(int, input().split(" "))
ab = a * x + b * y

if x >= y:
    abc = c * 2 * y + a * (x - y)
else:
    abc = c * 2 * x + b * (y - x)

cc = c * 2 * max(x, y)
print(min(ab, abc, cc))
Problem: p03373
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,x,y=map(int,input().split())
l=[]
l.append(x*a+y*b)
l.append(2*x*c+max(0,y-x)*b)
l.append(2*b*c+max(0,x-y)*a)
print(min(l))

Failing test case input:
1500 2000 1600 3 2

Expected output:
7900

Actual output:
8500


Fixed submission (verdict: Accepted):
a,b,c,x,y=map(int,input().split())
l=[]
l.append(x*a+y*b)
l.append(2*x*c+max(0,y-x)*b)
l.append(2*y*c+max(0,x-y)*a)
print(min(l))

Problem: p03373
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B,C,X,Y = map(int,input().split())

C2 = C * 2
diff = abs(X - Y)

ans = 0

if C2 <= min(A,B):
  ans += C2 * max(X,Y)

elif C2 > A + B:
  ans += (A * X) + (B * Y)

elif C2 < A + B:
  if A > B:
    ans += C2 * Y + A * diff

  else:
    ans += C2 * X + B * diff
    
print(ans)

Failing test case input:
1500 2000 1600 3 2

Expected output:
7900

Actual output:
11600


Fixed submission (verdict: Accepted):
A,B,C,X,Y = map(int,input().split())

C2 = C * 2
diff = abs(X - Y)

ans = 0


if C2 > A + B:
  ans = (A * X) + (B * Y)

elif C2 <= A + B:
  if X > Y:
    ans = min(C2 * Y + A * diff,C2 * X)

  else:
    ans = min(C2 * X + B * diff,C2 * Y)
    
print(ans)

Problem: p03373
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, C, X, Y = map(int, input().split())
cost = A*X + B*Y
new_cost = cost
for i in range(1, max(X, Y)+1):
  if i <= min(X, Y):
    new_cost += - A - B + 2*C
  else:
    new_cost += -A + 2*C if X > Y else -B + 2*C
  if cost < new_cost:
    print(cost)
    exit()
print(new_cost)


Failing test case input:
1500 2000 1600 3 2

Expected output:
7900

Actual output:
8500


Fixed submission (verdict: Accepted):
A, B, C, X, Y = map(int, input().split())
cost = A*X + B*Y
new_cost = cost
plus = 0
for i in range(1, max(X, Y)+1):
  if i <= min(X, Y):
    plus = - A - B + 2*C
  else:
    plus = -A + 2*C if X > Y else -B + 2*C
  if plus < 0:
    new_cost += plus
  else:
    break
print(new_cost)

Problem: p03373
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B,C,X,Y=map(int,input().split())
ans=0
tmp=0
for i in range(10**5+1):
    tmp = 2*C*i + A*max(0,X-i) + B*max(0,Y-i)
    if i==0:
        ans = tmp
    if tmp < ans:
        ans = tmp
print(ans,i)

Failing test case input:
1500 2000 1600 3 2

Expected output:
7900

Actual output:
7900 100000


Fixed submission (verdict: Accepted):
A,B,C,X,Y=map(int,input().split())
ans=0
tmp=0
for i in range(10**5+1):
    tmp = 2*C*i + A*max(0,X-i) + B*max(0,Y-i)
    if i==0:
        ans = tmp
    if tmp < ans:
        ans = tmp
print(ans)
Problem: p03373
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, C, X, Y = [int(x) for x in input().split(" ")]

min = max(A,B,C*2) * 10**5

for k in range(0,2*max(X,Y)+1,2):
  if A*(X-k/2)+B*(Y-k/2)+C*k < min:
    min = A*max(0,X-k/2)+B*max(0,Y-k/2)+C*k
        
print(int(min))

Failing test case input:
1500 2000 1600 3 2

Expected output:
7900

Actual output:
9600


Fixed submission (verdict: Accepted):
A, B, C, X, Y = [int(x) for x in input().split(" ")]

min = max(A,B,C)*max(X,Y)*2

for k in range(0,max(X,Y)*2+1,2):
  if A*max(0,X-k/2)+B*max(0,Y-k/2)+C*k < min:
    min = A*max(0,X-k/2)+B*max(0,Y-k/2)+C*k
        
print(int(min))

Problem: p03373
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c, x, y = map(int, input().split())
possible_minimum_sum1 = a * x + b * y
possible_minimum_sum2 = c * x * 2 + max(b-a, 0) * y
possible_minimum_sum3 = c * y * 2 + max(a-b, 0) * x

print(min(possible_minimum_sum1, possible_minimum_sum2, possible_minimum_sum3))


Failing test case input:
1500 2000 1600 3 2

Expected output:
7900

Actual output:
6400


Fixed submission (verdict: Accepted):
a, b, c, x, y = map(int, input().split())
possible_minimum_sum1 = a * x + b * y
possible_minimum_sum2 = c * x * 2 + max(y-x, 0) * b
possible_minimum_sum3 = c * y * 2 + max(x-y, 0) * a

print(min(possible_minimum_sum1, possible_minimum_sum2, possible_minimum_sum3))

Problem: p03373
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c, x, y = map(int, input().split())

ans1 = a*x + b*y

if x >= y:
    ans2 = 2*c*y + a*(x-y)
    ans3 = 2*x*c
else:
    ans2 = 2*c*x + b*(y-x)
    ans3 = 2*y*c

print(min(ans1, ans2), ans3)


Failing test case input:
1500 2000 1600 3 2

Expected output:
7900

Actual output:
7900 9600


Fixed submission (verdict: Accepted):
a, b, c, x, y = map(int, input().split())

ans1 = a*x + b*y

if x >= y:
    ans2 = 2*c*y + a*(x-y)
    ans3 = 2*x*c
else:
    ans2 = 2*c*x + b*(y-x)
    ans3 = 2*y*c

print(min(min(ans1, ans2), ans3))

Problem: p03373
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B,C,X,Y = map(int,input().split())

C2 = C * 2
diff = abs(X - Y)

ans = 0

if C2 <= min(A,B):
  ans += C2 * max(X,Y)
  print(ans)
elif C2 > A + B:
  ans += (A * X) + (B * Y)
  print(ans)
elif C2 < A + B:
  if A > B:
    ans += C2 * Y + A * diff
  else:
    ans += C2 * X + B * diff

Failing test case input:
1500 2000 1600 3 2

Expected output:
7900

Actual output:

Fixed submission (verdict: Accepted):
A,B,C,X,Y = map(int,input().split())

C2 = C * 2
diff = abs(X - Y)

ans = 0


if C2 > A + B:
  ans = (A * X) + (B * Y)

elif C2 <= A + B:
  if X > Y:
    ans = min(C2 * Y + A * diff,C2 * X)

  else:
    ans = min(C2 * X + B * diff,C2 * Y)
    
print(ans)
Problem: p03494
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = list(map(int, input().split()))
cnt = 0

list_sum = sum(a)


def ans():
    global list_sum, cnt
    while list_sum % 2 == 0:
        
        list_sum /= 2
        cnt += 1


for i in range(n):
    if a[i] % 2 != 0:
        cnt = 0
        break
    else:
        ans()

print(cnt)

Failing test case input:
3
2 36 114

Expected output:
1


Actual output:
3


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int, input().split()))
cnt = 0
check = 0

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

Problem: p03494
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A = list(map(int, input().split()))
tmp = min(A)
ans = 0
while (tmp % 2) == 0:
    tmp = tmp / 2
    ans += 1
print(ans)

Failing test case input:
4
10 5 43 30

Expected output:
0


Actual output:
2


Fixed submission (verdict: Accepted):
N = input()
A = list(map(int, input().split()))

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

Problem: p03494
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = list(map(int, input().split()))
B = []
flg = True
for a in A:
  i = 0
  while flg:
    if a % 2 ** i == 0:
      i += 1
    else:
      B.append(i - 1)
      flg = False
B.sort()
print(B[0])


Failing test case input:
6
71148002 1055849701 81412222 21985869 236966 734273188

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
N = int(input())
A = list(map(int, input().split()))
B = []
for a in A:
  i = 0
  while a % 2 ** i == 0:
    i += 1
  B.append(i - 1)
B.sort()
print(B[0])

Problem: p03494
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
a = list(map(int, input().split()))

i = 0
per = True
while per == True:
    for index in range(n):
        num = a[index]
        ans = divmod(num, 2)
        if num == 0 or ans[1] != 0:
            per = False
            break
        a[index] = ans[0]
    i += 1
print(i)

Failing test case input:
3
4 23 31

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int, input().split()))

i = 0
per = True
while per == True:
    for index in range(n):
        num = a[index]
        ans = divmod(num, 2)
        if num == 0 or ans[1] != 0:
            per = False
            break
        a[index] = ans[0]
    if per == True:
        i += 1
print(i)
Problem: p03494
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
li= list(map(int,input().split())) 	
ans=1
minNum=li[0]

for i in range(N):
	if li[i]%2==1:
		ans=0
		break
	elif li[i] < minNum:
		minNum = li[i]
		
if not ans==0:
	n=minNum
	ans=0	
	while n%2==0:
		n=n/2
		ans= ans+1

print(ans)


Failing test case input:
3
16 36 16

Expected output:
2


Actual output:
4


Fixed submission (verdict: Accepted):
N=int(input())
li= list(map(int,input().split())) 	
Ans=30
ans=0

for i in range(N):
	if li[i]%2==1:
		Ans=0
		break
	else:
		n=li[i]
		ans=0
		while n%2==0:
			n=n/2
			ans= ans+1
		if Ans>ans:
			Ans =ans

print(Ans)

Problem: p03494
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
num = int(input())
a = list(map(int, input().split()))

count = 0
for i in a:
  c = 0
  while i != 0 and i % 2 == 0:
    i /= 2
    c += 1
  if c <= count:
    count = c
print(count)

Failing test case input:
3
10 12 40

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
num = int(input())
a = list(map(int, input().split()))

carray = []
for i in a:
  c = 0
  while i != 0 and i % 2 == 0:
    i /= 2
    c += 1
  carray.append(c)
print(min(carray))

Problem: p03494
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
num = list(map(int,input().split()))
count = 0

while not all([n%2 for n in num]):
    num = [n/2 for n in num]
    count += 1
print(count)

Failing test case input:
4
27 6 17 9

Expected output:
0


Actual output:
2


Fixed submission (verdict: Accepted):
a = input()
num = list(map(int,input().split()))
count = 0

while not any([n%2 for n in num]):
    num = [n/2 for n in num]
    count += 1
print(count)

Problem: p03494
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
A = list(map(int, input().split()))

a = 0
count = 0
N = [0]*len(A)

for i in range(len(A)):
    if A[i] % 2 == 0:
        N[i] += 1


print(min(N))


Failing test case input:
3
16 36 16

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
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))
Problem: p03494
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
iter_num = input()
variables = input()

raw_variables = variables.split(' ')
variables = list()

for raw_variable in raw_variables:
    variables.append(int(raw_variable))


def calc(variable):
    process_count = 0
    while (variable % 2 == 0):
        process_count += 1
        variable = variable / 2
    return process_count


max_count = 0

for variable in variables:
    process_count = calc(variable)
    if process_count > max_count:
        max_count = process_count

print(max_count)


Failing test case input:
4
10 6 24 10

Expected output:
1


Actual output:
3


Fixed submission (verdict: Accepted):
iter_num = input()
variables = input()

raw_variables = variables.split(' ')
variables = list()

for raw_variable in raw_variables:
    variables.append(int(raw_variable))


def calc(variable):
    process_count = 0
    while (variable % 2 == 0):
        process_count += 1
        variable = variable / 2
    return process_count


min_count = None

for variable in variables:
    process_count = calc(variable)
    if min_count is None:
        min_count = process_count
    if process_count < min_count:
        min_count = process_count

print(min_count)

Problem: p03494
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

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

m = 500000000 
for i in range(len(values)):
	nowV = values[i]
	nm = 0
	for j in range(500000000):
		if nowV % 2 == 0:
			nm += 1
			nowV = nowV / 2
			m = min(m,n)
		else:
			break 
print(m)
			

Failing test case input:
6
71148002 1055849701 81412222 7499695 236966 734273188

Expected output:
0


Actual output:
6


Fixed submission (verdict: Accepted):

n = int(input().rstrip())
values = list(map(int,input().rstrip().split()))

m = 500000000 
for i in range(len(values)):
	nowV = values[i]
	nm = 0
	for j in range(500000000):
		if nowV % 2 == 0:
			nm += 1
			nowV = nowV / 2
		else:
			break 
	m = min(m,nm)
print(m)

Problem: p03494
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
n = input()
a = list(map(int, input().split()))
ans = float("inf")
for i in a:
    ans = min(ans, bin(i).rfind("1") - 1)
print(round(ans))

Failing test case input:
6
71148002 1800176736 81412222 7499695 179710 734273188

Expected output:
0


Actual output:
17


Fixed submission (verdict: Accepted):
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))
Problem: p03494
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = input()
b = input()
a = int(a)
b = b.split()
b = [int(s) for s in b]
b.sort()
c = 0
while True:
    for i in range(a):
        b[i] = b[i] / 2
    if b[0] % 2  != 0:
        break
    c += 1
    
print(c)

Failing test case input:
3
4 7 52

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
a = input()
b = input()
a = int(a)
b = b.split()
b = [int(s) for s in b]
c = 0
flag = True
while True:
    
    for i in range(a):
        if b[i] % 2 != 0:
            flag = False
        b[i] = b[i] / 2
        
    if flag == False:
        break
    c += 1

    

    
print(c)

Problem: p03494
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
a = [int(x) for x in input().split()]
b = 0
while len(list(filter(lambda i : i % 2 != 0, list(a)))) == 0 :
    a = list(map(lambda x: x/2, a))
    b += 1
b

Failing test case input:
3
4 23 31

Expected output:
0


Actual output:

Fixed submission (verdict: Accepted):
N = int(input())
a = [int(x) for x in input().split()]
b = 0
while len(list(filter(lambda i : i % 2 != 0, list(a)))) == 0 :
    a = list(map(lambda x: x/2, a))
    b += 1
print(b)

Problem: p03494
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = list(map(int, input().split()))
t = 0
def exist_odd(A):
  for i in A:
    if i % 2 == 1:
      break
    return 1
  else:
    return 0
while exist_odd(A) ==1:
  A = list(map(lambda x: x / 2, A))
  t = t+1
print(t)

Failing test case input:
6
586050932 1154626501 31409214 27068201 10685560 243833698

Expected output:
0


Actual output:
2


Fixed submission (verdict: Accepted):
N = int(input())
A = list(map(int, input().split()))
t = 0
def exist_odd(A):
  B = list(map(lambda x : x%2, A))
  return any(B)
  
while exist_odd(A) != True:
  A = list(map(lambda x: x 
  t = t+1
print(t)

Problem: p03494
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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))



Failing test case input:
4
10 6 24 10

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
def choise(n,s):
    k = 0
    lis = s.split()
    lis = list(map(lambda x: int(x), lis))
    while (len(lis) == int(n)):
        lis = list(filter(lambda x: x % 2 == 0, lis))
        if (len(lis) == int(n)): k += 1
        lis = list(map(lambda x: x / 2, lis))
    return k

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

    print(choise(n,s))
Problem: p03494
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
3
4 11 31

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
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)

Problem: p03494
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

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)

Failing test case input:
6
382253568 723152896 37802240 379425024 404894720 471526144

Expected output:
8

Actual output:
6


Fixed submission (verdict: Accepted):

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

while True:
  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)

Problem: p03494
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
A=list(map(int,input().split()))
cnt=0
while sum(A)%2==0:
  for i in range(N):
    A[i]=A[i]/2
  cnt=cnt+1
print(cnt)

Failing test case input:
3
4 23 31

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
N=int(input())
A=list(map(int,input().split()))
cnt=-1
h=0
while h==0:
 for i in range(N):
  if A[i]%2==0:
    A[i]=A[i]/2
  else:
    h=h+1
    break
 cnt=cnt+1
print(cnt)

Problem: p03494
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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

Failing test case input:
6
348324507 1154626501 32183854 379425024 590201381 471526144

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
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

Problem: p03494
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = input()
b = input()
a = int(a)
b = b.split()
b = [int(s) for s in b]
c = 0
flag = True
while True:
    
    for i in range(a):
        b[i] = b[i] / 2
        if b[i] % 2 != 0:
            flag = False
    c += 1
    if flag == False:
        break
    

    
print(c)

Failing test case input:
4
27 6 15 9

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
a = input()
b = input()
a = int(a)
b = b.split()
b = [int(s) for s in b]
c = 0
flag = True
while True:
    
    for i in range(a):
        if b[i] % 2 != 0:
            flag = False
        b[i] = b[i] / 2
        
    if flag == False:
        break
    c += 1

    

    
print(c)
Problem: p03494
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def num_2n(i):
    count = 0
    while(i % 2 == 0):
        i = i / 2
        count += 1
    return count



def main():
    num_ans = int(input())
    ans_list = list(map(int, input().split()))
    num_2n_list =[]
    for i in ans_list:
        num_2n_list.append(num_2n(i))
    num_2n_list.sort()
    num_2n_list.reverse()
    print(num_2n_list[0])


if __name__ == '__main__':
    main()


Failing test case input:
3
4 23 31

Expected output:
0


Actual output:
2


Fixed submission (verdict: Accepted):
def num_2n(i):
    count = 0
    while(i % 2 == 0):
        i = i / 2
        count += 1
    return count



def main():
    num_ans = int(input())
    ans_list = list(map(int, input().split()))
    num_2n_list =[]
    for i in ans_list:
        num_2n_list.append(num_2n(i))
    num_2n_list.sort()
    print(num_2n_list[0])


if __name__ == '__main__':
    main()

Problem: p03494
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


tmp = input()
tmp = input().split()
num = len(tmp)
min = int(tmp[0])
print (min)
for j in tmp:
	d = int(j)
	n = 0
	while(d % 2 == 0):
		n=n+1
		d=d/2
	if(min>n):
		min=n
	print(n)
print(min)


Failing test case input:
6
586050932 1892549229 59907007 27068201 236966 243833698

Expected output:
0


Actual output:
586050932
2
0
0
0
1
1
0


Fixed submission (verdict: Accepted):


tmp = input()
tmp = input().split()
num = len(tmp)
min = int(tmp[0])

for j in tmp:
	d = int(j)
	n = 0
	while(d % 2 == 0):
		n=n+1
		d=d/2
	if(min>n):
		min=n

print(min)

Problem: p03494
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = list(map(int, input().split()))

count = 0
flag = 0

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


	count += 1 if flag == 0 else +0

print(count)

Failing test case input:
6
71148002 1800176736 117468765 5864889 179710 734273188

Expected output:
0


Actual output:
2


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int, input().split()))

count = 0
flag = 0

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


	count += 1 if flag == 0 else +0

print(count)

Problem: p03494
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N=int(input())
an=list(map(int,input().split()))
n=0
for i in range(N):
    if an[i]%2==0:
        an[i]/2
        n+=1
print(n)

Failing test case input:
6
586050932 1154626501 31409214 379425024 590201381 471526144

Expected output:
0


Actual output:
4


Fixed submission (verdict: Accepted):
N=int(input())
an=list(map(int,input().split()))
n=0
while(all(a%2==0 for a in an)):
    an=[a
    n+=1
print(n)
Problem: p03494
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = list(map(int, input().split()))
c = 0

while sum(a)%2==0:
    a = list(map(lambda x: x/2, a))
    c+=1

print(c)


Failing test case input:
4
12 3 26 9

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int, input().split()))
c = 0

while list(map(lambda x: x%2, a)).count(0)==len(a):
    a = list(map(lambda x: x/2, a))
    c+=1

print(c)

Problem: p03494
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=int(input())
a=list(map(int,input().split()))
b=[]
cnt=0
for i in range(n):
    while a[i]%2==0:
       a[i] /= 2
       cnt += 1
    b.append(cnt)
if min(b)!=0:
    print(min(b)-1)
else:
    print('0')


Failing test case input:
6
382253568 723152896 37802240 379425024 590201381 471526144

Expected output:
0


Actual output:
8


Fixed submission (verdict: Accepted):
n=int(input())
a=list(map(int,input().split()))
b=[]
cnt=0
for i in range(n):
    if a[i]%2==1:
        print('0')
        exit()
    else:
        while a[i]%2==0:
            cnt += 1
            a[i] /=  2
        b.append(cnt)
        cnt = 0
print(min(b))

Problem: p03494
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
A = list(map(int, input().split()))

a = 0
count = 0
N = [0]*len(A)

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

print(min(N))


Failing test case input:
6
382253568 723152896 37802240 379425024 404894720 471526144

Expected output:
8

Actual output:
1


Fixed submission (verdict: Accepted):
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))

Problem: p03494
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
lis = list(map(int,input().split()))
x = 0
y = 0
while True:
  for i,v in enumerate(lis):
    j = v/2
    if j.is_integer():
      lis[i] = j
      x += 1
  y += 1
  if not x == n:
    break

print(y)

Failing test case input:
3
1 36 66

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
n = int(input())
lis = list(map(int,input().split()))
y = 0
while True:
    x = 0
    for i,v in enumerate(lis):
        j = v/2
        lis[i] = j
        if j.is_integer():
            x += 1
    if not x == n:
        break
    y += 1

print(y)

Problem: p03494
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
a = list(map(int, input().split()))
b = [bin(i)[2:] for i in a]
c = [0] * n
for i,v in enumerate(b):
  for j in v[::-1]:
    if j == '0':
      c[i] += 1
print(max(c))
  

Failing test case input:
3
16 36 16

Expected output:
2


Actual output:
4


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int, input().split()))
b = [bin(i)[2:] for i in a]
c = [0] * n
for i,v in enumerate(b):
  for j in v[::-1]:
    if j == '0':
      c[i] += 1
    else:
      break
print(min(c))
Problem: p03494
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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)

Failing test case input:
4
5 6 8 10

Expected output:
0

Actual output:
2


Fixed submission (verdict: Accepted):
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)

Problem: p03494
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
t=int(input())

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

count=0
while True:
    x=[True if i%2==0 else False for i in li]
    print(x)
    if all(x):
        for i in range(t):
            li[i]=li[i]/2
        count+=1
    else:
        break
print(count)

Failing test case input:
6
105530884 1892549229 59907007 27068201 236966 442481745

Expected output:
0


Actual output:
[True, False, False, False, True, False]
0


Fixed submission (verdict: Accepted):
t=int(input())

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

count=0
while True:
    x=[True if i%2==0 else False for i in li]
    if all(x):
        for i in range(t):
            li[i]=li[i]/2
        count+=1
    else:
        break
print(count)

Problem: p03494
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=int(input())
a=list(map(int,input().split()))
cnt=0
for i in range(n):
    while a[i]%2 != 1:
        if a[i]%2==0:
            a[i] /= 2
        cnt += 1
print(cnt)
    

Failing test case input:
4
10 5 43 27

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
n=int(input())
a=list(map(int,input().split()))
b=[]
cnt=0
for i in range(n):
    if a[i]%2==1:
        print('0')
        exit()
    else:
        while a[i]%2==0:
            cnt += 1
            a[i] /=  2
        b.append(cnt)
        cnt = 0
print(min(b))

Problem: p03494
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = list(map(int,input().split()))
n = 0
can = True

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

print(n)
        

Failing test case input:
6
586050932 1892549229 30334838 27068201 10685560 243833698

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
N = int(input())
A = list(map(int,input().split()))
n = 0
F = 0

while 1:
    
    for i in range(N):
        if A[i] % 2 == 0:
            continue
        else:
            F = 1
    
    if F == 1 : break 

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


print(n)