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:
class Fraction_Error(Exception):
    pass

from fractions import gcd
#import math
class Fraction():
    ##入力定義
    def __init__(self,Numerator=0,Denominator=1):
        self.a=Numerator
        self.b=Denominator

    #表示定義
    def __str__(self):
        if self.b==1:
            return str(self.a)
        else:
            return str(self.a)+"/"+str(self.b)

    #四則演算定義
    def __add__(self,other):
        c=Fraction()
        if not(isinstance(other,Fraction)):
            other=Fraction.Int_to_Fraction(other)
            
        c.a=self.a*other.b+self.b*other.a
        c.b=self.b*other.b
        return Fraction.__reduce(c)

    def __radd__(self,other):
        c=Fraction()
        if not(isinstance(other,Fraction)):
            other=Fraction.Int_to_Fraction(other)
            
        c.a=self.a*other.b+self.b*other.a
        c.b=self.b*other.b
        
        return Fraction.__reduce(c)
    
    def __sub__(self,other):
        return self+(-other)

    def __rsub__(self,other):
        return -self+other

    def __mul__(self,other):
        if not(isinstance(other,Fraction)):
            other=Fraction.Int_to_Fraction(other)
            
        return Fraction.__reduce(Fraction(self.a*other.a,self.b*other.b))

    def __rmul__(self,other):
        if not(isinstance(other,Fraction)):
            other=Fraction.Int_to_Fraction(other)
            
        return Fraction.__reduce(Fraction(self.a*other.a,self.b*other.b))

    def __floordiv__(self,other):
        if other==Fraction():
            raise Fraction_Error("0除算です.")
        
        H=self/other
        return H.a//H.b

    def __rfloordiv__(self,other):
        if self==Fraction():
            raise Fraction_Error("0除算です.")

        H=other/self
        return H.a//H.b
    
    def __truediv__(self,other):
        if other==Fraction():
            raise Fraction_Error("0除算です.")
        
        if not(isinstance(other,Fraction)):
            other=Fraction.Int_to_Fraction(other)
            
        return self*Fraction.__inverse(other)

    def __rtruediv__(self,other):
        if self==Fraction():
            raise Fraction_Error("0除算です.")
        
        if not(isinstance(self,Fraction)):
            self=Fraction.Int_to_Fraction(other)
            
        return Fraction.__inverse(self)*other

    def __pow__(self,other):
        if other==0:
            return 1
        n=abs(other)

        g=1
        k=self
        for i in range(int(math.log(n,2))+1):
            if n%2==1:
                g*=k

            k*=k
            n=n>>1

        if other>0:
            return g
        else:
            return 1/g
        
    #比較演算子
    def __eq__(self,other):
        t=self-other
        if isinstance(t,Fraction):
            return t.a==0
        else:
            return t==0
    
    def __nq(self,other):
        return not(self==other)

    def __lt__(self,other):
        t=self-other
        if isinstance(t,Fraction):
            return t.a<0
        else:
            return t<0

    def __le__(self,other):
        return (self<other) or (self==other)

    def __gt__(self,other):
        return -self<-other

    def __ge__(self,other):
        return (other<self) or (self==other)
    
    #その他
    def ToNumber(self):
        return self.a/self.b

    def sign(self):
        s=self.a*self.b
        if s>0:return 1
        elif s==0:return 0
        else:return -1

    def __reduce(self):
        g=gcd(self.a,self.b)
        self.a//=g
        self.b//=g

        if self.b<0:
            self.a*=-1
            self.b*=-1
        return Fraction(self.a,self.b)

    def Int_to_Fraction(self):
        if not(isinstance(self,Fraction)):
            return Fraction(self,1)
        else:return self
        
    def __inverse(self):
        if self==Fraction():
            raise Fraction_Error("0の逆数は存在しまんせん.")
        
        return Fraction.__reduce(Fraction(self.b,self.a))
    
    def __pos__(self):
        return self

    def __neg__(self):
        return Fraction(-self.a,self.b)

    def __abs__(self):
        return max(self,-self)
#--------------------
import math
A,B=map(int,input().split())
alpha=Fraction(8,100)
beta=Fraction(10,100)

m=max(A/alpha,B/beta)
m=math.ceil(m.a/m.b)

M=min((A+1)/alpha,(B+1)/beta)
M=math.floor(M.a/M.b)

if m<=M:
    print(m)
else:
    print(-1)

Submission status: Wrong Answer

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

