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:
A, B = map(int,input().split())
s1_basic = int(str(A / 0.08).split(".")[0])
s2_basic = int(str(B / 0.1).split(".")[0])
if s1_basic == s2_basic:
  print(s2_basic)
elif s1_basic+1 == s2_basic:
  print(s2_basic)
elif s1_basic-1 == s2_basic:
  print(s2_basic)
else:
  print(-1)

Submission status: Wrong Answer

Solution code:
A, B = map(int,input().split())
s1_basic = int(str(A / 0.08).split(".")[0])
s2_basic = int(str(B / 0.1).split(".")[0])
if s1_basic == s2_basic:
  print(s1_basic)
elif s1_basic+1 == s2_basic:
  print(s1_basic)
elif s1_basic-1 == s2_basic:
  print(s1_basic)
else:
  print(-1)

Submission status: Wrong Answer

Solution code:
A, B = map(int,input().split())
s1_basic = str(A / 0.08).split(".")[0]
s2_basic = str(B / 0.1).split(".")[0]
if s1_basic == s2_basic:
  print(s1_basic)
else:
  print(-1)

Submission status: Wrong Answer

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

ans = -1
for i in range(10**3):
    if i*8//100 == A and i*10//100 == B:
        ans = i
        break
    elif i*8//100 > A and i*10//100 > B:
        break
print(ans)

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
 
ans=-1
for x in range(1000):
    if int(x*(8/100))==A and int(x*(10/100))==B:
        ans=x
        break

print(ans)

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
 
x_max=int((100/8)*(A+1))
x_min=int((100/8)*A)
 
if x_min-int(x_min)>0:
    x_min+=1
 
x=-1
for i in range(x_min,x_max+1):
    if int(i*(1/10))==B:
        x=i
        break
if x_min>=x_max:
    x=-1
 
print(x)

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
 
x_max=int((100/8)*(A+1))
x_min=int((100/8)*A)
 
if x_min-int(x_min)>0:
    x_min+=1
 
x=-1
if x_min>=x_max:
    x=x_min
for i in range(x_min,x_max+1):
    if int(i*(1/10))==B:
        x=i
        break
 
print(x)

Submission status: Wrong Answer

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

x_max=int((100/8)*(A+1))
x_min=int((100/8)*A)

if x_min-int(x_min)>0:
    x_min+=1

x=-1
if x_min>=x_max:
    x=x_min
for i in range(x_min,x_max+1):
    if int(i*(1/10))==B:
        x=i
        break

if x<0 or 100<x:
    print("-1")
else:
    print(x)

Submission status: Wrong Answer

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

x_max=int((100/8)*(A+1))
x_min=int((100/8)*A)

if x_min==x_min:
    x=x_min
for i in range(x_min,x_max):
    if int(i*(1/10))==B:
        x=i
        break

if x<0 or 100<x:
    print("-1")
else:
    print(x)

Submission status: Wrong Answer

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

if 10*b<12.5*a<10*(b+1):
    print(int(12.5*a))
elif 12.5*a<=10*b<12.5*(a+1):
    print(int(10*b))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
am=a*(100/8)

bm=b*(100/10)

x=[]
for i in range(101):
    if am<=i and bm<=i:
        x.append(i)
    else:
        pass
if len(x)==0:
    print('-1')
else:
    print(x[0])

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
am=a*(100/8)
aM=(a+1)*(100/8)
bm=b*(100/10)
bM=(b+1)*(100/10)
x=[]
for i in range(101):
    if am<=i<aM and bm<=i<bM:
        x.append(i)
    else:
        pass
if len(x)==0:
    print('-1')
