Problem:


Score : 300 points

Problem Statement

Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.)

Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded down to the nearest integer.

If multiple prices satisfy the condition, print the lowest such price; if no price satisfies the condition, print -1.

Constraints

1 \leq A \leq B \leq 100

A and B are integers.

Input

Input is given from Standard Input in the following format:

A B

Output

If there is a price that satisfies the condition, print an integer representing the lowest such price; otherwise, print -1.

Sample Input 1

2 2

Sample Output 1

25

If the price of a product before tax is 25 yen, the amount of consumption tax levied on it is:

When the consumption tax rate is 8 percent: \lfloor 25 \times 0.08 \rfloor = \lfloor 2 \rfloor = 2 yen.

When the consumption tax rate is 10 percent: \lfloor 25 \times 0.1 \rfloor = \lfloor 2.5 \rfloor = 2 yen.

Thus, the price of 25 yen satisfies the condition. There are other possible prices, such as 26 yen, but print the minimum such price, 25.

Sample Input 2

8 10

Sample Output 2

100

If the price of a product before tax is 100 yen, the amount of consumption tax levied on it is:

When the consumption tax rate is 8 percent: \lfloor 100 \times 0.08 \rfloor = 8 yen.

When the consumption tax rate is 10 percent: \lfloor 100 \times 0.1 \rfloor = 10 yen.

Sample Input 3

19 99

Sample Output 3

-1

There is no price before tax satisfying this condition, so print -1.



Sample input:
2 2


Sample output:
25

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python
import sys

input = sys.stdin

def tax(pct8, pct10):
    pct8low = pct8 / 0.08
    pct8high = (pct8 + 1) / 0.08

    pct10low = pct10 / 0.1
    pct10high = (pct10 + 1) / 0.1

    #  8 H---------------L
    # 10     H-----------*----L
    #    <or>
    #  8     H------------*--L
    # 10 H----------------L
    #    <or>
    #  8     H---------------L
    # 10 H-------------------*-----L
    #    <or>
    #  8 H-------------------*-----L
    # 10     H---------------L
    if pct8high < pct10low or pct10high < pct8low:
        return -1
    else:
        return max(pct8low, pct10low)


pct8, pct10 = map(int, input.readline().split(" "))
print(tax(pct8, pct10))

Submission status: Wrong Answer

Solution code:
from math import ceil
a, b = map(int, input().split())

a1 = ceil(a/0.08)
a2 = ceil((a+1)/0.08)
b1 = ceil(b/0.1)
b2 = ceil((b+1)/0.1)
if a2 < b1 or b2 < a1:
  print(-1)
else:
  print(max(a1, b1))

Submission status: Wrong Answer

Solution code:
from math import floor
from math import ceil
a, b = map(int, input().split())

a1 = ceil(a/0.08)
a2 = floor((a+1)/0.08)
b1 = ceil(b/0.1)
b2 = floor((b+1)/0.1)
if a2 < b1 or b2 < a1:
  print(-1)
else:
  print(max(a1, b1))

Submission status: Wrong Answer

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

for i in range(1000):
    if int(i*0.08)==a and int(i*0.1)==b:
        print(i)
        break
    elif i==100:
        print(-1)

Submission status: Wrong Answer

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

for i in range(101):
    if int(i*0.08)==a and int(i*0.1)==b:
        print(i)
        break
    elif i==100:
        print(-1)

Submission status: Wrong Answer

Solution code:
S=list(map(int,input().split()))
A=S[0]
B=S[1]
if A%2==0:
    C=int(A/0.08)
    E=int((A+1)/0.08)
else:
    C=int(A/0.08)+1
    E=int((A+1)/0.08)-1
D=int(B/0.1)
n=max(C,D)

F=int((B+1)/0.1)
m=min(E,F)
if n<=m:
    print(int(n))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
S=list(map(int,input().split()))
A=S[0]
B=S[1]
C=int(A/0.08)
D=int(B/0.1)
n=max(C,D)
E=int((A+1)/0.08)
F=int((B+1)/0.1)
m=min(E,F)
if n<=m:
    print(int(n))