for i in range(1001):
    if int(i*0.08) == a and int(i*0.1) == b:
        num = i
        break

    elif i*0.08 < i*0.1:
        num =-1
        break

print(num)

Submission status: Wrong Answer

Solution code:
import math
a,b = map(int, input().split())
A = int(math.floor(a * (100/8)))
B = int(math.floor(b * (100/10)))
while True:
  if int(math.floor(A * (8/100))) == a:
    break
  else:
    A += 1
  
while True:
  if int(math.floor(B * (10/100))) == b:
    break
  else:
    B += 1
    
if  A == B:
  print(A)
else:
  print(-1)

Submission status: Wrong Answer

Solution code:
import math
a,b = map(int, input().split())
A = int(math.floor(a * (100/8)))
B = int(math.floor(b * (100/9)))
while True:
  if int(math.floor(A * (8/100))) == a:
    break
  else:
    A += 1
  
while True:
  if int(math.floor(B * (8/100))) == b:
    break
  else:
    B += 1
    
if  A == B:
  print(A)
else:
  print(-1)

Submission status: Wrong Answer

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

if(a%2 == 1):
    a_h = (a+1)*100 // 8 + 1
    a_l = a*100 // 8 + 1
else:
    a_h = (a+1)*100 // 8   
    a_l = a*100 // 8
b_h = (b+1)*10
b_l = b*10

if(a_l >= b_h or b_l >= a_h):
    print(-1)
elif(a_l < b_l):
    print(b_l)
elif(b_l <= a_l):
    print(a_l)

Submission status: Wrong Answer

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

a_h = (a+1)*100 // 8
a_l = a*100 // 8
b_h = (b+1)*100 // 10
b_l = b*100 // 10



if(a_l >= b_h or b_l >= a_h):
    print(-1)
elif(a_l < b_l):
    print(b_l)
elif(b_l <= a_l):
    print(a_l)

Submission status: Wrong Answer

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

C = A / 0.08
D = B / 0.1

if int(C * 0.1) == B:
    if int(D * 0.08) == A:
        print(min(int(C),int(D)))
    else:
        print(int(C))
elif int(D * 0.08) == A:
    print(int(D))
else:
    print(-1)

Submission status: Wrong Answer

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

C = A / 0.08
int(C)
D = B / 0.1
int(D)

if int(C * 0.1) == B:
    if int(D * 0.08) == A:
        print(min(int(C),int(D)))
    else:
        print(int(C))
elif int(D * 0.08) == A:
    print(int(D))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import math

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

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

if int(A * 0.1) == B:
    if int(B * 0.08) == A:
        print(min(A,B))
    else:
        print(A)
elif int(B * 0.08) == A:
    print(B)
else:
    print(-1)

Submission status: Wrong Answer

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

A = A / 0.08
int(A)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

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

A_s = math.ceil(a / 0.08)
A_e = math.floor((a+1) / 0.08)

B_s = math.ceil(b / 0.1)
B_e = math.floor((b+1) / 0.1)

ans = -1
for i in range(A_s, A_e + 1):
  for j in range(B_s, B_e + 1):
    if i == j:
      ans = i
      break
  if ans != -1:
    break
print(ans)

Submission status: Wrong Answer

Solution code:
import math

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

A_s = math.floor(a / 0.08)
A_e = math.ceil((a+1) / 0.08)

B_s = math.floor(b / 0.1)
B_e = math.ceil((b+1) / 0.1)

ans = -1
for i in range(A_s, A_e + 1):
  for j in range(B_s, B_e + 1):
    if i == j:
      ans = i
      break
  if ans != -1:
    break
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#C
a,b=map(int,input().split())
A=int((a*100)/8)
B=int(b*10)
M=max(A,B)
m=min(A,B)
ans1=0
ans2=0
x=0
if int(M*0.08)==a and int(M*0.1)==b:
    ans1=M
    x+=1
if int(m*0.08)==a and int(m*0.1)==b:
    ans2=m
    x+=2

if x==0:
    print('-1')
elif x==1:
    print(M)
elif x==2:
    print(m)
else:
    print(min(ans1,ans2))

Submission status: Wrong Answer

Solution code:
#C
a,b=map(int,input().split())
A=int((a*100)/8)
B=int(b*10)
M=max(A,B)
m=min(A,B)
if int(M*0.08)==a and int(M*0.1)==b:
    print(M)
elif int(m*0.08)==a and int(m*0.1)==b:
    print(m)
else:
    print('-1')

Submission status: Wrong Answer

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