else:
    print(x[0])

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
am=a*(100/8)
aM=(a+1)*(100/8)
bm=b*(100/10)
bM=(b+1)*(100/10)
for i in range(101):
    if am<=i<aM and bm<=i<bM:
        print(i)
        exit(0)
    elif i==100:
        print('-1')

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
am=a*(100/108)
aM=(a+1)*(100/108)
bm=b*(100/110)
bM=(b+1)/(100/110)
for i in range(101):
    if am<=i<aM and bm<=i<bM:
        print(i)
        exit(0)
    elif i==100:
        print('-1')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(1000):
    if int(i*0.08) == A and int(i*0.1) == B:
        print(i)
        exit()

print(-1)

Submission status: Wrong Answer

Solution code:
import math
a,b = map(int,input().split())
p1 = a // 0.08
p2 = b // 0.1
ans = math.inf

if math.floor(p1 * 0.1) == b:
    ans = p1
if math.floor(p2 * 0.08) == a:
    ans = min(ans,p2)
if ans == math.inf:
    ans = -1
print(int(ans))

Submission status: Wrong Answer

Solution code:
import math
a,b = map(int,input().split())
p1 = a / 0.08
p2 = b / 0.1
ans = math.inf

if math.floor(p1 * 0.1) == b:
    ans = p1
if math.floor(p2 * 0.08) == a:
    ans = min(ans,p2)
if ans == math.inf:
    ans = -1
print(int(ans))

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
x,y=(100*a)//8,10*b
seiki=[]
for z in [x,y]:
  if int(z*0.08)==a and int(z*0.1)==b:
    seiki.append(z)
if seiki:
  print(min(seiki))
else:
  print(-1)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
x,y=100*a//8,10*b
seiki=[]
for z in [x,y]:
  if int(z*0.08)==a and int(z*0.1)==b:
    seiki.append(z)
if seiki:
  print(min(seiki))
else:
  print(-1)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
x,y=a/0.08,b/0.1
seiki=[]
for z in [x,y]:
  if int(z*0.08)==a and int(z*0.1)==b:
    seiki.append(z)
if seiki:
  print(min(seiki))
else:
  print(-1)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
x,y=int(a/0.08),int(b/0.1)
seiki=[]
for z in [x,y]:
  if int(z*0.08)==a and int(z*0.1)==b:
    seiki.append(z)
if seiki:
  print(min(seiki))
else:
  print(-1)

Submission status: Wrong Answer

Solution code:
a,b =map(int,input().split())
 
for x in range(1009):
 if (x*0.08*100)//1==a*100 and (x*0.10*100)//1==b*100 and x//1==int(x):
  print(int(x))
  exit()
  
print(-1)

Submission status: Wrong Answer

Solution code:
a,b =map(int,input().split())
 
for x in range(1010):
 if (x*0.08*100)//1==a*100 and (x*0.10*100)//1==b*100 and x//1==int(x):
  print(int(x))
  exit()
  
print(-1)

Submission status: Wrong Answer

Solution code:
a,b =map(int,input().split())
 
for x in range(101):
 if (x*0.08*100)//1==a*100 and (x*0.10*100)//1==b*100 and x//1==int(x):
  print(int(x))
  exit()
  
print(-1)

Submission status: Wrong Answer

Solution code:
a,b =map(int,input().split())
 
for x in range(101):
 if (x*0.08*100)//1==a*100 and (x*1.10*100)//1==b*100 and x//1==int(x):
  print(int(x))
  exit()
  
print(-1)

Submission status: Wrong Answer

Solution code:
a,b =map(int,input().split())
 
for x in range(101):
 if (x*0.08)//1==a and (x*1.10)//1==b and x//1==int(x):
  print(int(x))
  exit()
  
print(-1)

Submission status: Wrong Answer

Solution code:
a,b =map(int,input().split())
 
for x in range(101):
 if (x*1.08)//1==a+x and (x*1.10)//1==b+x and x//1==int(x):
  print(int(x))
  exit()
  
print(-1)

Submission status: Wrong Answer

Solution code:
a,b =map(int,input().split())
 
