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:
# 未完成
import math
a = list(map(int, input().split()))

x = [a[0] / 0.08, (a[0] + 1) / 0.08]
y = [a[1] / 0.1, (a[1] + 1) / 0.1]
ans = [max([a[0] / 0.08, a[1] / 0.1]),
       min([(a[0] + 1) / 0.08, (a[1] + 1) / 0.1])]
if ((a[1] + 1) / 0.1 > (a[1] + 1) / 0.1) or (a[1] / 0.1 > (a[0] + 1) / 0.08):
    print(-1)
else:
    if math.ceil(ans[0]) > ans[1]:
        print(-1)
    else:
        print(math.ceil(ans[0]))

Submission status: Wrong Answer

Solution code:
a = list(map(int, input().split()))
ans = [max([a[0] / 0.08, a[1] / 0.1]),
       min([(a[0] + 1) / 0.08, (a[1] + 1) / 0.1])]
if ((a[1] + 1) / 0.1 > (a[1] + 1) / 0.1) or (a[1] / 0.1 > (a[0] + 1) / 0.08):
    print(-1)
else:
    if int(ans[0]-0.1) + 1 > ans[1]:
        print(-1)
    else:
        print(int(ans[0]-0.1) + 1)

Submission status: Wrong Answer

Solution code:
x, y = list(map(int,input().split()))
X = x//0.08
Y = y//0.1
if X == Y:
  print(X)
else:
  print(-1)

Submission status: Wrong Answer

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

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

print(-1)

Submission status: Wrong Answer

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

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

