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: Accepted

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

for i in range(1,10000):
    a = (i * 8) // 100
    b = (i * 10) // 100
    if A == a and B == b:
        print(i)
        exit()
print(-1)

Submission status: Accepted

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

for i in range(10**6):
    if int(i*0.08)==A and int(i*0.1)==B:
        print(i)
        break
else:
    print(-1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
A, B = map(int, input().split())
for x in range(100000):
  if int(x * 0.08) == A and (int(x * 0.10) == B):
    print(x)
    exit(0)
print(-1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
int1 = lambda x: int(x) - 1
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(500000)

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

for i in range(1001):
    a = (i * 0.08) // 1
    b = (i * .1) // 1

    if (a == A) & (b == B):
        print(i)
        sys.exit()

print("-1")

Submission status: Accepted

Solution code:
from math import floor

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

ans = -1
for i in range(10000):
    e8 = floor(i * 0.08)
    e10 = floor(i * 0.1)

    if e8 == a and e10 == b:
        ans = i
        break

print(ans)

Submission status: Accepted

Solution code:

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

import sys
for i in range(100000):

    if int(i * 0.08) == A and int(i * 0.1) == B:
        print (i)
        sys.exit()

print (-1)

Submission status: Accepted

Solution code:
def examA():
    S = SI()
    if S=="AAA" or S=="BBB":
        print("No")
    else:
        print("Yes")
    return

def examB():
    N, A, B = LI()
    loop = N//(A+B)
    ans = loop*A + min(A,N%(A+B))
    print(ans)
    return

def examC():
    A, B = LI()
    ans = -1
    for i in range(1,20000):
        if i*8//100==A:
            if i*10//100==B:
                ans = i
                break
    print(ans)
    return

def examD():
    ans = 0
    print(ans)
    return

def examE():
    ans = 0
    print(ans)
    return

def examF():
    ans = 0
    print(ans)
    return

import sys,copy,bisect,itertools,heapq,math,random
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
global mod,mod2,inf,alphabet,_ep
mod = 10**9 + 7
mod2 = 998244353
inf = 10**18
_ep = 10**(-12)
alphabet = [chr(ord('a') + i) for i in range(26)]

sys.setrecursionlimit(10**6)

if __name__ == '__main__':
    examC()

"""

"""

Submission status: Accepted

Solution code:
def main():
    A,B = map(int,input().split())
    for i in range(10000):
        if (int(i*0.08) == A) and (int(i*0.1) == B):
            break
    if i == 9999:
        print(-1)
    else:
        print(i)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(10000):
    a = int(i * 1.08) - i
    b = int(i * 1.10) - i
    if a == A and b == B:
        print(i)
        exit()

print(-1)

Submission status: Accepted

Solution code:
from collections import Counter,defaultdict,deque
from bisect import bisect_left
import sys,math,itertools,pprint,fractions,time
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

a,b = inpl()
res = INF
for i in range(1,10**6):
    if int(i*0.08) == a and int(i*0.1) == b:
        print(i)
        break
else:
    print(-1)

Submission status: Accepted

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

for x in range(2000):
    if floor(x*0.08) == A and floor(x*0.1) == B:
        print(x)
        break
else:
    print(-1)

Submission status: Accepted

Solution code:
import math

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

for i in range(10101):
    if math.floor(i * 0.08) == a and math.floor(i * 0.1) == b:
        print(i)
        break
else:
    print(-1)

Submission status: Accepted

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

for i in range(1, 10**5):
    if int(i * 0.08) == a and int(i * 0.1) == b :
        print(i)
        exit()
print(-1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SI(): return sys.stdin.readline()[:-1]

def main():
    a,b=MI()
    for ans in range(1,2000):
        if ans*2//25==a and ans//10==b:break
    if ans==1999:print(-1)
    else:print(ans)

main()

Submission status: Accepted

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

for i in range(1, 100000):
    tmpa = i * 8 // 100
    tmpb = i * 10 // 100
    if tmpa == a  and tmpb == b:
        print(i)
        exit()
print(-1)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A,B = list(map(int,input().split()))
flag=False
for i in range(100001):
    if int(i*0.08)==A and int(i*0.1)==B:
        flag=True
        break

if flag:
    print(i)
else:
    print(-1)

Submission status: Accepted

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

f = False
for x in range(1, 2000):
    if int(x * 0.08) == a and int(x * 0.1) == b:
        if not f:
            print(x)
        f = True

if not f:
    print(-1)

Submission status: Accepted

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

for i in range(1, 100000):
    if int(i * 0.08) == A and int(i * 0.1) == B:
        print(i)
        exit()
print(-1)

Submission status: Accepted

Solution code:
def main():

    A, B = map(int, input().split())
    for v in range(0, 100000):
        if int(v * 0.08) == A and int(v * 0.1) == B:
            return v
    return -1

if __name__ == '__main__':
    print(main())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import sys
A,B = map(int,input().split())
i = 0
while math.floor(i*0.08) <= A and math.floor(i*0.10) <= B:
  if math.floor(i*0.08) == A and math.floor(i*0.10) == B:
    print(i)
    sys.exit(0)
  i+=1
print(-1)

Submission status: Accepted

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

for i in range(5000):
  if int(i * 0.08) == A and int(i * 0.1) == B:
    print(i)
    break
else:
  print(-1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#
# 　　  ⋀_⋀　 
#　　  (･ω･)  
# .／ Ｕ ∽ Ｕ＼
#  │＊　合　＊│
#  │＊　格　＊│ 
#  │＊　祈　＊│ 
#  │＊　願　＊│ 
#  │＊　　　＊│ 
#      ￣
#
import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,sqrt,factorial,hypot,log #log2ないｙｐ
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from fractions import gcd
from random import randint
def ceil(a,b): return (a+b-1)//b
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    A,B=MI()
    for i in range(100000):
        if(int(i*0.08)==A and int(i*0.1)==B):
            print(i)
            return
    print(-1)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import math
import sys


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

for x in range(1,1011):
    a = x * 8 //100
    b = x * 10 // 100
    if a == A and b ==B: 
        print(x)
        exit(0)

print(-1)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
input = sys.stdin.readline

a, b = [int(item) for item in input().split()]
for i in range(20000):
    eight = int(i * 0.08)
    ten = int(i * 0.1)
    if eight == a and ten == b:
        print(i)
        exit()
print(-1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    A,B=map(int, input().split())
    for i in range(1,100000):
        if int(i*.08)==A and int(i*.1)==B:
            print(i)
            break
    else:
        print(-1)

if __name__ == "__main__":
    main()

Submission status: Accepted

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


ans = -1
for x in range(100000):
    a = int(x * 0.08)
    b = int(x * 0.1)
    if a == A and b == B:
        ans = x
        break

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

    for x in range(10000):
        if int(x * 0.08) == A and int(x * 0.1) == B:
            print(x)
            return

    print(-1)


if __name__ == '__main__':
    main()

# import sys
#
# sys.setrecursionlimit(10 ** 7)
#
# input = sys.stdin.readline
# rstrip()
# int(input())
# map(int, input().split())

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(1, 100000):
    x = i*8//100
    y = i*10//100
    if x == a and y == b:
        print(i)
        exit()
print(-1)

Submission status: Accepted

Solution code:
def solve():
    N, M = map(int, input().split())
    c = -1
    for i in range(1, 1001):
        a = int(i * 0.08)
        b = int(i * 0.1)
        if a == N and b == M:
            c = i
            break

    return c

print(solve())

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
ans = -1
for i in range(1,100000):
    taxa = (i*0.08)//1
    taxb = (i*0.1)//1

    if taxa == a and taxb == b:
        ans = i
        break

print(ans)

Submission status: Accepted

Solution code:
a, b = [int(i) for i in input().split()]

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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
for x in range(10000):
    if x * 8 // 100 == a and x * 10 // 100 == b:
        print(x)
        exit(0)
print(-1)

Submission status: Accepted

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

for i in range(10000):
  if i*8/100==A and i*10/100==B:
    print i
    exit(0)
print -1

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    A, B = list(map(int, input().split()))
    for i in range(1010):
        if int(i * 0.08) == A and int(i * 0.1) == B:
            return i
    return -1
   

print(main())

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
for n in range(10**6):
  if (n*8)//100==a and (n//10)==b:print(n);exit()
print(-1)

Submission status: Accepted

Solution code:
import os
import sys

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(10 ** 9)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7
# MOD = 998244353

A, B = list(map(int, sys.stdin.buffer.readline().split()))

for n in range(100000):
    if int(n * 0.08) == A and int (n * 0.10) == B:
        print(n)
        exit()
print(-1)

Submission status: Accepted

Solution code:
rr = raw_input
rri = lambda: int(rr())
rrm = lambda: map(int, rr().split())

def solve(A, B):
    for price in xrange(1, 1000000):
        tax1 =int(price * 0.08)
        tax2 = int(price* 0.10)
        if tax1 == A and tax2==B:
            return price
    return -1


print solve(*rrm())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import floor

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from itertools import permutations
import sys
import math
import bisect
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

def solve():
    a,b = LI()
    for i in range(1000000):
        if int(i*0.08) == a and int(i*0.10) == b:
            print(i)
            return
    print(-1)
    return

#Solve
if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
printn = lambda x: print(x,end='')
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
ins = lambda : input().strip()
DBG = True # and False
BIG = 10**18
R = 10**9 + 7

def ddprint(x):
  if DBG:
    print(x)

a,b = inm()
for i in range(1,11000):
    if (i*8)//100==a and (i*10)//100==b:
        print(i)
        exit()
print(-1)

Submission status: Accepted

Solution code:
import sys
import math
from collections import defaultdict

sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]

mod = 10**9 + 7

def I(): return int(input())
def LI(): return list(map(int, input().split()))
def LIR(row,col):
    if row <= 0:
        return [[] for _ in range(col)]
    elif col == 1:
        return [I() for _ in range(row)]
    else:
        read_all = [LI() for _ in range(row)]
        return map(list, zip(*read_all))

#################

A,B = LI()

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

Submission status: Accepted

Solution code:
from collections import *
from itertools import *
from bisect import *
from heapq import *
import copy
import math
from fractions import gcd

mod=10**9+7
#N=int(input())
A,B=map(int,input().split())
#A=list(map(int,input().split()))

for i in range(1,500001):
    #print((i*8)//100,(i*10)//100,i)
    if (i*8)//100==A and (i*10)//100==B:
        print(i)
        exit()

print(-1)

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

a, b = na()
for i in range(1, 100000):
    if i*8//100 == a and i*10//100 == b:
        print(i)
        sys.exit(0)
print(-1)

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0
while ans < 1000*A:
    if int(ans*0.08) == A and int(ans*0.1) == B:
        break
    ans += 1

if ans == 1000*A:
    ans = -1
print(ans)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
A,B=map(int,input().split())

for i in range(1,200000):
    if (i*0.08)//1==A and (i*0.1)//1==B:
        print(i)
        exit()

print(-1)

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
for i in range(1,10**5*2):
	if int(i*0.08+10**-12)==a:
		if int(i*0.1+10**-12)==b:
			print(i)
			exit()
print(-1)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    a,b=MI()
    ans=-1
    for i in range(10000):
        aa=int(i*0.08)
        bb=i//10
        if a==aa and b==bb:
            ans=i
            break
    print(ans)

main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(ans)

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split())
x1=a*100//8
x2=b*10
 if x1//10==b:
    print(x1)
else:
    print(-1)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math

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

f = math.floor
min8, max8 = f(a*12.5), f((a+1)*12.5)
min10, max10 = f(b*10), f((b+1)*10)

l8, l10 = list(range(min8, max8)), list(range(min10, max10))
s8, s10 = set(l8), set(l10)

ss = s8 & s10
print(min(ss))

Submission status: Runtime Error

Solution code:
import math

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

volume_A = A / 0.08
volume_B = B / 0.1

min_A, max_A = volume_A, volume_A
range_A = 1 / 0.08
min_B, max_B = volume_B, volume_B
range_B = 1 / 0.1

for i in range(math.floor(volume_A - range_A), math.ceil(volume_A + range_A)):
    if math.floor(i * 0.08) == A:
        min_A = min(min_A, i)
        max_A = max(max_A, i)

for j in range(math.floor(volume_B - range_B), math.ceil(volume_B + range_B)):
    if math.floor(j * 0.1) == B:
        min_B = min(min_B, j)
        max_B = max(max_B, j)

ans_A = set()
for i in range(min_A, max_A + 1):
    ans_A.add(i)

ans_B = set()
for j in range(min_B, max_B + 1):
    ans_B.add(j)

ans = ans_A & ans_B

if len(ans) == 0:
    print(-1)
else:
    print(min(ans))

Submission status: Runtime Error

Solution code:
a_s=a/1.08
a_t=(a+1)/1.08
b_s=b/1.1
b_t=(b+1)/1.1

a0=int(a_s)
a1=int(a_t)
b0=int(b_s)
b1=int(b_t)


if (a_s-a0)>0:
  a0+=1
if (a_t-a1)<=0:
  a1-=1
if (b_s-b0)>0:
  b0+=1
if (b_t-b1)<=0:
  b1-=1

lista=[i for i in range(a0,a1+1)]
listb=[i for i in range(b0,b1+1)]

ansl=[]
for j in range(len(lista)):
  if lista[j] in listb:
    ansl.append(lista[j])

if not ansl==[]:
  ans=ansl[0]
  print(ans)
else:
  print(-1)

Submission status: Runtime Error

Solution code:
a,b = map(int,input().split())
A = int(a/0.08)
B = int(b/0.1)
al = []
bl = []
i = 1
while True:
  j = 0
  if(int((A+i)*0.08) == a):
    al.appned(int(A+i))
  else:
    j += 1
  if(int((A-i)*0.08) == a):
    al.appned(int(A-i))
  else:
    j += 1
  if(j==2):
    break
  i+=1
k = 1
while True:
  j = 0
  if(int((B+i)*0.08) == b):
    bl.appned(int(B+i))
  else:
    j += 1
  if(int((B-i)*0.08) == b):
    bl.appned(int(B-i))
  else:
    j += 1
  if(j==2):
    break
  k+=1
al.sort()
ans = -1
for i in range(len(al)):
  if(al[i] in bl):
    ans = al[i]
    break
print(ans)

Submission status: Runtime Error

Solution code:
a,b = map(int,input().split())
A = int(a/0.08)
B = int(b/0.1)
al = []
bl = []
i = 1
while True:
  j = 0
  if(int((A+i)*0.08) == a):
    al.appned(int(A+i))
  else:
    j += 1
  if(int((A-i)*0.08) == a):
    al.appned(int(A-i))
  else:
    j += 1
  if(j==2):
    break
  i+=1
k = 1
while True:
  j = 0
  if(int((B+i)*0.08) == b):
    al.appned(int(B+i))
  else:
    j += 1
  if(int((B-i)*0.08) == b):
    al.appned(int(B-i))
  else:
    j += 1
  if(j==2):
    break
  k+=1
al.sort()
ans = -1
for i in range(len(al)):
  if(al[i] in bl):
    ans = al[i]
    break
print(ans)

Submission status: Runtime Error

Solution code:
a,b = map(int,inpout().split())
A = int(a/0.08)
B = int(b/0.1)
al = []
bl = []
i = 1
while True:
  j = 0
  if(int((A+i)*0.08) == a):
    al.appned(int(A+i))
  else:
    j += 1
  if(int((A-i)*0.08) == a):
    al.appned(int(A-i))
  else:
    j += 1
  if(j==2):
    break
  i+=1
k = 1
while True:
  j = 0
  if(int((B+i)*0.08) == b):
    al.appned(int(B+i))
  else:
    j += 1
  if(int((B-i)*0.08) == b):
    al.appned(int(B-i))
  else:
    j += 1
  if(j==2):
    break
  k+=1
al.sort()
ans = -1
for i in range(len(al)):
  if(al[i] in bl):
    ans = al[i]
    break
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split())
for x, y in range(1, 100):
  if x*8//100 == a and y*10//100 == b:
    print(x)
    exit()
  else:
    continue
print(-1)

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split())
for x, y in range(1, 100):
  if x*0.08 == a and y*0.1 == b:
    print(x)
    exit()
  else:
    continue
print(-1)

Submission status: Runtime Error

Solution code:
import math
a,b = [float(i) for i in input().split()]
ans = 1000000000
Flag = False

for i in range(1,10000):
    ans8 = int(math.floor(i*0.08))
    ans10 = int(math.floor(i*0.1))
#     print(ans8,ans10)
    if ans8 == a and ans10 == b:
        ans = min(ans, i)
        flag = True

if flag:
    print(ans)
else:
    print(-1)

Submission status: Runtime Error

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

if A%2 == 0:
    min = max([A*12.5,B*10])
    max = min([A*12.5+12,B*10+10])
else:
    min = max(int((A+1)*12.5-12),int(B*10))
    max = min(int((A+1)*12.5),int(B*10+10))

if min>max:
    ans = -1
else:
    ans = min
print(ans)

Submission status: Runtime Error

Solution code:
import math
a, b = list(map(int, input().split()))
for i in range(1, 1250):
    p8 = math.floor(i * 0.08)
    p10 = math.floor(i * 0.10)
    if p8 == a and p10 == b:
        print(i)
        return
print(-1)

Submission status: Runtime Error

Solution code:
import math
a,b=map(int,input().split())
ans=[]
for i in range(1251):
    if math.floor(i*0.08)==a and math.floor(i*0.1)==b:
        ans.append(i)
print(min(ans))

Submission status: Runtime Error

Solution code:
import math
a,b=map(int,input().split())
ans=[]
for i in range(1250):
    if math.floor(i*0.08)==a and math.floor(i*0.1)==b:
        ans.append(i)
print(min(ans))

Submission status: Runtime Error

Solution code:
N, A, B = map(int, input().split())
if N <= (A + B):
  if B > 0 and N - A >= 0:
     print(N - A)
  else:
    print(0)
else:
  print(B)

Submission status: Runtime Error

Solution code:
a = [i for i in range(int((A-1)*100/8 ), int((A+1)*100/8 ))]
b = [i for i in range(int((B-1)*100/10), int((B+1)*100/10))]

a = [i for i in a if int(i*0.08) == A]
b = [i for i in b if int(i*0.10) == B]

ans = list(set(a) & set(b))
if ans and min(ans) > 0:
    print(min(ans))
else:
    print(-1)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

e=0
t=0

for i in range(1,100):
	if a<=i*0.08<a+1:
		e=i
	if b<=i*0.1<b+1:
		t=i
	if e==t:
		print(e)
        
print(-1)

Submission status: Runtime Error

Solution code:
a,b = map(int,input().split())
q = list()
for i in range(1009):
  if int(i*0.08) == a and int(i*0.1) == b:
    q.append(i)

if len(q) == 0:
  print(-1)
print(min(q))

Submission status: Runtime Error

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

A = []
for i in range(math.floor(a/0.08), math.floor((a+1)/0.08) + 1):
  A.appned(i)
  
B = []
for i in range(math.floor(b/0.1), math.floor((b+1)/0.1) + 1):
  B.appned(i)
  
C = set(A)&set(B)

if C:
  print(min(C))
else:
  print(-1)

Submission status: Runtime Error

Solution code:
import math
A,B=map(int,input().split())
eight=[]
i=0
ten=[]
for a in range(1,1001):
    if math.floor(a*0.08)==A:
        eight.append(a)
    if math.floor(a*0.1)==B:
        ten.append(a)

for a in eight:
    if a in ten:
        print(a)
        i=1
        break
if i=0:
    print("-1")

Submission status: Runtime Error

Solution code:
m = lambda : (a:=list(map(int,input().split())) , c:=[x for x in range(1,1010) if int(x*0.08)==a[0] and int(x*0.1)==a[1]], min(c) if len(c)>0 else -1 )[2]
print(m)

Submission status: Runtime Error

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

import math
aS = math.ceil(a / 0.08)
al = math.floor((a + 1) / 0.08)
bs = math.ceil(b / 0.10)
bl = math.floor((b + 1) / 0.10)

for i in range(1000):
    if aS <= i < al and bs <= i < bl:
        print(i)
        flag = False
        break
if flag:
    print(-1)

Submission status: Runtime Error

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

import math
as = math.ceil(a / 0.08)
al = math.floor((a + 1) / 0.08)
bs = math.ceil(b / 0.10)
bl = math.floor((b + 1) / 0.10)

for i in range(1000):
    if as <= i < al and bs <= i < bl:
        print(i)
        break

Submission status: Runtime Error

Solution code:
import math
A, B = map(int, input().split())
arange = set(range(math.ceil(A*100/8), math.ceil((A+1)*100/8)))
brange = set(range(math.ceil(B*100/10), math.ceil((B+1)*100/10)))
print(min(arange & brange))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s1 = input()
s2 = input()
s1_basic = math.floor(s1 / 0.08)
s2_basic = math.floor(s2 / 0.1)
if s1_basic !== s2_basic:
  print(-1)
else:
  print(s1_basic)

Submission status: Runtime Error

Solution code:
s1 = input()
s2 = input()
s1_basic = math.floor(s1 / 0.08)
s2_basic = math.floor(s2 / 0.1)
if s1_basic != s2_basic:
  print("-1")
else:
  print(s1_basic)