for x in range(101):
 if (x*1.08)//1==a+x and (x*1.10)//1==b+x and x//1==x:
  print(int(x))
  exit()
  
print(-1)

Submission status: Wrong Answer

Solution code:
a,b =map(int,input().split())
 
for x in range(101):
 if (x*1.08)//1==a+x and (x*1.10)//1==b+x:
  print(int(x))
  exit()
  
print(-1)

Submission status: Wrong Answer

Solution code:
a,b =map(int,input().split())
 
for x in range(101):
 if int(x*1.08)==a+x and int(x*1.10)==b+x:
  print(int(x))
  exit()
  
print(-1)

Submission status: Wrong Answer

Solution code:
a,b =map(int,input().split())
 
for x in range(100):
 if int(x*1.08)==a+x and int(x*1.10)==b+x:
  print(int(x))
  exit()
  
print(-1)

Submission status: Wrong Answer

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

for x in range(100):
 if x*1.08==a+x and x*1.10==b+x:
  print(x)
 else:
  print(-1)

Submission status: Wrong Answer

Solution code:
import math
def main():
  A, B = map(int, input().split())
  
  #Nは最大でも１２５０
  
  for n in range(1, 2000):
    if math.floor(n * 0.08) == A and math.floor(n * 0.1) == B:
      print(n)
      return
  print(-1)
  
  print(math.floor(25 * 0.08))
  print(math.floor(25 * 0.1))
    
  
main()

Submission status: Wrong Answer

Solution code:
import math
def main():
  A, B = map(int, input().split())
  
  #Nは最大でも１２５０
  
  for n in range(1, 1251):
    if math.floor(n * 0.08) == A and math.floor(n * 0.1) == B:
      print(n)
      return
  print(-1)
  
  print(math.floor(25 * 0.08))
  print(math.floor(25 * 0.1))
    
  
main()

Submission status: Wrong Answer

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

import math
for i in range(11):
    if math.floor((x+i)*0.08)==a:
        print(x+i)
        exit(0)

print(-1)

Submission status: Wrong Answer

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

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

# O(1)の回答
if int(b*10*0.08) > a:
    print(-1)
elif int((b*10+9)*0.08) < a:
    print(-1)
elif a % 2 == 0:
    print(int(a/0.08))
else:
    print(int(a/0.08)+1)

Submission status: Wrong Answer

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

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

# O(1)の回答
if int(b*10*0.08) > a:
    print(-1)
elif a % 2 == 0:
    print(int(a/0.08))
else:
    print(int(a/0.08)+1)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import math


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

estimated = b * 10

ans = -1
for i in range(10):
    if (estimated+i) == math.ceil(a/0.08) and a == int((estimated+i)*0.08) and b == int((estimated+i)*0.1):
        ans = estimated+i
        break
print(ans)

Submission status: Wrong Answer

Solution code:
import math


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

estimated = b * 10

ans = -1
for i in range(10):
    if (estimated+i) == math.ceil(a/0.08):
        ans = estimated+i
        break
print(ans)

Submission status: Wrong Answer

Solution code:
import itertools
import functools
import math
from collections import Counter
from itertools import combinations

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

flg = 0
for i in range(1,100+1):
    CHK_A= (i * 8) // 100
    CHK_B= (i * 10) // 100
    if A == CHK_A and B == CHK_B:
        print(i)
        exit()

print(-1)

Submission status: Wrong Answer

Solution code:
import itertools
import functools
import math
from collections import Counter
from itertools import combinations

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

flg = 0
for i in range(1,100+1):
    CHK_A=math.floor(i * 0.08)
    CHK_B=math.floor(i * 0.10)
    if A == CHK_A and B == CHK_B:
        print(i)
        exit()

print(-1)

Submission status: Wrong Answer

