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:
inputted = list(map(int, input().split()))
tax_price_a = inputted[0]
tax_price_b = inputted[1]

price_8 = int(tax_price_a / 0.08)
price_10 = int(tax_price_b / 0.10)

if tax_price_b == int(price_8 * 0.1):
    print(price_8)
else:
    print('-1')

Submission status: Wrong Answer

Solution code:
inputted = list(map(int, input().split()))
tax_price_a = inputted[0]
tax_price_b = inputted[1]

price_8 = int(tax_price_a / 0.08)
price_10 = int(tax_price_b / 0.10)
print(price_8, price_10)

if tax_price_b == int(price_8 * 0.1):
    print(price_8)
else:
    print('-1')

Submission status: Wrong Answer

Solution code:
inputted = list(map(int, input().split()))
tax_price_a = inputted[0]
tax_price_b = inputted[1]

price_8 = int(tax_price_a / 0.08)
price_10 = int(tax_price_b / 0.10)

if price_8 == price_10:
    print(price_8)
# elif tax_price_b == int(price_8 * 0.1) or tax_price_a == int(price_10 * 0.8):
elif tax_price_b == int(price_8 * 0.1):
    print(price_8)
else:
    print('-1')

Submission status: Wrong Answer

Solution code:
inputted = list(map(int, input().split()))
tax_price_a = inputted[0]
tax_price_b = inputted[1]

price_8 = int(tax_price_a / 0.08)
price_10 = int(tax_price_b / 0.10)

if price_8 == price_10:
    print(price_8)
# elif tax_price_b == int(price_8 * 0.1) or tax_price_a == int(price_10 * 0.8):
elif tax_price_b == int(price_8 * 0.1):
    print(price_8)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
inputted = list(map(int, input().split()))
tax_price_a = inputted[0]
tax_price_b = inputted[1]

price_8 = int(tax_price_a / 0.08)
price_10 = int(tax_price_b / 0.10)

if price_8 == price_10:
    print(price_8)
elif tax_price_b == int(price_8 * 0.1):
    print(price_8)
elif tax_price_a == int(price_10 * 0.8):
    print(price_10)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
inputted = list(map(int, input().split()))
tax_price_a = inputted[0]
tax_price_b = inputted[1]

price_8 = int(tax_price_a / 0.08)
price_10 = int(tax_price_b / 0.10)

if price_8 == price_10:
    print(price_8)
elif tax_price_b == int(price_8 * 0.1):
    print(price_8)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
inputted = list(map(int, input().split()))
tax_price_a = inputted[0]
tax_price_b = inputted[1]

price_8 = int(tax_price_a / 0.08)
price_10 = int(tax_price_b / 0.10)

if price_8 == price_10:
    print(price_8)
elif tax_price_a == int(price_8 * 0.1):
    print(price_8)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
