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

ans=-1
n = int(max(12.5*a,10*b))

if int(n*1.1)-b == int(n*1.08)-a:
    ans=n
    
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

small=math.ceil(A/0.08)
big = math.ceil(B/0.1)

#print (small)
#print (big)

a =0
b =0
if small<=big:
  a = small
  b = big
else :
  a = big
  b = small
#print (a)
#print (b)

flag = False
if small ==big:
  flag =True
  print (small)
else :
  for i in range(a,b+1,1):
    a = math.floor(i*0.08)
    b = math.floor(i*0.1)
    #print (a)
    #print (b)
    if a==b:
      print (i)
      flag = True
      break
      break
if flag==False:
  print (-1)

Submission status: Wrong Answer

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

small=math.ceil(A/0.08)
big = math.ceil(B/0.1)

#print (small)
#print (big)

flag = False
if small ==big:
  flag =True
  print (small)
else :
  for i in range(big,small+1,1):
    a = math.floor(i*0.08)
    b = math.floor(i*0.1)
    #print (a)
    #print (b)
    if a==b:
      print (i)
      flag = True
      break
      break
if flag==False:
  print (-1)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
for i in range(101):
  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())

list1=[]
list2=[]
a=A*100/8
b=(A+1)*100/8
c=B*10
d=(B+1)*10

s=math.floor(a)
t=c
while s<b:
    list1.append(s)
    s=s+1

while t<d:
    list2.append(t)
    t=t+1

x=0
for i in list2:
    x=x+list1.count(i)
    if x==1:
        y=i
        print(str(y))
        break
    else:
        print('-1')

Submission status: Wrong Answer

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

list1=[]
list2=[]
a=A*100/8
b=(A+1)*100/8
c=B*10
d=(B+1)*10

s=math.floor(a)
t=c
while s<b:
    list1.append(s)
    s=s+1

while t<d:
    list2.append(t)
    t=t+1

x=0
for i in list2:
    x=x+list1.count(i)
    if x==1:
        y=i
        break

if x==1:
    print(str(y))
elif x==0:
    print('-1')

Submission status: Wrong Answer

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

list1=[]
list2=[]
a=A*100/8
b=(A+1)*100/8
c=B*10
d=(B+1)*10

s=math.floor(a)
t=c
while s<b:
    list1.append(s)
    s=s+1

while t<d:
    list2.append(t)
    t=t+1

x=0
for i in list1:
    x=x+list2.count(i)
    if x==1:
        y=i
        break

if x==1:
    print(str(y))
elif x==0:
    print('-1')

Submission status: Wrong Answer

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

list1=[]
list2=[]
a=A*100/8
b=(A+1)*100/8
c=B*10
d=(B+1)*10

s=math.floor(a)
t=c
while s<b:
    list1.append(s)
    s=s+1

while t<d:
    list2.append(t)
    t=t+1

x=0
for i in list1:
    x=x+list2.count(i)
    if x==1:
        y=i
        break

if x==1:
    print(str(y))
else:
    print('-1')

Submission status: Wrong Answer

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

list1=[]
list2=[]
a=A*100/8
b=(A+1)*100/8
c=B*10
d=(B+1)*10

s=a
t=c
while s<b:
    list1.append(round(s))
    s=s+1

while t<d:
    list2.append(t)
    t=t+1

x=0
for i in list1:
    x=x+list2.count(i)
    if x==1:
        y=i
        break

if x==1:
    print(str(y))
else:
    print('-1')

Submission status: Wrong Answer

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

for i in range (11000):
  if a <= i*0.08 <=a+1:
    if b<= i*0.1 <=b+1:
      print(i)
      exit()
print(-1)

Submission status: Wrong Answer

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

for i in range (11000):
  if a <= i*0.08 <=a+1:
    if b<= i*0.1 <=b+1:
      print(i)
      exit()

Submission status: Wrong Answer

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