Solution code:
import math
A, B = map(float, input().split())
lowerA = math.ceil(A/0.08)
upperA = math.floor((A+1)/0.08)      
lowerB = math.ceil(B/0.1)
upperB = math.floor((B+1)/0.1)
answer = -1
for i in range(lowerA, upperA):
  if (lowerB <= i) and (i <= upperB):
    answer = i
    break
print(answer)

Submission status: Wrong Answer

Solution code:
import math
A, B = map(float, input().split())
lowerA = math.ceil(A/0.08)
upperA = math.floor((A+1)/0.08)      
lowerB = math.ceil(B/0.1)
upperB = math.floor((B+1)/0.1)
answer = 0
for i in range(lowerA, upperA):
  if (lowerB <= i) and (i <= upperB):
    answer = i
    break
print(answer)

Submission status: Wrong Answer

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

x = int(a * 12.5)
y = int(b * 10)
ans = max(x,y)
print(int(ans) if int(ans * 0.08) == a and int(ans * 0.1) == b else -1)

Submission status: Wrong Answer

Solution code:
import math
A,B = list(map(int,input().split()))
X08d = math.ceil(A/0.08)
X08u = math.floor((A+1)/0.08)
X10d = math.ceil(B/0.10)
X10u = math.floor((B+1)/0.10)
ans = list(set(list(range(X08d,X08u+1)))&set(list(range(X10d,X10u+1))))
if ans == []:
    print(-1)
else:
    print(min(ans))

Submission status: Wrong Answer

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

a_max = (a+1)/0.08
a_min = a/0.08

b_max = 10*(b+1)
b_min = 10*b

if ((a_max > b_min >= a_min) or (a_min < b_max <= a_max)):
    print(int(max(a_min, b_min)))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
from decimal import Decimal

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

for i in range(10100):
    if A == int(i * 8 / 100) and B == int(i / 10):
        print(i)
        break

Submission status: Wrong Answer

Solution code:
from decimal import Decimal

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

for i in range(10100):
    if A == int(i * 0.08) and B == int(i * 0.1):
        print(i)
        break

Submission status: Wrong Answer

Solution code:
from decimal import Decimal

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

T1 = Decimal(A) * Decimal(100) / Decimal(8) 
if B == int(T1 / Decimal(10)):
    print(int(T1))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
from decimal import Decimal

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

T1 = Decimal(A) / Decimal(8) * Decimal(100)
if B == int(T1 / Decimal(10)):
    print(int(T1))
else:
    print(-1)

Submission status: Wrong Answer

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

for i in range(1300):
    if i == a*12.5 and i ==b*10:
        print(i)
        exit()
print(-1)

Submission status: Wrong Answer

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

for i in range(1300):
    if i == a*12.5 and b*10:
        print(i)
        exit()
print(-1)

Submission status: Wrong Answer

Solution code:
from decimal import Decimal

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

T1 = Decimal(A / 0.08)
if B == int(T1 * Decimal(0.1)):
    print(int(T1))
else:
    print(-1)

Submission status: Wrong Answer

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

T1 = A / 0.08
if B == int(T1 * 0.1):
    print(int(T1))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import math
a,b=map(int,input().split())
n=math.ceil((a*100)/8)
m=int((a*100)/10)
result=[]
for i in range(m-100,n+100):
    print(i)
    if math.floor(i*0.08)==a and math.floor(i*0.1)==b:
        result.append(i)
if result==[]:
    print(-1)
    exit()
print(min(result))

Submission status: Wrong Answer

Solution code:
import math
a,b=map(int,input().split())
n=math.ceil((a*100)/8)
m=int((a*100)/10)
result=[]
for i in range(m,n+1):
    if math.floor(i*0.08)==a and math.floor(i*0.1)==b:
        result.append(i)
if result==[]:
    print(-1)
    exit()
print(max(result))

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:
def rnd(n):
    if n-int(n)==0.5: return int(n)
    else: return round(n)