print(-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
price = (a // 0.09) + 1
while (price * 0.08) <= a:
    if (price * 0.1) // 1 == b:
        print(int(price))
        exit()
    price += 1
print('-1')

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
price = (a // 0.08)
while (price * 0.09) > a:
    if (price * 0.1) //1== b:
        print(int(price))
        exit()
    price += 1
print('-1')

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
price = (a / 0.08)
while (price * 0.08) // 1 == a:
    if (price * 0.1) // 1 == b:
        print(int(price))
        exit()
    price += 1
print('-1')

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
price = (a / 0.08)
while (price*0.08)//1 <= a:
    if (price * 0.1) // 1 == b:
        print(int(price))
        exit()
    price += 1
print('-1')

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
price = (a / 0.09) // 1
while price <= a / 0.08:
    # print(price)
    if (price * 0.1) // 1 == b:
        break
    price += 1
if price <= a / 0.08:
    print(int(price))
else:
    print('-1')

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
price = (a / 0.09) // 1
while price <= a / 0.08:
    # print(price)
    if (price * 0.1) // 1 == b:
        break
    price += 1
if price <= a / 0.08:
    print(int(price))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
price = (a / 0.08) // 1
while price > a / 0.09:
    # print(price)
    if (price * 0.1) // 1 == b:
        break
    price += 1
if price > a / 0.09:
    print(int(price))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
price = (a / 0.08) // 1
while price < a / 0.09:
    print(price)
    if (price * 0.1) // 1 == b:
        break
    price += 1
if price<a/0.09:
    print(price)
else:
    print(-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

A_price = (A / 8) * 100

while num < 1252:
  X = (num / 100) * 10
  if B == int(X) and int(A_price) == num:
    print(num)
    break
  elif num == 1251:
    print(-1)
    break
  else:
    num += 1

Submission status: Wrong Answer

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

A_price = (A / 8) * 100
B_price = (B / 10) * 100

while num < 1252:
  X = (num / 100) * 10
  if B == int(X) and int(A_price) == num:
    print(int(A_price))
    break
  elif num == 1251:
    print(-1)
    break
  else:
    num += 1

Submission status: Wrong Answer

Solution code:
A, B = [int(i) for i in input().rstrip().split(' ')]
_8 = 0.08
_10 = 0.10

retA = int(A / _8)
retB = int(B / _10)

if retA == retB:
    print(retA)
else:
    maxs = max(retA, retB)
    retA = int(maxs * _8 + .9)
    retB = int(maxs * _10 + .9)
    print(retA) if retA == retB else print(-1)

Submission status: Wrong Answer

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

A_price = (A / 8) * 100
B_price = (B / 10) * 100

while num < 1252:
  X = (num / 100) * 10
  if A == int(X) and int(B_price) == num:
    print(int(A_price))
    break
  elif num == 1251:
    print(-1)
    break
  else:
    num += 1

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
 
n = int(a / 0.08)
m = int(b / 0.1)
if not n == m:
  print(-1)
else:
  print(n)

Submission status: Wrong Answer

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

n = a // 0.08
m = b // 0.1
if not n == m:
  print(-1)
else:
  print(n)

Submission status: Wrong Answer

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

A_price = (A / 8) * 100

while num < 1252:
  X = (num / 100) * 10
  if A == int(X) and int(A_price) == num:
    print(int(A_price))
    break
  elif num == 1251:
    print(-1)
    break
  else:
    num += 1

Submission status: Wrong Answer

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

A_price = A / 8 * 100

while num < 1252:
  X = num / 100 * 10
  if A == int(X):
    print(int(A_price))
    break
  elif num == 1251:
    print(-1)
    break
  else:
    num += 1

Submission status: Wrong Answer

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

A_price = A / 8 * 100

while num < 1251:
  X = num / 100 * 10
  if A == int(X):
    print(int(A_price))
    break
  elif num == 1251:
    print("-1")
    break
  else:
    num += 1

Submission status: Wrong Answer

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

A_price = A / 8 * 100

while num < 1251:
  X = num / 100 * 10
  if A == int(X):
    print(int(A_price))
    break
  elif num == 1251:
    print(-1)
    break
  else:
    num += 1

Submission status: Wrong Answer

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

A_price = A / 8 * 100

while num < 1251:
  X = num / 100 * 10
  Y = int(X)
  if B == Y:
    print(int(A_price))
    break
  elif num == 1251:
    print(-1)
    break
  else:
    num += 1

Submission status: Wrong Answer

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

A_price = A / 8 * 100

while num < 1251:
  X = num / 100 * 10
  if B == int(X):
    print(int(A_price))
    break
  elif num == 1251:
    print(-1)
    break
  else:
    num += 1

Submission status: Wrong Answer

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

A_price = A / 8 * 100

while num < 1251:
  if B == num / 100 * 10:
    print(int(A_price))
    break
  elif num == 1251:
    print(-1)
    break
  else:
    num += 1

Submission status: Wrong Answer

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

A_price = A / 8 * 100
while num < 1010:
  X = num / 100 * 10
  if int(X) == B:
    print(int(A_price))
    break
  elif num == 1010:
    print(-1)
    break
  else:
    num += 1

Submission status: Wrong Answer

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

A_price = A / 8 * 100
while num < 1010:
  X = num / 100 * 10
  if int(X) == B:
    print(int(A_price))
    break
  elif num == 1100:
    print(-1)
    break
  else:
    num += 1

Submission status: Wrong Answer

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

A_price = A / 8 * 100
while num < 1100:
  X = num / 100 * 10
  if int(X) == B:
    print(int(A_price))
    break
  elif num == 1100:
    print(-1)
    break
  else:
    num += 1

Submission status: Wrong Answer

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

A_price = A / 8 * 100
while num < 1100:
  X = num / 100 * 1
  if B == int(X):
    print(int(A_price))
    break
  elif num == 1100:
    print(-1)
    break
  else:
    num += 1

Submission status: Wrong Answer

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

A_price = A / 8 * 100
while num < 1100:
  if B == num / 100 * 10:
    print(int(A_price))
    break
  elif num == 1100:
    print(-1)
  else:
    num += 1

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
 
A_price = A / 8 * 100
 
B_price = B / 10 * 100
 
if int(A_price) == int(B_price):
    print(int(A_price))
else:
    X = int(A_price) / 100 * 10
    Y = int(B_price) / 100 * 8
    if B == int(X):
        print(int(A_price))
    elif A == int(Y):
        print(int(B_price))
    else:
        print(-1)

Submission status: Wrong Answer

Solution code:
import sys
import os
import math

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    A, B = il()

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

    print(-1)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys
import os
import math

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    A, B = il()

    for n in range(10, 1000):
        if int(n * 0.08) == A and int(n * 0.1) == B:
            print(n)
            exit()

    print(-1)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import math
import sys
A, B = [int(i) for i in input().split()]
for i in range(math.ceil(12.5 * A), math.floor(12.5 * (A + 1))+1):
    if math.floor(i//10) == B:
        print(i)
        sys.exit()
print(-1)

Submission status: Wrong Answer

Solution code:
A, B = [int(i) for i in input().split()]
if B >= A and 4*(B-A) == A and 5*(B-A) == B:
  print(50*(B-A))
else:
  print(-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

a=int(A/0.08 + 0.5)
b=int(B/0.1 + 0.5)
out =0
print(a,b)
if a>=b:
    if math.floor(a*0.1) != B:
        out = -1
    else:
        out = int(a)
elif a<b:
    if math.floor(b*0.08) != A:
        out = -1
    else:
        out = int(b)
print(out)

Submission status: Wrong Answer

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

a=math.floor(A/0.08)
b=math.floor(B/0.1)
out =0
if a>=b:
    if math.floor(a*0.1) != B:
        out = -1
    else:
        out = a
elif a<b:
    if math.floor(b*0.08) != A:
        out = -1
    else:
        out = b
print(out)

Submission status: Wrong Answer

Solution code:
A, B = (int(x) for x in input().split())
A_min = A / 0.08
A_max = (A + 1) / 0.08
B_min = int(B // 0.10)
B_max = int((B + 1) // 0.10)
ans = -1

for i in range(B_min, B_max):
    if i >= A_min and i < A_max:
        ans = i
        break

print(ans)

Submission status: Wrong Answer

Solution code:
A,B = map(int, input().split())
X = int(A/0.08)
Y = int(B/0.1)
min = 0
if X == Y:
    min = X
elif X > Y:
    if int(X*0.1) == B:
        min = X
    else :
        min = -1
elif X < Y:
    if int(Y*0.08) == A:
        min = Y
    else :
        min = -1

print(min)

Submission status: Wrong Answer

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

min_a = int(a // 0.08) + 1
max_a = int((a + 1) // 0.08)
min_b = int(b // 0.1) + 1
max_b = int(b // 0.1) + 1

if max_a < min_b or max_b < min_a:
    print(-1)
else:
    print(min(min_a, min_b))

Submission status: Wrong Answer

Solution code:
a,b = [int(c) for c in input().split()]
maxa = (a+1) / 0.08
maxb = (b+1) / 0.1
mina = a / 0.08
minb = b / 0.1
mmax = int(min(maxa,maxb))
mmin = int(max(mina,minb)) if int(max(mina,minb))==max(mina,minb) else int(mina) + 1
if mmin>mmax:
    print("-1")
else:
    print(mmin)

Submission status: Wrong Answer

Solution code:
import math

A, B = map(int, input().split())
big = math.floor(max(A, B) / 0.08)
sma = math.floor(min(A, B) / 0.1)
num_list = [int(i) for i in range(sma, big + 1)]

for i in num_list:
    if i * 0.08 == A and i * 0.1 == B:
        print(i)
        break
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import math

A, B = map(int, input().split())
big = math.floor(max(A, B) / 0.08)
sma = math.floor(min(A, B) / 0.1)
num_list = [int(i) for i in range(sma, big + 1)]

for i in num_list:
    if math.floor(i * 0.08) == A and math.floor(i * 0.1) == B:
        print(i)
        break
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
A,B = map(int, input().split())
Anum = int(A/0.08)
Bnum = int(B/0.1)
check = 0
if Anum>Bnum:
    check=int(Anum*0.1)
    if check!=B:
        print('-1')
    else:
        print(Anum)
elif Anum<Bnum:
    check=int(Bnum*0.08)
    if check!=A:
        print('-1')
    else:
        print(Bnum)
else:
    print(Anum)

Submission status: Wrong Answer

Solution code:
A,B = map(int, input().split())
Anum = int(A/0.08)
Bnum = int(B/0.1)
check = 0
if Anum>Bnum:
    check=int(Anum*0.1)
    if check!=B:
        print('-1')
    else:
        print(Anum)
elif Anum<Bnum:
    check=int(Bnum*0.1)
    if check!=A:
        print('-1')
    else:
        print(Bnum)
else:
    print(Anum)

Submission status: Wrong Answer

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

b_l = list(range(int(b/0.1), int((b+0.99)//0.1+1)))
a_l = list(range(int(a/0.08), int((a+0.99)//0.08+1)))
l1_l2_and = set(b_l) & set(a_l)
print(min(l1_l2_and)) if bool(l1_l2_and) else print('-1')

Submission status: Wrong Answer

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

b_l = list(range(int(b/0.1), int((b+0.99)//0.1+1)))
a_l = list(range(int(a/0.08), int((a+0.99)//0.08+1)))
for i in b_l:
  if i == a_l[0]:
    print(i)
    exit(0)
print('-1')

Submission status: Wrong Answer

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

ans = 1
for b in range(10*B, 10*B+10):
    if int(b*0.08) == A:
        print(b)
        ans = 0

if ans:
    print(-1)

Submission status: Wrong Answer

Solution code:
from math import floor

def dostuff():
    a, b = (int(x) for x in input().split(' '))

    x = b * 10
    # print(x)
    i = x
    for i in range(x, x+11):
        if floor(i * 0.08) == a:
            print(i)
            return
    print(-1)

dostuff()

Submission status: Wrong Answer

Solution code:
from math import floor

def dostuff():
    a, b = (int(x) for x in input().split(' '))

    x = floor(b / 0.1)
    # print(x)

    for i in range(x, x+11):
        if floor(i * 0.08) == a:
            print(i)
            return
    print(-1)

dostuff()

Submission status: Wrong Answer

Solution code:
import math
tax1,tax2 = map(int,input().split())
tax_max1 = tax1+1 
if tax_max1%0.08 != 0:
    subtraction1 = int((tax_max1/0.08)) - math.ceil(tax1/0.08)
    store1 = []
    beggining1 = math.ceil(tax1/0.08)
    for num in range(subtraction1+1):
        price = beggining1 + num
        store1.append(price)
else:
    subtraction1 = int((tax_max1/0.08)-1) - math.ceil(tax1/0.08)
    store1 = []
    beggining1 = math.ceil(tax1/0.08)
    for num in range(subtraction1+1):
        price = beggining1 + num
        store1.append(price)
tax_max2 = tax2+1
subtraction2 = int((tax_max2/0.10)-1) - math.ceil(tax2/0.10)
store2 = []
beggining2 = math.ceil(tax2/0.10)
for num in range(subtraction2+1):
    price = beggining2 + num
    store2.append(price)

list3 = [value1 for value1 in store1 if value1 in store2]
if len(list3)>0:
    print(list3[0])
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import math
tax1,tax2 = map(int,input().split())
tax_max1 = tax1+1 
if tax_max1%0.08 != 0:
    subtraction1 = int((tax_max1/0.08)) - math.ceil(tax1/0.08)
    store1 = []
    beggining1 = math.ceil(tax1/0.08)
    for num in range(subtraction1+1):
        price = beggining1 + num
        store1.append(price)
else:
    subtraction1 = int((tax_max1/0.08)-1) - math.ceil(tax1/0.08)
    store1 = []
    beggining1 = math.ceil(tax1/0.08)
    for num in range(subtraction1+1):
        price = beggining1 + num
        store1.append(price)
tax_max2 = tax2+1
subtraction2 = int((tax_max2/0.10)-1) - math.ceil(tax2/0.10)
store2 = []
beggining2 = math.ceil(tax2/0.10)
for num in range(subtraction2+1):
    price = beggining2 + num
    store2.append(price)
common = list(set(store1)&set(store2))
if len(common)>0:
    print(common[0])
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import math
tax1,tax2 = map(int,input().split())
tax_max1 = tax1+1 
subtraction1 = int((tax_max1/0.08)) - math.ceil(tax1/0.08)
store1 = []
beggining1 = math.ceil(tax1/0.08)
for num in range(subtraction1+1):
    price = beggining1 + num
    store1.append(price)
tax_max2 = tax2+1 
subtraction2 = int((tax_max2/0.10)) - math.ceil(tax2/0.10)
store2 = []
beggining2 = math.ceil(tax2/0.10)
for num in range(subtraction2+1):
    price = beggining2 + num
    store2.append(price)
common = list(set(store1)&set(store2))
if len(common)>0:
    print(common[0])
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
A0=[int(100*A/8),100*(A+1)/8]
B0=[int(100*B/10),100*(B+1)/10]
S0=max(A0[0],B0[0])
S1=min(A0[1],B0[1])
if S0<S1:
    print(S0)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
A0=[int(100*A/8),int(100*(A+1)/8)]
B0=[int(100*B/10),int(100*(B+1)/10)]
S0=max(A0[0],B0[0])
S1=min(A0[1],B0[1])
if S0<S1:
    print(S0)
else:
    print(-1)

Submission status: Wrong Answer

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

ans = []
for i in range(1,1000):
    x = int(i * 0.08)
    y = int(i * 0.10)
    if x == A and y == B:
        ans.append(i)
    else:
        pass
if len(ans) == 0:
    print(-1)
else:
    print(ans[0])

Submission status: Wrong Answer

Solution code:
import math
a,b=map(int,input().split())
x=math.ceil(a*100/8)
y=math.floor((a+1)*100/8)
p=math.ceil(b*100/10)
q=math.floor((b+1)*100/10)
s=list(range(x,y+1))
t=list(range(p,q+1))
n=set(s) & set(t)
if len(n)==0:
  print("-1")
else:
  print(min(n))

Submission status: Wrong Answer

Solution code:
import math
a,b=map(int,input().split())
x=math.ceil(a*100/8)
y=math.floor((a+1)*100/8)
p=math.ceil(b*100/10)
q=math.floor((b+1)*100/10)
s=list(range(x,y+1))
t=list(range(p,q+1))
n=set(s) & set(t)
if len(n)==0:
  print(-1)
else:
  print(min(n))

Submission status: Wrong Answer

Solution code:
import math
a,b=map(int,input().split())
x=math.ceil(a*100/8)
y=math.floor((a+1)*100/8)
p=math.ceil(b*100/8)
q=math.floor((b+1)*100/8)
s=list(range(x,y+1))
t=list(range(p,q+1))
n=set(s) & set(t)
if len(n)==0:
  print(-1)
else:
  print(min(n))

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
import math
c = math.ceil(a/0.08)
d = round(b/ (0.1))
e = math.floor((a+1)/0.08)
f = round((b+1)/0.1)-1
i = c
j = -1
for i in range(c,e+1):
    if d <= i <= f:
        j = i
        break
    else:
        i = i+1
print(j)

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
import math
c = math.ceil(a/0.08)
d = round(b/ (0.1))
e = math.ceil((a+1)/0.08)
f = round((b+1)/0.1)
i = c
j = -1
for i in range(c,e+1):
    if d <= i <= f:
        j = i
        break
    else:
        i = i+1
print(j)

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
if a%(0.08)==0:
    c= a/0.08
else:
    c = round(a / (0.08))
d = round(b/ (0.1))
if (a+1)% 0.08==0:
    e = (a+1)/0.08-1
else:
    e = round((a+1)/0.08)   
f = round((b+1)/0.1)
i = c
j = -1
for i in range(c,e+1):
    if d <= i <= f:
        j = i
        break
    else:
        i = i+1
print(j)

Submission status: Wrong Answer

Solution code:
from collections import Counter
import math

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

# a =< x < a + 1:
min_a = math.ceil(a/0.08)

max_a = (a+1)/0.08

min_b = math.ceil(b/0.10)

max_b = (b+1)/0.10

ans_list = []

flag = True

while(min_a <= max_a):
    ans_list.append(min_a)
    min_a += 1
while(min_b < max_b):
    ans_list.append(min_b)
    min_b += 1
ans_list.sort()
ans = Counter(ans_list)
for i in ans:
    if ans[i] > 1:
        print(i)
        flag = False
        break
if flag:
    print(-1)

Submission status: Wrong Answer

Solution code:
from collections import Counter
import math

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

# a =< x < a + 1:
min_a = math.ceil(a/0.08)

max_a = (a+1)/0.08

min_b = math.ceil(b/0.10)

max_b = (b+1)/0.10

ans_list = []

flag = True

while(min_a <= max_a):
    ans_list.append(min_a)
    min_a += 1
while(min_b <= max_b):
    ans_list.append(min_b)
    min_b += 1
ans_list.sort()
ans = Counter(ans_list)
for i in ans:
    if ans[i] > 1:
        print(i)
        flag = False
        break
if flag:
    print(-1)

Submission status: Wrong Answer

Solution code:
from collections import Counter
import math

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

# a =< x < a + 1:
min_a = math.ceil(a/0.08)

max_a = (a+1)/0.08

min_b = math.ceil(b/0.10)

max_b = (b+1)/0.10

ans_list = []

flag = True

while(min_a < max_a):
    ans_list.append(min_a)
    min_a += 1
while(min_b < max_b):
    ans_list.append(min_b)
    min_b += 1
ans_list.sort()
ans = Counter(ans_list)
for i in ans:
    if ans[i] > 1:
        print(i)
        flag = False
        break
if flag:
    print(-1)

Submission status: Wrong Answer

Solution code:
from collections import Counter

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

# a =< x < a + 1:
min_a = int(a/0.08)

max_a = (a+1)/0.08

min_b = int(b/0.10)

max_b = (b+1)/0.10

ans_list = []

flag = True

while(min_a < max_a):
    ans_list.append(min_a)
    min_a += 1
while(min_b < max_b):
    ans_list.append(min_b)
    min_b += 1
ans_list.sort()
ans = Counter(ans_list)
for i in ans:
    if ans[i] > 1:
        print(i)
        flag = False
        break
if flag:
    print(-1)

Submission status: Wrong Answer

Solution code:
from collections import Counter

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

# a =< x < a + 1:
min_a = int(a/0.08)

max_a = (a+1)/0.08

min_b = int(b/0.10)

max_b = (b+1)/0.10

ans_list = []

flag = True

while(min_a < max_a):
    ans_list.append(min_a)
    min_a += 1
print(ans_list)
while(min_b < max_b):
    ans_list.append(min_b)
    min_b += 1
ans_list.sort()
ans = Counter(ans_list)
print(ans)
for i in ans:
    if ans[i] > 1:
        print(i)
        flag = False
        break
if flag:
    print(-1)

Submission status: Wrong Answer

Solution code:
from collections import Counter

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

# a =< x < a + 1:
min_a = int(a/0.08)

max_a = int((a+1)/0.08)

min_b = int(b/0.10)

max_b = int((b+1)/0.10)

ans_list = []

flag = True

while(min_a < max_a):
    ans_list.append(min_a)
    min_a += 1
while(min_b < max_b):
    ans_list.append(min_b)
    min_b += 1
ans_list.sort()
ans = Counter(ans_list)
for i in ans:
    if ans[i] > 1:
        print(i)
        flag = False
        break
if flag:
    print(-1)

Submission status: Wrong Answer

Solution code:
from collections import Counter

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

# a =< x < a + 1:
min_a = int(a/0.08)

max_a = int((a+1)/0.08)

min_b = int(b/0.10)

max_b = int((b+1)/0.10)

ans_list = []

while(min_a < max_a):
    ans_list.append(min_a)
    min_a += 1
while(min_b < max_b):
    ans_list.append(min_b)
    min_b += 1
ans_list.sort()
ans = Counter(ans_list)
for i in ans:
    if ans[i] > 1:
        print(i)
        break
print(-1)

Submission status: Wrong Answer

Solution code:
import math

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

pricemax_A = math.floor((A+1)/0.08)
pricemin_A = math.floor(A/0.08)

pricemax_B = math.floor((B+1)/0.1)
pricemin_B = math.floor(B/0.1)

if pricemin_A >= pricemax_B or pricemax_A <= pricemin_B:
    print(-1)
elif pricemin_A >= pricemin_B:
    print(pricemin_A)
elif pricemin_A < pricemin_B:
    print(pricemin_B)

Submission status: Wrong Answer

Solution code:
import math

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

pricemax_A = math.floor((A+1)/0.08)
pricemin_A = math.floor(A/0.08)

pricemax_B = math.floor((B+1)/0.1)
pricemin_B = math.floor(B/0.1)

if pricemin_A > pricemax_B or pricemax_A < pricemin_B:
    print(-1)
elif pricemin_A >= pricemin_B:
    print(pricemin_A)
elif pricemin_A < pricemin_B:
    print(pricemin_B)

Submission status: Wrong Answer

Solution code:
import math

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

pricemax_A = math.floor((A+1)/0.08)
pricemin_A = math.floor(A/0.08)

pricemax_B = math.floor((B+1)/0.1)
pricemin_B = math.floor(B/0.1)


if pricemin_A >= pricemin_B and pricemin_A < pricemax_B:
    print(pricemin_A)
elif pricemin_A <= pricemin_B and pricemax_A > pricemin_B:
    print(pricemin_B)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import math

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

pricemax_A = math.floor((A+1)/0.08)
pricemin_A = math.floor(A/0.08)

pricemax_B = math.floor((B+1)/0.1)
pricemin_B = math.floor(B/0.1)

if (pricemin_A < pricemin_B and pricemax_A < pricemax_B) or (pricemin_B < pricemin_A and pricemax_B < pricemax_A):
    print(-1)
elif pricemin_A >= pricemin_B and pricemin_A < pricemax_B:
    print(pricemin_A)
elif pricemin_A <= pricemin_B and pricemax_A > pricemin_B:
    print(pricemin_B)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import math

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

pricemax_A = math.floor((A+1)/0.08)
pricemin_A = math.floor(A/0.08)

pricemax_B = math.floor((B+1)/0.1)
pricemin_B = math.floor(B/0.1)

if (pricemin_A <= pricemin_B and pricemax_A <= pricemax_B) or (pricemin_B <= pricemin_A and pricemax_B <= pricemax_A):
    print(-1)
elif pricemin_A >= pricemin_B and pricemin_A < pricemax_B:
    print(pricemin_A)
elif pricemin_A <= pricemin_B and pricemax_A > pricemin_B:
    print(pricemin_B)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
ansA = A / 0.08
ansB = B / 0.1
ans = 0

"""
print('ansA=', ansA)
print('ansB=', ansB)
"""

if ansA > ansB:
    ans = int(ansA)
else:
    ans = int(ansB)

#print('tmpans=', ans)

def check_ans(ans):
    ra = int(ans * 0.08)
    rb = int(ans * 0.1)
    wa = int((ans - 1) * 0.08)
    wb = int((ans - 1) * 0.1)

    """
    print('ra=', ra)
    print('rb=', rb)
    print('wa=', wa)
    print('wb=', wb)
    """

    if wa == A and wb == B:
        pass
    else:
        if ra == A and rb == B:
            return ans
        elif ra < A or rb < B:
            return 0
        else:
            pass
    return check_ans(ans-1)

#print('return=', check_ans(ans))

if check_ans(ans) == 0:
    print('-1')
else:
    print(ans)

Submission status: Wrong Answer

Solution code:
import math

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

pricemax_A = math.floor((A+1)/0.08)
pricemin_A = math.floor(A/0.08)

pricemax_B = math.floor((B+1)/0.1)
pricemin_B = math.floor(B/0.1)

if A > B or A < 0 or B < 0 or A > 100 or B > 100:
    print(-1)

if pricemin_A >= pricemin_B and pricemin_A < pricemax_B:
    print(pricemin_A)
elif pricemin_A <= pricemin_B and pricemax_A > pricemin_B:
    print(pricemin_B)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import math

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

pricemax_A = math.floor((A+1)/0.08)
pricemin_A = math.floor(A/0.08)

pricemax_B = math.floor((B+1)/0.1)
pricemin_B = math.floor(B/0.1)

if pricemin_A >= pricemin_B and pricemin_A < pricemax_B:
    print(pricemin_A)
elif pricemin_A <= pricemin_B and pricemax_A > pricemin_B:
    print(pricemin_B)
else:
    print(-1)

if pricemin_A <= pricemin_B and pricemax_A > pricemin_B:
    print(pricemin_B)
elif pricemin_A >= pricemin_B and pricemin_A < pricemax_B:
    print(pricemin_A)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
ansA = A / 0.08
ansB = B / 0.1
ans = 0

"""
print(ansA)
print(ansB)
"""

if ansA > ansB:
    ans = int(ansA)
else:
    ans = int(ansB)

#print(ans)

def check_ans(ans):
    ra = int(ans * 0.08)
    rb = int(ans * 0.1)
    wa = int((ans - 1) * 0.08)
    wb = int((ans - 1) * 0.1)

    """
    print(ra)
    print(rb)
    print(wa)
    print(wb)
    """

    if wa == A and wb == B:
        pass
    else:
        if ra == A and rb == B:
            return ans
        elif ra < A or rb < B:
            return 0
        else:
            pass
    check_ans(ans-1)


if check_ans(ans) == 0:
    print('-1')
else:
    print(ans)

Submission status: Wrong Answer

Solution code:
import math

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

pricemax_A = math.floor((A+1)/0.08)
pricemin_A = math.floor(A/0.08)

pricemax_B = math.floor((B+1)/0.1)
pricemin_B = math.floor(B/0.1)

if pricemin_A >= pricemin_B and pricemin_A <= pricemax_B:
    print(pricemin_A)
elif pricemin_A <= pricemin_B and pricemax_A >= pricemin_B:
    print(pricemin_B)
else:
    print(-1)