else:
    print(-1)

Submission status: Wrong Answer

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

res = -1
# 最大で1009円まで
for i in range(1, 1010):
  q_A = int(i / A)
  q_B = int(i / B)
  if q_A == q_B:
    res = i
    break
  else:
    continue

print(i)

Submission status: Wrong Answer

Solution code:
a, b = [int(i) for i in input().split()]
A = a/0.08
B = b*10
if abs(A-B) <= 10:
    print(int(max(A, B)+0.5))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import numpy as np
a,b = list(map(int,(input().split())))
temp_a = int(a/0.08)
temp_b = int(b/0.1)
ans = 0
temp_a = list(map(lambda i:int(i/0.08) ,np.arange(a,a+1,0.1)))
temp_b = list(map(lambda i:int(i/0.1) ,np.arange(b,b+1,0.1)))
#print(temp_a,temp_b)              
#print(temp_a,temp_b)
dup = set(temp_a) & set(temp_b)
if dup:
  print(min(dup))
else:
  print(-1)

Submission status: Wrong Answer

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

for n in range(0, 10000):
  a2 = int(n * 8 / 100)
  b2 = int(n * 8 / 100)
  if a2 == a and b2 == b:
    print(n)
    exit()
  else:
    print(-1)

Submission status: Wrong Answer

Solution code:
a, b = [int(i) for i in input().split()]
A = a/0.08
B = b*10
# print(A, B)
if B-10 < A < B+10:
    print(int(max(A, B)+0.5))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
a, b = [int(i) for i in input().split()]
A = a/0.08
B = b*10
print(A, B)
if B-10 < A < B+10:
    print(int(max(A, B)+0.5))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
tax = input().split(" ")
A = int(tax[0])
B = int(tax[1])

ans = (A+B) / 0.18

if A != int(0.08*ans) or B != int(0.1*ans):
    ans = -1

print(int(ans))

Submission status: Wrong Answer

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

for n in range(0, 10000):
  a2 = int(n * 8 / 100)
  b2 = int(n * 8 / 100)
  if a2 == a and b2 == b:
    print(n)
    exit()

Submission status: Wrong Answer

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

for n in range(0, 10000):
  a2 = int(n * 0.08)
  b2 = int(n * 0.1)
  if a2 == a and b2 == b:
    print(n)
    exit()

Submission status: Wrong Answer

Solution code:
tax = input().split(" ")
A = int(tax[0])
B = int(tax[1])

ans = (A+B) / 0.18

if A != 0.08*ans or B != 0.1*ans:
    ans = -1

print(int(ans))

Submission status: Wrong Answer

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

for n in range(0, 10000):
  a2 = n * 0.08
  b2 = n * 0.1
  if a2 == a and b2 == b:
    print(min(a2, b2))

Submission status: Wrong Answer

Solution code:
a, b = [int(i) for i in input().split()]
A = a/0.08
B = b*10
# print(A, B)
if B-1 < A < B+10:
    print(int(max(A, B)+0.5))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
c = max(int(a / 0.08), int(b / 0.10))
if c < min(int((a + 1) / 0.08), int((b + 1) / 0.10)):
    print(c)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
a, b = [int(i) for i in input().split()]
A = int(a/0.08)
B = int(b/0.1)
# print(A, B)
if B <= A < B+10:
    print(A)
else:
    print(-1)

Submission status: Wrong Answer

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

x=b*10

y=a*100/8
ans=-1

if x<=int(y):
    for i in range(x,int(y)+1):
        if int(i*0.08)==a and int(i*0.1)==b:
            ans=i
            break
else:    
    for i in range(int(y),x+1):
        if int(i*0.08)==a and int(i*0.1)==b:
            ans=i
            break
print(ans)

Submission status: Wrong Answer

Solution code:
import math
a,b = map(int,input().split())
a_min = math.ceil(a/0.08)
b_min = int(b/0.1)
a_max = math.floor((a+1)/0.08)
b_max = math.floor((b+1)/0.1)
if a_min>=b_max or b_min>=a_max:
  print(-1)
