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())
a = int(A / 0.08)
b = int(B / 0.10)

for n in range(min(a,b), max(a,b)+1):
    if int(n * 0.08) == A and int(n * 0.10) == B:
        print(n)
        break
else:
    print(-1)

Submission status: Wrong Answer

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

eight = int(A / 0.08)
ten = int(B / 0.1)

for x in range(0, 9):
    if eight + x == ten:
        print(ten)
        exit()
for x in range(0, 10):
    if ten + x == eight:
        print(eight)
        exit()

print(-1)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
A_under = A * 25 // 2
A_top = (A + 1) * 25 // 2 - 1
B_under = B * 10
B_top = B * 10 + 9

if B_under <= A_under <= B_top:
    print(A_under)
elif A_under <= B_under <= A_top:
    print(B_under)
else:
    print(-1)

Submission status: Wrong Answer

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

ans = -1
for i in range(1, 101):
  if int(i* 0.08) == A:
    if int(i * 0.1) == B:
      ans = i
      break
      
print(ans)

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
A, B = map(int, input().split())

xmin = 1
while xmin < 100*A:
    if int(0.08*xmin) == A and int(0.1*xmin) == B :
        print(int(xmin))
        exit()
    elif int(0.08*xmin) < A or int(0.1*xmin) < B :
        xmin += 1
    else :
        print(-1)
        exit()

Submission status: Wrong Answer

Solution code:
tax_8, tax_10 = map(int, input().split())

min_8 = tax_8 * 100 // 8
limit_8 = (tax_8 + 1) * 100 // 8

min_10 = tax_10 * 100 // 10
limit_10 = (tax_10 + 1) * 100 // 10

target = max(min_8, min_10)

if target < limit_8 and target < limit_10:
    print(target)
else:
    print(-1)

Submission status: Wrong Answer

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

    for i in range(200):
        if int(i * 0.08) == a and int(i * 0.10) == b:
            print(i)
            return
    print(-1)
    return


if __name__ == "__main__":
    solve()

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.10) == B:
    print(i)
    exit()
print(-1)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
 
import math
import itertools
import sys
import copy
#import numpy as np
 
# 入力
#A, B, C, D = map(int, input().split())
#L = list(map(int, input().split()))
#S = list(str(input()))
#N = int(input())
#S = str(input())
A, B = map(int, input().split())

for i in range(1, 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:
"""
// Author : snape_here - Susanta Mukherjee
     
"""
 
from __future__ import division, print_function
 
import os,sys
from io import BytesIO, IOBase
 
if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip
 
 
def ii(): return int(input())
def si(): return input()
def mi(): return map(int,input().split())
def li(): return list(mi())
 
 
def gcd(x, y):
    while y:
        x, y = y, x % y
    return x
    
 
def read():
    sys.stdin = open('input.txt', 'r')  
    sys.stdout = open('output.txt', 'w') 
 
 
import math

mod=1000000007 

def main():

    a,b=mi()
    x=int(a/(0.08))
    y=int(b/(0.1))
    #print(x,y)
    if x>y:
        if int(x*0.1)==b:
            print(x)
        else:
            print(-1)
    else:
        if int(y*0.08)==a:
            print(y)
        else:
            print(-1)

# region fastio#
 
BUFSIZE = 8192
 
 
class FastIO(IOBase):
    newlines = 0
 
    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None
 
    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()
 
    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()
 
    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)
 
 
class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")
 
 
def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()
 
 
if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
 
input = lambda: sys.stdin.readline().rstrip("\r\n")
 
# endregion
 
 
if __name__ == "__main__":
    #read()
    main() 
#Comment read()

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
Ax = A * 25 // 2
Ay = (A + 1) * 25 // 2
Bx = B * 10
By = (B + 1) * 10

if Ay <= Bx or By <= Ax:
    print(-1)
else:
    print(max(Bx, Ax))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

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

l = int(a / 0.08)
r = int((a + 0.999999999999) / 0.08)

