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 = [int(x) for x in input().strip().split()]

lA = math.ceil(A / 0.08)
uA = (A + 1) / 0.08
if uA.is_integer():
    uA = int(uA) - 1
else:
    uA = int(uA)

lB = math.ceil(B / 0.1)
uB = (B + 1) / 0.1
if uB.is_integer():
    uB = int(uB) - 1
else:
    uB = int(uB)

if uA < lB or uB < lA:
    print(-1)
elif uB > uA:
    print(lB)
else:
    print(lA)

Submission status: Wrong Answer

Solution code:
import math

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

x_min = a / 0.08
x_max = (a + 1) / 0.08

y_min = b / 0.1
y_max = (b + 1) / 0.1

x_list = list(range(math.ceil(x_min), math.floor(x_max) + 1))
y_list = list(range(math.ceil(y_min), math.floor(y_max) + 1))

matome = set(x_list) & set(y_list)
matome = list(matome)


if not matome:
    print(-1)
else:
    print(min(matome))

Submission status: Wrong Answer

Solution code:
def ta():
    (n,m)=input().split()
    n=int(n)
    m=int(m)
    # l=[0,0.05,0.07,0.09,0.1,0.13,0.15,0.17,0.19,0.2,0.23,0.25,0.27,0.29,0.3,0.33,0.35,0.37,0.4,0.43,0.45,0.47,0.49,0.5,0.55,0.6,0.65,0.7,0.75,0.8,0.85,0.9,0.95,]
    l1=[]
    l2=[]
    if n<=m and m<=100:
        o=0
        for i in range(25):
            b=(n+o)/0.08
            c=(m+o)/0.1
            o=o+0.04
            l2.append(c)
            l1.append(b)
        l2=sorted(l2)
        l1=sorted(l1)
        if l1[0]>=l2[0]:
            for j in l1:
                for k in l2:
                    if int(j)==int(k):
                        return int(j)
        else:
            for j in l2:
                for k in l1:
                    if int(j)==int(k):
                        return int(j)
    return int('-1')
print(ta())

Submission status: Wrong Answer

Solution code:
def ta():
    (n,m)=input().split()
    n=int(n)
    m=int(m)
    # l=[0,0.05,0.07,0.09,0.1,0.13,0.15,0.17,0.19,0.2,0.23,0.25,0.27,0.29,0.3,0.33,0.35,0.37,0.4,0.43,0.45,0.47,0.49,0.5,0.55,0.6,0.65,0.7,0.75,0.8,0.85,0.9,0.95,]
    l1=[]
    l2=[]
    if n<=m and m<=100:
        o=0
        for i in range(50):
            b=(n+o)/0.08
            c=(m+o)/0.1
            o=o+0.02
            l2.append(c)
            l1.append(b)
        l2=sorted(l2)
        l1=sorted(l1)
        if l1[0]>=l2[0]:
            for j in l1:
                for k in l2:
                    if int(j)==int(k):
                        return int(j)
        else:
            for j in l2:
                for k in l1:
                    if int(j)==int(k):
                        return int(j)
    return int('-1')
print(ta())

Submission status: Wrong Answer

Solution code:
def ta():
    (n,m)=input().split()
    n=int(n)
    m=int(m)
    # l=[0,0.05,0.07,0.09,0.1,0.13,0.15,0.17,0.19,0.2,0.23,0.25,0.27,0.29,0.3,0.33,0.35,0.37,0.4,0.43,0.45,0.47,0.49,0.5,0.55,0.6,0.65,0.7,0.75,0.8,0.85,0.9,0.95,]
    l1=[]
    l2=[]
    if n<=m and m<=100:
        o=0
        for i in range(100):
            b=(n+o)/0.08
            c=(m+o)/0.1
            o=o+0.01
            l2.append(c)
            l1.append(b)
        l2=sorted(l2)
        l1=sorted(l1)
        if l1[0]>=l2[0]:
            for j in l1:
                for k in l2:
                    if int(j)==int(k):
                        return int(j)
        else:
            for j in l2:
                for k in l1:
                    if int(j)==int(k):
                        return int(j)
    return int('-1')