cand_a = [ i for i in range(math.floor(a/0.08), math.floor((a+1)/0.08)-1)]
cand_b = [ i for i in range(math.floor(b/0.1), math.floor((b+1)/0.1)-1)]

cand = sorted(list(set(cand_a) & set(cand_b)))
if len(cand) > 0:
    print(cand[0])
else:
    print(-1)

Submission status: Wrong Answer

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

cand_a = [ i for i in range(math.floor(a/0.08), math.floor((a+1)/0.08))]
cand_b = [ i for i in range(math.floor(b/0.1), math.floor((b+1)/0.1))]

cand = sorted(list(set(cand_a) & set(cand_b)))
if len(cand) > 0:
    print(cand[0])
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
for i in range(101):
    if ((i*8)+0.000005)//100==A and ((i*10)+0.000005)//100==B:
        print(i)
        exit()
    else:
        pass
print(-1)

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
for i in range(101):
    if ((i*8)+0.5)//100==A and ((i*10)+0.5)//100==B:
        print(i)
        exit()
    else:
        pass
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()
    else:
        pass
print(-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

import math

if math.ceil((a+1)*12.5) < math.ceil(b*10) or math.ceil(a*12.5) > math.ceil((b+1)*10):
    print(-1)
else:
    print(max(math.ceil(a*12.5),math.ceil(b*10)))

Submission status: Wrong Answer

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

import math

if math.ceil((a+1)*12.5) < math.ceil(b*10):
    print(-1)
else:
    print(max(math.ceil(a*12.5),math.ceil(b*10)))

Submission status: Wrong Answer

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

for i in range(1, int(max(a/0.08, b/0.1)) + 1):
    if int(i * 0.08) == a and  int(i * 0.10) == b:
        print(i)
        exit()

print(-1)

Submission status: Wrong Answer

Solution code:
import sys
a, b = map(int, input().split())
for i in range(1000):
    at = int(i * 0.08)
    bt = int(i * 0.10)
    if at == a and bt == b:
        print(i)
        sys.exit()
print(-1)

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
a1 = int((a) * 100/8)
a2 = int((a + 1) * 100/8)
b1 = int((b) * 10)
b2 = int((b + 1) * 10)
al = list(range(a1,a2))
bl = list(range(b1,b2))
if a2 > b1:
    print(max(min(al),min(bl)))
else:
    print(-1)

Submission status: Wrong Answer

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

for x in range(1,1009):
    if math.floor(x * 0.08 )== a and math.floor(x * 0.1) == b:
        print(x)
        exit()

Submission status: Wrong Answer

Solution code:
import math

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

if A == 0 and B == 0:
    print(0)
    exit()

for i in range(100):
    a = math.floor((i+1)*8/100)
    b = math.floor((i+1)/10)
    if A == a and B == b:
        print(i+1)
        exit()

print(-1)

Submission status: Wrong Answer

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

if A == 0 and B == 0:
    print(0)
    exit()

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

print(-1)

Submission status: Wrong Answer

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

if A == 0 and B == 0:
    print(0)
    exit()

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

print(-1)

Submission status: Wrong Answer

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

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

print(-1)

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
for i in range(0,111):
  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())
x=100*a/8
y=100/8*(a+1)
z=10*b
w=10*(b+1)
import math
if max(math.ceil(z),math.ceil(x))<w:
    print(math.ceil(max(z,x)))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
x=12.5*a
y=12.5*(a+1)
z=10*b
w=10*(b+1)
import math
if math.ceil(x)<w:
    print(math.ceil(max(z,x)))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
x=12.5*a
y=12.5*(a+1)
z=10*b
w=10*(b+1)
import math
if math.ceil(z)<y:
    print(math.ceil(max(z,x)))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
x=12.5*a
y=12.5*(a+1)
z=10*b
w=10*(b+1)
if y<=z:
    print(-1)
else:
    p=max(x,z)
    import math
    print(math.ceil(p))

Submission status: Wrong Answer

Solution code:
import math
A, B = map(int,input().split())
minA = math.floor(A/0.08)
maxA = math.ceil((A+1)/0.08) -1
minB = math.floor(B/0.1)
maxB = math.ceil((B+1)/0.1) -1

if (minA>maxB) or (minB>maxA):
    print(-1)
else:
    print(max(minA,minB))

Submission status: Wrong Answer

Solution code:
import math
A, B = map(int,input().split())
minA = math.floor(A/0.08)
maxA = math.ceil((A+1)/0.08) -1
minB = math.floor(B/0.08)
maxB = math.ceil((B+1)/0.08) -1
if (minA>maxB) or (minB>maxA):
    print(-1)