ans = r
flag = False
for i in range(l, r + 1):
    if math.floor(i * 0.1) == b:
        ans = min(ans, i)
        flag = True

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main():
  a,b=map(int,input().split())
  for i in (int(a/0.08),int((a+1)/0.08)):
    if int(i*0.1)==b:
      return i
  return -1
print(main())

Submission status: Wrong Answer

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

pa = int(a * 100/8)
pb = int(b * 100/10)

for price in range(pb, pa+1):
    if int(pa * 0.08) == a and int(pb * 0.1) == b:
        print(price)
        exit()

print(-1)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
ax = a / 0.08
bx = b / 0.10
if int(ax) != ax:
    print(-1)
    exit()
if int(bx) != bx:
    print(-1)
    exit()
print(min(int(ax), int(bx)))

Submission status: Wrong Answer

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

x = int(a / 0.08)
x_upp = int((a+1)/0.08)
y = int(b / 0.1)
y_upp = int((b+1)/0.1)

lst1 = list(i for i in range(x, x_upp))
lst2 = list(i for i in range(y, y_upp))
res = -1
for n in lst1:
    if n in lst2:
        res = n
        break
print(res)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
def main():
    a,b=map(int,input().split())
    for i in range(1,130):
        if int(i*0.08)==a:
            if int(i*0.1)==b:
                print(i)
                return
    print( -1)
main()

Submission status: Wrong Answer

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

tax1 = int(a/0.08)
tax2 = int(b/0.1)
en = 0
l = sorted([tax1,tax2])
for i in l:
    if int(i*0.08) == a and int(i*0.1) == b:
        print(i)
        en = 1
        break
if en == 0:
    print(-1)

Submission status: Wrong Answer

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

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

a = set(range(int(A / 0.08), int((A + 1) / 0.08) + 1))
b = set(range(int(B / 0.1), int((B + 1) / 0.1) + 1))
print(min(a & b)) if a & b else print(-1)

Submission status: Wrong Answer

Solution code:
a, b =map(int, input().split())
aa = int(a/(0.08))
bb = int(b/(0.1))
if int(aa * 0.1) == b:
	print (aa)
	exit()

if int(aa * 0.1) != b:
	print (-1)
	exit()

Submission status: Wrong Answer

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

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))

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
A, B = map(int, input().split())

xmin = min(12.5*A, 10*B)
while xmin < 100*A:
    if int(0.08*xmin) == A and int(0.1*xmin) == B :
        print(int(xmin))
        exit()
    elif int(0.08*xmin) < A or int(0.1*xmin) < B :
        xmin += 1
    else :
        print(-1)
        exit()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
if a%2==1:
    c=a+1
else:
    c=a