else:
  print(max(a_min,b_min))
print(a_min,a_max,b_min,b_max)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
for n in range(int(100/0.08)):
  if int(n*0.08)==a and int(n*0.1)==b:
    print(n)
  else:
    print('-1')

Submission status: Wrong Answer

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

x=b*10

y=a*100/8
ans=-1
for i in range(x,int(y)+1):
    if int(i*0.08)==a and int(i*0.1)==b:
        ans=i
        break
print(ans)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
A, B = map(int, input().split())

x_list=[]
for num in range(2000):
    if int(num*0.08)==A:
        x_list.append(num)

y_list=[]
for num in range(2000):
    if int(num*0.1)==B:
        y_list.append(num)

l1_l2_and = list(set(x_list)&set(y_list))

if l1_l2_and==[]:
    print(-1)
elif l1_l2_and[0]>0:
    print(l1_l2_and[0])
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import math

a, b = map(int, input().split())
min1 = a / 0.08
max1 = (a+1) / 0.08
min2 = b / 0.1
max2 = (b+1) / 0.1

if max1 < min2:
    print('-1')
else:
    print(math.ceil(min1))

Submission status: Wrong Answer

Solution code:
a, b = [int(i) for i in input().split()]
A = int(a/0.08)
B = int(b/0.1)
if A == B:
  print(A)
else:
  print(-1)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
for n in range(2000):
    if int(n) * 0.08 == A and int(n) * 0.1 == B:
        print(n)
        exit()
print(-1)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
for n in range(2000):
    if int(n) * 0.08 == A and int(n) * 0.1 == B:
        print(n)
        break
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
for n in range(1, 2000):
    if n * 0.08 == A and n * 0.1 == B:
        print(n)
        break
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
for n in range(1, 2000):
    if n * 8 / 100 == A and n * 10 / 100 == B:
        print(n)
        break
    else:
        print(-1)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
for n in range(1, 2000):
    if n * 8 / 100 == A and n * 10 / 100 == B:
        print(n)
        break
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
for n in range(1, 10000):
    if n * 8 / 100 == A and n * 10 / 100 == B:
        print(n)
        break
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
from math import floor , ceil

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

x = ceil(num[0] / (8 / 100))

y = round(num[1] / (10 / 100))

if x < y :
    print(-1)
    exit()
elif x == y:
    print(x)
    exit()
else:
    for temp in range(min(x,y),max(x,y)+1):
        if num[0] == floor(0.08 * temp) and num[1] == floor(0.10 * temp):
            print(temp)
            exit()
print(-1)

Submission status: Wrong Answer

Solution code:
from math import floor , ceil

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

x = ceil(num[0] / (8 / 100))

y = round(num[1] / (10 / 100))

if x < y :
    print("Case:1")
    print(-1)
    exit()
elif x == y:
    print(x)
    exit()
else:
    for temp in range(min(x,y),max(x,y)+1):
        if num[0] == floor(0.08 * temp) and num[1] == floor(0.10 * temp):
            print(temp)
            exit()
print(-1)

Submission status: Wrong Answer

Solution code:
from math import floor , ceil

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

x = ceil(num[0] / (8 / 100))

y = round(num[1] / (10 / 100))

if x < y :
    print(-1)
    exit()
elif x == y:
    print(x)
else:
    for temp in range(min(x,y),max(x,y)+1):
        if num[0] == floor(0.08 * temp) and num[1] == floor(0.10 * temp):
            print(temp)
            exit()
print(-1)

Submission status: Wrong Answer

Solution code:
from math import floor , ceil

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

x = ceil(num[0] / (8 / 100))

y = round(num[1] / (10 / 100))

if x < y :
    print(-1)
    exit()
elif x == y:
    print(x)
else:
    for temp in range(y,x+1):
        if num[0] == floor(0.08 * temp) and num[1] == floor(0.10 * temp):
            print(temp)
            exit()

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
print(int(round(max(12.5*A,10*B)+0.4999999,0)))

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
if A * 12.5 == B * 10:
    print(A * 12.5)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