x=[]
y=[]
x.append(25*a//2)
x.append((25*a+24)//2)
y.append(10*b)
y.append(10*b+9)
if x[1]<y[0] or y[1]<x[0]:
    print(-1)
else:
    print(max(x[0],y[0]))

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
num_a = int((100*a)//8)

if int(num_a//10) == b:
    print(num_a)
else:
    print(-1)

Submission status: Wrong Answer

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

oan=a*100/8
if a%2!=0:
    oan=int(oan)+1
else:
    oan=int(oan)

oax=(a+1)*100/8
if a%2!=0:
    oax=int(oax)+1
else:
    oax=int(oax)
obn=int(b*100/10)
obx=int((b+1)*100/10)
al=[]
bl=[]
for i in range (oan,oax+1):
    al.append(i)
for j in range (obn,obx+1):
    bl.append(j)
ans=10000
for i in range (oax-oan):
    if al[i] in bl:
        if al[i]<=ans:
            ans=al[i]
if ans==10000:
    print('-1')
else:
    print(str(ans))

Submission status: Wrong Answer

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

oan=a*100/8
if a%2!=0:
    oan=int(oan)+1
else:
    oan=int(oan)

oax=(a+1)*100/8
if a%2!=0:
    oax=int(oax)+1
else:
    oax=int(oax)
obn=int(b*100/10)
obx=int((b+1)*100/10)
al=[]
bl=[]
for i in range (oan,oax+1):
    al.append(i)
for j in range (obn,obx+1):
    bl.append(j)
ans=10000
for i in range (oax-oan+1):
    if al[i] in bl:
        if al[i]<=ans:
            ans=al[i]
if ans==10000:
    print('-1')
else:
    print(str(ans))

Submission status: Wrong Answer

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

oan=a*100/8
if a%2!=0:
    oan=int(oan)+1
else:
    oan=int(oan)

oax=(a+1)*100/8
if a%2!=0:
    oax=int(oax)+1
else:
    oax=int(oax)
obn=int(b*100/10)
obx=int((b+1)*100/10)
al=[]
bl=[]
for i in range (oan,oax):
    al.append(i)
for j in range (obn,obx):
    bl.append(j)
ans=10000
for i in range (oax-oan):
    if al[i] in bl:
        if al[i]<=ans:
            ans=al[i]
if ans==10000:
    print('-1')
else:
    print(str(ans))

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)
b_min = int(b / 0.1)
b_max = int((b + 1) / 0.1)

if a_max > b_min and b_max > a_min:
    print(max(a_min, b_min))
else:
    print('-1')

Submission status: Wrong Answer

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

a_min = a / 0.08
a_max = (a + 1) / 0.08
b_min = b / 0.1
b_max = (b + 1) / 0.1

if a_max > b_min and b_max > a_min:
    print(int(max(a_min, b_min)))
else:
    print('-1')

Submission status: Wrong Answer

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

a_min = a / 0.08
a_max = (a + 1) / 0.08
b_min = b / 0.1
b_max = (b + 1) / 0.1

if a_max < b_min or b_max < a_min:
    print('-1')
elif a_max >= b_min and b_max >= a_min:
    print(int(max(a_min, b_min)))

Submission status: Wrong Answer

Solution code:
import math

a,b = [int(i) for i in input().split()]
flag = False
for i in range(b*10+1,b*10+10):
  if math.floor(i * 0.08) == a:
    print(i)
    flag = True
    break
if not flag:
  print(-1)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
minprice = int(A * 12.5)
maxprice = (A+1) * 12.5
flag = 0
while(minprice < maxprice):
  tax = int(minprice * 0.1)
  if(tax == B):
    flag = 1
    print(minprice)
    break
  minprice += 1

if(flag == 0):
  print(-1)

Submission status: Wrong Answer

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

for i in range(1,101,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
import math

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

for i in range(1,101,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
import math

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

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

print(-1)

Submission status: Wrong Answer

Solution code:
import sys
import math

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

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

print(-1)

Submission status: Wrong Answer

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

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

print(-1)

Submission status: Wrong Answer

Solution code:
import math

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

    ans = -1

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

main()

Submission status: Wrong Answer

Solution code:
import math
a,b=map(int,input().split())
x=[]
aa=math.ceil(a/0.08)
bb=math.floor((a+1)/0.08)+1
for i in range(aa,bb):
  x.append(i)
#print(x)
f=0
for i in x:
  if math.floor(0.1*i)==b and f==0:
    print(i)
    f=1
    
if f==0:
  print(-1)

Submission status: Wrong Answer

Solution code:
import math
a,b=map(int,input().split())
x=[]
aa=math.ceil(a/0.08)
bb=math.floor((a+1)/0.08)+1
for i in range(aa,bb):
  x.append(i)
#print(x)
f=0
for i in x:
  if (0.1*i)//1==b and f==0:
    print(i)
    f=1
    
if f==0:
  print(-1)

Submission status: Wrong Answer

Solution code:
import math
A,B =list(map(int,input().split()))
fr = 0
for i in range(300):
    if math.floor(i * 0.08) == A and math.floor(i * 0.1) == B:
        print(i)
        fr += 1
        break
if fr == 0:
    print(-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

A,B=map(int, input().split())
Amin=int(math.ceil(A/0.08))
if A%2==0:
    Amax=int(math.floor((A+1)/0.08))
else:
    Amax=int(math.floor((A+1)/0.08)-1)
Bmin=int(math.ceil(B/0.1))
Bmax=int(math.floor((B+1)/0.1)-1)
if Amax<Bmin or Bmax<Amin:
    ans=-1
else:
    ans=max(Amin,Bmin)

print(Amin)
print(Amax)
print(Bmin)
print(Bmax)
print(ans)

Submission status: Wrong Answer

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

#Aから判断される、元値として適切な値は?
Akagen=math.ceil(A*12.5 )
Azyogen=math.ceil((A+1)*12.5)
#B
Bkagen=math.ceil(B*10 )
Bzyogen=math.ceil((B+1)*10-1 )

#print("{} {} {} {} ".format(Akagen,Azyogen,Bkagen,Bzyogen))
if Azyogen<Bkagen or Bzyogen<Akagen:
    print("-1")
    exit()
print(Akagen if Akagen>Bkagen else Bkagen)

Submission status: Wrong Answer

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

#Aから判断される、元値として適切な値は?
Akagen=math.ceil(A*12.5 )
Azyogen=math.ceil((A+1)*12.5)
#B
Bkagen=math.ceil(B*10 )
Bzyogen=math.ceil((B+1)*10-1 )

print("{} {} {} {} ".format(Akagen,Azyogen,Bkagen,Bzyogen))
if Azyogen<Bkagen or Bzyogen<Akagen:
    print("-1")
    exit()
print(Akagen if Akagen>Bkagen else Bkagen)

Submission status: Wrong Answer

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

#Aから判断される、元値として適切な値は?
Akagen=math.ceil(A*12.5 )
Azyogen=math.ceil((A+1)*12.5)
#B
Bkagen=math.ceil(B*10 )
Bzyogen=math.ceil((B+1)*10-1 )

#print("{} {} {} {} ".format(Akagen,Azyogen,Bkagen,Bzyogen))
if Azyogen<Bkagen:
    print("-1")
    exit()
print(Akagen if Akagen>Bkagen else Bkagen)

Submission status: Wrong Answer

Solution code:
import sys
A,B = map(int,input().split())
if A<13:
  print(-1)
  sys.exit()
last = 2000

for i in range(last):
  mA = int(i*0.08)
  mB = int(i*0.10)

  
  if mA==A and mB==B:
    print(i)
    break
  if i==last-1:
    print("-1")

Submission status: Wrong Answer

Solution code:
import sys
A,B = map(int,input().split())
if A<13:
  print(-1)
  sys.exit()
last = 2000

for i in range(last):
  mA = int(i*0.08)
  mB = int(i*0.10)
  print(mA,mB,i)

  
  if mA==A and mB==B:
    print("match")
    print(i)
    break
  if i==last-1:
    print("-1")

Submission status: Wrong Answer

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

last = 2000
for i in range(last):
  mA = int(i*0.08)
  mB = int(i*0.10)

  
  if mA==A and mB==B:
    print("match")
    print(i)
    break
  if i==last-1:
    print("-1")

Submission status: Wrong Answer

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

x, y = A / 0.08, B / 0.1

if math.floor(x) == math.floor(y):
  print(int(x))
  exit(0)
if x > y:
  tmp = math.floor(x * 0.1)
  if tmp == B:
    print(int(x))
    exit(0)
else:
  tmp = math.floor(y * 0.1)
  if tmp == A:
    print(int(y))
    exit(0)

print(-1)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
x = (a / 0.08)
y = (b / 0.1)
while x*0.08 > float(a):
    x -= 1
while y*0.1 > float(b):
    y -= 1
if int(x*0.08) == a and int(y*0.1) == b:
    print(max(int(x), int(y)))
else:
    print('-1')

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
x = (a / 0.08)
y = (b / 0.1)
a2 = int(max(x, y)) * 0.08
b2 = int(max(x, y)) * 0.1
a3 = int(min(x, y)) * 0.08
b3 = int(min(x, y)) * 0.1
if int(a3) == a and int(b3) == b:
    print(int(min(x, y)))
elif int(a2) == a and int(b2) == b:
    print(int(max(x, y)))
else:
    print('-1')

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
x = (a / 0.08)
y = (b / 0.1)
a2 = int(max(x, y)) *0.08
b2 = int(max(x, y)) * 0.1
if int(a2) == a and int(b2) == b:
    print(int(max(x, y)))
else:
    print('-1')

Submission status: Wrong Answer

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

x=A*12.5
y=B*10

if x>=y and int(x*0.1)==B:
    print(int(max(x,y)))
else:
    print(-1)

Submission status: Wrong Answer

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

x=A*12.5
y=B*10

if x>=y:
    print(int(max(x,y)))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
A,B = list(map(int,input().split()))
z=0
for x in range(int(25*A/2),int(25*(A+1)/2)):
    for y in range(int(10*B),int(10*(B+1))):
        if x==y:
            print(x)
            break
        else:
            z += 1
    if x==y:
        break
if z==(int(25*(A+1)/2)-int(25*A/2))*(int(10*(B+1))-int(10*B)):
    
    print(-1)

Submission status: Wrong Answer

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

Amin = A/0.08 
Amax = (A+1)/0.08
Bmin = B/0.1 
Bmax = (B+1)/0.1

ans = 0
if Amax <= Bmin or Amin >= Bmax:
    ans = -1
else:
    if Bmin <= Amin:
        ans = math.floor(Amin)
    if Amin <= Bmin:
        ans =math.floor(Bmin)

print(ans)

Submission status: Wrong Answer

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

count = 0
for n in range(10000):
    za = n*0.08
    zb = n*0.1
    count += 1
    if A == za and B == zb:
        print(n)
        break


if count == 10000:
    print(-1)

Submission status: Wrong Answer

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

for i in range(1100):
    if int(i*0.8)==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())

Amin = A/0.08
Amax = (A+1)/0.08
Bmin = B/0.1
Bmax = (B+1)/0.1

ans = 0
if Amax <= Bmin or Amin >= Bmax:
    ans = -1
else:
    if Bmin <= Amin:
        ans = Amin
    if Amin <= Bmin:
        ans = Bmin

print(ans)

Submission status: Wrong Answer

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

Amin = A/0.08
Amax = (A+1)/0.08
Bmin = B/0.1
Bmax = (B+1)/0.1

ans = 0
if Amax <= Bmin or Amin > Bmax:
    ans = -1
else:
    if Bmin <= Amin:
        ans = Amin
    if Amin <= Bmin:
        ans = Bmin

print(ans)

Submission status: Wrong Answer

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

Amin = A/0.08
Amax = (A+1)/0.08
Bmin = B/0.1
Bmax = (B+1)/0.1

ans = 0
if Amax <= Bmin or Amin > Bmax:
    ans = -1
if Bmin <= Amin and Bmax > Amin:
    ans = Amin
if Amin <= Bmin and Bmax < Amin:
    ans = Bmin

print(ans)

Submission status: Wrong Answer

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

Flag = False

price1 = int(A // 0.08) + 1
price2 = int(B // 0.1) + 1

for i in range(price1,price2+1):
  if int(i * 0.08) == A and int(i *0.1) == B:
    Flag = True
    price = i
    break

if Flag == True:
  print(price)
else:
  print(-1)

Submission status: Wrong Answer

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

one = A/0.08
two = (A+1)/0.08
three = B/0.1
four = (B+1)/0.1

print(one, two, three, four)


if two < three or one > four:
    kai = -1
if three <= one and one <= four <= two:
    kai = one
if one < three <=two:
    kai = three

print(kai)

Submission status: Wrong Answer

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

# ans * 0.08 = a -> a / 0.08

a_min = (a * 100) // 8
a_max = (((a+1) * 100) // 8) - 1
b_min = b * 10
b_max = ((b+1) * 10) - 1

lr = [a_min, a_max, b_min, b_max]
lr.sort()

if lr[0] == a_min and lr[1] == b_min:
    print(b_min)
elif lr[0] == b_min and lr[1] == a_min:
    print(a_min)
else:
    print(-1)

Submission status: Wrong Answer

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

# ans * 0.08 = a -> a / 0.08

a_min = (a * 100) // 8
a_max = (((a+1) * 100) // 8) - 1
b_min = b * 10
b_max = ((b+1) * 10) - 1

if a_min <= b_min and b_min <= a_max:
    print(b_min)
elif a_min > b_min and b_max >= a_min:
    print(a_min)
else:
    print(-1)

Submission status: Wrong Answer

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

# ans * 0.08 = a -> a / 0.08

a_ansmin = (a * 100) // 8
a_ansmax = (((a+1) * 100) // 8) - 1
b_ansmin = b * 10
b_ansmax = ((b+1) * 10) - 1

if a_ansmax >= b_ansmin and a_ansmin <= b_ansmax:
    ansmin = max(a_ansmin, b_ansmin)
    print(ansmin)
else:
    print(-1)

Submission status: Wrong Answer

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

# ans * 0.08 = a -> a / 0.08

a_ansmin = (a * 100) // 8
a_ansmax = (((a+1) * 100) // 8) - 1
b_ansmin = b * 10
b_ansmax = ((b+1) * 10) - 1

if a_ansmax >= b_ansmin:
    ansmin = max(a_ansmin, b_ansmin)
    print(ansmin)
else:
    print(-1)

Submission status: Wrong Answer

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

if max([100/8*A,10*B])<=min([100/8*(A+1),10*(B+1)]):
    print(math.ceil(max([100/8*A,10*B])))
else:
    print(-1)

Submission status: Wrong Answer

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

if max([100/8*A,10*B])<=min([100/8*(A+1),10*(B+1)]):
    print(int(max([100/8*A,10*B])))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import math
A, B = map(int, input().split())
 
lower = math.ceil(max(A/0.08, B/0.1))
upper = math.ceil(min((A+1)/0.08, (B+1)/0.1))
 
if lower <= upper:
    print(lower)
else:
    print(-1)

Submission status: Wrong Answer

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

lower = math.ceil(max(A/0.08, B/0.1))
upper = math.floor(min((A+1)/0.08, (B+1)/0.1))

if lower <= upper:
    print(lower)
else:
    print(-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
A, B=map(int,input().split())
for i in range(1000):
    if math.floor(i*0.08)==A and math.floor(i*0.1)==B:
        print(i)
        exit()

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
a_interval = [a/0.08,(a+1)/0.08]
b_interval = [b/0.1,(b+1)/0.1]
a_interval = [x for x in range(int(a_interval[0]),int(a_interval[1])+1) if (x < a_interval[1])&(x > a_interval[0])]
b_interval = [x for x in range(int(b_interval[0]),int(b_interval[1])+1) if (x < b_interval[1])&(x > b_interval[0])]
tmp = set(a_interval) & set(b_interval)
if tmp == set():
    print(-1)
else:
    print(min(tmp))

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
a_interval = [a/0.08,(a+1)/0.08]
b_interval = [b/0.1,(b+1)/0.1]
a_interval = [x for x in range(int(a_interval[0]),int(a_interval[1])) if x < a_interval[1]]
b_interval = [x for x in range(int(b_interval[0]),int(b_interval[1])) if x < b_interval[1]]
tmp = set(a_interval) & set(b_interval)
if tmp == set():
    print(-1)
else:
    print(min(tmp))

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
a_interval = list(map(int,[a/0.08,(a+1)/0.08]))
b_interval = list(map(int,[b/0.1,(b+1)/0.1]))
a_interval = [x for x in range(a_interval[0],a_interval[1]+1)]
b_interval = [x for x in range(b_interval[0],b_interval[1]+1)]
tmp = set(a_interval) & set(b_interval)
if tmp == set():
    print(-1)
else:
    print(min(tmp))

Submission status: Wrong Answer

Solution code:
from math import floor

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

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

A = a[0]
B = a[1]
x = int(100/8*A)

if A == B:
    while 1:
        if int(x*0.08)== int(x*0.10):
            print(x)
            break
        x+=1
        if x > 10000:
            print('-1')
            break
elif A != B:
    if int(100/8*A) == int(100/10*B):
        print(50*(B-A))
    else:
        print('-1')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
A = 12.5*A
B = 10*B
if (A-12.5 < B < A+12.5) and (B-10 < A < B+10):
    print(int(max(A, B)))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
expectedEight,expectedTen= map(int,input().split())
answerEight=int(expectedEight/(.08))
print(answerEight if answerEight>=((expectedTen)/(.1)) and answerEight<=((expectedTen+.9999999999)/(.1)) else -1)

Submission status: Wrong Answer

Solution code:
expectedEight,expectedTen= map(int,input().split())
answerEight=int(expectedEight/(.08))
print(answerEight if answerEight>=((expectedTen)/(.1)) and answerEight<=((expectedTen+.999)/(.1)) else -1)

Submission status: Wrong Answer

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

Amin = -(-A*100//8)
Bmax = (B+1)*100//10
if Amin > Bmax:
  print(-1)
else:
  print(Amin)

Submission status: Wrong Answer

Solution code:
A,B = map(int, input().split())
A_answer = []
B_answer = []
answer = [9999]

for i in range(10):
  A_place = A / 0.08
  A_answer.append(int(A_place))
  A += 0.1

for i in range(10):
  B_place = B / 0.1
  B_answer.append(int(B_place))
  B += 0.1

for i in A_answer:
  if i in B_answer:
    answer.append(i)
  else:
    pass
if answer == 9999:
  print(-1)
else:
  print(min(answer))

Submission status: Wrong Answer

Solution code:
A,B = map(int, input().split())
A_place = A / 0.08
B_place = B / 0.1

if int(A_place) == int(B_place):
  print(A_place)
else:
  print(-1)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
from math import floor, ceil
a, b = map(int, input().split())
low = floor(a / 0.09)
high = ceil(a / 0.08)
for i in range(low, high + 1):
    if b == floor(i * 0.10) and a == floor(i * 0.08):
        print(i)
        break
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
from math import floor, ceil
a, b = map(int, input().split())
low = floor(a / 0.08)
high = ceil(a / 0.09)
for i in range(low, high + 1):
    if b == floor(i * 0.10):
        print(i)
        break
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
for i in range(1000):
    if A == int(i * 0.08) and B == int(i * 0.10):
        print(i)
        exit(0)
print(-1)

Submission status: Wrong Answer

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

for i in range(1010):
  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 sys
import math

from collections import defaultdict
from collections import deque
def load(vtype=int):
    return vtype(input().strip())
def load_list(seplator=" ", vtype=int):
    return [vtype(v) for v in input().strip().split(seplator)]
def exit():
    import sys
    sys.exit(0)
def perm_sub(li, used):
    if len(li) == len(used):
        return [deque()]
    k = []
    for i in range(len(li)):
        if i in used:
            continue
        used.add(i)
        sub_list = perm_sub(li, used)
        for sub in sub_list:
            sub.appendleft(li[i])
        k.extend(sub_list)
        used.discard(i)
    return k
def perm_li(li):
    return perm_sub(li, set())
def perm_n(n):
    return perm_sub(list(range(n)), set())
def join_i(li, sep=""):
    return sep.join([str(e) for e in li])
def li2n(li):
    n, base = 0, 1
    for i in range(len(li)-1, -1, -1):
        n += li[i] * base
        base *= 10
    return n
def sli2ili(li):
    return [int(s) for s in li] 
def prime_list(n):
    li = [i for i in range(2, n+1)]
    for i in range(len(li)):
        if li[i] >= int(math.sqrt(n)):
            break
        if li[i] == -1:
            continue
        for j in range(i+1, len(li)):
            if li[j] % li[i] == 0:
                li[j] = -1
    return [n for n in li if n != -1]
def gcd(a, b):
    a, b = max(a, b), min(a, b)
    while True:
        r = a % b
        if r == 0: return b
        a, b = b, r
def lcm(a, b):
    return int(a * b / gcd(a,b))
def all_subset(li):
    s = []
    n = len(li)
    for bit in range(0, (1<<(n+1))):
        ss = set()
        for i in range(0, n):
            if (bit & (1 << i)):
                ss.add(li[i])
        s.append(ss)
    return s
def factorial(n):
    if n == 1:
        return 1
    return n * factorial(n-1)
def mCn(m, n):
    def factorial_ntimes(m, n):
        r = 1
        while n:
            r *= m
            m -= 1
            n -= 1
        return r
    return int(factorial_ntimes(m, n) / factorial(n))

A, B = load_list()

a1 = int(A * 100 / 8)
a2 = int((A+1) * 100 / 8)
b1 = int(B * 100 / 10)
b2 = int((B+1) * 100 / 10)

for i in range(b1, b2+1):
    if i >= a1 and i <= a2:
        print(i)
        exit()
print(-1)

Submission status: Wrong Answer

Solution code:
import math
a,b = map(int, input().split())
 
if int(a*1.25)==b or math.ceil(a*1.25)==b:
  print(math.ceil(a/0.08))
else:
  print(-1)

Submission status: Wrong Answer

Solution code:
import math
a,b = map(int, input().split())
 
if int(a*1.25)==b:
  print(math.ceil(a/0.08))
else:
  print(-1)

Submission status: Wrong Answer

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

if int(a*1.25)==b:
  print(int(a/0.08))
else:
  print(-1)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
b1m = a / 0.08
b1s = (a + 1) / 0.08
b2m = b * 10.0
b2s = (b + 1) * 10.0

m = max(b1m, b2m)
s = min(b1s, b2s)

if m < s:
    print(int(m))
else:
    print(-1)

Submission status: Wrong Answer

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

Amin=A*100//8
Amax=(A+1)*100//8
if Amax*8/100 == Amax*8//100:
    Amax-=1

Bmin=B*10
Bmax=(B+1)*10
if Bmax/10 == Bmax//10:
    Bmax-=1

ans=-1
flag=False
for a in range(Amin,Amax+1):
    for b in range(Bmin,Bmax+1):
        if a==b:
            ans=a
            flag=True
            break
    if flag:
        break
print(ans)

Submission status: Wrong Answer

Solution code:
import math
A,B = map(int,input().split())
sol1 = int(A/0.08)
sol2 = int(B/0.10)
ans = lambda x1,x2 : x1 if x1 == x2 else -1
flagA = True
flagB = True
while True:
    if(sol1 * 0.08 <= A and flagA):
        flagA = False
        if(math.floor(sol1*0.10) == B):
            print(sol1)
            break
    sol1 -= 1
    if(sol2 * 0.10 <= B and flagB):
        flagB = False
        if(math.floor(sol2*0.08) == A):
            print(sol2)
            break
    if(not flagA and not flagB):
        print(-1)
        break
    sol2 -= 1

Submission status: Wrong Answer

Solution code:
import math
A,B = map(int,input().split())
sol1 = int(A/0.08)
sol2 = int(B/0.10)
ans = lambda x1,x2 : x1 if x1 == x2 else -1
flagA = True
flagB = True
while True:
    if(sol1 * 0.08 <= A and flagA):
        flagA = False
        if(math.floor(sol1*0.10) == B):
            print(sol1)
            break
    sol1 -= 1
    if(sol2 * 0.10 <= B and flagB):
        flagB = False
        if(math.floor(sol2*0.08) == A):
            print(sol2)
            break
    if(not flagA and not flagB):
        print(-1)
        break
    sol2 -= 1
    print(sol1,sol2)

Submission status: Wrong Answer

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

Amin=A*8//100
Amax=(A+1)*8//100
if (A+1)%0.08==0:
    Amax-=1

Bmin=B*10
Bmax=(B+1)*10
if (B+1)%0.1==0:
    Bmax-=1

ans=-1
flag=False
for a in range(Amin,Amax+1):
    for b in range(Bmin,Bmax+1):
        if a==b:
            ans=a
            flag=True
            break
    if flag:
        break
print(ans)

Submission status: Wrong Answer

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

Amin=math.floor(A/0.08)
Amax=math.floor((A+1)/0.08)
if (A+1)%1.08==0:
    Amax-=1

Bmin=B*10
Bmax=(B+1)*10
if (B+1)%0.1==0:
    Bmax-=1

ans=-1
flag=False
for a in range(Amin,Amax+1):
    for b in range(Bmin,Bmax+1):
        if a==b:
            ans=a
            flag=True
            break
    if flag:
        break
print(ans)

Submission status: Wrong Answer

Solution code:
import math
A,B = map(int,input().split())
sol1 = int(A/0.08)
sol2 = int(B/0.10)
ans = lambda x1,x2 : x1 if x1 == x2 else -1
while True:
    if(sol1 * 0.08 <= A):
        if(math.floor(sol1*0.10) == B):
            print(sol1)
        else:
            print(-1)
        break
    sol1 -= 1
    if(sol2 * 0.10 <= B):
        if(math.floor(sol2*0.08) == A):
            print(sol2)
        else:
            print(-1)
        break
    sol2 -= 1

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
sol1 = A/0.08
sol2 = B/0.10
ans = lambda x1,x2 : x1 if x1 == x2 else -1
print(int(ans(sol1,sol2)))

Submission status: Wrong Answer

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

taxfree = A/0.08
while taxfree*0.08 < A+1:
    if B <= taxfree*0.1 < B+1:
        ans.append(int(taxfree))
        break
    taxfree += 1

taxfree = B/0.1
while taxfree*0.1 < B+1:
    if B <= taxfree*0.08 < A+1:
        ans.append(int(taxfree))
        break
    taxfree += 1

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

Submission status: Wrong Answer

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

while taxfree*0.08 < A+1:
    if B <= taxfree*0.1 < B+1:
        print(int(taxfree))
        exit()
    taxfree += 1

print(-1)

Submission status: Wrong Answer

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

A = a[0]
B = a[1]
x = int(100/8*A)

if A == B:
    while 1:
        if int(x*0.08)== int(x*0.10):
            print(x)
            break
        x+=1
        if x > 10000:
            print(-1)
            break
elif A != B:
    if int(100/8*A) == int(100/10*B):
        print(50*(B-A))
    else:
        print(-1)

Submission status: Wrong Answer

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

A = a[0]
B = a[1]
x = int(100/8*A)

if A == B:
    while 1:
        if int(x*0.08)== int(x*0.10):
            print(x)
            break
        x+=1
else:
    print(50*(B-A))