mn=max(b*10,c//2*25)

#mn=fractions.ceil(max(b/0.1,a/0.08))

mx=min((b+1)/0.1,(a+1)/0.08)
if mn<=mx:
    print(int(mn))
else:
    print(-1)

Submission status: Wrong Answer

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

PA = int(-(-A // 0.08))

if int(PA*0.1) == B:
    print(PA)

else:
    print(-1)

Submission status: Wrong Answer

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

x1 = (25*a)//2
x2 = 10*b

p = []

if x1>0 and (8*x1)//100==a and (10*x1)//100==b:
    p.append(x1)
elif x2>0 and (8*x2)//100==a and (10*x2)//100==b:
    p.append(x2)
else:
    print(-1)

if len(p)!=0:
    print(min(p))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

judge = True
for i in range(1,1000):
    if 0.08*i//1 == a and 0.1*i//1 ==b:
        print(i)
        judge = False
        break

if judge:
    print(-1)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
ax = a / 0.08
bx = b / 0.08
if int(ax) != ax:
    print(-1)
    exit()
if int(bx) != bx:
    print(-1)
    exit()
print(min(int(ax), int(bx)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
ans = []
for i in range(100, 0, -1):
    if int(i * 0.08) == A and int(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
import sys
x,y= map(int,input().split())
for i in range(1000):
    if math.floor(i *0.08) == x and math.floor(i *0.10) == y:
        print(i)
        sys.exit()
print(-1)

Submission status: Wrong Answer

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

ans = -1
for i in range(0,1000):
    if(math.floor(i*0.08) == A and math.floor(i*0.10) == B):
        ans = i
        break
print(ans)

Submission status: Wrong Answer

Solution code:
a, b = input().split()
a, b = int(a), int(b)
# ans_a = (0.08) / a
# ans_b = (0.1) / b
ans_a = a / 0.08

# ans_b = b /0.1
ans_b = ans_a * 0.1

# print("a", ans_a)
# print("b", ans_b)

if b != int(ans_b):
    print("-1")
print(int(ans_a))

Submission status: Wrong Answer

Solution code:
a,b = map(int, input().split())
a2 = int(a * (25/2))
b2 = b*10
for i in range(min(a2,b2), max(a2,b2)+1):
    if int(i*(8/100)) == a and int(i*(10/100)) == b:
        print(i)
        exit()
print(-1)

Submission status: Wrong Answer

Solution code:
d8 = {}
d10 = {}
for i in range(1, 100):
    d8[int(i * 1.08)] = i
    d10[int(i * 1.1)] = i

A, B = map(int, input().rstrip().split())
a = d8.get(A, None)
b = d10.get(B, None)
if a!= b or a is None or b is None:
    print(-1)
else:
    print(a)

Submission status: Wrong Answer

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

price_8 = -int(-a/0.08)
price_10 = -int(-b/0.1)

print(price_10) if price_10==price_8 else print(-1)

Submission status: Wrong Answer

Solution code:
# import numpy as np
# import math
# import copy
# from collections import deque
import sys
input = sys.stdin.readline
# sys.setrecursionlimit(10000)


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

    res = -1

    for i in range(1,101):
        price8 = int(i*0.08)
        price10 = int(i*0.1)
        if (price8 == A) & (price10 == B):
            res = i
            break

    print(res)



main()

Submission status: Wrong Answer

Solution code:
import math

a, b = map(int, input().split())
low = max(math.ceil(a * 100 / 8), b * 10)
high = min(100 * (a + 1) // 8, 10 * (b+1))

if low <= high:
    print(low)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
A, B = map(int, input().split())

xmin = min(12.5*A, 10*B)
while xmin < 100*A:
    if int(0.08*xmin) == A and int(0.1*xmin) == B :
        print(xmin)
        exit()
    elif int(0.08*xmin) < A or int(0.1*xmin) < B :
        xmin += 1
    else :
        print(-1)
        exit()

Submission status: Wrong Answer

Solution code:
import math
a, b = map(int, input().split())
xl=(a+1)/0.08
xr=a/0.08
yl=(b+1)/0.1
yr=b/0.1
if min(xl,yl) < max(xr,yr):
    print(-1)
else:
    print(math.ceil(max(xr,yr)))

Submission status: Wrong Answer

Solution code:
import math

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

l = int(a / 0.08)
r = int((a + 0.999999999999) / 0.08)

ans = r
flag = False
for i in range(l, r + 1):
    if math.floor(i * 0.1) == b:
        ans = min(r, i)
        flag = True

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

Submission status: Wrong Answer

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

xa = int(a / 0.08)
xb = int(b / 0.10)
if xa >= xb:
    xmin = xa
else:
    xmin = xb

ya = int((a + 1) / 0.08)
yb = int((b + 1) / 0.10)
if ya <= yb:
    xmax = ya
else:
    xmax = yb

if xmax <= xmin:
    print(-1)
else:
    print(xmin)

Submission status: Wrong Answer

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

ra = [int(-(-A // 0.08)), int((A + 1) / 0.08)]
rb = [int(-(-B // 0.1)), int((B + 1) / 0.1)]

if ra[1] < rb[0] or rb[1] < ra[0]:
    print(-1)
else:
    print(max(ra[0], rb[0]))

Submission status: Wrong Answer

Solution code:
import math

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

l = int(a / 0.08)
r = int((a + 0.999999999999) / 0.08)

ans = r
flag = False
for i in range(l, r + 1):
    if math.floor(i * 0.1) == b:
        ans = min(l, i)
        flag = True

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

Submission status: Wrong Answer

Solution code:
from math import floor
a,b=list(map(int, input().split()))
x=a/(0.08)
y=b/(0.1)
if floor(x*0.1)==b or floor(y*0.08)==a:
  print(floor(x))
else:
  print(-1)

Submission status: Wrong Answer

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

for i in range(1, 101):
    aa = math.floor(i * 0.08)
    bb = math.floor(i * 0.1)
    if a == aa and b == bb:
        print(i)
        exit()
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
from math import floor
A, B = map(int, input().split())
OK = False
for n in range(1, 101):
    if floor(n*0.08) == A and floor(n*0.10) == B:
        OK = True
        ans = n
print(ans if OK else '-1')

Submission status: Wrong Answer

Solution code:
import math

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

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
A_under = A * 25 // 2
A_top = (A + 1) * 25 // 2 - 1
B_under = B * 10
B_top = B * 10 - 1

if B_under <= A_under <= B_top:
    print(A_under)
elif A_under <= B_under <= A_top:
    print(B_under)
else:
    print(-1)

Submission status: Wrong Answer

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

max_a = (A + 1) / 0.08
min_a = A / 0.08

max_b = (B + 1) / 0.1
min_b = B / 0.1



ans = -1
for i in range(int(min_a), -int(-max_a)+1):
  if i >= int(min_b) and i < int(max_b):
    ans = i
    break

print(ans)

Submission status: Wrong Answer

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

if B*10 >= (A+1)/0.08:
    print(-1)
    exit()
s = int(A/0.08)
for n in range(100):
    if int((s+n)*0.1) == B:
        print(s+n)
        exit()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import math
A, B = map(int, input().split())
for i in range(1, 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:
a, b = map(int, input().split())
for i in range(int(a/0.08)+1, int((a+1)/0.08)):
    if int(i * 0.1) == b:
        print(i)
        break
else: print(-1)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
a = A / 0.08
b = B / 0.1
print(a)

Submission status: Wrong Answer

Solution code:
def solve(a,b):
	start,end= int(a/0.08),int((a+1)/0.08)
	for i in range(start,end):
		if int(i*0.10)==b:
			return i
	return -1
a,b= map(int,input().split(' '))
print(solve(a,b))

Submission status: Wrong Answer

Solution code:

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

if(int(int(a / 0.08) * 0.1) == b):
    print(int(a / 0.08))
    exit()

print(-1)

Submission status: Wrong Answer

Solution code:
from math import ceil
from math import floor
a,b = map(int,input().split())
l1 = ceil((a-0.50001)/0.08)
r1 = floor((a+0.5)/0.08)
l2 = ceil((b-0.50001)/0.1)
r2 = floor((b+0.5)/0.1)
l3 = max(l1,l2)
r3 = min(r2,r1)
if(l3<=r3):
    print(l3)
else:
    print(-1)

Submission status: Wrong Answer

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

xa = int(a / 0.08)
xb = int(b * 10)
xaFlag =int(xa * 0.1) == b
xbFlag = int(xb * 0.08) == a
if(xaFlag == True and xbFlag == False):
    print(int(xa))
elif(xaFlag == False and xbFlag == True):
    print(int(xb))
elif(xaFlag == False and xbFlag == False):
    print(-1)
else:
    print(min(xa, xb))

Submission status: Wrong Answer

Solution code:
from math import floor
a,b = map(int,input().split())
ans = a*10
for i in range(11):
    if i == 10:
        ans = -1
        break
    ans += 1
    if floor(ans*0.08) == b:
        break
    
print(ans)

Submission status: Wrong Answer

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

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

a = set(range(int(A / 0.08), int((A + 1) / 0.08)))
b = set(range(int(B / 0.1), int((B + 1) / 0.1)))
print(min(a & b)) if a & b else print(-1)

Submission status: Wrong Answer

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

x1 = (25*a)//2
x2 = 10*b

p = []

if (8*x1)//100==a and (10*x1)//100==b:
    p.append(x1)
elif (8*x2)//100==a and (10*x2)//100==b:
    p.append(x2)
else:
    print(-1)

if len(p)!=0:
    print(min(p))

Submission status: Wrong Answer

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

a = [int(a * 12.5),int((a + 1) * 12.5)]
b = [int(b * 10),int((b + 1) * 10)]
# print(a)
# print(b)
if max(a[0], b[0]) < min(a[1], b[1]):
    print(max(a[0], b[0]))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
from math import floor
a,b=list(map(int, input().split()))
x=a/(0.08)
y=b/(0.1)
if floor(x*0.1)==b or floor(y*0.08)==a:
  print(int(x))
else:
  print(-1)

Submission status: Wrong Answer

Solution code:
from sys import stdin
a,b = map(int,stdin.readline().rstrip().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:
a, b = map(int, input().split())

eightper = []
n = int(a/0.08)
while int(n*0.08) == a:
    eightper.append(n)
    n += 1
    
for e in eightper:
    if int(e*0.1) == b:
        print(e)
        break
else:
    print(-1)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

t = False
for i in range(1, 101):
    if int(i*0.08) == a:
        if int(i*0.1) == b:
            t = True
            break
            
if t == True:
    print(i)
else:
    print("-1")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

a1 = math.ceil( A /0.08 )
a2 = math.ceil( (A+1) /0.08 )

b1 = math.ceil( B /0.1 )
b2 = math.ceil( (B+1) /0.1 )

if a1 <= b2:
  print(a1)
else:
  print(-1)

Submission status: Wrong Answer

Solution code:
b, c = map(int, input().split())
b_before_min = b / 0.08
b_before_max = (b+1) / 0.08
c_before_min = c / 0.1
c_before_max = (c+1) / 0.1

if(c_before_min <= b_before_min and b_before_min <= c_before_max):
    print(int(b_before_min))
elif(b_before_min <= c_before_min and c_before_min <= b_before_max):
    print(int(c_before_min))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
# coding: utf-8

import sys
import math
import collections
import itertools
from inspect import currentframe
INF = 10 ** 10
MOD = 10 ** 9 + 7
def input() : return sys.stdin.readline().strip()
def gcd(x, y) : return y if x % y == 0 else gcd(y, x % y)
def lcm(x, y) : return (x * y) // gcd(x, y)
def I() : return int(input())
def MI() : return map(int, input().split())
def LI() : return [int(x) for x in input().split()]
def RI(N) : return [int(input()) for _ in range(N)]
def LRI(N) : return [[int(x) for x in input().split()] for _ in range(N)]
def chkprint(*args) : names = {id(v):k for k,v in currentframe().f_back.f_locals.items()}; print(', '.join(names.get(id(arg),'???')+' = '+repr(arg) for arg in args))

A, B = MI()

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

    if i == 109:
        print(-1)
        break

Submission status: Wrong Answer

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

import sys
from collections import Counter

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = 10 ** 18
MOD = 10 ** 9 + 7

a, b = MAP()

for x in range(200):
    if int(x * 1.08) == x + a and int(x * 1.1) == x + b:
        print(x)
        exit()
print(-1)

Submission status: Wrong Answer

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

tmpA = int(A / 0.08)
tmpB = int(B / 0.1)

tmpA2 = int(tmpA * 0.08)
tmpB2 = int(tmpB * 0.1)

if tmpA2 == A and tmpB2 == B:
    print(max(tmpA,tmpB))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!
# coding: utf-8
from fractions import gcd 
from functools import reduce
import sys
sys.setrecursionlimit(200000000)
from inspect import currentframe


# my functions here!
#標準エラー出力
def printargs2err(*args):
    names = {id(v):k for k,v in currentframe().f_back.f_locals.items()}
    print(', '.join(names.get(id(arg),'???')+' : '+repr(arg) for arg in args),file=sys.stderr)
def debug(*args):
    print(*args,file=sys.stderr)

def printglobals():
    for (symbol, value) in globals().items():
        print('symbol="%s"、value=%s' % (symbol, value),file=sys.stderr)
def printlocals():
    for (symbol, value) in locals().items():
        print('symbol="%s"、value=%s' % (symbol, value),file=sys.stderr)
#入力（後でいじる）
def pin(type=int):
    return map(type,input().split())
     
#input

def resolve():
    A,B=pin()
    ans=-1
    for i in range(1,101):
        if int(i*(0.08))==A and int(i*(0.1))==B:
            ans=i
            break

    print(ans)
    #print([["NA","YYMM"],["MMYY","AMBIGUOUS"]][cMMYY][cYYMM])
#if __name__=="__main__":resolve()

"""
#printデバッグ消した？
#前の問題の結果見てないのに次の問題に行くの？
"""
"""
お前カッコ閉じるの忘れてるだろ
"""
import sys
from io import StringIO
import unittest

class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)
    def test_入力例_1(self):
        input = """2 2"""
        output = """25"""
        self.assertIO(input, output)
    def test_入力例_2(self):
        input = """8 10"""
        output = """100"""
        self.assertIO(input, output)
    def test_入力例_3(self):
        input = """19 99"""
        output = """-1"""
        self.assertIO(input, output)
if __name__=="__main__":resolve()

Submission status: Wrong Answer

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

PA = int(-(-A // 0.08))

if int(PA*0.1) == B:
    print(PA)

else:
    print(-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from math import floor
A, B = map(int, input().split())
for n in range(1, 101):
    if floor(n*0.08) == A and floor(n*0.10) == B:
        print(n)
        break
else:
    print('-1')

Submission status: Wrong Answer

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

for i in range(101):
    if (i*8)//100 == a and (i*10)//100 == b:
        print(i)
        exit()

print(-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

minA = A / 0.08
maxA = (A+1) / 0.08
minB = B / 0.1
maxB = (B+1) / 0.1

if minB <= minA and minA <= maxB: print(int(minA))
elif minA <= minB and minB <= maxA: print(int(minB))
elif minB <= maxA and maxA <= maxB: print(int(maxA))
elif minA <= maxB and maxB <= maxA: print(int(maxB))
else: print("-1")

Submission status: Wrong Answer

Solution code:
import math

a, b = [ int(v) for v in input().split() ]
ans = -1
for i in range(1, 101):
    if math.floor(i * 0.08) == a and math.floor(i * 0.1) == b:
        ans = i
        break
print(ans)

Submission status: Wrong Answer

Solution code:
import math

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

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

print("-1")

Submission status: Wrong Answer

Solution code:
from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
import itertools
from itertools import permutations, combinations, accumulate
import sys
import bisect
import string
import math
import time


def I(): return int(input())


def S(): return input()


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


def MS(): return map(str, input().split())


def LI(): return [int(i) for i in input().split()]


def LI_(): return [int(i)-1 for i in input().split()]


def StoI(): return [ord(i)-97 for i in input()]


def ItoS(nn): return chr(nn+97)


def input(): return sys.stdin.readline().rstrip()


def show(*inp, end='\n'):
    if show_flg:
        print(*inp, end=end)


YNL = {False: 'No', True: 'Yes'}
YNU = {False: 'NO', True: 'YES'}
MOD = 10**9+7
inf = float('inf')
IINF = 10**10
l_alp = string.ascii_lowercase
u_alp = string.ascii_uppercase
ts = time.time()
sys.setrecursionlimit(10**6)
nums = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']

show_flg = False
# show_flg = True


def main():
    A, B = MI()

    high = A / 0.08
    low = B / 0.1

    for N in range(int(low), int(high + 1) + 1):
        if int(N * 0.08) == A and int(N * 0.1) == B:
            print(N)
            return

    print(-1)
    # print(low, high)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

x = int(A/0.08)

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