print(ta())

Submission status: Wrong Answer

Solution code:
def ta():
    (n,m)=input().split()
    n=int(n)
    m=int(m)
    # l=[0,0.05,0.07,0.09,0.1,0.13,0.15,0.17,0.19,0.2,0.23,0.25,0.27,0.29,0.3,0.33,0.35,0.37,0.4,0.43,0.45,0.47,0.49,0.5,0.55,0.6,0.65,0.7,0.75,0.8,0.85,0.9,0.95,]
    l1=[]
    l2=[]
    if n<=m and m<=100:
        o=0
        for i in range(10000):
            b=(n+o)/0.08
            c=(m+o)/0.1
            o=o+0.0001
            l2.append(c)
            l1.append(b)
        l2=sorted(l2)
        l1=sorted(l1)
        if l1[0]>=l2[0]:
            for j in l1:
                for k in l2:
                    if int(j)==int(k):
                        return int(j)
        else:
            for j in l2:
                for k in l1:
                    if int(j)==int(k):
                        return int(j)
                    # else:
        return int('-1')
print(ta())

Submission status: Wrong Answer

Solution code:
def ta():
    (n,m)=input().split()
    n=int(n)
    m=int(m)
    # l=[0,0.05,0.07,0.09,0.1,0.13,0.15,0.17,0.19,0.2,0.23,0.25,0.27,0.29,0.3,0.33,0.35,0.37,0.4,0.43,0.45,0.47,0.49,0.5,0.55,0.6,0.65,0.7,0.75,0.8,0.85,0.9,0.95,]
    l1=[]
    l2=[]
    if n<=m and m<=100:
        o=0
        for i in range(100):
            b=(n+o)/0.08
            c=(m+o)/0.1
            o=o+0.01
            l2.append(c)
            l1.append(b)
        l2=sorted(l2)
        l1=sorted(l1)
        if l1[0]>=l2[0]:
            for j in l1:
                for k in l2:
                    if int(j)==int(k):
                        return int(j)
        else:
            for j in l2:
                for k in l1:
                    if int(j)==int(k):
                        return int(j)
                    # else:
        return int('-1')
print(ta())

Submission status: Wrong Answer

Solution code:
def ta():
    (n,m)=input().split()
    n=int(n)
    m=int(m)
    # l=[0,0.05,0.07,0.09,0.1,0.13,0.15,0.17,0.19,0.2,0.23,0.25,0.27,0.29,0.3,0.33,0.35,0.37,0.4,0.43,0.45,0.47,0.49,0.5,0.55,0.6,0.65,0.7,0.75,0.8,0.85,0.9,0.95,]
    l1=[]
    l2=[]
    if n<=m and m<=100:
        o=0
        for i in range(1000):
            b=(n+o)/0.08
            c=(m+o)/0.1
            o=o+0.001
            l2.append(c)
            l1.append(b)
            l2=sorted(l2)
            l1=sorted(l1)
        if l1[0]>=l2[0]:
            for j in l1:
                for k in l2:
                    if int(j)==int(k):
                        return int(j)
        else:
            for j in l2:
                for k in l1:
                    if int(j)==int(k):
                        return int(j)
                    # else:
        return int('-1')
print(ta())

Submission status: Wrong Answer

Solution code:
def ta():
    (n,m)=input().split()
    n=int(n)
    m=int(m)
    # l=[0,0.05,0.07,0.09,0.1,0.13,0.15,0.17,0.19,0.2,0.23,0.25,0.27,0.29,0.3,0.33,0.35,0.37,0.4,0.43,0.45,0.47,0.49,0.5,0.55,0.6,0.65,0.7,0.75,0.8,0.85,0.9,0.95,]
    l1=[]
    l2=[]
    if n<=m and m<=100:
        o=0
        for i in range(100):
            b=(n+o)/0.08
            c=(m+o)/0.1
            o=o+0.01
            l2.append(c)
            l1.append(b)
            l2=sorted(l2)
            l1=sorted(l1)
        if l1[0]>=l2[0]:
            for j in l1:
                for k in l2:
                    if int(j)==int(k):
                        return int(j)
        else:
            for j in l2:
                for k in l1:
                    if int(j)==int(k):
                        return int(j)
                    # else:
        return int('-1')
