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,b = map(int,input().split())

max = math.ceil(a*100/8)

for i in range(1, max+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 math
a,b = map(int,input().split())

tax_8 = 0.08
tax_10 = 0.1

li = [99999999999]
for i in range(1,101):
    temp = math.floor(i *tax_8)
    temp2 = math.floor(i*tax_10)
    if temp == a and temp2 == b:
        li.append(i)
li.sort()
if li[0] == 99999999999:
    print("-1")
else:
    print(li[0])

Submission status: Wrong Answer

Solution code:
import math

t8,t10=map(int,input().split(" "))

mint8=t8/0.08
maxt8=(t8+1)/0.08
mint10=t10/0.1
maxt10=(t10+1)/0.1

ans=list(set(range(math.ceil(mint8),int(maxt8)+1)) & set(range(math.ceil(mint10),int(maxt10)+1)))
if len(ans)==0:
    print(-1)
else:
    print(min(ans))

Submission status: Wrong Answer

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

ans = -1
for i in range(10 ** 3 + 1):
  if int(i * 0.08) == A and int(i * 0.1) == B:
    ans = i
    
print(ans)

Submission status: Wrong Answer

Solution code:
#158.C
import math
A,B =map(int,input().split())
A2=A/0.08
B2=B/0.1


if str(A2)[0]==str(B2)[0]:
    print(math.floor(max(A2,B2)))
else:
    print(-1)

Submission status: Wrong Answer

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

X = int(-(-(B-A)//0.02))

if X < 0:
    print(-1)
else:
    print(X)

Submission status: Wrong Answer

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

X = int(-(-(B-A)//0.02))

if X <= 0:
    print(-1)
else:
    print(X)

Submission status: Wrong Answer

Solution code:
import math
a,b,=map(int, input().split())
aTax = math.ceil(a / 0.08)
bTax = math.ceil(b / 0.10)
if 0 <= aTax - bTax < 10:
    print(aTax)
elif 0 <= bTax - aTax < 13:
    print(bTax)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import math
a,b,=map(int, input().split())
aTax = math.ceil(a / 0.08)
bTax = math.ceil(b / 0.10)
if 0 <= aTax - bTax < 10:
    print(aTax)
else:
    print(-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b,=map(int, input().split())
aTax = a / 0.08
bTax = b / 0.10
if aTax == bTax or b == int(aTax * 0.1):
    print(int(aTax))
else:
    print(-1)

Submission status: Wrong Answer

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

list1 = []
list2 = []

border1 = math.ceil(A/0.08)
border2 = math.ceil((A+1)/0.08-1)
border3 = math.ceil(A/0.1)
border4 = math.ceil((A+1)/0.1-1)

for i in range(border1,border2+1,1):
    list1.append(i)
for j in range(border3,border4+1,1):
    list2.append(j)
    
list3 = list(set(list1) & set(list2))

if bool(list3)==True:
    print(min(list3))
else:
    print('-1')

Submission status: Wrong Answer

Solution code:
import math

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

N_a = [(A+(i*0.1))*(100/8) for i in range(10)]
N_b = []


for j in N_a:
    b = math.ceil(j * 0.1)
    if b == B:
        N_b.append(j)

if N_b == []:
    print(-1)
    exit();

N_b.sort()

print(int(N_b[0]))

Submission status: Wrong Answer

Solution code:
import math

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

N_a = [(A+(i*0.1))*(100/8) for i in range(10)]
N_b = []


for j in N_a:
    b = math.floor(j * 0.1)
    if b == B:
        N_b.append(j)

if N_b == []:
    print(-1)
    exit();

N_b.sort()

print(int(N_b[0]))

Submission status: Wrong Answer

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

a1 = int(a/0.08)
a2 =int((a+1)/0.08)
b1 = int(b/0.1)
b2= int((b+1)/0.1)

A=range(a1,a2+1)
B=range(b1,b2+1)

if set(A)&set(B)==set():
  print(-1)
else:
  C = set(A)&set(B)
  print(min(C))

Submission status: Wrong Answer

Solution code:
import math
a,b = map(int,input().split())
for i in range(700):
  if math.floor(i*2/25) == a and math.floor(i//10) == b:
    print(i)
    exit()
print('-1')

Submission status: Wrong Answer

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

for i in range(10):
    num = 10*b + i

    if a <= num*0.08 <= a+1:
        ans = num
        break

print(ans)

Submission status: Wrong Answer

Solution code:
a,b = map(int, input().split())
aa = int(a / 0.08)
bb = int(b / 0.1)
#print(aa,bb)
if aa == bb:
    print(aa)
else:
    m = max(aa,bb)
    l = min(aa,bb)
    aa_m = int(m * 0.08)
    aa_l = int(l * 0.08)
    bb_m = int(m * 0.1)
    bb_l = int(l * 0.1)
    #print(aaa,bbb)
    if aa_l == a and bb_l == b:
        print(l)
    else:
        if aa_m == a and bb_m == b:
            print(m)
        else:
            print(-1)

Submission status: Wrong Answer

Solution code:
a,b = map(int, input().split())
aa = int(a / 0.08)
bb = int(b / 0.1)
#print(aa,bb)
if aa == bb:
    print(aa)
else:
    m = max(aa,bb)
    aaa = int(m * 0.08)
    bbb = int(m * 0.1)
    #print(aaa,bbb)
    if aaa == a and bbb == b:
        print(m)
    else:
        print(-1)

Submission status: Wrong Answer

Solution code:
from math import ceil

A, B = map(int, input().split())
minS = [int(A*(100/8)), int(B*(100/10))]
maxS = [ceil((A+1)*(100/8)), ceil((B+1)*(100/10))]
if maxS[1] <= minS[0] or maxS[0] <= minS[1]:
    print(-1)
else:
    print(max(minS))

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
c=[]
d=[]
if a % 2 == 0:
    s = int(100*a/8)
    t = int(100*(a+1)/8) + 1
else:
    s = int(100*a/8) + 1
    t = int(100*(a+1)/8) 
u = int(10*b) 
v = int(10*(b+1)) 
for i in range(s,t):
    c.append(i)
for j in range(u,v):
    d.append(j)
print(c)
print(d)
c_d = set(c) & set(d)
if (len(c_d)>0):
    print(min(c_d))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
c=[]
d=[]
if a % 2 == 0:
    s = int(100*a/8)
    t = int(100*(a+1)/8) + 1
else:
    s = int(100*a/8) + 1
    t = int(100*(a+1)/8) 
u = int(100*b/10) 
v = int(100*(b+1)/10) 
for i in range(s,t):
    c.append(i)
for j in range(u,v):
    d.append(j)
print(c)
print(d)
c_d = set(c) & set(d)
if (len(c_d)>0):
    print(min(c_d))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
c=[]
d=[]
if a % 2 == 0:
    s = int(100*a/8)
    t = int(100*(a+1)/8) + 1
else:
    s = int(100*a/8) + 1
    t = int(100*(a+1)/8) 
u = int(100*b/10) 
v = int(100*(b+1)/10) + 1
for i in range(s,t):
    c.append(i)
for j in range(u,v):
    d.append(j)
c_d = set(c) & set(d)
if (len(c_d)>0):
    print(min(c_d))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import math
a,b=map(int, input().split())
a_min = math.ceil(a/0.08)
a_max = math.ceil((a+1)/0.08)-1
b_min = math.ceil(b/0.1)
b_max = math.ceil((b+1)/0.1)-1

if max([a_min,b_min]) >= min([a_max,b_max]):
  print(-1)
else:
  print(min([a_min,b_min]))

Submission status: Wrong Answer

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

c = max((a/0.08),(b/0.1))
if math.floor(c*0.1) - math.floor(c*0.08) < abs(a-b):
    print('-1')
else:
    print(c)

Submission status: Wrong Answer

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

c = float((b/0.1)//1)

while True:
    if (c*0.080)//1 == float(a):
        print(int(c))
        exit()
    elif (c*0.080)//1 > a or (c*0.1)//1 != float(b):
        print(-1)
        exit()
    else:
        c += 1.0

Submission status: Wrong Answer

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

c = float((b/0.1)//1)


while True:
    if (c*0.080)//1 == a:
        print(int(c))
        exit()
    elif (c*0.080)//1 > a or (c*0.1)//1 != b:
        print(-1)
        exit()
    else:
        c += 1.0

Submission status: Wrong Answer

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

c = float((b/0.1)//1)


while True:
    if (c*0.080)//1 == a:
        print(int(c))
        exit()
    elif (c*0.080)//1 > a or (c*0.1)//1 != b:
        print('-1')
        exit()
    else:
        c += 1.0

Submission status: Wrong Answer

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

c = float((b/0.1)//1)


while True:
    if (c*0.0800)//1 == a:
        print(c)
        exit()
    elif (c*0.080)//1 > a or (c*0.1)//1 != b:
        print('-1')
        exit()
    else:
        c += 1.0

Submission status: Wrong Answer

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

c = float((b/0.1)//1)


while True:
    if (c*0.0800)//1 == a:
        print(int(c))
        exit()
    elif (c*0.080)//1 > a or (c*0.1)//1 != b:
        print('-1')
        exit()
    else:
        c += 1.0

Submission status: Wrong Answer

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

c = float((b/0.1)//1)


while True:
    if (c*0.08)//1 == a:
        print(int(c))
        exit()
    elif (c*0.08)//1 > a or (c*0.1)//1 != b:
        print('-1')
        exit()
    else:
        c += 1.0

Submission status: Wrong Answer

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

c = (b/0.1)//1


while True:
    if (c*0.08)//1 == a:
        print(int(c))
        exit()
    elif (c*0.08)//1 > a or (c*0.1)//1 != b:
        print('-1')
        exit()
    else:
        c += 1

Submission status: Wrong Answer

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

c = (a/0.08)//1


while True:
    if (c*0.1)//1 == b:
        print(int(c))
        exit()
    elif (c*0.1)//1 > b or (c*0.08)//1 != a:
        print('-1')
        exit()
    else:
        c += 1

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
A1 = A/0.08
A2 = (A+1)/0.08
B1 = B/0.1
B2 = (B+1)/0.1
C = 0
for i in range(1000):
  if A1 <= i < A2 and B1 <= i < B2:
    print(i)
    C = 1
    break
if C == 0:
  print(-1)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
A1 = A/0.08
A2 = (A+1)/0.08
B1 = B/0.1
B2 = (B+1)/0.1
for i in range(1000):
  if A1 <= i < A2 and B1 <= i < B2:
    print(i)
    break

Submission status: Wrong Answer

Solution code:
print(-1)

Submission status: Wrong Answer

Solution code:
import math
il = input().split()
A = int(il[0])
B = int(il[1])

flag = -1

for i in range(10, 1000):
    if(math.floor(i * 0.08) == A and math.floor(i * 0.1) == B):
        flag = i
        break
print(flag)

Submission status: Wrong Answer

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

# check
kimeuchi = max([int(A / 0.08), int(B / 0.1)])
if int(kimeuchi * 0.08) == A and int(kimeuchi * 0.1) == B:

    print(kimeuchi)
else:
    print(-1)

Submission status: Wrong Answer

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

# check
kimeuchi = max([int(A / 0.08), int(B / 0.1)])
if kimeuchi * 0.08 == A and kimeuchi * 0.1 == B:
    print(kimeuchi)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import math

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

tax_a = 0.08
tax_b = 0.1

first_price = int(A / tax_a)
final_price = int((A+1) / tax_a)

for i_price in range(first_price, final_price+1):
    if math.floor(i_price * tax_b) == B:
        ans = i_price
        break
else:
    ans = -1

print(ans)

Submission status: Wrong Answer

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

# check
if int(A / 0.08) < int(B / 0.1):
    print(-1)
else:
    print(max([int(A / 0.08), int(B / 0.1)]))

Submission status: Wrong Answer

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

# check
if A < B:
    print(-1)
else:
    print(max([int(A / 0.08), int(B / 0.1)]))

Submission status: Wrong Answer

Solution code:
import sys

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

for i in range(1,101,1):
    if int(i*0.08)==A and int(i*0.10)==B:
        print(i)
        sys.exit()
print(-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
for i in range(20000,-1,-1):
    if int(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())
for i in range(20000):
    if int(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())
ans=True
for i in range(1,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:
A,B=map(int,input().split())
ans=True
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:
A,B=map(int,input().split())
ans=True
for i in range(100):
    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(1500):
    if int(i*0.08) == A and (i * 0.1) == B:
        print(i)
        exit()
        print("-1")

Submission status: Wrong Answer

Solution code:
def main():
    A, B = map(int, input().split())
    for i in range(1, 10000):
        if i * 0.08 == A and i * 0.1 == B:
            print(i)
            break
    else:
        print(-1)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
from math import ceil, floor

def main():
    A, B = map(int, input().split())
    A1 = ceil(A / 0.08)
    if (A + 1) % 0.08 == 0:
        A2 = floor((A+1)/0.08) - 1
    else:
        A2 = floor((A+1)/0.08)

    B1 = ceil(B/0.1)
    B2 = floor((B+1)/0.1) - 1

    C = max(A1, B1)
    if C <= min(A2, B2):
        print(C)
    else:
        print(-1)
    

    

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

x = a/0.08
y = b/0.10


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

Submission status: Wrong Answer

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

x = a/0.08
y = b/0.10
print(x,y)
print(int(x*0.10),int(x*0.08))

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

Submission status: Wrong Answer

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

x = a/0.08
y = b/0.10
print(x,y)
print(int(x*0.10),int(x*0.08))

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

Submission status: Wrong Answer

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

x = a/0.08
y = b/0.10



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

Submission status: Wrong Answer

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

x = a/0.08
y = b/0.10

print(x,y)

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

Submission status: Wrong Answer

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

x = a/0.08
y = b/0.10

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

Submission status: Wrong Answer

Solution code:
Str = input().split()
A = int(Str[0])
B = int(Str[1])
import math 
ans = -1
for i in range(1, 101):
  if math.floor(i * 0.08) == A:
    if math.floor(i * 0.1) == B:
      ans = i
      break

      
print(ans)

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
if a/0.08 == a//0.08:
    emin = a//0.08
else:
    emin = a//0.08+1
if (a+1)/0.08 == (a+1)//0.08:
    emax = (a+1)//0.08-1
else:
    emax = (a+1)//0.08
tmin = b/0.1
tmax = (b+1)/0.1-1
if tmax > emax:
    if tmin <= emax:
        print(int(tmin))
    else:
        print(-1)
else:
    if emin <= tmax:
        print(int(emin))
    else:
        print(-1)

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
if a/0.08 == a//0.08:
    emin = a//0.08
else:
    emin = a//0.08+1
if (a+1)/0.08 == (a+1)//0.08:
    emax = (a+1)//0.08-1
else:
    emax = (a+1)//0.08
tmin = b/0.1
tmax = (b+1)/0.1-1
if tmax > emax:
    if tmin <= emax:
        print(tmin)
    else:
        print(-1)
else:
    if emin <= tmax:
        print(emin)
    else:
        print(-1)

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
n = 1
while n <= 1000:
  if a <= n*0.08 < a+1 and b <= n*0.1 < b +1:
    print(n)
    break
  n += 1
  if n == 1000:
    print(-1)
    break

Submission status: Wrong Answer

Solution code:
import sys
a, b = map(int, sys.stdin.readline().split())
i = 0
res = -1
while i <= 1000:
  if int(i*0.08) == int(i*0.1):
    res = i
    break
  i += 1
print(res)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
for i in range(10000):
    x = (i * 8) // 100
    y = (i*10)//100
    if(x == A & y == B):
        print(i)
        exit()
        print("-1")

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
for i in range(10000):
    if int(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())
for i in range(1001):
    if int(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())
for i in range(1001):
    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())
for i in range(1001):
    if (i * 0.08) == A and int(i * 0.1) == B:
        print(i)
        import sys
        sys.exit()
        print("-1")

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
def main():
    A, B = map(int, input().split())
    ans = 10001
    for x in range(1, 10001):
        if 0 <= 8*x - 100*A <= 100 and 0 <= 10*x - 100*B <= 100:
            ans = min(ans, x)
    if ans == 10001:ans = -1
    print(ans)
if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
import math
# input処理を高速化する
input = sys.stdin.readline

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

Moneys = range(1,1000)

#消費税が入力と一致したインデックス
a_index=set()
b_index=set()

for i in Moneys:
    if math.floor(i*0.08) == A:
        a_index.add(i)

for j in Moneys:
    if math.floor(j*0.1) == B:
        b_index.add(j)

Tax = a_index&b_index

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

Submission status: Wrong Answer

Solution code:
import sys
import math
# input処理を高速化する
input = sys.stdin.readline

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

Moneys = range(1,1001)

#消費税が入力と一致したインデックス
a_index=set()
b_index=set()

for i in Moneys:
    if math.floor(i*0.08) == A:
        a_index.add(i)

for j in Moneys:
    if math.floor(j*0.1) == B:
        b_index.add(j)

Tax = a_index&b_index

if len(Tax)!=0:
    print(list(Tax)[0])
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import math
a, b = map(int, input().split())
x = []
y = []
for i in range(math.floor(b/0.1), math.floor((b+1)/0.1)):
    y.append(i)
for i in range(math.floor(a/0.08), math.floor((a+1)/0.08)):
    if y.count(i) == 1:
        print(i)
        exit()
print('-1')

Submission status: Wrong Answer

Solution code:
import math
a, b = map(int, input().split())
x = []
y = []
for i in range(math.floor(b/0.1), math.floor((b+1)/0.1)+1):
    y.append(i)
for i in range(math.floor(a/0.08), math.floor((a+1)/0.08)+1):
    if y.count(i) == 1:
        print(i)
        exit()
print('-1')

Submission status: Wrong Answer

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

print(-1)

Submission status: Wrong Answer

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

print(-1)

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
ans = -1
for x in range(b*10,(b+1)*10+1):
    if x*0.08 == a:
        ans = x
        break
print(ans)

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
ans = -1
for x in range(b*10,(b+1)*10):
    if x*0.08 == a:
        ans = x
        break
print(ans)

Submission status: Wrong Answer

Solution code:
import math

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

start_plice = math.ceil(A / 0.08) if math.ceil(A / 0.08) < math.ceil(B / 0.1) else math.ceil(B / 0.1)

while True:
  if math.floor(start_plice * 0.08) > A:
    print(-1)
    break
  
  if math.floor(start_plice * 0.1) >= B:
    print(start_plice)
    break
  
  start_plice += 1

Submission status: Wrong Answer

Solution code:
'''
メモ

消費税率が8パーセントを基準として、条件を満たす税抜き価格の範囲を決定する
その範囲で10パーセントを試し、全て満たさないなら-1
条件を満たした時点が最小なので、条件を満たせば、その時点の価格を出力する

'''

import math

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

start_plice = math.ceil(A / 0.08)

while True:
  if math.floor(start_plice * 0.08) > A:
    print(-1)
    break
  
  if math.floor(start_plice * 0.1) >= B:
    print(start_plice)
    break
  
  start_plice += 1

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
lia=[]
lib=[]
for i in range(10):
  lia.append(a+(i/10))
for i in range(10):
  lib.append(b+(i/10))
def eight(n):
  return int(n/0.08)
def ten(m):
  return int(m/0.1)
lia2=list(map(eight,lia))
lib2=list(map(ten,lib))
ans=[]
for i in lia2:
  for j in lib2:
    if i==j:
      ans.append(i)
if ans==[]:
  print(-1)
else:
  print(min(ans))

Submission status: Wrong Answer

Solution code:
import math

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

ans = max(A / 0.08, B / 0.1)

if math.floor(ans*0.08)==A and math.floor(ans*0.10)==B:
    print(int(ans))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
a , b = map(int, input().split())
ar = int(a / .08)
b_r = int(b / .1)

if ar == b_r :
    print(ar)

else:
    if ar > b_r:
        if((ar-b_r)/10) < 1:
            print(ar)
        else:
            print(-1)
    else:
        if (( b_r - ar ) / 8) < 1:
            print(ar)
        else:
            print(-1)

Submission status: Wrong Answer

Solution code:
a , b = map(int, input().split())
ar = a/.08
b_r = b/.1

if ar == b_r :
    print(ar)

else:
    if ar > b_r:
        if((ar-b_r)/10) < 1:
            print(ar)
        else:
            print(-1)
    else:
        if (( b_r - ar ) / 8) < 1:
            print(ar)
        else:
            print(-1)

Submission status: Wrong Answer

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

a8 = int(a/0.08)
b10 = int(b/0.1)


A = []
i = 0
while(True):
    if (a8+i)*0.08 < a+1:
        A.append(int(a8+i))
        i += 1
    else:
        break
B = []
i = 0
while(True):
    if (b10+i)*0.1 < b+1:
        B.append(int(b10+i))
        i += 1
    else:
        break
s1 = set(A)
s2 = set(B)
C = list(s1&s2)

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

Submission status: Wrong Answer

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

a8 = a/0.08
b10 = b/0.1


A = []
i = 0
while(True):
    if (a8+i)*0.08 < a+1:
        A.append(int(a8+i))
        i += 1
    else:
        break
B = []
i = 0
while(True):
    if (b10+i)*0.1 < b+1:
        B.append(int(b10+i))
        i += 1
    else:
        break
s1 = set(A)
s2 = set(B)
C = list(s1&s2)

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

Submission status: Wrong Answer

Solution code:
A_tax, B_tax = map(int, input().split())
A_wo_tax_min = int(A_tax/0.08+0.6)
A_wo_tax_max = int((A_tax+1.0)/0.08)
B_wo_tax_min = B_tax*10
B_wo_tax_max = (B_tax+1)*10-1
if A_wo_tax_min > B_wo_tax_max or B_wo_tax_min > A_wo_tax_max:
    print(-1)
else:
    print(min(max(A_wo_tax_min, B_wo_tax_min), min(A_wo_tax_max, B_wo_tax_max)))

Submission status: Wrong Answer

Solution code:
A_tax, B_tax = map(int, input().split())
A_wo_tax_min = int(A_tax/0.08)
A_wo_tax_max = int((A_tax+1.0)/0.08-0.00000000000001)
B_wo_tax_min = int(B_tax/0.1)
B_wo_tax_max = int((B_tax+1.0)/0.1-0.00000000000001)
if A_wo_tax_min > B_wo_tax_max or B_wo_tax_min > A_wo_tax_max:
    print(-1)
else:
    print(min(max(A_wo_tax_min, B_wo_tax_min), min(A_wo_tax_max, B_wo_tax_max)))

Submission status: Wrong Answer

Solution code:
A_tax, B_tax = map(int, input().split())
A_wo_tax_min = int(A_tax/0.08)
A_wo_tax_max = int((A_tax+1.0)/0.08-0.0001)
B_wo_tax_min = int(B_tax/0.1)
B_wo_tax_max = int((B_tax+1.0)/0.1-0.0001)
if A_wo_tax_min > B_wo_tax_max or B_wo_tax_min > A_wo_tax_max:
    print(-1)
else:
    print(min(max(A_wo_tax_min, B_wo_tax_min), min(A_wo_tax_max, B_wo_tax_max)))

Submission status: Wrong Answer

Solution code:
A_tax, B_tax = map(int, input().split())
A_wo_tax_min = int(A_tax/0.08)
A_wo_tax_max = int((A_tax+0.9)/0.08+1)
B_wo_tax_min = int(B_tax/0.1)
B_wo_tax_max = int((B_tax+0.9)/0.1+1)
if A_wo_tax_min > B_wo_tax_max or B_wo_tax_min > A_wo_tax_max:
    print(-1)
else:
    print(min(max(A_wo_tax_min, B_wo_tax_min), min(A_wo_tax_max, B_wo_tax_max)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
A, B = map(int, input().split())
if A/B>=0.8:
    #A/0.08 < (B+0.999)/0.1
    print(math.ceil(A/0.08))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
i = 0
ans = 0
while i<=1000:
    i += 1
    if i*0.08>=a and i*0.1>=b:
        ans=i
        break
    else:
        ans=-1

if ans==-1:
    print(-1)
else:
    print(ans)

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
i = 0
ans = 0
while i<=1000:
    i += 1
    if i*0.08>=a and i*0.1>=b:
        ans=i
        break
    else:
        ans=-1
        break
print(ans)

Submission status: Wrong Answer

Solution code:
def main():
    A,B=map(int,input().split())
    if A%2==0:
        p=A/0.08
    else:
        p=(A//0.08)+1

    if B==p//10:
        print(int(p))
    else:
        print(-1)    
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
from sys import stdin
import sys
import math

A, B = list(map(int, stdin.readline().rstrip().split()))

#x * 8 / 100 = A
#x * 10 / 100 = B

#xA = A * 100 / 8
#xB = B * 100 / 10


def tax(x,ratio):
    return math.floor(x * ratio / 100)


xA = int(A * 100 / 8)
xB = int(B * 100 / 10)

for i in range(max(0, xB-1), xA+2):
    tax_a = tax(i, 8)
    tax_b = tax(i, 10)

    if tax_a == A and tax_b == B:
        print(i)
        sys.exit()

print(-1)

Submission status: Wrong Answer

Solution code:
from sys import stdin
import sys
import math

A, B = list(map(int, stdin.readline().rstrip().split()))

#x * 8 / 100 = A
#x * 10 / 100 = B

#xA = A * 100 / 8
#xB = B * 100 / 10


def tax(x,ratio):
    return math.floor(x * ratio / 100)


xA = int(A * 100 / 8)
xB = int(B * 100 / 10)

for i in range(xB-1, xA+1):
    tax_a = tax(i, 8)
    tax_b = tax(i, 10)

    if tax_a == A and tax_b == B:
        print(i)
        sys.exit()

print(-1)

Submission status: Wrong Answer

Solution code:
a, b = map(int,input().split())
e = 10**-7
mi = max(int(a/0.08),int(b/0.1))
ma = min(int((a+1-e)/0.08),int((b-e+1)/0.1))
if mi > ma:
    print(-1)
else:
    print(mi)

Submission status: Wrong Answer

Solution code:
a, b = map(int,input().split())
e = 10**-7
mi = max(int((a+e)/0.08),int((b+e)/0.1))
ma = min(int((a+1+e)/0.08),int((b+e+1)/0.1))
if mi > ma:
    print(-1)
else:
    print(mi)

Submission status: Wrong Answer

Solution code:
a, b = map(int,input().split())
e = 10**-4
mi = max(int((a+e)/0.08),int((b+e)/0.1))
ma = min(int((a+1+e)/0.08),int((b+e+1)/0.1))
if mi > ma:
    print(-1)
else:
    print(mi)

Submission status: Wrong Answer

Solution code:
a, b = map(int,input().split())
e = 10**-4
mi = max(int((a+e)/0.08),int((b+e)/0.1))
ma = min(int((a+1+e)/0.08),int((b+e+1)/0.1))
print(ma,mi)
if mi > ma:
    print(-1)
else:
    print(mi)

Submission status: Wrong Answer

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

min_a=a*12.5
min_b=b*10

if min_b-min_a<12.5 and min_a<min_b:
    print(str(min_b))

elif min_a-min_b<=10 and min_b<=min_a:
    if a%2==1:
        print(str(int(min_a)+1))
    else:
        print(str(int(min_a)))
else:
    print(str(-1))

Submission status: Wrong Answer

Solution code:

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

result = False
Amin = int(round(A * 12.5)) 
Amax = int(round((A+1) * 12.5)-1)
Bmin = B * 10
Bmax = (B+1) * 10


for i in range(Amin,Amax+1):
    for j in range(Bmin,Bmax+1):
        
        if(i == j):
            print(i)
            result = True
            break

    if(result):

        break



if(result==False):
    print(-1)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
X=[]
for i in range(1011):
	if A+1>=0.08*i>=A and B+1>=0.1*i>=B:
		X.append(i)

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

Submission status: Wrong Answer

Solution code:
import math
a,b = map(int,input().split())
la = [i for i in range(int(a/0.08),math.ceil((a+1)/0.08))]
lb = [i for i in range(int(b/0.1),math.ceil((b+1)/0.1))]
for i in lb:
    if i in la:
        print(i)
        exit()
print("-1")