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=list(map(int,input().split()))
A=int(a*12.5)
B=int(b*10)

if A==B:
  print(A)
else:
  print(-1)

Submission status: Wrong Answer

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

x = max((a//0.08)+1, int(a/0.08))
y = b//0.1*0.1

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

Submission status: Wrong Answer

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

x = max((a//0.08)+1, int(a/0.08))
y = b//0.1*0.1

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

Submission status: Wrong Answer

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

x = max((a//0.08)+1, int(a/0.08))
y = b//0.1*0.1

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

Submission status: Wrong Answer

Solution code:
import math
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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

x = a / 0.08
y = b / 0.1
left = math.floor(min(x, y))
right = math.ceil(max(x, y))
print(x,y,left,right)
for i in range(left , right + 1):
    if int(i * 0.08) == a and int(i * 0.1) == b:
        print(i)
        exit()
print('-1')

Submission status: Wrong Answer

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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

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

for i in range(min(x, y), max(x, y) + 1):
    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())

import math
flag = 0

for i in range(1250):
	if i*0.08 == A and i*0.1 == B:
		print(i)
		flag = 1
		break

if flag == 0:
	print(-1)

Submission status: Wrong Answer

Solution code:
a, b=map(int, input().split())
import math
la=math.floor(a/0.08)
ua=math.ceil((a+0.9999999)/0.08)
lb=math.floor(b/0.1)
ub=math.ceil((b+0.9999999)/0.1)

if la<=lb and lb<=ua:
  print(lb)
elif lb<=la and la<=ub:
  print(la)
else:
  print(-1)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import math

tax_8, tax_10 = map(int, input().split())

price_8_min = tax_8 / 0.08
price_8_max = (tax_8 + 0.99) / 0.08

price_10_min = tax_10 / 0.1
price_10_max = (tax_10 + 0.99) / 0.1

if price_8_min <= price_10_max or price_10_min <= price_8_max:
    print(math.ceil(max(price_8_min, price_10_min)))
else:
    print('-1')

Submission status: Wrong Answer

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

for i in range(int(A/0.08)+1,int((A+1)/0.08)+1):
    A_se.add(i)

for i in range(int(B/0.1)+1,int((B+1)/0.1)+1):
    B_se.add(i)

C = A_se & B_se
if len(C)==0:
    print(-1)
else:
    print(min(C))

Submission status: Wrong Answer

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

for i in range(int(A/0.08),int((A+1)/0.08)+1):
    A_se.add(i)

for i in range(int(B/0.1),int((B+1)/0.1)+1):
    B_se.add(i)

C = A_se & B_se
if len(C)==0:
    print(-1)
else:
    print(min(C))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
x=0
for i in range(b*9+1,b*10+1):
  if (i*0.08)//1<=i*0.08 and i*0.08<(i*0.08)//1+1:
    print(i)
    x=i
    break
if x==0:
  print('-1')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math as m
a,b=map(int,input().split())
flag=True
for i in range(1,10**6):
    if m.floor(i*(0.08))==a and m.floor(i*(0.08))==b:
        flag=False
        print(i)
        break
if flag:
    print(-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math as m
a,b=map(int,input().split())
flag=True
for i in range(1,101):
    if m.floor(i*(0.08))==a and m.floor(i*(0.08))==b:
        flag=False
        print(i)
        break
if flag:
    print(-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
M1 = int(A * 100 / 8)
M2 = int(B * 10)
if M1 == M2:
    print(M1)
else:
    print('-1')

Submission status: Wrong Answer

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

eightlow = int((A/0.08))
eighthigh = int((A+1)//0.08)
tenlow = int((B/0.1))
tenhigh = int((B+1)//0.1)

eight = []
ten = []

for i in range(eightlow, eighthigh+1):
    eight.append(i)
for i in range(tenlow, tenhigh+1):
    ten.append(i)

for i in range(len(eight)):
    for j in range(len(ten)):
        if eight[i] == ten[j]:
            print(eight[i])
            exit()

print(-1)

Submission status: Wrong Answer

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

eightlow = int((A/0.08))
eighthigh = int((A+1)//0.08)
tenlow = int((B/0.1))
tenhigh = int((B+1)//0.1)

eight = []
ten = []

for i in range(eightlow, eighthigh):
    eight.append(i)
for i in range(tenlow, tenhigh):
    ten.append(i)

for i in range(len(eight)):
    for j in range(len(ten)):
        if eight[i] ==ten[j]:
            print(eight[i])
            exit()

print(-1)

Submission status: Wrong Answer

Solution code:
import math
a,b = map(int, input().split())
x1 = math.floor(a*100/8)
x2 = math.floor(b*10)
if x1>=x2 and int(x1*0.1)==b:
    print(x1)
elif x1 < x2 and int(x2*0.8)==a:
    print(x1)
else:   
    print(-1)

Submission status: Wrong Answer

Solution code:
import math
a,b = map(int, input().split())
x1 = math.ceil(a*100/8)
x2 = math.ceil(b*10)
if x1>=x2 and int(x1*0.1)==b:
    print(x1)
elif x1 < x2 and int(x2*0.8)==a:
    print(x1)
else:   
    print(-1)

Submission status: Wrong Answer

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

for i in range(1,10100):
    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())
for i in range(1,1002):
    if a == int(i*0.08) and b == int(i*0.1):
        print(i)
        break

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
x1=a*(25/2)
x2=b*10
if x1>x2:
    ans = x1//1
    if int((ans*0.1)//1)!=b:
        ans = -1
else:
    ans = x2//1
    if int((ans*0.08)//1)!=a:
        ans = -1

print(int(ans))

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
x1=a*(25/2)
x2=b*10
if x1>x2:
    ans = x1//1
    if (ans*0.1)//1!=b:
        ans = -1
else:
    ans = x2//1
    if (ans*0.08)//1!=a:
        ans = -1

print(int(ans))

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
x1=a*(25/2)
x2=b*10
if x1>x2:
    ans = x1//1
    if (ans*0.1)//1!=b:
        ans = -1
else:
    ans = x2//1
    if (ans*0.08)//1!=a:
        ans = -1

print(ans)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
x_A = (100*A + 7) // 8
x_B = B * 10

if 0 <= x_A - x_B < 10:
    print(x_A)
else:
    print(-1)

Submission status: Wrong Answer

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

p1 = int(a // 0.08 + 1)
p2 = int(b // 0.1 + 1)

p1_list = [i for i in range(p1,p1+13)]
p2_list = [i for i in range(p2,p2+10)]

p_list = set(p1_list) & set(p2_list)

p_list = list(p_list)
p_list = sorted(p_list)

if len(p_list) == 0:
    print(-1)
else:
    print(p_list[0])

Submission status: Wrong Answer

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

for price in range(1, 101):
    if int(price * 0.08) == A and int(price * 0.1) == B:
        ans = price
        break

print(ans)

Submission status: Wrong Answer

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

for i in range(1000):
    tax_eight = int(i * 0.08)
    tax_ten = int(i * 0.1)
    if A == tax_eight and B == tax_ten:
        ans.append(i)

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

Submission status: Wrong Answer

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

for i in range(1,101):
    hati = int(i * 0.08)
    juu = int(i * 0.1)
    
    if hati == a and juu == b:
        flag = 1
        print(i)
        break
    
if flag == 0:
    print("-1")

Submission status: Wrong Answer

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

if (int(ans_b*0.08) == a)and(int(ans_a*0.1) != b):
  print(ans_b)
elif (int(ans_b*0.08) != a)and(int(ans_a*0.1) == b):
  print(ans_a)
elif (int(ans_b*0.08) == a)and(int(ans_a*0.1) == b):
  print(min(ans_a,ans_b))
else:
  print(-1)

Submission status: Wrong Answer

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

ans_a = int(a/0.08)
ans_b = int(b/0.1)

if ans_a <= ans_b:
  if int(ans_b*0.08) == a:
    print(ans_b)
  else:
    print(-1)
elif ans_b < ans_a:
  if int(ans_a*0.1) == b:
    print(ans_a)
  else:
    print(-1)

Submission status: Wrong Answer

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

ans_a = int(a/0.08)

if int(ans_a*0.1) == b:
  print(ans_a)
else:
  print(-1)

Submission status: Wrong Answer

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

a_min = int(A / 0.08)
a_max = int((A+1) / 0.08)
#print(a_min, a_max)

b_min = int(B / 0.1)
b_max = int((B+1)/0.1)
#print(b_min, b_max)

for i in range(a_min, a_max+1):
    if b_min <= i < b_max:
        print(i)
        exit()

print(-1)

Submission status: Wrong Answer

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

a_min = int(A / 0.08)
a_max = int((A+1) / 0.08)
#print(a_min, a_max)

b_min = int(B / 0.1)
b_max = int((B+1)/0.1)
#print(b_min, b_max)

for i in range(a_min, a_max+1):
    if b_min <= i <= b_max:
        print(i)
        exit()

print(-1)

Submission status: Wrong Answer

Solution code:
#import math

a,b=map(int,input().split())
#x=int(a/0.08)
#y=int(b/0.1)
for i in range(1,1000):
#for i in range(y,x+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:
import math

a,b=map(int,input().split())
x=int(math.ceil(a/0.08))
y=int(b/0.1)
for i in range(y,x+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:
import math

a,b=map(int,input().split())
x=int(a/0.08)
y=int(b/0.1)
for i in range(y,x+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:
import math

a,b=map(int,input().split())
x=int(a/0.08)
y=int(a/0.1)
#print(x,y)
for i in range(y,x+1):
  #print(math.ceil(i*0.08),math.ceil(i*0.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:
a,b = map(int, input().split())
ans = -1
for i in range(101):
  if int(i * 0.08) == a and int(i * 0.1) == b:
    ans = i
    break
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

x_8 = ( a * 100 // 8 )
for x in range( x_8, x_8 + 13 ):
    if x // 10 == b:
        print( x )
        exit()
print( -1 )

Submission status: Wrong Answer

Solution code:
import math

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

b = B * 10
ans = -1
for i in range(1, 1001):
    y = math.floor(i * 0.08)
    if y == A:
        ans = i
        break
print(ans)

Submission status: Wrong Answer

Solution code:
import math

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

b = B * 10
ans = -1
for i in range(b, 1001):
    y = math.floor(i * 0.08)
    if y == A:
        ans = i
        break
print(ans)

Submission status: Wrong Answer

Solution code:
import math

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

b = B * 10
ans = b
for i in range(b, b*2):
    y = math.floor(i * 0.08)
    if y == A:
        ans = min(ans, i)
        break
if ans == b:
    print(-1)
else:
    print(ans)

Submission status: Wrong Answer

Solution code:
import math

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

b = B * 10
ans = -1
for i in range(b, b*2):
    y = math.floor(i * 0.08)
    if y == A:
        ans = i
        break
print(ans)

Submission status: Wrong Answer

Solution code:
import math

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

b = B * 10
a = math.floor(A / 0.08)
ans = -1
for i in range(b, a + 11):
    y = math.floor(i * 0.08)
    if y == A:
        ans = i
        break
print(ans)

Submission status: Wrong Answer

Solution code:
import math

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

x = B * 10
ans = -1
for i in range(x, int(A / 0.08) + 11):
    y = math.floor(i * 0.08)
    if y == A:
        ans = i
        break
print(ans)

Submission status: Wrong Answer

Solution code:
import math

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

x = B * 10
ans = -1
for i in range(x, int(B / 0.08) + 11):
    y = math.floor(i * 0.08)
    if y == A:
        ans = i
        break
print(ans)

Submission status: Wrong Answer

Solution code:
import math

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

x = B * 10
ans = -1
for i in range(x, int(B / 0.08) + 2):
    y = math.floor(i * 0.08)
    if y == A:
        ans = i
        break
print(ans)

Submission status: Wrong Answer

Solution code:
import math

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

x = B * 10
ans = -1
for i in range(x, math.floor(B / 0.08) + 2):
    y = math.floor(i * 0.08)
    if y == A:
        ans = i
        break
print(ans)

Submission status: Wrong Answer

Solution code:
import math

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

x = B * 10
ans = -1
for i in range(x, x+11):
    y = math.floor(i * 0.08)
    if y == A:
        ans = i
        break
print(ans)

Submission status: Wrong Answer

Solution code:
import math

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

x = B * 10
ans = -1
i = x
y = math.floor(i * 0.08)
while y <= A:
    if y == A:
        ans = i
        break
    i += 1
    y = math.floor(i * 0.08)
print(ans)

Submission status: Wrong Answer

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

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

print(-1)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import math
a,b = map(int,input().split())
TF = True
A,B = [],[]
for i in range(10):
    ansA = math.ceil((a+0.1*i)*12.5)
    ansB = math.ceil((b+0.1*i)*10)
    A.append(ansA)
    B.append(ansB)
    if ansA in B:
        print(ansA)
        TF = False
        break
    elif ansB in A:
        print(ansB)
        TF = False
        break
if TF == True:
    print(-1)

Submission status: Wrong Answer

Solution code:
import math
a,b = map(int,input().split())
TF = True
A,B = [],[]
for i in range(10):
    ansA = math.ceil((a+0.1*i)*12.5)
    ansB = math.ceil((b+0.1*i)*10)
    A.append(ansA)
    B.append(ansB)
    if ansA in B:
        print(ansA)
        TF = False
        break
    elif ansB in A:
        print(ansB)
        TF = False
        break
print(A,B)
if TF == True:
    print(-1)

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
TF = True
A,B = [],[]
for i in range(10):
    ansA = int((a+0.1*i)*12.5)
    ansB = int((b+0.1*i)*10)
    A.append(ansA)
    B.append(ansB)
    if ansA in B:
        print(ansA)
        TF = False
        break
    elif ansB in A:
        print(ansB)
        TF = False
        break
if TF == True:
    print(-1)

Submission status: Wrong Answer

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

m=math.floor(max(a / 0.08, b / 0.10))
if math.floor(m*0.08) == a and math.floor(m*0.10) == b:
    print(m)
else:
    print(-1)

Submission status: Wrong Answer

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

m=math.floor(max(a / 0.08, b / 0.10))
if math.floor(m*0.08) == math.floor(m*0.10):
    print(m)
else:
    print(-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n,m=map(int,input().split())
for i in range(1,1000):
  if int(i*0.08)==n and int(i*0.1)==m:
    print(i)
else:
  print(-1)

Submission status: Wrong Answer

Solution code:
a, b = map(int,input().split())
for ax in [i / 100 for i in range(a*100, (a+1)*100)]:
    ao = ax / 0.08
    if ao == int(ao):
        if b * 10 <= ao < b*10+10:
            print(int(ao))
            exit()
print(-1)

Submission status: Wrong Answer

Solution code:
import math
A,B=map(int,input().split())
a=math.floor(A/0.08)
aa=math.ceil((A+1)/0.08)
for i in range(a,aa):
  if B<=i*0.1<B+1:
    print(i)
    exit()
else:
  print('-1')

Submission status: Wrong Answer

Solution code:
import math
A,B=map(int,input().split())
a=math.floor(A/0.08)
aa=math.floor((A+1)/0.08)
for i in range(a,aa):
  if B<=i*0.1<B+1:
    print(i)
    exit()
else:
  print('-1')

Submission status: Wrong Answer

Solution code:
import math
A,B=map(int,input().split())
N=math.floor(A/0.08)
for i in range(N,100):
  if B<=i*0.1<B+1:
    print(i)
    exit()
else:
  print('-1')

Submission status: Wrong Answer

Solution code:
import math
A,B=map(int,input().split())
N=math.floor(A/0.08)
if B<=N*0.1<B+1:
  print(N)
else:
  print('-1')

Submission status: Wrong Answer

Solution code:
import math
A, B = map(int, input().split())
C = {i for i in range(math.floor(A*12.5),math.ceil((A+1)*12.5))}
D = {j for j in range(B*10,(B+1)*10)}
E = C&D
if E == set():
    print(-1)
    exit()
print(min(E))

Submission status: Wrong Answer

Solution code:
import bisect,collections,copy,heapq,itertools,math,numpy,string
import sys
sys.setrecursionlimit(10**7)

def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())

def main():
    A, B = LI()
    A_bottom,A_upper = A/0.08,(A+1)/0.08
    B_bottom,B_upper = B/0.10,(B+1)/0.10
    # print(A_bottom,A_upper,B_bottom,B_upper)
    if A_bottom>=B_bottom and A_bottom<B_upper:
        print(int(A_bottom))
    elif B_bottom>=A_bottom and B_bottom<A_upper:
        print(int(B_bottom))
    else:
        print(-1)

main()

Submission status: Wrong Answer

Solution code:
import bisect,collections,copy,heapq,itertools,math,numpy,string
import sys
sys.setrecursionlimit(10**7)

def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())

def main():
    A, B = LI()
    A_bottom,A_upper = int(A/0.08),int((A+1)/0.08)
    B_bottom,B_upper = int(B/0.10),int((B+1)/0.10)
    # print(A_bottom,A_upper,B_bottom,B_upper)
    if A_bottom>=B_bottom and A_bottom<B_upper:
        print(A_bottom)
    elif B_bottom>=A_bottom and B_bottom<A_upper:
        print(B_bottom)
    else:
        print(-1)

main()

Submission status: Wrong Answer

Solution code:
import bisect,collections,copy,heapq,itertools,math,numpy,string
import sys
sys.setrecursionlimit(10**7)

def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())

def main():
    A, B = LI()
    A_bottom,A_upper = int(A/0.08),int((A+1)/0.08)
    B_bottom,B_upper = int(B/0.10),int((B+1)/0.10)
    # print(A_bottom,A_upper,B_bottom,B_upper)
    if A_bottom>=B_bottom and A_bottom<=B_upper:
        print(A_bottom)
    elif B_bottom>=A_bottom and B_bottom<=A_upper:
        print(B_bottom)
    else:
        print(-1)

main()

Submission status: Wrong Answer

Solution code:
import sys
import math
A,B=map(int,input().split())
tmp=math.floor(A/0.08)
while True:
    if math.floor(tmp/10)==B:
        print(tmp)
        sys.exit()
    elif math.floor(tmp/10)<B:
        print(-1)
        sys.exit()
    tmp+=1

Submission status: Wrong Answer

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

x1 = -(-25*A//2)
x2 = 25*(A+1)//2
x3 = 10*B
x4 = 10*(B+1)
print(x1, x2, x3, x4)

if x1 <= x3 and x3 < x2:
  print(x3)
elif x3 <= x1 and x1 < x4:
  print(x1)
else:
  print(-1)

Submission status: Wrong Answer

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

x1 = 25*A//2
x2 = 25*(A+1)//2
x3 = 10*B
x4 = 10*(B+1)

if x1 == x3:
  print(x1)
elif x1 < x3 and x3 < x2 and x3 < x4:
  print(x3)
elif x3 < x1 and x1 < x4 and x1 < x2:
  print(x1)
else:
  print(-1)

Submission status: Wrong Answer

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

x1 = 25*A//2
x2 = 25*(A+1)//2
x3 = 10*B
x4 = 10*(B+1)

if x1 == x3:
  print(x1)
elif x1 < x3 and x3 < x2:
  print(x3)
elif x3 < x1 and x1 < x4:
  print(x1)
else:
  print(-1)

Submission status: Wrong Answer

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

x1 = 25*A//2
x2 = 25*(A+1)//2
x3 = 10*B
x4 = 10*(B+1)

if x1 <= x3 and x3 < x2:
  print(x3)
elif x3 <= x1 and x1 < x4:
  print(x1)
else:
  print(-1)

Submission status: Wrong Answer

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

x1 = 25*A//2
x2 = 25*(A+1)//2
x3 = 10*B
x4 = 10*(B+1)

if x1 <= x3 and x3 < x2:
  print(x3)
elif x3 <= x1 and x1 < x2:
  print(x1)
else:
  print(-1)

Submission status: Wrong Answer

Solution code:
# import sys
import math
# import itertools
# from collections import deque
# from collections import defaultdict
# import heapq
# import copy
# import bisect
# import numpy as np
# from scipy.special import comb

# def my_input(): return sys.stdin.readline().rstrip()
# sys.setrecursionlimit(100000)
# INF = 1001001001001
# MOD = 1000000007


def main():

    A, B = map(int, input().split())
    a1 = A * 12.25
    a2 = (A + 1) * 12.25
    b1 = B * 10
    b2 = (B + 1) * 10

    ans = math.ceil(max(a1, b1))
    if ans < a2 and ans < b2:
        print(ans)
    else:
        print("-1")


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys

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

A = int( a * 100 / 8 )
B = b * 10

if abs(B-A) >= 10:
  print(-1)
  sys.exit()
  
if A <= B:
  while A <= B:
    if int( A * 0.1 ) == b:
      print(A)
      sys.exit()
    else:
      A += 1
else:
  while B <= A:
    if int( B * 8 / 100 ) == a:
      print(B)
      sys.exit()
    else:
      B += 1

Submission status: Wrong Answer

Solution code:
import sys

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

A = int( a * 100 / 8 )
B = b * 10

if abs(B-A) >= 10:
  print(-1)
  sys.exit()
  
else:
  if A <= B:
    while A <= B:
      if int( A * 0.1 ) == b:
        print(A)
        sys.exit()
      else:
        A += 1
  else:
    while B < A:
      if int( B * 8 / 100 ) == a:
        print(B)
        sys.exit()
      else:
        B += 1

Submission status: Wrong Answer

Solution code:
import sys

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

A = int( a * 100 / 8 )
B = b * 10

if abs(B-A) >= 10:
  print(-1)
  sys.exit()
  
else:
  if A < B:
    while A <= B:
      if int( A * 0.1 ) == b:
        print(A)
        sys.exit()
      else:
        A += 1
  else:
    while B < A:
      if int( B * 8 / 100 ) == a:
        print(B)
        sys.exit()
      else:
        B += 1

Submission status: Wrong Answer

Solution code:
import sys

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

A = int( a * 100 / 8 )
B = b * 10

if abs(B-A) >= 10:
  print(-1)
  sys.exit()
  
else:
  if A < B:
    while A < B:
      if int( A * 0.1 ) == b:
        print(A)
        sys.exit()
      else:
        A += 1
  else:
    while B <= A:
      if int( B * 8 / 100 ) == a:
        print(B)
        sys.exit()
      else:
        B += 1

Submission status: Wrong Answer

Solution code:
# For taking space seperated integer variable inputs.
import math


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


A, B = invr()

x1 = int(A / 0.08)
y1 = int(x1 * 0.1)

x2 = int(B / 0.1)
y2 = int(x2 * 0.08)

# print(x1, x2)
# print(y1, y2)
res = -1
if y1 == B:
    res = x1
if y2 == A:
    res = min(res, x2)
print(res)

Submission status: Wrong Answer

Solution code:
# For taking space seperated integer variable inputs.
import math


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


A, B = invr()

x = int(A / 0.08)
y = int(x * 0.1)

if y == B:
    print(x)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
A, B= map(int, input().split())
money = B*10
ans=-1
while money//10==B:
	print(money, money//10, int(money*0.08))
	if int(money*0.08)==A:
		ans=money
		break
	money+=1
print(ans)

Submission status: Wrong Answer

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

a=A/0.08
b=B/0.10
c=max(a,b)
d=int(c*0.08)
e=int(c*0.1)

if A==d and B==e:
    print(int(c))
else:
    print(-1)

Submission status: Wrong Answer

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

original_a = int(A / 0.08)
original_b = int(B / 0.1)

original = max(original_a, original_b)

if int(original * 0.08) == A and int(original * 0.2) == B:
    print(original)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
cal,cal2,s=0,0,0
ans=[0]*5

true=[]
cal=A/0.08

for i in range(5):
    ans[i]=cal+i
    s=int(cal*0.1)
    if s==B:
        true.append(ans[i])
        break

if i==4:
    print("-1")
else :
    print(int(true[0]))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main():
    a, b = map(int, input().split())
    ans = -1
    for i in range(10000, -1, -1):
        tax1 = int(i*0.08)
        tax2 = int(i*0.08)
        if tax1 == a and tax2 == b:
            ans = i
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
def main():
    a, b = map(int, input().split())
    ans = -1
    for i in range(10000, 1, -1):
        tax1 = int(i*0.08)
        tax2 = int(i*0.08)
        if tax1 == a and tax2 == b:
            ans = i
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
def main():
    a, b = map(int, input().split())
    a_temp = int(a/0.08)
    b_temp = int(b/0.1)
    if max(a_temp, b_temp) == a_temp:
        if int(a_temp*0.1) == b:
            ans = a_temp
        else:
            ans = -1
    else:
        if int(b_temp*0.08) == a:
            ans = b_temp
        else:
            ans = -1
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
from math import ceil, floor

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

Submission status: Wrong Answer

Solution code:
from math import ceil, floor

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

Submission status: Wrong Answer

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

a=True
for i in range(100):
    if int(0.08*i)==A and int(0.10*i)==B:
        print(i)
        a=False
        break
if a==True:
    print(-1)

Submission status: Wrong Answer

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

for i in range(100):
    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())

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

print(-1)

Submission status: Wrong Answer

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

for i in range(1000):
    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())
for i in range(B*100):
    if i*8//100 == A and i * 10 // 100 == B:
        print(i)
        exit()
print(-1, -1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
a,b = map(int,input().split())
 
inf = -math.floor(-a/0.08)
sup = math.floor((a+1)/0.08)
for i in range(inf,sup+1):
  if 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(1,1009):
    if (i * 8 // 100) == A and (i * 10 // 100) == B:
        print(i)
        break

Submission status: Wrong Answer

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

inf = (-1)*math.floor((-1)*a/0.08)
sup = math.floor((a+1)/0.08)
for i in range(inf,sup+5):
  if math.floor(i*0.1) == b:
    print(i)
    exit()
    
print(-1)