print(ta())

Submission status: Wrong Answer

Solution code:
def C158():
    A, B = [int(_) for _ in input().split()]
    X1 = int(A / 0.08)
    #X2 = int(B / 0.1)
    if int(X1 * 0.1) == B:
        print(X1)
    else:
        print("-1")


if __name__ == "__main__":
    C158()

Submission status: Wrong Answer

Solution code:
def ta():
    (n,m)=input().split()
    n=int(n)
    m=int(m)
    # l=[0,0.05,0.07,0.09,0.1,0.13,0.15,0.17,0.19,0.2,0.23,0.25,0.27,0.29,0.3,0.33,0.35,0.37,0.4,0.43,0.45,0.47,0.49,0.5,0.55,0.6,0.65,0.7,0.75,0.8,0.85,0.9,0.95,]
    l1=[]
    l2=[]
    if n<=m and m<=100:
        o=0
        for i in range(100):
            b=(n+o)/0.08
            c=(m+o)/0.1
            o=o+0.01
            l2.append(c)
            l1.append(b)
        if l1[0]>=l2[0]:
            for j in l1:
                for k in l2:
                    if int(j)==int(k):
                        return int(j)
        else:
            for j in l2:
                for k in l1:
                    if int(j)==int(k):
                        return int(j)
                    # else:
        return int('-1')
print(ta())

Submission status: Wrong Answer

Solution code:
def ta():
    (n,m)=input().split()
    n=int(n)
    m=int(m)
    # l=[0,0.05,0.07,0.09,0.1,0.13,0.15,0.17,0.19,0.2,0.23,0.25,0.27,0.29,0.3,0.33,0.35,0.37,0.4,0.43,0.45,0.47,0.49,0.5,0.55,0.6,0.65,0.7,0.75,0.8,0.85,0.9,0.95,]
    l1=[]
    l2=[]
    if n<=m and m<=100:
        o=0
        for i in range(100):
            b=(n+o)/0.08
            c=(m+o)/0.1
            o=o+0.01
            l2.append(c)
            l1.append(b)
        for j in l1:
            for k in l2:
                if int(j)==int(k):
                    return int(j)
                # else:
        return int('-1')
print(ta())

Submission status: Wrong Answer

Solution code:
def ta():
    (n,m)=input().split()
    n=int(n)
    m=int(m)
    # l=[0,0.05,0.07,0.09,0.1,0.13,0.15,0.17,0.19,0.2,0.23,0.25,0.27,0.29,0.3,0.33,0.35,0.37,0.4,0.43,0.45,0.47,0.49,0.5,0.55,0.6,0.65,0.7,0.75,0.8,0.85,0.9,0.95,]
    l1=[]
    l2=[]
    if n<=m<=100:
        o=0
        for i in range(100):
            b=(n+o)/0.08
            c=(m+o)/0.1
            o=o+0.01
            l2.append(c)
            l1.append(b)
        print(l1,l2)
        for j in l1:
            for k in l2:
                if int(j)==int(k):
                    return int(j)
                # else:
        return int('-1')
print(ta())

Submission status: Wrong Answer

Solution code:
def C158():
    A, B = [int(_) for _ in input().split()]
    X1 = int(A / 0.08)
    X2 = int(B / 0.1)
    if X1 == X2:
        print(X1)
    else:
        print("-1")


if __name__ == "__main__":
    C158()

Submission status: Wrong Answer