print(round(max(12.5*A,10*B)+0.5,1))

Submission status: Wrong Answer

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

price_a = round(A*100/8)
price_b = int(B*100/10)

if(int(price_a * 1.10) - B == price_a) :
  print(price_a)
  exit()
if(int(price_b * 1.08) - A == price_b) :
  print(price_b)
  exit()
  
print(-1)

Submission status: Wrong Answer

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

for i in range(1,1250):
    if int(i*0.08)==a and int(i*0.1)==b:
        print(i)
        break
else:
    print(-1)

Submission status: Wrong Answer

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

price_a = int(A*100/8)
price_b = int(B*100/10)

if(int(price_a * 1.10) - B == price_a) :
  print(price_a)
  exit()
if(int(price_b * 1.08) - A == price_b) :
  print(price_b)
  exit()
  
print(-1)

Submission status: Wrong Answer

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

price_a = int(A*100/8)
price_b = int(B*100/10)

if(int(price_a * 1.10) - B == price_a) :
  print(int(price_a*1.08))
  print(price_a)
  exit()
if(int(price_b * 1.08) - A == price_b) :
  print(price_b)
  exit()
  
print(-1)

Submission status: Wrong Answer

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

price_a = int(A/8*100)
price_b = int(B/10*100)

if(int(price_a * 1.10) - B == int(price_a * 1.08) - A) :
  print(price_a)
  exit()
if(int(price_b * 1.10) - B == int(price_b * 1.08) - A) :
  print(price_b)
  exit()
  
print(-1)

Submission status: Wrong Answer

Solution code:
from math import *
A,B = map(int,input().split())

#A = x*.08
#x1 = A / 0.08
#x2 = B / 0.1

x = 0
while 1:
    x += 1
    if floor(x*0.08) == A:
        break

if B == floor(x * 0.1):
    print(int(x))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
ans1 = int(A/0.08)
ans2 = int(B/0.1)
if ans1 == ans2 :
    print(ans1)
elif max(ans1, ans2) * 0.08 == A:
    print(max(ans1, ans2))
elif max(ans1, ans2) * 0.1 == B:
    print(max(ans1, ans2))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
ans1 = int(A/0.08)
ans2 = int(B/0.1)
if ans1 == ans2 :
    print(ans1)
elif max(ans1, ans2) * 0.08 == A:
    print(max(ans1, ans2))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
from math import *
A,B = map(int,input().split())

#A = x*.08
x1 = A / 0.08
#x2 = B / 0.1

if B == floor(x1 * 0.1):
    print(int(x1))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import math
x, y = map(int, input().split())
a = x / 0.08
b = y / 0.1
ans = -1
for i in range(math.floor(b), math.floor((y+1)/0.1)):
    if math.floor(a) ==i:
        ans = i
        break
print(ans)

Submission status: Wrong Answer

Solution code:
import math
x, y = map(int, input().split())
a = x / 0.08
b = y / 0.1
ans = -1
for i in range(math.floor(b), math.floor((y+1)/0.08)):
    if math.floor(a) ==i:
        ans = i
        break
print(ans)

Submission status: Wrong Answer

Solution code:
a8, b10 = map(int, input().split())
min8 = a8 / 0.08
max8 = (a8+1) / 0.08 

min10 = b10 / 0.1
max10 = (b10+1) / 0.1 
list10 = [i for i in range(int(min10), int(max10))]
if int(min8) - min8 != 0:
    min8 = int(min8) + 1
if int(max8) - max8 != 0:
    max8 = int(max8) + 1
list8 = [i for i in range(int(min8), int(max8))]
if len(list(set(list8).intersection(set(list10)))) >= 1:
    print(list(set(list8).intersection(set(list10)))[0])
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())
a = x / 0.08
b = y / 0.1
ans = -1
for i in range(round(b), round((y+1)/0.08)):
    if round(a) ==i:
        ans = i
        break