for i in range (1100):
  if a <= i*0.08 <=a+1:
    if b<= i*0.1 <=b+1:
      print(i)
      exit()

Submission status: Wrong Answer

Solution code:
A,B = map(int, input().split())
a = int(A/0.08)
b = int(B/0.10)
an1 = 100000
an2 = 100000

if B == int(a*0.1):
     an1 = int(A / 0.08)
if A == int(b*0.08):
     an2 = int(B / 0.10)

if an1 == 100000 and an2 == 100000:
    print(-1)
else:
    print(min(an1,an2))

Submission status: Wrong Answer

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

small=math.ceil(A/0.08)
big = math.ceil(B/0.1)

print (small)
print (big)

flag = False
if small ==big:
  flag =True
  print (small)
else :
  for i in range(big,small+1,1):
    a = math.floor(i*0.08)
    b = math.floor(i*0.1)
    #print (a)
    #print (b)
    if a==b:
      print (i)
      flag = True
      break
      break
if flag==False:
  print (-1)

Submission status: Wrong Answer

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

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

#print (small)
#print (big)

flag = False
if small ==big:
  flag =True
  print (small)
else :
  for i in range(big,small+1,1):
    a = math.floor(i*0.08)
    b = math.floor(i*0.1)
    #print (a)
    #print (b)
    if a==b:
      print (i)
      flag = True
      break
      break
if flag==False:
  print (-1)

Submission status: Wrong Answer

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

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

#print (small)
#print (big)

flag = False
if small ==big:
  flag =True
  print (small)
else :
  for i in range(big,small+1,1):
    a = math.floor(i*0.08)
    b = math.floor(i*0.1)
    #print (a)
    #print (b)
    if a==b:
      print (a)
      flag = True
      break
      break
if flag==False:
  print (-1)

Submission status: Wrong Answer

Solution code:
# coding: utf-8


def main():
    A, B = map(int, input().split())
    ans = -1
    for i in range(10001):
        if i * 8 // 100 == A and i / 10 == B:
            ans = i
            break

    print(ans)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
# coding: utf-8


def main():
    A, B = map(int, input().split())
    for i in range(10001):
        if i * 8 // 100 == A and i / 10 == B:
            print(i)
            break

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
# coding: utf-8


def main():
    A, B = map(int, input().split())
    for i in range(10001):
        if i * 8 / 100 == A and i / 10 == B:
            print(i)
            break

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import math

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

am = a / 0.08
aM = (a+1) / 0.08

bm = b / 0.1
bM = (b+1) / 0.08

m = max(am, bm)
M = min(aM, bM)

if m < M :
	print(math.ceil(m))
	 
else:
	print('-1')

Submission status: Wrong Answer

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

am = a / 0.08
aM = (a+1) / 0.08

bm = b / 0.1
bM = (b+1) / 0.08

m = max(am, bm)
M = min(aM, bM)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