Solution code:
def ta():
    (n,m)=input().split()
    n=int(n)
    m=int(m)
    # l=[0,0.05,0.07,0.09,0.1,0.13,0.15,0.17,0.19,0.2,0.23,0.25,0.27,0.29,0.3,0.33,0.35,0.37,0.4,0.43,0.45,0.47,0.49,0.5,0.55,0.6,0.65,0.7,0.75,0.8,0.85,0.9,0.95,]
    l1=[]
    l2=[]
    if n<=m:
        o=0
        for i in range(1000):
            b=(n+o)/0.08
            c=(m+o)/0.1
            o=o+0.001
            l2.append(c)
            l1.append(b)
        l1=sorted(set(l1))
        l2=sorted(set(l2))
        for j in l1:
            for k in l2:
                if int(j)==int(k):
                    return int(j)
                # else:
        return int('-1')
print(ta())

Submission status: Wrong Answer

Solution code:
def ta():
    (n,m)=input().split()
    n=int(n)
    m=int(m)
    # l=[0,0.05,0.07,0.09,0.1,0.13,0.15,0.17,0.19,0.2,0.23,0.25,0.27,0.29,0.3,0.33,0.35,0.37,0.4,0.43,0.45,0.47,0.49,0.5,0.55,0.6,0.65,0.7,0.75,0.8,0.85,0.9,0.95,]
    l1=[]
    l2=[]
    if n<=m:
        o=0
        for i in range(100):
            b=(n+o)/0.08
            c=(m+o)/0.1
            o=o+0.01
            l2.append(c)
            l1.append(b)
        l1=sorted(set(l1))
        l2=sorted(set(l2))
        for j in l1:
            for k in l2:
                if int(j)==int(k):
                    return int(j)
                # else:
        return int('-1')
print(ta())

Submission status: Wrong Answer

Solution code:
def ta():
    (n,m)=input().split()
    n=int(n)
    m=int(m)
    l=[0,0.05,0.07,0.09,0.1,0.13,0.15,0.17,0.19,0.2,0.23,0.25,0.27,0.29,0.3,0.33,0.35,0.37,0.4,0.43,0.45,0.47,0.49,0.5,0.55,0.6,0.65,0.7,0.75,0.8,0.85,0.9,0.95,]
    l1=[]
    l2=[]
    if n<=m:
        for i in l:
            b=(n+i)/0.08
            c=(m+i)/0.1
            l2.append(c)
            l1.append(b)
        l1=sorted(set(l1))
        l2=sorted(set(l2))
        for j in l1:
            for k in l2:
                if int(j)==int(k):
                    return int(j)
                # else:
        return int('-1')
print(ta())

Submission status: Wrong Answer

Solution code:
def ta():
    (n,m)=input().split()
    n=int(n)
    m=int(m)
    l=[0,0.1,0.15,0.2,0.25,0.3,0.35,0.4,0.45,0.5,0.55,0.6,0.65,0.7,0.75,0.8,0.85,0.9,0.95]
    l1=[]
    l2=[]
    if n<=m:
        for i in l:
            b=(n+i)/0.08
            c=(m+i)/0.1
            l2.append(c)
            l1.append(b)
        l1=sorted(set(l1))
        l2=sorted(set(l2))
        for j in l1:
            for k in l2:
                if int(j)==int(k):
                    return int(j)
                # else:
        return int('-1')
print(ta())

Submission status: Wrong Answer

Solution code:
def ta():
    (n,m)=input().split()
    n=int(n)
    m=int(m)
    l=[0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9]
    l1=[]
    l2=[]
    if n<=m:
        for i in l:
            b=(n+i)/0.08
            c=(m+i)/0.1
            l2.append(c)
            l1.append(b)
        l1=sorted(set(l1))
        l2=sorted(set(l2))
        for j in l1:
            for k in l2:
                if int(j)==int(k):
                    return int(j)
                # else:
        return int('-1')
print(ta())

Submission status: Wrong Answer

