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 .

Solution (Python):
import sys
import math
sys.setrecursionlimit(10 ** 7)

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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

ans = -1
for i in range(1, 1263):
    if math.floor(i * 0.08) == A and math.floor(i * 0.1) == B:
        ans = i
        break

print(ans)

Solution (Python):

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

from decimal import Decimal

n_list = [(int(i*0.08),int(i*0.1)) for i in range(1500)]

for i,v in enumerate(n_list):
    if v==(a,b):
        print(i)
        import sys
        sys.exit()
print(-1)

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

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

Solution (Python):


def resolve():
    A,B=map(int,input().split())
    for i in range(1,20000):
        a=int(i*0.08)
        b=int(i*0.1)
        if a==A and b==B:
            print(i)
            return
    else:
        print(-1)


if __name__ == "__main__":
    resolve()

Solution (Python):
import math
A,B=map(int,input().split())
ans=-1
for i in range(1,10001):
    n1=int(math.floor(i * 0.08))
    n2=int(math.floor(i * 0.1))

    if n1 == A and n2 == B:
        ans=i
        break

print(ans)

Solution (Python):
import math
a,b = map(int,input().split())
for i in range(1,1251):
    if math.floor(i*0.08) == a and math.floor(i*0.1) == b:
        print(i)
        exit()
print('-1')

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

Solution (Python):
import sys
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)
        sys.exit()
print(-1)

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

for n in range(1,20000):
    if int(n * 0.08) == a:
        if int(n * 0.10) == b:
            print(n)
            exit()

print(-1)

Solution (Python):
A,B = map (int,input().split())
eight = [0] * 2000
ten = [0] * 2000
for i in range(2000):
    eight[i] =(float(i+1) * 0.08)//1
    ten[i] = (float(i+1) * 0.1)//1
ans = 0
for i in range(2000):
    if A == eight[i] and B == ten[i]:
        ans =  i + 1
        break
if ans == 0:
    print(-1)
else:
    print(ans)

Solution (Python):
from math import floor

if __name__ == "__main__":
    a, b = map(int, input().split())

    for i in range(1251):
        if floor(i*0.08) == a and floor(i*0.1) == b:
            print(i)
            exit()

    print('-1')

Solution (Python):
a,b=map(int,input().split())
ans=10**9
for i in range(1,1001):
  if int(i*0.08)==a and int(i*0.1)==b:
    ans=min(i,ans)
if ans==10**9:
  print(-1)
else:
  print(ans)

Solution (Python):
import math
a, b = map(int, input().split())
for yen in range(1, 10000):
    ap = math.floor(yen*0.08)
    bp = math.floor(yen*0.10)
    
    if ap == a and bp == b:
        print(yen)
        exit()
print(-1)

Solution (Python):
A,B = map(int,input().split())
check = 0
for i in range(100000):
    if i * 8 // 100 == A:
        if i * 10 // 100 == B:
            ans = i
            check = 1
            break
if check == 0:
    ans = -1
print(ans)

Solution (Python):
import math
import sys
a,b = map(int, input().split())
for ans in range(1, 1500):
    if math.floor(ans * 0.08) == a and math.floor(ans * 0.10) == b:
        print(ans)
        sys.exit()
print(-1)

Solution (Python):
def main():
    A, B = map( int, input().split())
    ans = -1
    for i in range(100000):
        if i*8//100 == A and i*10//100 == B:
            ans = i
            break
    print(ans)
if __name__ == '__main__':
    main()

Solution (Python):
import math

A, B = map(int, input().split())
jdg = False
ans = 1000
for i in range(B*10, (B+1)*10-1):
    M = math.floor(i*0.08)
    if M == A:
        jdg = True
        ans = min(ans,i)

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

Solution (Python):
A, B = map(int, input().split())
import math

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

Solution (Python):
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import math
import bisect
import random
from itertools import permutations, accumulate, combinations, product
import sys
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, floor
from operator import mul
from functools import reduce
import pprint
sys.setrecursionlimit(10 ** 9)


INF = 10 ** 20
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
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)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 1000000007

a, b = LI()
for i in range(10000):
    if i * 8 //100 == a and i // 10 == b:
        print(i)
        break
else:
    print(-1)

Solution (Python):
import sys
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)
        sys.exit()
print(-1)