print(ans)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split(' '))
X = {(int(x*0.08), int(x*0.1)): x for x in reversed(range(1, 101))}
print(X.get((A, B), -1))

Submission status: Wrong Answer

Solution code:
from math import floor
def main():
    a, b = map(int, input().split())
    for i in range(1, 1000):
        x1 = floor(i*0.08)
        x2 = floor(i*0.1)
        if x1 == a and x2 == b:
            print(i)
            return
    print('-1')
main()

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
ans = -1
for i in range(1000):
    if int(i*0.08) == a and int(i*0.1) ==b:
        ans = i
        break
print(ans)

Submission status: Wrong Answer

Solution code:
a,b = input().split()
a,b = [int(a), int(b)]
min_a = (a * 100) / 8
if min_a != ((a * 100) // 8):
  min_a += 0.5
  
max_a = ((a + 1) * 100) / 8
min_b = b * 10
max_b = (b + 1) * 10

if min_a >= min_b and min_a < max_b:
  print(min_a)
elif min_b >= min_a and min_b < max_a:
  print(min_b)
else:
  print('-1')

Submission status: Wrong Answer

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

p = []
for i in range(10, 1000):
  if int(i*0.08) == a:
    if int(i*0.1) == b:
      p.append(i)

if len(p) == 0 or p[0] == 0:
  print(-1)
else:
  print(p[0])

Submission status: Wrong Answer

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

p = []
for i in range(10, 1000):
  if int(i*0.08) == a:
    if int(i*0.1) == b:
      p.append(i)

if len(p) == 0:
  print(-1)
else:
  print(p[0])

Submission status: Wrong Answer

Solution code:
a,b = input().split()
a,b = [int(a), int(b)]
min_a = (a * 100) // 8
max_a = ((a + 1) * 100) / 8
min_b = b * 10
max_b = (b + 1) * 10

if min_a >= min_b and min_a < max_b:
  print(min_a)
elif min_b >= min_a and min_b < max_a:
  print(min_b)
else:
  print('-1')

Submission status: Wrong Answer

Solution code:
a,b = input().split()
a,b = [int(a), int(b)]
min_a = (a * 100) // 8
max_a = ((a + 1) * 100) // 8
min_b = b * 10
max_b = (b + 1) * 10

if min_a >= min_b and min_a < max_b:
  print(min_a)
elif min_b >= min_a and min_b < max_a:
  print(min_b)
else:
  print('-1')

Submission status: Wrong Answer

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

a_min = -(-a // 0.08)
a_max = -(-(a+1) // 0.08)
b_min = -(-b // 0.1)
b_max = -(-(b+1) // 0.1)

if a_max < b_min:
    print(-1)
elif a_min > b_min:
    print(int(a_min))
else:
    print(int(b_min))

Submission status: Wrong Answer

Solution code:
def main():
    from math import ceil
    a, b = map(int, input().split())
    A = list(range(int(a/0.08), int((a+1)/0.08)))
    B = list(range(int(b/0.10), int((b+1)/0.10)))
    r = -1

    for i in range(len(B)):
        if B[i] in A:
            r = B[i]
            break
    print(r)

main()

Submission status: Wrong Answer

Solution code:
from math import ceil
a, b = map(int, input().split())
A = list(range(int(a/0.08), int((a+1)/0.08)-1))
B = list(range(int(b/0.10), int((b+1)/0.10)-1))

r = -1
for i in range(len(B)):
    if B[i] in A:
        r = B[i]
        break
print(r)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
 
money = 1
while money < 1010:
  if money ==int(0.08*a) and money == int(0.10*b):
    print(money)
    break
  money+=1
  if money ==1010:
    print(-1)

Submission status: Wrong Answer

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

money = 1
while money < 1010:
  if money ==int(0.08*a) and money == int(0.10*b):
    print(money)
  money+=1
  if money ==1010:
    print(-1)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
a_ = int(a/0.08)
b_ = int(b/0.10)
print(a_ if a_==b_ else -1)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
money = 1
while money <1010:
  if money==a//0.08 and money == b//0.10:
    print(money)
  money+=1
  if money == 1010:
    print(-1)

Submission status: Wrong Answer

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

def find(per, value):
    n_list = [i for i in range(1,101)]
    return list(filter(lambda x:int(x*per) == value, n_list))

a_list = list(set(find(0.08, A)) & set(find(0.1, B)))
if a_list:
    print(min(a_list))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
a,b=map(int, input().split())
n=0
for i in range(a * 100 // 10):
  if int(i * 0.08) == a and int(i * 0.1) == b:
    print(i)
    n+=1
    break
if n == 0:
  print(-1)

Submission status: Wrong Answer

Solution code:
a,b=map(int, input().split())
n=0
for i in range(a * 100 // 8 + 2):
  if int(i * 0.08) == a and int(i * 0.1) == b:
    print(i)
    n+=1
    break
if n == 0:
  print(-1)

Submission status: Wrong Answer

Solution code:
import math
a, b = map(int, input().split())
aX1 = a/0.08
aX2 = (a+1)/0.08
la = [i for i in range(int(aX1),int(math.ceil(aX2)))]
 
bX1 = b/0.10
bX2 = (b+1)/0.10
lb = [i for i in range(int(bX1),int(math.ceil(bX2)))]
 
l=[]
l+=la+lb
l = set(l)
if len(l) == len(la)+ len(lb):
  print(-1)
else:
  print(max(min(la),min(lb)))

Submission status: Wrong Answer

Solution code:
a,b=map(int, input().split())
n=0
for i in range(a * 100 // 8 + 1):
  if int(i * 0.08) == a and int(i * 0.1) == b:
    print(i)
    n+=1
    break
if n == 0:
  print(-1)

Submission status: Wrong Answer

Solution code:
from math import ceil, floor

A, B = map(int,input().split())

x8min = ceil(A / 0.08) # 8%でA円になる最小値
x8max = floor((A + 1) / 0.08) # 8%でA円になるのは、これ未満
x10min = ceil(B / 0.1) # 10%でB円になる最小値
x10max = floor((B + 1) / 0.1) # 10%でB円になるのは、これ未満

#print(str(x8min))
#print(str(x8max))
#print(str(x10min))
#print(str(x10max))

if (x8min > x10max) or (x8max < x10min):
    print('-1')
else:
    print(str(x8min))

Submission status: Wrong Answer

Solution code:
from math import ceil, floor

A, B = map(int,input().split())

x8min = ceil(A / 0.08) # 8%でA円になる最小値
x8max = floor((A + 1) / 0.08) # 8%でA円になるのは、これ未満
x10min = ceil(B / 0.1) # 10%でB円になる最小値
x10max = floor((B + 1) / 0.1) # 10%でB円になるのは、これ未満

#print(str(x8min))
#print(str(x8max))
#print(str(x10min))
#print(str(x10max))

if (x8min <= x10max) and (x8max >= x10min) and (x8min >= x10max):
    print(str(x8min))
else:
    print('-1')

Submission status: Wrong Answer

Solution code:
from math import ceil, floor

A, B = map(int,input().split())

x8min = ceil(A / 0.08) # 8%でA円になる最小値
x8max = floor((A + 1) / 0.08) # 8%でA円になるのは、これ未満
x10min = ceil(B / 0.1) # 10%でB円になる最小値
x10max = floor((B + 1) / 0.1) # 10%でB円になるのは、これ未満

#print(str(x8min))
#print(str(x8max))
#print(str(x10min))
#print(str(x10max))

if (x8min <= x10max) and (x8max >= x10max):
    print(str(x8min))
else:
    print('-1')

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
if int(A/0.08*0.1) == B :
    print(int(A/0.08))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
if int(A/0.08*0.1) == B :
    print(round(A/0.08))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
if round(A/0.08*0.1) == B:
    print(round(A/0.08))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import math

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

motoa = a/0.08
motob = b/0.1
a += 0.999
xmotoa = a/0.08

if xmotoa >= motob:
    print(math.ceil(motoa))
else:
    print('-1')

Submission status: Wrong Answer

Solution code:
import math
l1=input().split(" ")
t80=int(l1[0])
t100=int(l1[1])
t80_min=math.ceil(t80/0.08)
t80_max=math.ceil((t80+1)/0.08)
t100_min=math.ceil(t100/0.1)
t100_max=math.ceil((t100+1)/0.1)
if t80_max<t100_min or t100_max<t80_min:
    print("-1")
else:
    if t80_min<=t100_min:
        print(math.ceil(t100_min))
    else:
        print(math.ceil(t80_min))

Submission status: Wrong Answer

Solution code:
import math
l1=input().split(" ")
t80=int(l1[0])
t100=int(l1[1])
t80_min=(t80/0.08)
t80_max=((t80+1)/0.08)
t100_min=(t100/0.1)
t100_max=((t100+1)/0.1)
if t80_max<t100_min or t100_max<t80_min:
    print("-1")
else:
    if t80_min<=t100_min:
        print(math.ceil(t100_min))
    else:
        print(math.ceil(t80_min))

Submission status: Wrong Answer

Solution code:
import math
l1=input().split(" ")
t80=int(l1[0])
t100=int(l1[1])
t80_min=(t80/0.08)
t80_max=((t80+1)/0.08)
t100_min=(t100/0.1)
t100_max=((t100+1)/0.1)
if t80_max<t100_min:
    print("-1")
else:
    if t80_min<=t100_min:
        print(math.ceil(t100_min))
    else:
        print(math.ceil(t80_min))

Submission status: Wrong Answer

Solution code:
l1=input().split(" ")
t80=int(l1[0])
t100=int(l1[1])
t80_min=(t80/0.08)
t80_max=((t80+1)/0.08)
t100_min=(t100/0.1)
t100_max=((t100+1)/0.1)
if t80_max<t100_min:
    print("-1")
else:
    if t80_min<=t100_min:
        print(int(t100_min))
    else:
        print(int(t80_min))

Submission status: Wrong Answer

Solution code:
l1=input().split(" ")
t80=int(l1[0])
t100=int(l1[1])
t80_min=(t80/0.08)
t80_max=((t80+1)/0.08)
t100_min=(t100/0.1)
t100_max=((t100+1)/0.1)
if t80_max<t100_min:
    print("-1")
else:
    if t80_min<=t100_min:
        print(t100_min)
    else:
        print(t80_min)

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
Aa=A/8*100
Aam=(A+1)/8*100
Ba=B*10
Bam=(B+1)*10
if (Aa<=Ba and Ba<Aam)or(Ba<=Aa and Aa<Bam):
    print(int(max(Aa,Ba)))
else:
    print("-1")

Submission status: Wrong Answer

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

import math

for i in range(101):
    if math.floor(i * 0.08) == A and math.floor(i * 0.1) == B:
        print(i)
        exit()

print(-1)

Submission status: Wrong Answer

Solution code:
from math import floor as f
A, B = map(int, input().split(" "))

ans = []
for c in range(1000):
    a = f(c * 0.08)
    b = f(c * 0.1)
    if a == A and b == B:
        print(c)
        break
else:
    print("-1")

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split());l=max(--a*25//2,b*10);print([-1,l][l<min(-~a*25//2,-~b*10)])

Submission status: Wrong Answer

Solution code:
import sys, re
import math
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7



a, b = MAP()

ans = int( min(a * 12.5, b * 10) )

if int(float(ans) * 0.08) == a and int(float(ans) * 0.1) == b:
    print(ans)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
A, B = list(map(int,input().split()))
list_i = []
for i in range(1000):
    if A <= i * 8 / 100 < A + 1:
        list_i.append(i)
    else:
        pass
            
        
list_j = []
for j in range(1000):
    if B <= j * 10 / 100 < B + 1:
        list_j.append(j)
    else:
        pass
            
    
s_i = set(list_i)
s_j = set(list_j)
list_w = s_j & s_i
if not list_w :
    print(-1)   
else:
     print(min(list_w))

Submission status: Wrong Answer

Solution code:
A, B = list(map(int,input().split()))
list_i = []
for i in range(1000):
    if A <= i * 8 / 100 < A + 1:
        list_i.append(i)
    else:
        pass
            
        
list_j = []
for j in range(1000):
    if B <= j * 10 / 100 < B + 1:
        list_j.append(j)
    else:
        pass
            
    
s_i = set(list_i)
s_j = set(list_j)
list_w = s_j & s_i
if not list_w :
    print(list_i, list_j, -1)   
else:
     print(min(list_w))

Submission status: Wrong Answer

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

A, B = map(int, input().split())

for numA in range(0,101):
	A1 = math.floor(numA * 0.08)
	for numB in range(0,101):
		B1 = math.floor(numB * 0.1)

		if A == int(A1) and B == int(B1) and int(numA) == int(numB):
			print(numA)
			exit()

print(-1)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import math
A, B = map(int, input().split())

A1 = math.floor(A / 0.08)
B1 = math.floor(B / 0.1)

if A1 == B1:
	print(A1)
else:
	num = [i / 10 for i in range(0, 10)]
	for i in num:
		A2 = A1 + i

		ansA1 = math.floor(A2 * 0.08)
		ansB1 = math.floor(A2 * 0.1)

		if int(ansA1) == A and int(ansB1)== B:
			print(math.floor(A2))
			exit()
	print(-1)

Submission status: Wrong Answer

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

A, B = MAP()

for i in range(1, 1000):
	if i*8//100 == A and i*10//100 == B:
		print(i)
		break
else:
	print(-1)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
if b * 10 <= ((a + 1) * 25) // 2 and -(-a * 25 // 2) < (b + 1) * 10:
    print(max(-(-a*25//2), b * 10))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
aa, bb = map(int,input().split())
a = aa / 0.08
b = bb / 0.1
c = []
if (a-int(a))>0.5:
    for i in range(13):
        if (b-int(b))>0.9:
            for j in range(10):
                if int(a)+i == int(b)+j:
                    c.append(int(a)+i)
                else:
                    pass
        else:
            for j in range(9):
                if int(a)+i == int(b)+j:
                    c.append(int(a)+i)
                else:
                    pass
else:
    for i in range(12):
        if (b-int(b))>0.9:
            for j in range(10):
                if int(a)+i == int(b)+j:
                    c.append(int(a)+i)
                else:
                    pass
        else:
            for j in range(9):
                if int(a)+i == int(b)+j:
                    c.append(int(a)+i)
                else:
                    pass

if c==[]:
    print(-1)
elif (int(a)+i)<=0:
    print(-1)
else:
    print(*c[:1])

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
if b * 10 <= ((a + 1) * 25) // 2 and -(-a * 25 // 2) <= (b + 1) * 10:
    print(max(-(-a*25//2), b * 10))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
aa, bb = map(int,input().split())
a = aa / 0.08
b = bb / 0.1
c = []
if (a-int(a))<0.5:
    for i in range(12):
        if (b-int(b))>0.9:
            for j in range(10):
                if int(a)+i == int(b)+j:
                    c.append(int(a)+i)
                else:
                    pass
        else:
            for j in range(9):
                if int(a)+i == int(b)+j:
                    c.append(int(a)+i)
                else:
                    pass
else:
    for i in range(13):
        if (b-int(b))>0.9:
            for j in range(10):
                if int(a)+i == int(b)+j:
                    c.append(int(a)+i)
                else:
                    pass
        else:
            for j in range(9):
                if int(a)+i == int(b)+j:
                    c.append(int(a)+i)
                else:
                    pass
if c==[]:
    print(-1)
elif (int(a)+i)<=0:
    print(-1)
else:
    print(*c[:1])

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split());c=-(-a*25//2);print(c if b*10<=(a+1)*25//2 and c<=(b+1)*10 else -1)