Solution code:
def ta():
    (n,m)=input().split()
    n=int(n)
    m=int(m)
    l=[0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9]
    l1=[]
    l2=[]
    if n<=m:
        for i in l:
            b=(n+i)/0.08
            c=(m+i)/0.1
            l2.append(c)
            l1.append(b)
        l1=sorted(set(l1))
        l2=sorted(set(l2))
        for j in l1:
            for k in l2:
                if int(j)==int(k):
                    return int(j)
                # else:
        return '-1'
print(ta())

Submission status: Wrong Answer

Solution code:
def ta():
    (n,m)=input().split()
    n=int(n)
    m=int(m)
    l=[0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9]
    l1=[]
    l2=[]
    for i in l:
        b=(n+i)/0.08
        c=(m+i)/0.1
        l2.append(c)
        l1.append(b)
    l1=sorted(set(l1))
    l2=sorted(set(l2))
    for j in l1:
        for k in l2:
            if int(j)==int(k):
                return int(j)
            else:
                return int("-1")
print(ta())

Submission status: Wrong Answer

Solution code:
import math
A,B = map(int,input().split())
C = math.ceil(100*A/8)
D = math.floor(100*(A+1)/8)
for X in range(C,D+1):
  if B == math.floor(10*X/100):
    print(X)
    break
else:
  print(-1)

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
Listx = []
Listy = []
Listz = []
for j in range(25):
    x = int(A*12.5+(j/2))
    Listx.append(x)

for i in range(9):
    y = B*10+i
    Listy.append(y)

for k in range(len(Listy)):
    if Listy[k] in Listx:
        Listz.append(Listy[k])
        print(min(Listz))
        break
while Listz == []:
    print("-1")
    break

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
ans = int(A/0.08)
if B == int(ans * 0.10):
    print(ans)
else:
    ans = int(B/0.10)
    if A == int(ans * 0.08):
        print(ans)
    else:
        print(-1)

Submission status: Wrong Answer

Solution code:
import numpy as np

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

xa_min = 12.5 * A
xa_max = 12.5 * (A+1)
xb_min = 10 * B
xb_max = 10 * (B+1)

x_min = np.ceil(max(xa_min, xb_min))
x_max = np.floor(min(xa_max, xb_max))

if x_min > x_max:
	print(-1)
else:
	print(int(x_min))

Submission status: Wrong Answer

Solution code:
import math

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

val1 = int(A / 0.08)
val2 = int(B / 0.1)

minVal = min(val1, val2)
maxVal = max(val1, val2)

if math.floor(minVal*0.08) == A and math.floor(minVal*0.1) == B:
    print(minVal)
elif math.floor(maxVal*0.08) == A and math.floor(maxVal*0.1) == B:
    print(maxVal)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import math

A, B = map(int, input().split())
value = 0
for i in range(1, 101):
    if math.floor(i * 0.08) == A and math.floor(i * 0.1) == B:
        value = i
        break
if value == 0:
    print(-1)
else:
    print(value)

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())
i1 = x * 12.5
i2 = y * 10
z = max(i1, i2)
if z // 12.5 != x or z // 10 != y:
    print(-1)
else:
    print(int(z))

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())
i1 = x*12.5
i2 = y*10
z = max(i1, i2)
if z//12.5 != x or z//10 != y:
  print(-1)
else:
  print(z)

Submission status: Wrong Answer