else:
    print(max(minA,minB))

Submission status: Wrong Answer

Solution code:
import math
A, B = map(int,input().split())
minA = math.floor(A/0.08)
maxA = math.ceil((A+1)/0.08) -1
minB = math.floor(B/0.08)
maxB = math.ceil((B+1)/0.08) -1
if (minA>maxB) or (minB>maxA):
    print(-1)
else:
    print(min(minA,minB))

Submission status: Wrong Answer

Solution code:
A,B = map(int, input().split())
a=[]
q=1
while True:
    if  int(q*0.08)==A:
        a.append(q)
    if q*0.08>A:
        break
    q+=1
b=[]
w=1
while True:
    if  int(w*0.1)==B:
        b.append(w)
    if int(w*0.1)>B:
        break
    w+=1
    
#print(a)
#print(b)
#
#print(max(a[0],b[0]))
e=max(a[0],b[0])

if e in a and e in b:
    print(e)
else:
    print('-1')

Submission status: Wrong Answer

Solution code:
import numpy as np
import scipy.sparse as sps
import scipy.misc as spm
import collections as col
import functools as func
import itertools as ite
import fractions as frac
import math as ma
import cmath as cma
import copy as cp
import sys
def sinput(): return sys.stdin.readline().strip()
def iinput(): return int(sinput())
def imap(): return map(int, sinput().split())
def fmap(): return map(float, sinput().split())
def iarr(n=0):
    if n: return [0 for _ in range(n)]
    else: return list(imap())
def farr(): return list(fmap())
def sarr(n=0):
    if n: return ["" for _ in range(n)]
    else: return sinput().split()
def barr(n): return [False for _ in range(n)]
sys.setrecursionlimit(10**7)
MOD = 10**9 + 7; EPS = sys.float_info.epsilon
PI = np.pi; EXP = np.e; INF = np.inf

a,b = imap()
amin,amax = int(a*100/8)+1, int((a+1)*100/8)+1
bmin,bmax = b*10, (b+1)*10
ran = set(range(amin,amax)) & set(range(bmin,bmax))
ans = min(ran) if ran else -1
print(ans)

Submission status: Wrong Answer

Solution code:
import numpy as np
import scipy.sparse as sps
import scipy.misc as spm
import collections as col
import functools as func
import itertools as ite
import fractions as frac
import math as ma
import cmath as cma
import copy as cp
import sys
def sinput(): return sys.stdin.readline().strip()
def iinput(): return int(sinput())
def imap(): return map(int, sinput().split())
def fmap(): return map(float, sinput().split())
def iarr(n=0):
    if n: return [0 for _ in range(n)]
    else: return list(imap())
def farr(): return list(fmap())
def sarr(n=0):
    if n: return ["" for _ in range(n)]
    else: return sinput().split()
def barr(n): return [False for _ in range(n)]
sys.setrecursionlimit(10**7)
MOD = 10**9 + 7; EPS = sys.float_info.epsilon
PI = np.pi; EXP = np.e; INF = np.inf

a,b = imap()
amin,amax = int(a*100/8), int((a+1)*100/8)+1
bmin,bmax = b*10, (b+1)*10
ran = set(range(amin,amax)) & set(range(bmin,bmax))
ans = min(ran) if ran else -1
print(ans)

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
a1 = a*125
a2 = (a+1)*125
b1 = b*100
b2 = (b+1)*100

#print(a1/10, a2/10, b1/10, b2/10)
if a1 >= b1 and a1 < b2:

    print(int(round(a1/10, 0)))
    
elif b1 >= a1 and b1 < a2:
    print(int(round(b1/10, 0)))
    
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
aa = 0
aaa = 0
bb = 0
bbb = 0
x = True
for i in range(1, 1009):
    if a == int(i*0.08) and x:
        aa=i
        x = False
        continue
    if a ==int(i*0.08)-1:
        aaa = i-1
        break
x = True
for i in range(1, 1009):
    if b == int(i*0.1) and x:
        bb=i
        x = False
        continue
    if b ==int(i*0.1)-1:
        bbb = i-1
        break
#print(aa, aaa, bb, bbb)
if bb>=aa and bb <= aaa:
    print(bb)
elif aa >=bb and aa<= bbb:
    print(aa)
else:
    print(-1)

Submission status: Wrong Answer

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