a, b = map(int, input().split())
check = int(a/0.08)
if rnd(check*0.08)==a and rnd(check*0.1)==b: print(check)
else:
    i=1
    while i<=100:
        if rnd((check+i)*0.08)==a and rnd((check+i)*0.1)==b:
            print(check+i); break
        elif rnd((check-i)*0.08)==a and rnd((check-i)*0.1)==b:
            print(check-i); break
        i+=1
    else: print(-1)

Submission status: Wrong Answer

Solution code:
def rnd(n):
    if n-int(n)==0.5: return int(n)
    else: return round(n)
a, b = map(int, input().split())
check = int(a/0.08)
if rnd(check*0.08)==a and rnd(check*0.1)==b: print(check)
else:
    i=1
    while i<=10:
        if rnd((check+i)*0.08)==a and rnd((check+i)*0.1)==b:
            print(check+i); break
        elif rnd((check-i)*0.08)==a and rnd((check-i)*0.1)==b:
            print(check-i); break
        i+=1
    else: print(-1)

Submission status: Wrong Answer

Solution code:
def rnd(n):
    if n-int(n)==0.5: return int(n)
    else: return round(n)
a, b = map(int, input().split())
check = int(a/0.08)
if rnd(check*0.08)==a and rnd(check*0.1)==b: print(check)
else: print(-1)

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
ten = []
ei = []
for i in range(1,101):
    if a <= i*0.08 < a+1:
        ei.append(i)
for j in range(1,101):
    if b <= j*0.1 < b+1:
        ten.append(j)
case = set(ei) & set(ten)
if not case:
    print(-1)
else:
    print(min(case))

Submission status: Wrong Answer

Solution code:
import sys

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

val_1 = A / 0.08
val_2 = B / 0.10

if val_1 == val_2:
    print(int(val_1))
    sys.exit()

i = 1
if val_1 > val_2:
    while val_1 != val_2:
        val_2 = (B + 0.1*i)/0.1
        i += 1
        if val_1 < val_2:
            print(-1)
            sys.exit()
    print(int(val_1))
elif val_1 < val_2:
    while val_1 != val_2:
        val_1 = (A + 0.08*i)/0.08
        i += 1
        if val_1 > val_2:
            print(-1)
            sys.exit()
    print(int(val_1))

Submission status: Wrong Answer

Solution code:
import sys

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

val_1 = A / 0.08
val_2 = B / 0.10

i = 1

if int(val_1) == int(val_2):
    print(int(val_1))
    sys.exit()
else:
    while val_1 != val_2:
        val_2 = (B + 0.1*i)/0.1
        i += 1
        if val_1 < val_2:
            print(-1)
            sys.exit()
print(int(val_1))

Submission status: Wrong Answer

Solution code:
import sys 
import math
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
A, B = map(int, readline().split())
A1 = math.ceil(A / 0.08)
B1 = math.ceil(B / 0.1)
A2 = int((A+1) / 0.08)
B2 = int((B+1) / 0.1)
a = min(A1,B1)
b = max(A2,B2)
for i in range(a,b+1):
    if A1 <= i <= A2 and B1 <= i <= B2:
        print(i)
        sys.exit()
print(-1)

Submission status: Wrong Answer

Solution code:
import sys 
import math
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
A, B = map(int, readline().split())
A1 = math.ceil(A / 0.08)
B1 = math.ceil(B / 0.1)
A2 = int((A+1) / 0.08)
B2 = int((B+1) / 0.1)
print(A1,A2)
a = min(A1,B1)
b = max(A2,B2)
for i in range(a,b+1):
    if A1 <= i <= A2 and B1 <= i <= B2:
        print(i)
        sys.exit()
print(-1)

Submission status: Wrong Answer

Solution code:
import sys 
import math
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
A, B = map(int, readline().split())
A1 = math.floor(A / 0.08)
B1 = math.floor(B / 0.1)
A2 = int((A+1) / 0.08)
B2 = int((B+1) / 0.1)
a = min(A1,B1)
b = max(A2,B2)
for i in range(a,b+1):
    if A1 <= i <= A2 and B1 <= i <= B2:
        print(i)
        sys.exit()