Solution code:
a, b = map(float, input().split())
lowest = max([-(-a // 0.08), -(-b // 0.1)])
highest = min([-(-(a+1) // 0.08), -(-(b+1) // 0.1)])
comb = [-1, -1]
for target in range(int(lowest), int(highest+1)):
	cand = [(target*0.08)//1, (target*0.1)//1]
	if cand == [a, b]:
		comb = cand
		break
print('{:.0f} {:.0f}'.format(comb[0], comb[1]))

Submission status: Wrong Answer

Solution code:
import math
A,B=map(int,input().split())
p=math.floor(100*A/8)
print(p if math.floor(p*0.1)==B else -1)

Submission status: Wrong Answer

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

total = int(max(-(-a//0.08),-(-(b//0.1))))
for i in range(1,total+1):
  y1 = int(i * 0.08)
  y2 = int(i * 0.1)
  if y1 == a and y2 == b:
    print(i)
    exit()
print("-1")

Submission status: Wrong Answer

Solution code:
# A = [list(map(int, input().split())) for _ in range(3)]
# n = int(input())
# B = [int(input()) for _ in range(n)]
# X = list(map(int, input().split()))
a, b = map(int, input().split())
aprice = (25*a)/2
bprice = 10*b
if abs(aprice-bprice) <= 10:
    print(int(max(aprice, bprice)))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import math
a, b = [int(i) for i in input().split()]
 
a_min = math.ceil(a * 12.5)
a_max = int((a+1) * 12.5 - 10e-10)
 
b_min = math.ceil(b * 10 )
b_max = int((b+1)*10 - 10e-10)
 
if a_max < b_min:
  print(-1)
  exit()
  
if b_min < a_max:
  print(-1)
  exit()
  
if a_min <= b_min:
  print(b_min)
  exit()
print(a_min)

Submission status: Wrong Answer

Solution code:
import math
a, b = [int(i) for i in input().split()]

a_min = math.ceil(a * 12.5)
a_max = int((a+1) * 12.5)

b_min = math.ceil(b * 10 )
b_max = int((b+1)*10)

if a_max < b_min:
  print(-1)
  exit()

if b_min < a_max:
  print(-1)
  exit()
  
if a_min < b_min:
  print(b_min)
else:
  print(a_min)

Submission status: Wrong Answer

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

a_min = int(a * 12.5) + 1
a_max = int((a+1) * 12.5)

b_min = int(b * 10 ) + 1
b_max = int((b+1)*10)

if a_max < b_min:
  print(-1)
  exit()

if b_min < a_max:
  print(-1)
  exit()
  
if a_min < b_min:
  print(b_min)
else:
  print(a_min)

Submission status: Wrong Answer

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

a_min = int(a / 0.08) + 1
a_max = int( (a+1) / 0.08)

b_min = int(a / 0.10) + 1
b_max = int( (a+1) / 0.10)

if a_max < b_min:
  print(-1)
  exit()

if b_min < a_max:
  print(-1)
  exit()
  
if a_min < b_min:
  print(b_min)
else:
  print(a_min)

Submission status: Wrong Answer

Solution code:
import math
a,b=map(int,input().split())
ax=set(range(math.ceil(25*a/2),math.floor(25*(a+1)/2)+1))
bx=set(range(math.ceil(10*b),math.floor(10*(b+1))+1))
x=list(ax&bx)
if x:
  print(x[0])
else:
  print(-1)

Submission status: Wrong Answer

Solution code:
import math
a,b=map(int,input().split())
ax=set(range(math.ceil(25*a/2),(math.floor(25*(a+1)/2)+1)))
bx=set(range(math.ceil(10*b),(math.floor(10*(b+1)))+1))
x=list(ax&bx)
if x:
  print(x[0])
else:
  print(-1)

Submission status: Wrong Answer

Solution code:
import math
a,b=map(int,input().split())
ax=set(range(math.ceil(25*a/2),math.floor(25*(a+1)/2)))
bx=set(range(math.ceil(10*b),math.floor(10*(b+1))))
x=list(ax&bx)
if x:
  print(x[0])
else:
  print(-1)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import math
a,b=map(int,input().split())
a_down=math.ceil(a/0.08)
a_up=math.ceil((a+1)/0.08)
b_down=math.ceil(b/0.1)
b_up=math.ceil((b+1)/0.1)

for i in range(a_down,a_up):
  if i >= b_down and i < b_up:
    print(i)
    break
  else:
    print(-1)
    break

Submission status: Wrong Answer

Solution code:
import math
a,b=map(int,input().split())
for i in range(2000):
  if math.floor((i+1)*0.1)==a and math.floor((i+1)*0.08)==b:
    print(i+1)
    break

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 max(a_min, b_min) < min(a_max, b_max):
    ans = max(a_min, b_min)
else:
    ans = -1

print(ans)

Submission status: Wrong Answer

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

cand_a = math.ceil(12.5*A)
cand_b = math.ceil(10*B)
max_a = math.floor(12.5*(A + 1))
max_b = math.floor(10*(B + 1))

if cand_a < cand_b:
    if cand_b > max_a:
        ans = -1
    else:
        ans = cand_b
elif cand_b < cand_a:
    if cand_a > max_b:
        ans = -1
    else:
        ans = cand_a
else:
    ans = cand_a

print(ans)

Submission status: Wrong Answer

Solution code:
tax_eight, tax_ten = map(int, input().split())
min_eight_price = tax_eight / 0.08
max_eight_price = (tax_eight + 1) / 0.08
min_ten_price = tax_ten / 0.1
max_ten_price = (tax_ten + 1) / 0.1
min_price = max(min_eight_price, min_ten_price)
max_price = min(max_eight_price, max_ten_price)
if max_price < min_price:
    print(-1)
else:
    print(int(min_price))

Submission status: Wrong Answer

Solution code:
tax_eight, tax_ten = map(int, input().split())
min_eight_price = tax_eight / 0.08
max_eight_price = (tax_eight + 1) / 0.08
min_ten_price = tax_ten * 10
max_ten_price = (tax_ten + 1) * 10
min_price = max(min_eight_price, min_ten_price)
max_price = min(max_eight_price, max_ten_price)
if max_price <= min_price:
    print(-1)
else:
    print(int(min_price))

Submission status: Wrong Answer

Solution code:
tax_eight, tax_ten = map(int, input().split())
min_eight_price = tax_eight / 0.08
max_eight_price = (tax_eight + 1) / 0.08
min_ten_price = tax_ten * 10
max_ten_price = (tax_ten + 1) * 10
min_price = max(min_eight_price, min_ten_price)
max_price = min(max_eight_price, max_ten_price)
if max_price <= min_price:
    print("-1")
else:
    print(int(min_price))

Submission status: Wrong Answer

Solution code:
tax_eight, tax_ten = map(int, input().split())
min_eight_price = tax_eight / 0.08
max_eight_price = (tax_eight + 1) / 0.08
min_ten_price = tax_ten * 10
max_ten_price = (tax_ten + 1) * 10
min_price = max(min_eight_price, min_ten_price)
max_price = min(max_eight_price, max_ten_price)
if max_price <= min_price:
    print("-1")
else:
    print(min_price)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
x1 = a / 0.08
x2 = b / 0.10
ans = int(max(x1, x2))
print(ans if int(ans*0.08)==a and int(ans*0.10)==b else -1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
a=A/(0.08); 
res=0
# print(a,b)
for n in range(1250):
    if (n<=a<n+1):
        tmp=n*0.1
#         print(tmp)
        if (B<=tmp<B+1):
            res=n
#             print(res)
print(-1 if res==0 else res)

Submission status: Wrong Answer

Solution code:
import sys

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

def CalculationTax(List,Tax,Value):
    Answer1 = Value *100 // Tax
    List.append (Answer1)
    Result = (Answer1 + 1) * Tax // 100
    while Result < Value + 1:
        Answer1 += 1
        Result = (Answer1 + 1) * Tax // 100
        List.append (Answer1)

List8 = []
List10 = []
CalculationTax(List8,8,A)
CalculationTax(List10,10,B)

if List8[0] == List10[0]:
    print(List8[0])
    sys.exit()
print('-1')

Submission status: Wrong Answer

Solution code:
import math

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

x=math.floor(a/0.08)
if math.floor(x*0.1)==b:
    print(x)
else:
    print(-1)

Submission status: Wrong Answer

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

for i in range(101):
  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())
C = []
D = []
for i in range(101):
  if math.floor(i*0.08) == a:
    C.append(i)
  if math.floor(i*0.1) == b:
    D.append(i)
if len(list(set(C) & set(D))) == 0:
  print('-1')
else:
  print(min(list(set(C) & set(D))))

Submission status: Wrong Answer

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

amax = math.ceil((A + 1) / 8 * 100) - 1
amin = math.ceil(A / 8 * 100)
bmax = math.ceil((B + 1) * 10) - 1
bmin = math.ceil(B / 10 * 10)

if amin > bmax or bmin > amax:
    print(-1)
else:
    print(int(max(amin, bmin)))

Submission status: Wrong Answer

Solution code:
a,b = map(int, input().split())
ls = [b*10+i for i in [0,1,2,3,4,5,6,7,8,9]]
t = 0
for x in ls:
    if a*100/8 == x:
        print(x)
        break
    else:
        t += 1
        
if t == 10:
    print(-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = -1
for i in range(100000):
  if (i*8//100 == a and i*10//100 == b):
    break
  ans = i+1
    
print(ans)

Submission status: Wrong Answer

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

ans = -1
for i in range(10000):
  if (i*8//100 == a and i*10//100 == b):
    break
  ans = i+1
    
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(1, 101):
    A_ans = int(i * 0.08)
    B_ans = int(i * 0.10)
    if (A_ans == A) & (B_ans == B):
        ans = i
        break
    else:
        ans = -1

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
import math

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
a, b = map(int, input().split())
lsta = list(range(math.ceil(a/0.08), int((a+1)/0.8)+1))
lstb = list(range(math.ceil(b/0.1), int((b+1)/0.1)+1))
for la in lsta:
  for lb in lstb:
    if la==lb:
      print(la)
      exit()
print(-1)

Submission status: Wrong Answer

Solution code:
import math
a, b = map(int, input().split())
lsta = list(range(math.ceil(a/0.08), math.ceil((a+1)/0.8)))
lstb = list(range(math.ceil(b/0.1), math.ceil((b+1)/0.1)))
for la in lsta:
  for lb in lstb:
    if la==lb:
      print(la)
      exit()
print(-1)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
lsta = list(range(int(a/0.08), int((a+1)/0.08)+1))
lstb = list(range(int(b/0.1), int((b+1)/0.1)+1))
for la in lsta:
  for lb in lstb:
    if la==lb:
      print(la)
      exit()
print(-1)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
lb = int(b/0.1)
print(lb if lb in list(range(int(a/0.08), int((a+1)/0.08)+1)) else -1)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
lb = int(b/0.1)
print(lb if lb in list(range(int(a / 0.08), int((a+1) / 0.08))) else -1)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
lsta = list(range(int(a / 0.08), int((a+1) / 0.08)))
lstb = list(range(int(b / 0.1), int((b+1) / 0.1)))
for la in lsta:
  for lb in lstb:
    if la == lb:
      print(lb)
      exit()
print(-1)

Submission status: Wrong Answer

Solution code:
import math
a, b = list(map(int, input().split(" ")))
p1 = 100*a/8

p2 = math.floor(p1*0.1)
if p1%1 !=0:
    print(-1)
elif p2 == b:
    print(int(p1))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import math
a, b = list(map(int, input().split(" ")))
p1 = 100*a/8

p2 = math.floor(p1*0.1)
if p2 == b:
    print(int(p1))
else:
    print(-1)

Submission status: Wrong Answer

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

print(M)

Submission status: Wrong Answer

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

print(-1)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
for i in range(1500):
  if int(i*0.08) == int(i*0.1):
    print(i)

print(-1)

Submission status: Wrong Answer

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

if a==b:
  print(a)
else:
  print("-1")

Submission status: Wrong Answer

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

if a==b:
  print(a)
else:
  print(-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a=input()
(n,m)=a.split(" ")
n=int(n)
m=int(m)
k=n/0.08
k=int(k)
l=int(k*0.08)
j=m/0.1
j=int(j)
o=int(j*0.1)
if l==n and o==m:
    print(k)
else:
    print("-1")