AA=(A*100)//8
BB=(B*100)//10

if abs(AA-BB)<20:
    print(AA)
    
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
a1 = a*125
a2 = (a+1)*125
b1 = b*100
b2 = (b+1)*100


if a1 >= b1 and a1 < b2:

    print(int(a1/10))
    
elif b1 >= a1 and b1 < a2:
    print(int(b1/10))
    
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
a1 = a/0.08
a2 = (a+1)/0.08
b1 = b/0.1
b2 = (b+1)/0.1


if a1 >= b1 and a1 < b2:

    print(int(a1))
elif b1 >= a1 and b1 < a2:
    print(int(b1))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
a1 = a/0.08
a2 = (a+1)/0.08
b1 = b/0.1
b2 = (b+1)/0.1

if a1 >= b1 and a1 <= b2:
    print(int(a1))
else:
    print(-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main():
    a, b = map(int, input().split())
    al = int(a / 0.08 + 0.05)
    bl = int(b / 0.1)
    au = al + 12 - a % 2
    bu = bl + 9
    if bu < al or au < bl:
        print(-1)
    else:
        print(max(al, bl))


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def main():
    a, b = map(int, input().split())
    al = int(a / 0.08 + 0.05)
    bl = int(b / 0.1)
    au = al + 12 - a % 2
    bu = bl + 9
    lb = max(al, bl)
    ub = min(au, bu)
    if lb <= ub and ((al <= bu <= au) or (bl <= au <= bu)):
        print(lb)
    else:
        print(-1)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def main():
    a, b = map(int, input().split())
    al = int(a / 0.08 + 0.05)
    bl = int(b / 0.1)
    au = al + 12 - a % 2
    bu = bl + 9
    lb = max(al, bl)
    ub = min(au, bu)
    if lb <= ub and (al <= bu <= au) and (bl <= au <= bu):
        print(lb)
    else:
        print(-1)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def main():
    a, b = map(int, input().split())
    al = int(a / 0.08 + 0.05)
    bl = int(b / 0.1)
    au = al + 12 - a % 2
    bu = bl + 9
    lb = max(al, bl)
    ub = min(au, bu)
    if lb <= ub and (al <= bu or bl <= au):
        print(lb)
    else:
        print(-1)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def main():
    a, b = map(int, input().split())
    av = int(a / 0.08 + 0.05)
    bv = int(b / 0.1)
    lb = max(bv, av)
    ub = min(av+11 + (1 - a % 2), bv+9)
    if lb <= ub:
        print(lb)
    else:
        print(-1)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def main():
    a, b = map(int, input().split())
    av = int(a / 0.08 + 0.05)
    bv = int(b / 0.1)
    lb = max(bv, av)
    ub = min(av+11, bv+9)
    if lb <= ub:
        print(lb)
    else:
        print(-1)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def main():
    a, b = map(int, input().split())
    av = int(a / 0.08)
    bv = int(b / 0.1)
    lb = max(bv, av)
    ub = min(av+11, bv+9)
    if lb <= ub:
        print(lb)
    else:
        print(-1)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def main():
    a, b = map(int, input().split())
    eight = [i for i in range(0, 10001) if a == int(i * 0.08)]
    ten = [i for i in range(0, 10001) if b == int(i * 0.1)]
    print(eight)
    print(ten)
    for i in eight:
        for j in ten:
            if i == j:
                print(i)
                return
    print(-1)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def main():
    a, b = map(int, input().split())
    eight = [i for i in range(0, 101) if a == int(i * 0.08)]
    ten = [i for i in range(0, 101) if b == int(i * 0.1)]
    for i in eight:
        for j in ten:
            if i == j:
                print(i)
                return
    print(-1)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
A,B=map(int,input().split())
c=A*25//2
d=B*10
for i in range(d,d+11):
  if int(i*0.08)==A:
    print(i)
    sys.exit()
print(-1)

Submission status: Wrong Answer

Solution code:
import sys
A,B=map(int,input().split())
d=(B*10)-4
for i in range(d,d+18):
  if int(i*0.08)==A:
    print(i)
    sys.exit()
print(-1)

Submission status: Wrong Answer

Solution code:
import sys
A,B=map(int,input().split())
d=(B*10)-4
for i in range(d,d+11):
  if int(i*0.08)==A:
    print(i)
    sys.exit()
print(-1)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
ll = []
for i in range(1,116):
    if int(i*0.08) == a and int(i*0.1) == b:
        ll.append(i)
    else:
        pass
if len(ll) != 0:
    print(ll[0])
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
ll = []
for i in range(1,101):
    if int(i*0.08) == a and int(i*0.1) == b:
        ll.append(i)
    else:
        pass
if len(ll) != 0:
    print(ll[0])
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys
import math
from decimal import *

def solve(A: int, B: int):
    A = Decimal(str(A))
    B = Decimal(str(B))
    s8 = Decimal('0.08')
    s10 = Decimal('0.10')
    n8 = [math.ceil(A/s8), math.floor((A+1)/s8)]
    n10 = [math.ceil(B/s10), math.floor((B+1)/s10)]

    # print(n8, n10)
    if n10[0] <= n8[0] <= n10[1]:
        print(int(n8[0]))
    elif n8[0] <= n10[0] <= n8[1]:
        print(int(n10[0]))
    else:
        print('-1')
    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    solve(A, B)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys
import math
from decimal import *

def solve(A: int, B: int):
    A = Decimal(str(A))
    B = Decimal(str(B))
    s8 = Decimal('0.08')
    s10 = Decimal('0.10')
    n8 = [math.floor(A/s8), math.floor((A+1)/s8)]
    n10 = [math.floor(B/s10), math.floor((B+1)/s10)]

    if n10[0] <= n8[0] <= n10[1]:
        print(int(n8[0]))
    elif n8[0] <= n10[0] <= n8[1]:
        print(int(n10[0]))
    else:
        print('-1')
    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    solve(A, B)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys
from decimal import *

def solve(A: int, B: int):
    A = Decimal(str(A))
    B = Decimal(str(B))
    s8 = Decimal('0.08')
    s10 = Decimal('0.10')
    n8 = [A/s8, (A+1)/s8]
    n10 = [B/s10, (B+1)/s10]
    if n10[0] <= n8[0] <= n10[1]:
        print(int(n8[0]))
    elif n8[0] <= n10[0] <= n8[1]:
        print(int(n10[0]))
    else:
        print('-1')
    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    solve(A, B)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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


def solve(A: int, B: int):
    n8 = [A/0.08, (A+1)/0.08]
    n10 = [B/0.1, (B+1)/0.1]
    if n10[0] <= n8[0] <= n10[1]:
        print(int(n8[0]))
    elif n8[0] <= n10[0] <= n8[1]:
        print(int(n10[0]))
    else:
        print('-1')
    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    solve(A, B)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import numpy as np
A, B = list(map(int, input().split()))

a = np.arange(int(A/0.08),int((A+1)/0.08))
b = np.arange(int(B/0.1),int((B+1)/0.1))

if a[0] > b[len(b)-1] or a[len(a)-1] < b[0]:
  print(-1)
else:
  print(max(a[0],b[0]))

Submission status: Wrong Answer

Solution code:
import math

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

min_price_A = math.ceil(A * 12.5)
max_price_A = min_price_A + 12

min_price_B = B * 10
max_price_B = min_price_B + 9

if min_price_A <= min_price_B:
    if max_price_A >= min_price_B:
        print(int(min_price_B))
    else:
        print(-1)
else:
    if max_price_B >= min_price_A:
        print(int(min_price_A))
    else:
        print(-1)

Submission status: Wrong Answer

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

min_price_A = A * 12.5
max_price_A = min_price_A + 12

min_price_B = B * 10
max_price_B = min_price_B + 9

if min_price_A <= min_price_B:
    if max_price_A >= min_price_B:
        print(int(min_price_B))
    else:
        print(-1)
if min_price_A > min_price_B:
    if max_price_B >= min_price_A:
        print(int(min_price_A))
    else:
        print(-1)

Submission status: Wrong Answer

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

min_price_A = A * 12.5
max_price_A = min_price_A + 12

min_price_B = B * 10
max_price_B = min_price_B + 10

if min_price_A <= min_price_B:
    if max_price_A >= min_price_B:
        print(int(min_price_B))
    else:
        print(-1)
else:
    if max_price_B >= min_price_A:
        print(int(min_price_A))
    else:
        print(-1)

Submission status: Wrong Answer

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

x = int(a/0.08)
y = int(b/0.1)

if int(x*0.08) == a and int(x*0.1) == b:
    print(x)
elif int(y*0.08) == a and int(y*0.1) == b:
    print(y)
else:
    print(-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b=list(map(float,input().split()))
import sys
for i in range(100000):
  if int(i*8/100)==a and int(i*8/100):
    print(i)
    sys.exit()
print(-1)