print(-1)

Submission status: Wrong Answer

Solution code:
import math
a,b = [int(i) for i in input().split()]
ans=[]
for i in range(1000):
    if math.floor(i*0.08) == a and math.floor(i*0.1) == b: ans.append(i)
if len(ans) != 0: print(min(ans))
else: print(-1)

Submission status: Wrong Answer

Solution code:
import math
a,b = [int(i) for i in input().split()]
if math.floor(10*a/8) == b: print(100*a//8)
else: print(-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for x in range(0,10**6):
    print('---')
    print(x)
    ax = (8*x)//100
    bx = (10*x)//100
    print(ax,bx)
    if ax == a and bx == b:
        print(x)
        break
else:
    print(-1)

Submission status: Wrong Answer

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

for x in range(0,10001):
    print('---')
    print(x)
    ax = (8*x)//100
    bx = (10*x)//100
    print(ax,bx)
    if ax == a and bx == b:
        print(x)
        break
else:
    print(-1)

Submission status: Wrong Answer

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

for x in range(0,101):
    ax = (8*x)//100
    bx = (10*x)//100
    if ax == a and bx == b:
        print(x)
        break
else:
    print(-1)

Submission status: Wrong Answer

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

for x in range(0,100):
    ax = (8*x)//100
    bx = (10*x)//100
    if ax == a and bx == b:
        print(x)
        break
else:
    print(-1)

Submission status: Wrong Answer

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

A_n = int(100*A/8)
B_n = int(100*B/10)

if A_n == B_n:
  print(A_n)
elif A_n < B_n:
  if int(B_n*0.8) == A:
    print(B_n)
  else:
    print(-1)
elif B_n < A_n:
  if int(A_n*0.1) == B:
    print(A_n)
  else:
    print(-1)
else:
  print(-1)

Submission status: Wrong Answer

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

for i in range(1010):
    tax8 = math.floor(a * 0.08)
    tax10 = math.floor(a * 0.1)

    if a == tax8 and b == tax10:
        print(i)
        exit()

print(-1)

Submission status: Wrong Answer

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

for i in range(1009):
    tax8 = math.floor(a * 0.08)
    tax10 = math.floor(a * 0.1)

    if a == tax8 and b == tax10:
        print(i)
        exit()
else:
    print(-1)

Submission status: Wrong Answer

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

for i in range(1251):
    tax8 = math.floor(a * 0.08)
    tax10 = math.floor(a * 0.1)

    if a == tax8 and b == tax10:
        print(i)
        exit()
else:
    print(-1)

Submission status: Wrong Answer

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

for i in range(1200):
    tax8 = math.floor(a * 0.08)
    tax10 = math.floor(a * 0.1)

    if a == tax8 and b == tax10:
        print(i)
        exit()
else:
    print(-1)

Submission status: Wrong Answer

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

for i in range(1200):
    tax8 = int(a * 0.08)
    tax10 = int(a * 0.1)

    if a == tax8 and b == tax10:
        print(i)
        exit()
else:
    print(-1)

Submission status: Wrong Answer

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

for i in range(111):
    tax8 = int(a * 1.08)
    tax10 = int(a * 1.1)

    if a == tax8 and b == tax10:
        print(i)
        exit()
else:
    print(-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A, B = input().split()
A = int(A)
B = int(B)
ans = -1
for x in range(10001):
    if x*0.08 == A and x*0.1 == B:
        ans = x
        break

print(ans)

Submission status: Wrong Answer

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

a1 = int(a * 100 / 8)
b1 = b * 10
c = 0
a2 = a1 + 25
b2 = b1 + 25

if a2 == b2:
    print(a2 - 25)
if abs(a2 - b2) > 25:
    print(-1)
elif a2 > b2:
    for i in range(b2, a2 + 1):
        if int(i * 0.08) == a1 and int(i * 0.1) == int(b1):
            print(i - 25)
            break
        else:
            c = c + 1
    if c == (a2 - b2 + 1):
        print(-1)
elif a2 < b2:
    for i in range(a2, b2 + 1):
        if int(i * 0.08) == a1 and int(i * 0.1) == int(b1):
            print(i - 25)
            break
        else:
            c = c + 1
    if c == (b2 - a2 + 1):
        print(-1)

Submission status: Wrong Answer

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

a1 = int(a * 100 / 8)
b1 = b * 10
c = 0
a2 = a1 + 25
b2 = b1 + 25

if a2 == b2:
    print(a2 - 25)
if abs(a2 - b2) > 25:
    print(-1)
elif a2 > b2:
    for i in range(b2, a2 + 1):
        if int(i * 0.08) == a1 and int(i * 0.1) == int(b1):
            print(i)
            break
        else:
            c = c + 1
    if c == (a2 - b2 + 1):
        print(-1)
elif a2 < b2:
    for i in range(a2, b2 + 1):
        if int(i * 0.08) == a1 and int(i * 0.1) == int(b1):
            print(i)
            break
        else:
            c = c + 1
    if c == (b2 - a2 + 1):
        print(-1)

Submission status: Wrong Answer

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


dic=defaultdict(lambda:-1)
for i in range(100,0,-1):
    dic[int(i*0.08),int(i*0.10)]=i
    
print(dic[a,b])

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
ans=-1
for i in range(1300):
    if int(i/25)==a and int(i/10)==b:
        ans=i
        break
print(ans)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
ans=-1
for i in range(101):
    if int(i/25)==a and int(i/10)==b:
        ans=i
        break
print(ans)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
ans=-1
for i in range(101):
    if int(i*8/100)==a and int(i/10)==b:
        ans=i
        break
print(ans)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
imn=int((a+0.05)/0.08)
imx=imn+12
jmn=int(b*10)
jmx=int(jmn+9)
i_=range(imn,imx+1)
j_=range(jmn,jmx+1)
for i in i_:
  for j in j_:
    if i==j:
      print(i)
      exit()
print(-1)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
imn=int((a+0.05)/0.08)
imx=imn+13
jmn=int(b*10)
jmx=int(jmn+9)
i_=range(imn,imx+1)
j_=range(jmn,jmx+1)
for i in i_:
  for j in j_:
    if i==j:
      print(i)
      exit()
print(-1)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
imn=int(a/0.08)
imx=int(imn+12.5)
jmn=int(b*10)
jmx=int(jmn+9)
i_=range(imn,imx+1)
j_=range(jmn,jmx+1)
for i in i_:
  for j in j_:
    if i==j:
      print(i)
      exit()
print(-1)

Submission status: Wrong Answer

Solution code:
import math
A,B = list(map(int,input().split()))
 
A_min=12*A+math.floor(0.5*A)
A_max=12*(A+1)+math.ceil(0.5*(A+1))
B_min=10*B
B_max=10*(B+1)
 
if A_max <= B_min:
    print(-1)
elif B_max <= A_min:
    print(-1)
else:
    print(max(A_min,B_min))

Submission status: Wrong Answer

Solution code:
import math
A,B = list(map(int,input().split()))
 
A_min=12*A+math.floor(0.5*A)
A_max=12*(A+1)+math.ceil(0.5*(A+1))
B_min=10*B
B_max=10*(B+1)
 
if A_max < B_min:
    print(-1)
elif B_max < A_min:
    print(-1)
else:
    print(max(A_min,B_min))

Submission status: Wrong Answer

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

flag = -1
for x in range(1,101):
    if (x *0.08) // 1 == A and (x*0.1) // 1 == B:
        flag = x
        break

print(flag)