Solution (Python):
import math

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

r = -1
for i in range(1,1251):
    if math.floor(i * 0.08) == a and math.floor(i * 0.1) == b:
        r = i
        break

print(r)

Solution (Python):
import math

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

if a%2==0:
    koho1=[(a*25)//2, ((a*25)//2) +12]
else:
    koho1=[int((a*12.5)+0.5), int((a*12.5)+11.5)]

koho2=[b*10, b*10+9]

if koho2[0]<=koho1[0] and koho1[0]<=koho2[1]:
    print(koho1[0])
elif koho1[0]<=koho2[0] and koho2[0]<=koho1[1]:
    print(koho2[0])
else:
    print(-1)

Solution (Python):
''' بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ '''

gi = lambda : list(map(int,input().split()))
a, b = gi()
for k in range(1001):
	if int(k * .08) == a and int(k * .1) == b:
		print(k)
		exit()
print(-1)

Solution (Python):
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(0)

print("-1")

Solution (Python):
A,B = map(int,input().split())
ans = -1

for i in range(1,2000):
    if (i * 0.08) // 1 == A and (i * 0.1) // 1 == B:
        ans = i
        break

print(ans)

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

for i in range(100000):
    if i*108//100-i==A and i*110//100-i==B:
        print(i)
        exit()

print(-1)

Solution (Python):
from math import floor

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

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

Solution (Python):
A,B = list(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)
        break
    if i == 10**5 -1:
        print(-1)
        break

Solution (Python):
import math

NN = 2020202
MOD = 10**9+7
INF = float("inf")


a, b = map(int, input().split())
low = max(a/0.08, b/0.1)
high = min((a+1)/0.08, (b+1)/0.1)

price = math.ceil(low)


if price >= high:
    print(-1)
else:
    print(price)

Solution (Python):
from math import floor


def solve():
    A, B = map(int, input().split())
    for i in range(1, 10000):
        if A == floor(i * 0.08) and B == floor(i * 0.1):
            print(i)
            exit()
    print(-1)


if __name__ == '__main__':
    solve()

Solution (Python):
[A,B] = list(map(int,input().split()))
C1 = A*(100/8)
C2 = (A+1)*(100/8)
D1 = B*(100/10)
D2 = (B+1)*(100/10)
flag = 0
for n in range(int(C1//1), int(C2//1)+1):
    if (C1<=n<C2) and (D1<=n<D2):
        print(n)
        flag = 1
        break
if flag==0:
    print(-1)

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

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

for i in range(1, 1000000):
    if int(i*0.10) > 100:
        print(-1)
        exit()
    if int(i*0.08) == a and int(i*0.10) == b:
        print(i)
        exit()
print(-1)

Solution (Python):
def main():
    import math
    a, b = map(int, input().split())

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


if __name__ == '__main__':
    main()

Solution (Python):
from math import ceil
a,b=map(int,input().split())
l=max(a/0.08,b/0.1)
r=min((a+1)/0.08,(b+1)/0.1)
if r-l>=1:
    print(ceil(l))
else:
    print(-1)

Solution (Python):



'''
A=[]
B=[]
for i in range():
    a, b = map(int, input().split())
    A.append(a)
    B.append(b)'''




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

flg =False
for i in range(1,10001):
    if int(i*0.08)==a and int(i*0.1)==b:
        print(i)
        flg=True
        break
if not flg:
    print(-1)

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

Solution (Python):
a,b=map(int, input().split())  
import math
x=math.floor(a/0.08)
y=math.floor(b/0.1)
minxy=min(x,y)
for i in range(minxy, minxy+100):
    if math.floor(i*0.08)==a and math.floor(i*0.1)==b:
        print(i)
        exit()
print(-1)

Solution (Python):
import math

a, b = map(int, input().split())
"""
ax = range()
bx = range(b*10,b*10+10)
"""

for i in range(10 * a, 1251):
    if (math.floor(i * (8 / 100)) == a and math.floor(i * (10 / 100)) == b):
        print(i)
        break
else:
    print(-1)

Solution (Python):
import math
A, B = map(int, input().split())

res = -1
for i in range(10000):
    if math.floor(i*0.08) == A and math.floor(i*0.1) == B:
        res = i
        break

print(res)

Solution (Python):
import math
a,b=map(int,input().split())
ans=-1
tmp=b*10
for x in range(tmp-20,tmp+20):
    if math.floor(x*0.08)==a and math.floor(x*0.10)==b:
        ans=x
        break
print(ans)

Solution (Python):
a,b=map(int,input().split())
ans=-1
for i in range(10*b,10*(b+1)):
	if a<=i*0.08 and i*0.08<a+1:
		ans=i
		break
print(ans)

Solution (Python):
import sys
from collections import defaultdict, Counter, deque
from itertools import accumulate, permutations, combinations
from operator import itemgetter
from bisect import bisect_left, bisect_right, bisect
from heapq import heappop, heappush
from fractions import gcd
from math import ceil, floor, sqrt, cos, sin, pi
from copy import deepcopy




def main():
    a,b = map(int, input().split())
    for x in range(1250):
        if int(0.08*x) == a and int(0.1*x) == b:
            return x
    return -1

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

Solution (Python):
import sys

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

for i in range(1, 2000):
    a = int(i * 0.08)
    b = int(i * 0.1)
    if a == A and b == B:
        print(i)
        sys.exit()
print(-1)

Solution (Python):
a, b = map(int, input().split())
for i in range(10, 1100):
    nowA = int(0.08 * i)
    nowB = int(0.1 * i)
    if nowA == a and nowB == b:
        print(i)
        exit()
print(-1)

Solution (Python):

import sys
import math

def solve(A: int, B: int):
    for i in range(1,1001):
        if A == math.floor(0.08*float(i)) and B == math.floor(0.1*float(i)):
            print(i)
            return
    print(-1)



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  
    B = int(next(tokens))  
    solve(A, B)

if __name__ == '__main__':
    main()

Solution (Python):
from math import ceil

A, B = map(int, input().split())
x = max(ceil(A / 0.08), ceil(B / 0.1))
if x < (A + 1) / 0.08 and x < (B + 1) / 0.1:
    print(x)
else:
    print(-1)

Solution (Python):


iim = lambda: map(int, input().rstrip().split())

def resolve():
    A, B = iim()
    ans = 10 * B
    for i in range(ans, ans+10):
        if (8*i) // 100 == A:
            print(i)
            return
    print(-1)


if __name__ == "__main__":
    resolve()

Solution (Python):
a,b=map(int,input().split())
ans=0

for i in range(1,10000):
    pa=int(i*0.08)
    pb=int(i*0.10)
    if pa>100 or pb >100:
        break
    if pa==a and pb==b:
        print(i)
        ans=1
        break
if ans==0:
    print(-1)

Solution (Python):
import math
a,b = map(int,input().split())
n = 100000
for i in range(1,n):
    if math.floor(i * 0.08) == a and math.floor(i * 0.1) == b:
        print(i)
        exit()
print(-1)

Solution (Python):

import sys
import math


def solve(A: int, B: int):
    for i in range(10000):
        per8 = math.floor(i * 0.08)
        per10 = math.floor(i * 0.10)
        if per8 == A and per10 == B:
            print(i)
            exit()

    print(-1)
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  
    B = int(next(tokens))  
    solve(A, B)


if __name__ == '__main__':
    main()

Solution (Python):
ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

a,b = mi()

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

Solution (Python):

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

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

Solution (Python):
import math
A, B = map(int, input().split())
ans = -1
for i in range(2000):
  if math.floor(i*0.08) == A and math.floor(i*0.1)==B:
    ans = i
    break
print(ans)

Solution (Python):










import math
import statistics
import string


def intinput():
    return int(input())
def listintinput():
    return list(map(int, input().split()))
def splitintinput():
    return map(int, input().split())
def factorialsurplus(x, y, z):  
    ret = 1
    for i in range(x, y + 1):
        ret = (ret * i) % z
    return (ret)
def isprime(x):
    if x == 1:
        return False
    if x == 2:
        return True
    sq = int(math.sqrt(x))
    for i in range(2,sq+1):
        if x % i == 0:
            return False
    return True
def hcfnaive(a,b):
    if(b==0):
        return a
    else:
        return hcfnaive(b,a%b)

A, B = splitintinput()

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

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

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

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

ans = -1
for i in range(1, 20001):
    a = int(i * 1.08) - i
    b = int(i * 1.1) - i
    if A == a and B == b:
        ans = i
        break
print(ans)

Solution (Python):
A,B=map(int,input().split())
import math
for i in range(1,1010):
  if math.floor(i*0.08)==A and math.floor(i*0.1)==B:
    print(i)
    exit(0)
print(-1)

Solution (Python):
def main():
    a, b = map(int, input().split())
    for x in range(1, 100005):
        aa = x * 8 // 100
        bb = x // 10
        if aa == a and bb == b:
            print(x)
            return

    print(-1)

main()

Solution (Python):
def main():
    A, B = (int(i) for i in input().split())
    ans = -1
    from math import floor
    for y in range(100000 + 1):
        a = floor(y*0.08)
        b = floor(y*0.1)
        if a == A and b == B:

            ans = y
            break
    print(ans)


if __name__ == '__main__':
    main()

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

ans = -1

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

Solution (Python):
A,B = map(int,input().rstrip().split(" "))
e = False
for i in range(10 ** 4):
  if int(i * 0.08) == A and int(i * 0.10) == B:
    print(i)
    e = True
    break
if e == False:
  print(-1)

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

ans = -1

for i in range(1, 10**5):
    if a * 12.5 <= i and i < (a+1)*12.5 and 10 * b <= i and i < 10 * (b + 1):
        ans = i
        break

print(ans)

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

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

print(-1)

Solution (Python):
import sys
input = sys.stdin.readline

def gcd(a: int, b: int):
    """ https://cocodrips.hateblo.jp/entry/2014/03/05/143623
    """
    while b:
        a, b = b, a%b
    return a

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


def main():
	A,B = map(int, input().split())
	
	
	
	
	X = 0.08
	Y = 0.10
	
	res = 0
	for i in range(1, 1101):
		if int(i*X)==A and int(i*Y)==B:
			res = i
			break
	else:
		res = -1
	
	
	
	
	print(res)
	
if __name__ == "__main__":
    main()

Solution (Python):
from math import floor
A,B = map(int,input().split())
flag = 0
for i in range(1,15000):
  if floor(i*0.08)==A and floor(i*0.10)==B:
    print(i)
    flag = 1
    break
    
if flag==0:
  print("-1")

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

def solve(A, B):
    for x in range(0, 100000):
        if (x * 8) // 100 == A and (x * 10) // 100 == B:
            return x
    return -1

print(solve(A, B))

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

x = 1
while True:
    A = int(x * 0.08)
    B = int(x * 0.1)
    if A == a and B == b:
        print(x)
        break
    elif A > a or B > b:
        print(-1) 
        break
    x += 1

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

Solution (Python):
a, b = map(int, input().split())
flag = True
for i in range(1250):
  n = i+1
  if int(n*0.08) == a and int(n*0.1) == b:
    flag = False
    print(n)
    break
if flag:
  print(-1)

Solution (Python):
import sys
input=sys.stdin.readline

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


ans=b*10



while int(ans*0.08) != a or int(ans*0.1) != b:
    ans+=1
    if int(ans*0.08) != a and int(ans*0.1) != b:
        print(-1)
        exit()

print(ans)

Solution (Python):

import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub

sys.setrecursionlimit(100000)
input = sys.stdin.readline
INF = 2**62-1

def read_int():
    return int(input())


def read_int_n():
    return list(map(int, input().split()))


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


def read_str():
    return input().strip()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(A, B):
    for i in range(1, 1000+1):
        if int(i * 0.08) == A and int(i * 0.1) == B:
            return i
    return -1


def main():
    A, B = read_int_n()
    print(slv(A, B))


if __name__ == '__main__':
    main()

Solution (Python):
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)

Solution (Python):
import math,itertools,fractions,heapq,collections,bisect,sys,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

def main():
  a,b=LI()
  for i in range(100000):
    _a=i*0.08
    _b=i*0.1

    

    if int(_a)==a and int(_b)==b:
      return i

  return -1


print(main())

Solution (Python):

import math

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

for i in range(0, 10001):
    if math.floor(0.08*i) == a:
        if math.floor(0.10*i) == b:
            print(i)
            exit()

print(-1)

Solution (Python):
import math
A, B = map(int, input().split())
ans = -1
for i in range(1, 10001):
    a = i*0.08
    b = i*0.1
    if math.floor(a) == A and math.floor(b) == B:
        ans = i
        break
print(ans)

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

for x in range(1001):
    if int(x * 0.08) == A and int(x * 0.1) == B:
        print(x)
        exit()
print(-1)

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

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

Solution (Python):
a,b=map(int,input().split())
p=a/0.08
q=(a+1)/0.08
r=b/0.1
s=(b+1)/0.1
Min=max(p,r)
Max=min(q,s)
if Min>=Max:
    print(-1)
else:
    print(int(-(-Min//1)))

Solution (Python):



def compute(a, b):
    max_v = b * 200
    for v in range(1, max_v):
        if int(v * 0.08) == a and int(v * 0.1) == b:
            return v
    else:
        return None


def main():
    a, b = (int(x) for x in input().split())
    res = compute(a, b)
    print(-1 if res is None else res)


if __name__ == "__main__":
    main()

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


for i in range(1,2001):
    aa = floor(i * 0.08)
    bb = floor(i * 0.1)
    if aa == a and bb == b:
        print(i)
        break
else:
    print(-1)

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

for i in range(20000):
  if(i*0.08//1==a and i*0.1//1==b):
    print(i)
    exit()
    
print(-1)

Solution (Python):
import math
def resolve():
    A, B = map(int, input().split())

    for x in range(1, 100*100):
        a = math.floor(x * 0.08)
        b = math.floor(x * 0.1)
        if a == A and b == B:
            print(x)
            return
    
    print(-1)
    return

if __name__ == "__main__":
    resolve()

Solution (Python):
from math import floor

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

for x in range(1,10**5):
    ax = floor(x*0.08)
    bx = floor(x*0.1)
    if ax==a and bx==b:
        print(x)
        exit()
print(-1)

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

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

n = 10**6
for i in range(n):
    if int(i * 0.08) == A and int(i * 0.1) == B:
        print(i)
        exit()
    elif int(i * 0.08) > A or int(i * 0.01) > B:
        print(-1)
        exit()

Solution (Python):


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

for ans in range(1, 1001):
    if int(ans * 0.08) == A and int(ans * 0.1) == B:
        print(ans)
        exit(0)
print('-1')

Solution (Python):
import fractions

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

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

Solution (Python):
A,B = map(int,input().split())
ans = -1
for i in range(0,10101):
    if (i*0.08//1 == A)and(i*0.1//1 == B):
        ans = i
        break

print(ans)

Solution (Python):
from sys import stdin
def main():
    readline=stdin.readline
    A,B=map(int,readline().split())
    low=B*10
    high=B*10+9
    for n in range(low,high+1):
        if int(n*0.08)==A:
            print(n)
            break
    else:
        print(-1)
if __name__=="__main__":
    main()

Solution (Python):




def solve(inp):
    (A, B) = map(int, inp.readline().strip().split(' '))

    b1 = B * 10
    b2 = (B + 1) * 10
    for i in range(b1, b2 + 1):
        if int(i * 0.08) == A and int(i * 0.1) == B:
            return str(i)

    return "-1"


def main():
    import sys
    result = solve(sys.stdin)
    if result is not None and result != '':
        print(result)


if __name__ == '__main__':
    main()

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

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

Solution (Python):

def price():
    a, b = map(int, input().split())

    x = int(a / 0.08)

    if x * 8 < 100 * a:
        x += 1
    while 100*a <= x*8 < 100*a + 100:
        if 100*b <= x*10 < 100*b + 100:
            return x
        x += 1
    return -1

print(price())

Solution (Python):

import sys
read = sys.stdin.readline


def read_ints():
    return list(map(int, read().split()))


def read_a_int():
    return int(read())


def read_tuple(H):
    '''
    H is number of rows
    '''
    ret = []
    for _ in range(H):
        ret.append(tuple(map(int, read().split())))
    return ret


def read_col(H, n_cols):
    '''
    H is number of rows
    n_cols is number of cols

    A列、B列が与えられるようなとき
    '''
    ret = [[] for _ in range(n_cols)]
    for _ in range(H):
        tmp = list(map(int, read().split()))
        for col in range(n_cols):
            ret[col].append(tmp[col])

    return ret


def read_matrix(H):
    '''
    H is number of rows
    '''
    return [list(map(int, read().split())) for _ in range(H)]


def read_map(H):
    '''
    H is number of rows
    文字列で与えられた盤面を読み取る用
    '''
    return [read()[:-1] for _ in range(H)]


def read_map_as_int(H):
    '''
    
    '''
    ret = []
    for _ in range(H):
        ret.append([1 if s == '
    return ret


A, B = read_ints()

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

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

ans = -1

for i in range(1, 10001):
    hachi = int(i * 0.08)
    jyu = int(i * 0.10)
    if hachi == A and jyu == B:
        ans = i
        break

print(ans)

Solution (Python):
a, b = map(int, input().split())
u = max(10 * b, (25 * a) // 2 + (25 * a) % 2)
v = min(10 * b + 9, (25 * a + 24) // 2)
if u <= v:
    print(u)
else:
    print(-1)

Solution (Python):
import sys
A, B = map(int, input().split())
for x in range(1, 1300):
    if int(0.08 * x) == A and int(0.1 * x) == B:
        print(x)
        sys.exit()
print(-1)

Solution (Python):



def ri():
    return int(input())

def rl():
    return list(input().split())

def rli():
    return list(map(int, input().split()))

def main():
    a, b = rli()
    for i in range(10000):
        na = i*8//100
        nb = i*10//100
        if na == a and nb == b:
            print(i)
            return
    print(-1)


if __name__ == '__main__':
    main()

Solution (Python):
A, B = map(int, input().split())
p = -1
for i in range(100001):
  if (108 * i) // 100 - i == A and (11 * i) // 10 - i == B:
    p = i
    break
print(p)

Solution (Python):
a,b = map(int,input().split())
loop = 100000
ans = loop
for i in range(loop):
  if i*0.08//1 == a and i*0.1//1==b:
    ans = min(ans,i)

if ans == loop:  
  ans = -1
  
print(ans)

Solution (Python):
import sys
sys.setrecursionlimit(1000000000)
import math
from fractions import gcd
def lcm(a, b): return a * b // gcd(a, b)
from itertools import count, permutations
from functools import lru_cache
from collections import deque, defaultdict
from pprint import pprint
ii = lambda: int(input())
mis = lambda: map(int, input().split())
lmis = lambda: list(mis())
INF = float('inf')
N1097 = 10**9 + 7

def meg(f, ok, ng):
    while abs(ok-ng)>1:
        mid = (ok+ng)//2
        if f(mid):
            ok=mid
        else:
            ng=mid
    return ok

def get_inv(n, modp):
    return pow(n, modp-2, modp)

def factorials_list(n, modp):    
    fs = [1]
    for i in range(1, n+1):
        fs.append(fs[-1] * i % modp)
    return fs

def invs_list(n, fs, modp):     
    invs = [get_inv(fs[-1], modp)]
    for i in range(n, 1-1, -1):
        invs.append(invs[-1] * i % modp)
    invs.reverse()
    return invs

def comb(n, k, modp):
    num = 1
    for i in range(n, n-k, -1):
        num = num * i % modp
    den = 1
    for i in range(2, k+1):
        den = den * i % modp
    return num * get_inv(den, modp) % modp

def comb_from_list(n, k, modp, fs, invs):   
    return fs[n] * invs[n-k] * invs[k] % modp



class UnionFindEx:
    def __init__(self, size):
        
        self.roots = [-1] * size
    def getRootID(self, i):
        r = self.roots[i]
        if r < 0:   
            return i
        else:
            r = self.getRootID(r)
            self.roots[i] = r
            return r
    def getGroupSize(self, i):
        return -self.roots[self.getRootID(i)]
    def connect(self, i, j):
        r1, r2 = self.getRootID(i), self.getRootID(j)
        if r1 == r2:
            return False
        if self.getGroupSize(r1) < self.getGroupSize(r2):
            r1, r2 = r2, r1
        self.roots[r1] += self.roots[r2]    
        self.roots[r2] = r1
        return True

def main():
    A,B=mis()
    for i in range(1000000):
        if math.floor(i*.08)==A and math.floor(i*.1)==B:
            print(i)
            return
    print(-1)

main()

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

a = (A * 100 + 7) // 8
b = ((A+1) * 100 + 7) // 8 - 1
c = B * 10
d = (B+1) * 10 - 1

ma = min(b, d)
mi = max(a, c)
print(mi if mi <= ma else -1)

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