A = -(-(a + 1)*100//8)
B = (b + 1)*10
s = a*100//8
t = b*10


re = 0

# print("{}, {}, {}, {}".format(A, B, s, t))

if s >= t:
    n = -(-(a + 1)*100//8 - s)
    for i in range(n):
        if t <= s + i < B:
            re = s + i
            break

else:
    n = -(-(b + 1)*100//8 - t)
    for i in range(n):
        if s <= t + i < A:
            re = t + i
            break

if re != 0:
    print(re)
else:
    print(-1)

Submission status: Wrong Answer

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

A = int(-(-(a + 1)*100//8))
B = int(-(-(b + 1)*10))
s = a*100//8
t = b*10


re = 0

# print("{}, {}, {}, {}".format(A, B, s, t))

if s >= t:
    n = int(-(-(a + 1)*100//8) - s)
    for i in range(n):
        if t <= s + i < B:
            re = s + i
            break

else:
    n = int(-(-(b + 1)*100//8) - t)
    for i in range(n):
        if s <= t + i < A:
            re = t + i
            break

if re != 0:
    print(re)
else:
    print(-1)

Submission status: Wrong Answer

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

A = int(-(-(a + 1) // 0.08))
B = int(-(-(b + 1) // 0.1))
s = a*100//8
t = b*10


re = 0

# print("{}, {}, {}, {}".format(A, B, s, t))

if s >= t:
    n = int(-(-(a + 1)*100//8) - s)
    for i in range(n):
        if t <= s + i < B:
            re = s + i
            break

else:
    n = int(-(-(b + 1)*100//8) - t)
    for i in range(n):
        if s <= t + i < A:
            re = t + i
            break

if re != 0:
    print(re)
else:
    print(-1)

Submission status: Wrong Answer

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

A = int(-(-(a + 1) // 0.08))
B = int(-(-(b + 1) // 0.1))
s = a*100//8
t = b*10


re = 0

# print("{}, {}, {}, {}".format(A, B, s, t))

if s >= t:
    n = int(-(-(a + 1) // 0.08) - s)
    for i in range(n):
        if t <= s + i < B:
            re = s + i
            break

else:
    n = int(-(-(b + 1) // 0.08) - t)
    for i in range(n):
        if s <= t + i < A:
            re = t + i
            break

if re != 0:
    print(re)
else:
    print(-1)

Submission status: Wrong Answer

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

A = int(-(-(a + 1) // 0.08))
B = int(-(-(b + 1) // 0.1))
s = int(a / 0.08)
t = int(b / 0.1)


re = 0

#print("{}, {}, {}, {}, {}".format(A, B, s, t, n))

if s >= t:
    n = int(-(-(a + 1) // 0.08) - s)
    for i in range(n):
        if t <= s + i < B:
            re = s + i
            break

else:
    n = int(-(-(b + 1) // 0.08) - t)
    for i in range(n):
        if s <= t + i < A:
            re = t + i
            break

if re != 0:
    print(re)
else:
    print(-1)

Submission status: Wrong Answer

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

A = int(-(-(a + 1) // 0.08))
B = int(-(-(b + 1) // 0.1))
s = int(a / 0.08)
t = int(b / 0.1)
n = int(-(-(a + 1) // 0.08) - s)
re = 0

#print("{}, {}, {}, {}, {}".format(A, B, s, t, n))

if s >= t:
    for i in range(n):
        if t <= s + i < B:
            re = s + i
            break

else:
    for i in range(n):
        if s <= t + i < A:
            re = t + i
            break

if re != 0:
    print(re)
else:
    print(-1)

Submission status: Wrong Answer

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

A = int(-(-(a + 1) // 0.08))
B = int(-(-(b + 1) // 0.1))
s = int(a / 0.08)
t = int(b / 0.1)
n = int(-(-(a + 1) // 0.08) - s)
re = 0

print("{}, {}, {}, {}, {}".format(A, B, s, t, n))

if s >= t:
    for i in range(n):
        if t <= s + i < B:
            re = s + i
            break

else:
    for i in range(n):
        if s <= t + i < A:
            re = t + i
            break

if re != 0:
    print(re)
else:
    print(-1)

Submission status: Wrong Answer

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

A = int(-(-(a + 1) / 0.08))
B = int(-(-(b + 1) / 0.1))
s = int(a / 0.08)
t = int(b / 0.1)
n = int(-(-(a + 1) // 0.08) - s)
re = 0


for i in range(n):
    if t <= s + i <= B:
        re = s + i
        break


if re != 0:
    print(int(re))
else:
    print(-1)

Submission status: Wrong Answer

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

A = int(-(-(a + 1) / 0.08))
B = int(-(-(b + 1) / 0.1))
s = int(a / 0.08)
t = int(b / 0.1)
n = int(-(-(a + 1) // 0.08) - s)
re = 0
print(n)

for i in range(n):
    if t <= s + i <= B:
        re = s + i
        break


if re != 0:
    print(int(re))
else:
    print(-1)

Submission status: Wrong Answer

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

A = int(-(-(a + 1) / 0.08))
B = int(-(-(b + 1) / 0.1))
s = int(a / 0.08)
t = int(b / 0.1)
n = int(-(-(a + 1) // 0.08) - s)
re = 0

for i in range(n):
    if t <= s + i < B:
        re = s + i
        break


if re != 0:
    print(int(re))
else:
    print(-1)

Submission status: Wrong Answer

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

A = (a + 1) / 0.08
B = (b + 1) / 0.1
s = a / 0.08
t = b / 0.1
n = ((a + 1) // 0.08) - s
re = 0

print(s)
print(t)

for i in range(int(n + 1)):
    if t <= s + i < B:
        re = s + i
        break


if re != 0:
    print(int(re))
else:
    print(-1)

Submission status: Wrong Answer

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

A = (a + 1) / 0.08
B = (b + 1) / 0.1
s = -(-a // 0.08)
t = -(-b // 0.1)
n = ((a + 1) // 0.08) - s
re = 0



for i in range(int(n + 1)):
    if t <= s + i < B:
        re = s + i
        break


if re != 0:
    print(re)
else:
    print(-1)

Submission status: Wrong Answer

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

A = (a + 1) / 0.08
B = (b + 1) / 0.1
s = -(-a // 0.08)
t = -(-b // 0.1)
n = ((a + 1) // 0.08) - s
re = 0



for i in range(int(n)):
    if t <= s + i < B:
        re = s + i
        break


if re != 0:
    print(re)
else:
    print(-1)

Submission status: Wrong Answer

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

if a != b:
    x = (b-a) * 50
    if math.floor(x*0.08) == a and math.floor(x*0.10) == b:
        print(x)
    else:
        print(-1)
elif a == 1:
    print(13)
elif a == 2:
    print(25)
elif a == 3:
    print(38)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import math
A, B = map(int, input().split())
b1 = B*10
b2 = b1 + 10

for i in range(b1, b2+1):
    if math.floor(i*0.08) == A:
        print(i)
        break

    if i == b2:
        print(-1)

Submission status: Wrong Answer

Solution code:
import math
A, B = map(int, input().split())
a1 = math.ceil(A*12.5)
a2 = math.floor((A+1)*12.5)
b1 = B*10
b2 = b1 + 10

if a2 < b1 or b2 < a1:
    print(-1)

elif a1 < b1:
    print(b1)

else:
    print(a1)

Submission status: Wrong Answer

Solution code:
import math
A, B = map(int, input().split())
a1 = math.ceil(A*100/8)
a2 = math.ceil((A+1)*100/8)
b1 = B*10
b2 = b1 + 10

if a2 < b1 or b2 < a1:
    print(-1)

elif a1 < b1:
    print(b1)

else:
    print(a1)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
l = []
for i in range(1, 10000):
  a = i * 0.08
  b = i * 0.1
  if a > A and b > B:
    break
  elif a < A+1 and B < b+1:
    l.append(i)

  
if len(l) == 0:
  print(-1)
else:
  print(max(l))

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
l = []
for i in range(1, 10000):
  a = i * 0.08
  b = i * 0.1
  if a > A and b > B:
    break
  elif a <= A and B <= b:
    l.append(i)

  
if len(l) == 0:
  print(-1)
else:
  print(max(l))

Submission status: Wrong Answer

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

ans = -1
for v in range(100*10):
  t8 = int(v * 0.08)
  t10 = int(v * 0.1)

  if t8 > a or t10 > b:
    break

  if t8 == a and t10 == b:
    ans = v
    break

print(ans)

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.1) == b:
		print(i)
		break
else:
	print(-1)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split(' '))
for i in range(1, 1500):
    if i * 8 // 100 == A and i * 10 // 100 == B:
        print(i)
        break

Submission status: Wrong Answer

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

a1 = (A+1)/0.08
a2 = A/0.08
b1 = (B+1)/0.1
b2 = B/0.1


if a2 >= b1 or b2 >= a1:
    print(-1)
else:
    print(int(max(a2, b2)))

Submission status: Wrong Answer

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

a1 = (A+1)/0.08
a2 = A/0.08
b1 = (B+1)/0.1
b2 = B/0.1
print(a1, a2, b1, b2)

if a2 >= b1 or b2 >= a1:
    print(-1)
else:
    print(int(max(a2, b2)))

Submission status: Wrong Answer

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

a1 = (A+1)/0.08
a2 = A/0.08
b1 = (B+1)/0.1
b2 = B/0.1


if a2 >= b1 or b2 >= a1:
    print('-1')
else:
    print(int(max(a2, b2)))

Submission status: Wrong Answer

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

Xbmin = 10 * B
Xbmax = 10 * B + 10
ans = -1

for x in range(Xbmin, Xbmax+1):
    if 100 * A <= x * 8 and  x * 8 <= 100 * (A + 1):
        ans = x
        break
    
print(ans)

Submission status: Wrong Answer

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

X = A * 100 / 8

if X * 10 // 100 == B:
    print(int(X))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
x = [int(x) for x in input().split()]
A, B = x[0], x[1]
a = int(100 * A / 8)
b = 10 * B
if a == b:
    print(a)
elif a > b and int(a * 0.1) == B:
    print(a)
elif b > a and int(b * 0.08) == A:
    print(b)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
x = [int(x) for x in input().split()]
A, B = x[0], x[1]
a = int(100 * A / 8)
b = 10 * B
if a == b:
    print(a)
elif a > b and int(a * 0.1) == B:
    print(a)
elif b > a == int(b * 0.08):
    print(b)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
if a*12.5 > (b+1) *10 or b*10 > (a+1)*12.5:
  print(-1)
else:
  m = max([a*12.5,b*10])
  M = min([(b+1) *10, (a+1)*12.5])
  i = m//1
  if m == i:
    print(int(i))
  else:
    print(int(i+1))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans1 = 0
ans2 = 0

for i in range(1, 10001):
  ans1 = i * 0.08
  ans2 = i * 0.10
  
  if (ans1) == A and int(ans2) == B:
    print(i)
    exit()
    
print(-1)

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
# 8% -> [a,a+1)
# 10% -> [b,b+1)
# max(a*100/8, b*10) <= 元の価格 < min((a+1)*100/8, (b+1)*10)
min8 = a*(100/8)
max8 = (a+1)*(100/8)
min10 = b*10
max10 = (b+1)*10
mi = int(max(min8, min10) - 0.001)
ma = int(min(max8, max10) - 0.001)
if mi > ma:
    ans = -1
else:
    ans = mi + 1
print(ans)

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
# 8% -> [a,a+1)
# 10% -> [b,b+1)
# max(a*100/8, b*10) <= 元の価格 < min((a+1)*100/8, (b+1)*10)
min8 = a*(100/8)
max8 = (a+1)*(100/8)
min10 = b*10
max10 = (b+1)*10
mi = int(max(min8, min10) - 0.001)
ma = int(min(max8, max10))
if mi >= ma:
    ans = -1
else:
    ans = mi + 1
print(ans)

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
# 8% -> [a,a+1)
# 10% -> [b,b+1)
# max(a*100/8, b*10) <= 元の価格 < min((a+1)*100/8, (b+1)*10)
min8 = a*(100/8)
max8 = (a+1)*(100/8)
min10 = b*10
max10 = (b+1)*10
mi = int(max(min8, min10) - 0.01)
ma = int(min(max8, max10))
if mi >= ma:
    ans = -1
else:
    ans = mi + 1
print(ans)

Submission status: Wrong Answer

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

xa = []
xb = []
a = 0
if A*12.5 != int(A*12.5):
    a = 1
for i in range(int(A*12.5) + a, int((A+1)*12.5)):
    xa.append(i)
for i in range(int(B*10), int((B+1)*10)):
    xb.append(i)

# print(xa, xb)

t = 0
for i in range(len(xa)):
    if xb.count(xa[i]) >= 1:
        print(xa[i])
        t += 1
    break
if t == 0:
    print(-1)

Submission status: Wrong Answer

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

xa = []
xb = []
for i in range(int(A*12.5), int((A+1)*12.5)):
    xa.append(i)
for i in range(int(B*10), int((B+1)*10)):
    xb.append(i)

#print(xa, xb)

t = 0
for i in range(len(xa)):
    if xb.count(xa[i]) >= 1:
        print(xa[i])
        t += 1
    break
if t == 0:
    print(-1)

Submission status: Wrong Answer

Solution code:
import math

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

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

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

ss = s8 & s10
print(min8, max8, min10, max10)
print(min(ss) if len(ss) >0 else -1)
print(238*0.08)

Submission status: Wrong Answer

Solution code:
import math

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

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

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

ss = s8 & s10
#print(min8, max8, min10, max10)
#print(l8, l10 )
print(min(ss) if len(ss) >0 else -1)
#print(137*0.08)

Submission status: Wrong Answer

Solution code:
import math

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

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

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

ss = s8 & s10
print(min(ss) if len(ss) >0 else -1)

Submission status: Wrong Answer

Solution code:
import math

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

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

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

ss = s8 & s10
print(min(ss) if len(ss) >0 else -1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

for num in range(1, 1000):
    if int(num * 0.08) == a and int(num * 0.1) == b:
        print(num)
        exit()
else:
    print(-1)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
a,b = [int(x) for x in input().split()]
res = -1
for i in range(20000):
  if i * 8 // 100 == a and i * 10 // 100:
    res = i
    break
print(res)

Submission status: Wrong Answer

Solution code:
a,b = [int(x) for x in input().split()]
res = -1
for i in range(20000):
  if i * 108 // 100 == a and i * 110 // 100:
    res = i
print(res)

Submission status: Wrong Answer

Solution code:
def main():
    a, b = map(int, input().split(" "))
    a1 = a*100/8
    a2 = (a+1)*100/8
    b1 = b*10
    b2 = (b+1)*10
    if a2<=b1 or b2<=a1:
        print(-1)
    else:
        print(int(max(a1,b1)))
        
    

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
def main():
    a, b = map(int, input().split(" "))
    a1 = a*100/8
    a2 = (a+1)*100/8
    b1 = b*10
    b2 = (b+1)*10
    if a2<=b1:
        print(-1)
    else:
        print(int(max(a1,b1)))
        
    

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
def main():
    a, b = map(int, input().split(" "))
    a1 = a*100/8
    a2 = (a+1)*100/8
    b1 = b*10
    b2 = (b+1)*10
    if a2<b1:
        print(-1)
    else:
        print(int(max(a1,b1)))
        
    

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

candidate = math.ceil(A * 12.5)
if math.floor(candidate * 0.1) != B :
  print(-1)
else :
  print(candidate)

Submission status: Wrong Answer

Solution code:
from math import floor

eight, ten = list(map(int, input().split()))

def func():
    for x in range(1, 101):
        if floor(x * 0.08) == eight and floor(x * 0.1) == ten:
            return x
    return -1

print(func())

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
for i in range(1, 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(1, 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 = [int(i) for i in input().split()]
if 12.5 * a >= 10 * (b + 1) or 12.5 * (a + 1) <= 10 * b:
  print(-1)
  exit()
print(int(max(12.5*a, 10*b)))

Submission status: Wrong Answer

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

for i in range(10**5):
    if (i*0.08) == a and (i*0.1):
        ans = i
        break

print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

answer = -1
for i in range(1,101):
  if int(i*8//100) == a and int(i*10//100) == b:
    answer = i
    break
    
print(answer)

Submission status: Wrong Answer

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

answer = -1
for i in range(1,101):
  print(i)
  if int(i*8//100) == a and int(i*10//100) == b:
    answer = i
    break
    
print(answer)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
from sys import exit
import math
ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

a,b = mi()

money = math.floor(a/0.08)

if math.floor(money*0.10) == b:
    print(money)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
c,d=int(a/float(0.08)),int(b/float(0.1))
if int(c*float(0.1))!=b:
  c=-1
if int(d*float(0.08))!=a:
  d=-1

if c==-1 and d==-1:
  print(-1)
elif c!=-1 and d==-1:
  print(c)
elif c==-1 and d!=-1:
  print(d)
else:
  print(min(c,d))

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
c,d=int(a/0.08),int(b/0.1)
if int(c*0.1)!=b:
  c=-1
if int(d*0.08)!=a:
  d=-1

if c==-1 and d==-1:
  print(-1)
elif c!=-1 and d==-1:
  print(int(c))
elif c==-1 and d!=-1:
  print(int(d))
else:
  print(min(c,d))

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
c,d=a/float(0.08),b/float(0.1)
if int(c*0.1)!=b:
  c=-1
if int(d*0.08)!=a:
  d=-1

if c==-1 and d==-1:
  print(-1)
elif c!=-1 and d==-1:
  print(int(c))
elif c==-1 and d!=-1:
  print(int(d))
else:
  print(min(int(c), int(d)))

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
c,d=a/float(0.08),b/float(0.1)
if int(c*0.1)!=b:
  c=-1
if int(d*0.08)!=a:
  d=-1
print(max(int(c),int(d)))

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
import math
if B-1<=(A*25/2)//10<=B+1:
    a=math.ceil(A*25/2)
    while a*8//100==A:
        a-=1
    print(a+1)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
import math
if 0<=B-A<=20:
    a=math.ceil(A*25/2)
    while a*8//100==A:
        a-=1
    print(a+1)
else:
    print(-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
import math
if (A*25/2)//10 == B:
    print(math.ceil(A*25/2))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
if (A*25/2)//10 == B:
    print(A*25//2)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import math

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

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

min_A, max_A = volume_A, volume_A
range_A = math.ceil(1 / 0.08)
min_B, max_B = volume_B, volume_B
range_B = math.ceil(1 / 0.1)

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

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

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

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

ans = ans_A & ans_B

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

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
flg=0
for i in range(101):
    c=int(i*1.08)-i
    d=int(i*1.1)-i
    if c==a and b==d:
        print(i)
        flg=1
        exit()
if flg==0:
    print(-1)

Submission status: Wrong Answer

Solution code:
a,b=input().split()
a=int(a)
b=int(b)
x=10
y=int(x*8/100)
z=int(x*10/100)
for i in range(10000):
  if y==a and z==b:
    print(x)
  else:
    x=x+1

Submission status: Wrong Answer

Solution code:
import math

def solve():
    A, B = [int(i) for i in input().split()]
    a = math.ceil(A / 0.08)
    b = math.floor(B / 0.1)
    for i in range(b, a + 1):
        if int(i * 0.08) == A and int(i * 0.1) == B:
            print(i)
            exit()
    print(-1)

if __name__ == "__main__":
    solve()

Submission status: Wrong Answer

Solution code:
def solve():
    A, B = [int(i) for i in input().split()]
    a = int(A / 0.08)
    b = int(B / 0.1)
    ans = -1
    for i in range(min(a, b), max(a, b) + 1):
        if int(i * 0.08) == A and int(i * 0.1) == B:
            ans = i if ans == -1 else min(ans, i)
    print(ans)

if __name__ == "__main__":
    solve()