Problem:


Score : 300 points

Problem Statement

Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.)

Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded down to the nearest integer.

If multiple prices satisfy the condition, print the lowest such price; if no price satisfies the condition, print -1.

Constraints

1 \leq A \leq B \leq 100

A and B are integers.

Input

Input is given from Standard Input in the following format:

A B

Output

If there is a price that satisfies the condition, print an integer representing the lowest such price; otherwise, print -1.

Sample Input 1

2 2

Sample Output 1

25

If the price of a product before tax is 25 yen, the amount of consumption tax levied on it is:

When the consumption tax rate is 8 percent: \lfloor 25 \times 0.08 \rfloor = \lfloor 2 \rfloor = 2 yen.

When the consumption tax rate is 10 percent: \lfloor 25 \times 0.1 \rfloor = \lfloor 2.5 \rfloor = 2 yen.

Thus, the price of 25 yen satisfies the condition. There are other possible prices, such as 26 yen, but print the minimum such price, 25.

Sample Input 2

8 10

Sample Output 2

100

If the price of a product before tax is 100 yen, the amount of consumption tax levied on it is:

When the consumption tax rate is 8 percent: \lfloor 100 \times 0.08 \rfloor = 8 yen.

When the consumption tax rate is 10 percent: \lfloor 100 \times 0.1 \rfloor = 10 yen.

Sample Input 3

19 99

Sample Output 3

-1

There is no price before tax satisfying this condition, so print -1.



Sample input:
2 2


Sample output:
25

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
c=[]
d=[]
if a % 2 == 0:
    s = int(100*a/8)
else:
    s = int(100*a/8) + 1
t = int(100*(a+1)/8) + 1
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:
x,y = map(int,input().split())

x_d = int(x / 0.08)
y_d = int(y / 0.10)

if x_d == y_d:
    print(x_d)
else:
    for i in range(y_d, x_d+1):
        if int(i * 0.08) == int(i * 0.10):
            print(i)
            exit()
    else:
        print("-1")

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())

x_d = int(x / 0.08)
y_d = int(y / 0.10)

if x_d == y_d:
    print(x_d)
else:
    if int(x_d * 0.08) == int(x_d * 0.10):
        print(x_d)
    elif int(y_d*0.08) == int(y_d * 0.10):
        print(y_d)
    else:
        print("-1")

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())

x_d = int(x / 0.08)
y_d = int(y / 0.10)

if x_d == y_d:
    print(x_d)
else:
    if int(x_d * 0.08) == int(x_d * 0.10):
        print(x_d)
    else:
        print("-1")

Submission status: Wrong Answer

Solution code:
from bisect import bisect_left as bl
from bisect import bisect_right as br
from heapq import heappush,heappop
from math import floor,ceil
from collections import *
from functools import reduce,cmp_to_key
import sys
input = sys.stdin.readline

M = mod = 998244353
def factors(n):return sorted(set(reduce(list.__add__, ([i, n//i] for i in range(1, int(n**0.5) + 1) if n % i == 0))))
def inv_mod(n):return pow(n, mod - 2, mod)

def li():return [int(i) for i in input().rstrip('\n').split()]
def st():return input().rstrip('\n')
def val():return int(input().rstrip('\n'))
def li2():return [i for i in input().rstrip('\n')]
def li3():return [int(i) for i in input().rstrip('\n')]


a,b = li()
ans = float('inf')
i = b
j = a

d = defaultdict(int)

while j < a + 1:
    d[floor(j/0.08)] += 1
    j += 0.000001

while i < b + 1:
    temp = floor(i/0.1)
    ans = min(ans,temp if d[temp] else float('inf'))
    i += 0.000001

print(ans if ans != float('inf') else -1)

Submission status: Wrong Answer

Solution code:
from bisect import bisect_left as bl
from bisect import bisect_right as br
from heapq import heappush,heappop
from math import floor,ceil
from collections import *
from functools import reduce,cmp_to_key
import sys
input = sys.stdin.readline

M = mod = 998244353
def factors(n):return sorted(set(reduce(list.__add__, ([i, n//i] for i in range(1, int(n**0.5) + 1) if n % i == 0))))
def inv_mod(n):return pow(n, mod - 2, mod)

def li():return [int(i) for i in input().rstrip('\n').split()]
def st():return input().rstrip('\n')
def val():return int(input().rstrip('\n'))
def li2():return [i for i in input().rstrip('\n')]
def li3():return [int(i) for i in input().rstrip('\n')]


a,b = li()
ans = float('inf')
i = b
j = a

d = defaultdict(int)

while j < a + 1:
    d[floor(j/0.08)] += 1
    j += 0.000001

while i < a + 1:
    temp = floor(i/0.08)
    ans = min(ans,temp if d[temp] else float('inf'))
    i += 0.000001

print(ans if ans != float('inf') else -1)

Submission status: Wrong Answer

Solution code:
from bisect import bisect_left as bl
from bisect import bisect_right as br
from heapq import heappush,heappop
from math import floor,ceil
from collections import *
from functools import reduce,cmp_to_key
import sys
input = sys.stdin.readline

M = mod = 998244353
def factors(n):return sorted(set(reduce(list.__add__, ([i, n//i] for i in range(1, int(n**0.5) + 1) if n % i == 0))))
def inv_mod(n):return pow(n, mod - 2, mod)

def li():return [int(i) for i in input().rstrip('\n').split()]
def st():return input().rstrip('\n')
def val():return int(input().rstrip('\n'))
def li2():return [i for i in input().rstrip('\n')]
def li3():return [int(i) for i in input().rstrip('\n')]


a,b = li()
ans = float('inf')
i = b
j = a
while j < a + 1:
    i = b
    while i < b + 1:
        curr1 = floor(j/0.08)
        curr2 = floor(i/0.1)
        if curr1 == curr2:ans = min(ans,curr1)
        i += 0.001
    j += 0.001
print(ans if ans != float('inf') else -1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

price_8=100*a/8
price_10=100*b/10

if(math.floor(price_8+12.5)>price_10):
    print(max(int(price_10), math.ceil(price_8)))
else:
    print(-1)

Submission status: Wrong Answer

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

price_8=100*a/8
price_10=100*b/10
if(b*10+10<math.ceil(a*12.5) or math.floor(a*12.5+12.5)<b*10):
    price = -1
else:
    price = max(math.ceil(price_8), price_10)

print(price)

Submission status: Wrong Answer

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

price_8=100*a/8
price_10=100*b/10
if(math.floor(b*10+10)<math.ceil(a*12.5) or math.floor(a*12.5+12.5)<math.ceil(b*10)):
    price = -1
else:
    price = max(math.ceil(price_8), math.ceil(price_10))

print(price)

Submission status: Wrong Answer

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

price_8=100*a/8
price_10=100*b/10
if(math.floor(b*10+10)<math.ceil(b*12.5) or math.floor(a*12.5+12.5)<math.ceil(a*10)):
    price = -1
else:
    price = max(math.ceil(price_8), math.ceil(price_10))

print(price)

Submission status: Wrong Answer

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

price_8=100*a/8
price_10=100*b/10
if(b/a>1.25):
    price = -1
else:
    price = max(math.ceil(price_8), math.ceil(price_10))

print(price)

Submission status: Wrong Answer

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

price_8=100*a/8
price_10=100*b/10
if(price_10/price_8>1.25):
    price = -1
else:
    price = max(math.ceil(price_8), math.ceil(price_10))

print(price)

Submission status: Wrong Answer

Solution code:
a, b = input("").split()
a = int(a)
b = int(b)
numA = a/0.08
numB = b/0.1
sol = max(numA, numB)
if int(sol*0.08) != a or int(sol*0.1) != b:
    print("-1")
else:
    print(int(sol))

Submission status: Wrong Answer

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

m08=A/0.08
m10low=B/0.1
m10up=(B+1)/0.1

if m08<m10up and m08>m10low:
  print(int(m08))
else:
  print(-1)

Submission status: Wrong Answer

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

m08=A/0.08
m10low=B/0.1
m10up=(B+1)/0.1

if m08<m10up and m08>=m10low:
  print(int(m08))
else:
  print(-1)

Submission status: Wrong Answer

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

m08=A/0.08
m10low=B/0.1
m10up=(B+1)/0.1

if m08<=m10up and m08>=m10low:
  print(int(m08))
else:
  print(-1)

Submission status: Wrong Answer

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

price = b * 10

for i in range(10):
  if ((price + i) * 0.08) == a:
    print(price + i)
    exit()
else:
  print("-1")

Submission status: Wrong Answer

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

price = int(a / 0.08 + 0.5)

if price // 10 == b:
  print(price)
else:
  print("-1")

Submission status: Wrong Answer

Solution code:
import math
a, b = map(int, input().split())
if (a + 1)* 12.5 - 1 < b * 10:
    print(-1)
    exit()
print(max(math.ceil(a * 12.5), b * 10))

Submission status: Wrong Answer

Solution code:
import math
import sys
a, b = map(int, input().split())
if b - a > 0.02 * max(math.ceil(a * 12.5), b * 10):
    print(-1)
    sys.exit()
print(max(math.ceil(a * 12.5), b * 10))

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys
import math
a, b = map(int, input().split())
for x in range(1, 1000, 1):
    if int(x * 0.08) == a and int(x * 0.1) == b:
        print(x)
        sys.exit()
print(-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
A,B = map(int, input().split())
answerA = math.ceil(A/0.08)
answerAA = math.floor((A+1)/0.08)
answerB = math.ceil(B/0.1)
answerBB = math.floor((B+1)/0.1)
if answerA == answerAA:
    if answerA >= answerB and answerA <= answerBB:
        print(answerA)
elif answerB == answerBB:
    if answerB >= answerA and answerB <= answerAA:
        print(answerB)
else:
    if answerB > answerAA:
        print("-1")
    elif answerB == answerAA:
        print(answerAA)
    elif answerA < answerB and answerAA > answerB:
        print(answerB)
    elif answerA == answerB:
        print(answerB)
    elif answerB < answerA and answerBB >= answerA:
        print(answerA)
    elif answerBB < answerA:
        print("-1")
    else:
        print("-1")

Submission status: Wrong Answer

Solution code:
import math
A,B = map(int, input().split())
answerA = math.ceil(A/0.08)
answerAA = math.floor((A+1)/0.08)
answerB = math.ceil(B/0.1)
answerBB = math.floor((B+1)/0.1)
if answerB > answerAA:
    print("-1")
elif answerB == answerAA:
    print(answerAA)
elif answerA < answerB and answerAA > answerB:
    print(answerB)
elif answerA == answerB:
    print(answerB)
elif answerB < answerA and answerBB >= answerA:
    print(answerA)
elif answerBB < answerA:
    print("-1")
else:
    print("-1")

Submission status: Wrong Answer

Solution code:
import math
A,B = map(int, input().split())
answerA = math.ceil(A/0.08)
answerAA = math.floor((A+1)/0.08)
answerB = math.ceil(B/0.1)
answerBB = math.floor((B+1)/0.1)
if answerA < answerB and answerAA >= answerB:
    print(answerB)
elif answerB < answerA and answerBB >= answerA:
    print(answerA)
elif answerB > answerAA:
    print("-1")
elif answerBB < answerA:
    print("-1")
elif answerA >= answerB and answerAA <= answerBB:
    print(answerA)
elif answerB >= answerA and answerBB <= answerAA:
    print(answerB)
else:
    print("-1")

Submission status: Wrong Answer

Solution code:
import math
A,B = map(int, input().split())
answerA = math.ceil(A/0.08)
answerAA = math.floor((A+1)/0.08)
answerB = math.ceil(B/0.1)
answerBB = math.floor((B+1)/0.1)
if answerA < answerB and answerAA >= answerB:
    print(answerB)
elif answerB < answerA and answerBB >= answerA:
    print(answerA)
elif answerA >= answerB and answerAA <= answerBB:
    print(answerA)
elif answerB >= answerA and answerBB <= answerAA:
    print(answerB)
else:
    print("-1")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
for i in range(1, 10000):
  if int(0.08 * i) == A and int(0.01 * i) == B:
    print(i)
    quit()
print('-1')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
A,B = map(int,input().split())
valA_min = math.ceil(A/0.08)
valB_min = math.ceil(B/0.1)
if valA_min <= valB_min:
  if A == round(valB_min*0.08):
    result = valB_min
  else:
    result = -1
else:
  if B == round(valA_min*0.1):
    result = valA_min
  else:
    result = -1
print(result)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import math
import itertools
import statistics
#import numpy as np
import collections
a, b = list(map(int, input().split()))
#print(a/0.08)
price = math.ceil(a/0.08)
if b==price*0.1//1:
    ans = int(price//1)
    print(ans)
else:
    while math.floor(price*0.08)==a:
        price += 1
        if b==price*0.1//1:
            ans = int(price//1)
            print(ans)
            exit()

    print("-1")


# print(a/0.08*0.1//1)
#print(b/0.1)

Submission status: Wrong Answer

Solution code:

import math
import itertools
import statistics
#import numpy as np
import collections
a, b = list(map(int, input().split()))
#print(a/0.08)
price = a//0.08
while math.floor(price*0.08)==a:
    if b==price*0.1//1:
        ans = int(price//1)
        print(ans)
        exit() 
    price += 1

print("-1")


# print(a/0.08*0.1//1)
#print(b/0.1)

Submission status: Wrong Answer

Solution code:

import math
import itertools
import statistics
#import numpy as np
import collections
a, b = list(map(int, input().split()))
#print(a/0.08)
price = math.floor(a/0.08)
while math.floor(price*0.08)==a:
    if b==price*0.1//1:
        ans = int(price//1)
        print(ans)
        exit()
price += 1

print("-1")


# print(a/0.08*0.1//1)
#print(b/0.1)

Submission status: Wrong Answer

Solution code:

import math
import itertools
import statistics
#import numpy as np
import collections
a, b = list(map(int, input().split()))
#print(a/0.08)
price = math.ceil(a/0.08)
if b==price*0.1//1:
    ans = int(price//1)
    print(ans)
else:
    while math.ceil(price*0.08)==a:
        price += 1
        if b==price*0.1//1:
            ans = int(price//1)
            print(ans)
            exit()

    print("-1")


# print(a/0.08*0.1//1)
#print(b/0.1)

Submission status: Wrong Answer

Solution code:

import math
import itertools
import statistics
#import numpy as np
import collections
a, b = list(map(int, input().split()))
#print(a/0.08)
price = a/0.08
if b==price*0.1//1:
    ans = int(price//1)
    print(ans)
else:
    while math.ceil(price*0.08)==a:
        price += 1
        if b==price*0.1//1:
            ans = int(price//1)
            print(ans)
            exit()

    print("-1")


# print(a/0.08*0.1//1)
#print(b/0.1)

Submission status: Wrong Answer

Solution code:

import math
import itertools
import statistics
#import numpy as np
import collections
a, b = list(map(int, input().split()))
#print(a/0.08)

if b==a/0.08*0.1//1:
    ans = int(a/0.08//1)
    print(ans)
else:
    print("-1")
#
# print(a/0.08*0.1//1)
#print(b/0.1)

Submission status: Wrong Answer

Solution code:
A,B=tuple(int(i) for i in input().split(" "))
err=lambda X:abs(int(X*0.08)-A)+abs(int(X*0.10)-B)
rg=[int(A/0.08),int(B/0.10)]
rg.sort()
rg[0]-=1
rg[1]+=1
solv=[X for X in range(*rg) if err(X)==0]
solv.sort()
if(len(solv)==0):
    print("-1")
else:
    print(solv[0])

Submission status: Wrong Answer

Solution code:
a, b = list(map(int, input().split()))
c = 10 * b
d = int(a / 0.08 + 0.5)
for i in range(c, c + 10):
    if i == d:
        print(d)
        break
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import math
A,B=list(map(int, input().split()))
Amin = int(math.ceil(A/0.08))
Amax = int((A+1)/0.08)
Bmin = int(math.ceil(B/0.10))
Bmax = int((B+1)/0.10)
if Amin <= Bmin and Bmin <= Amax:
    print(Bmin)
elif Amin <= Bmax and Bmax <= Amax:
    print(Amin)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
A = a[0]
B = a[1]
c = True
for x in range(10001):
    a = x * 0.08
    b = x * 0.1
    if A == round(a,2) and B == round(b,2):
        print(x)
        c = False
        break
if c:
    print(-1)

Submission status: Wrong Answer

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


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

if judge == 0:
    print(-1)

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
A = a[0]
B = a[1]
c = True
for x in range(10001):
    a = x * 8 / 100
    b = x * 10 / 100
    if A == round(a) and B == round(b):
        print(x)
        c = False
        break
if c:
    print(-1)

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
A = a[0]
B = a[1]
c = True
for x in range(10001):
    a = x * 8 // 100
    b = x * 10 // 100
    print(a)
    print(b)
    if A == a and B == b:
        print(x)
        c = False
        break
if c:
    print(-1)

Submission status: Wrong Answer

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

x = a/0.08

y = b/0.1


judge = 0

for i in range(10):
    for j in range(10):
        x = (a+i/10)/0.08
        y = (b+j/10)/0.10
        if (x == y) and (judge == 0):
            judge = 1
            print(int(x))


if judge == 0:
    print(-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
x = [a[0]]
y = [a[1]]
a = []
b = []
c = []
d = 0
while x[len(x)-1] < x[0] + 1:
    x.append(round(x[d] + 0.001,3))
    y.append(round(y[d] + 0.001,3))
    d += 1
for i in x:
    a.append(round(i/0.08,3))
for i in y:
    b.append(round(i/0.10,3))
for i in a:
    for i2 in b:
        if i == i2:
            c.append(i)
if len(c) > 0:
    print(round(min(c)))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
x = [a[0]]
y = [a[1]]
a = []
b = []
c = []
d = 0
while x[len(x)-1] < x[0] + 1:
    x.append(round(x[d] + 0.001,3))
    y.append(round(y[d] + 0.001,3))
    d += 1
for i in x:
    a.append(i/0.08)
for i in y:
    b.append(i/0.10)
for i in a:
    for i2 in b:
        if i == i2:
            c.append(i)
if len(c) > 0:
    print(round(min(c)))
else:
    print(-1)

Submission status: Wrong Answer

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

a_tax = int(a / 0.08)
b_tax = int(b / 0.1)
n  = min([a_tax, b_tax])

if b_tax / a_tax > 1.3 or b_tax / a_tax < 1.2:
    n = -1
else:
    while True:
        if a == int(n * 0.08) and b == int(n * 0.1):
            break

        n += 1

print(n)

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
x = [a[0]]
y = [a[1]]
a = []
b = []
c = []
d = 0
while x[len(x)-1] < x[0] + 1:
    x.append(round(x[d] + 0.001,3))
    y.append(round(y[d] + 0.001,3))
    d += 1
for i in x:
    a.append(i/0.08)
for i in y:
    b.append(i/0.1)
for i in a:
    for i2 in b:
        if i == i2:
            c.append(i)
if len(c) > 0:
    print(round(min(c)))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
x = [a[0]]
y = [a[1]]
a = []
b = []
c = []
for i in range(9):
    x.append(round(x[i] + 0.1,1))
    y.append(round(y[i] + 0.1,1))
for i in x:
    a.append(i/0.08)
for i in y:
    b.append(i/0.1)
for i in a:
    for i2 in b:
        if i == i2:
            c.append(i)
if len(c) > 0:
    print(round(min(c)))
else:
    print(-1)

Submission status: Wrong Answer

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

s8 = int(a * 12.5)
s10 = int(b * 10)
maxs = max(s8, s10)
mins = min(s8, s10)

minimum = -1
for i in range(mins, maxs+1):
  if (int(i * .08) == a) and (int(i * .1) == b):
    minimum = i
    break
    
print(minimum)

Submission status: Wrong Answer

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

for i in range(1009):
    answer_A=i*0.08
    answer_B=i*0.1
    if answer_A==A and answer_B==B:
        answer=i
        break
    else:
        answer=-1

print(answer)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

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

e=int(a / 0.08)
for i in range(e, 1009):
    if (b == math.floor(i * 0.1)):
        print(i)
        exit (0)

print(-1)

Submission status: Wrong Answer

Solution code:
import math
a, b = [int(i) for i in input().split()]
for i in range(1000):
    if(math.floor(0.08 * i) == a and math.floor(0.1 * i) == b):
        print(i)
        break

Submission status: Wrong Answer

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

m = math.floor(max(a/0.08, b/0.1))
M = math.floor(min((a+1)/0.08, (b+1)/0.1))

if m > M:
  print("-1")
else:
  print(int(m))

Submission status: Wrong Answer

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

m = max(a/0.08, b/0.1)
M = min((a+1)/0.08, (b+1)/0.1)

if m > M:
  print("-1")
else:
	print(int(math.floor(m)))

Submission status: Wrong Answer

Solution code:
from math import ceil


def solve(string):
    a, b = map(int, string.split())
    ans = ceil(a / 0.08)
    while ans // 10 < b:
        ans += 1
    return str(ans) if ans * 2 // 25 == a else "-1"


if __name__ == '__main__':
    import sys
    print(solve(sys.stdin.read().strip()))

Submission status: Wrong Answer

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

flg = False
A_price = int(A/0.08)
A_price_range = [A_price + i for i in range(-12, 1)]

B_price = int(B/0.1)
B_price_range = [B_price + i for i in range(0, 10)]
co = set(A_price_range) &  set(B_price_range)

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

Submission status: Wrong Answer

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

flg = False
A_price = int(A/0.08)
A_price_range = [A_price + i for i in range(-12, 1)]

B_price = int(B/0.1)
B_price_range = [B_price + i for i in range(0, 11)]
co = set(A_price_range) &  set(B_price_range)

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

Submission status: Wrong Answer

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

flg = False
price = int(A/0.08)
for i in range(-12, 1):
    price_range = price+i
    if int(price_range*0.1)==B:
        flg = True
        break

if flg:
    print(price_range)
else:
    print(-1)

Submission status: Wrong Answer

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

price = int(A/0.08)
if B==int(price*0.1):
    print(price)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import math
a,b=map(int,input().split())
arr=[]
for i in range(1,101,1):
  if a==math.floor(i*0.08) and b==math.floor(i*0.1) :
    print(i)
    exit()
print(-1)

Submission status: Wrong Answer

Solution code:
import math
a,b=map(int,input().split())
arr=[]
for i in range(1,101,1):
  if b==math.floor(i*0.1):
    arr.append(i)
for i in arr:
  if a==math.floor(i*0.08):
    print(i)
    exit()
print(-1)

Submission status: Wrong Answer

Solution code:
import math

A, B = [int(x) for x in input().strip().split()]

flg = 0
for i in range(1,1000):
        x = math.floor(i * 0.08)
        y = math.floor(i * 0.1)
        if x == A and y == B:
                print(i)
                flg = 1
                break
if flg == 0:
        print(-1)

Submission status: Wrong Answer

Solution code:
import math

A, B = [int(x) for x in input().strip().split()]

x = math.ceil(A / 0.08)
y = math.floor(x * 0.1)

if y == B:
        print(x)
else:
        y = math.floor( (x-1) * 0.1)
        if y == B:
                print(x)
        else:
                print(-1)

Submission status: Wrong Answer

Solution code:
import math

A, B = [int(x) for x in input().strip().split()]

x = math.ceil(A / 0.08)
y = math.floor(x * 0.1)



if y == B:
        print(x)
else:
        print(-1)

Submission status: Wrong Answer

Solution code:
import math

A, B = [int(x) for x in input().strip().split()]

x = math.floor(A / 0.08)
y = math.floor(B / 0.1)

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

Submission status: Wrong Answer

Solution code:
import math

A, B = [float(x) for x in input().strip().split()]

x = math.floor(A / 0.08)
y = math.floor(0.1 * x)

if y == B:
        print(x)
else:
        print(-1)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
# b, c =
# a = int(input())
#n = str(input())
from math import floor
A, B = [int(i) for i in input().split()]

# 判定
inc = floor(A / 0.08)
inc_max = (A + 1) / 0.08

while(1):
    if inc >= inc_max:
        print(-1)
        break
    elif floor(inc * 0.1) == B:
        print(inc)
        break
    else:
        inc += 1

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
A, B = map(int,input().split())
for i in range(10000):
    if math.floor(i * 0.08) == A:
        result = i
        break
if math.floor(result * 0.1) == B:
    print(result)
else:
    print('-1')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

a_b = list(map(int, input().split()))

a = a_b[0]
b = a_b[1]

#aを満たす範囲
a_min = math.floor(a / 0.08)
a_max = math.floor((a+1) / 0.08)

#bを満たす範囲
b_min = math.floor(b / 0.10)
b_max = math.floor((b+1) / 0.10)

for i in range(a_min, a_max):
  tax = i * 0.10
  if tax >= b and tax < b+1:
    print(i)
    break
  else:
    pass
  if i == a_max - 1:
    print(-1)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
r = '-1'
for i in range(100):
	v = i + 1
	ax = int(v * 0.08)
	if ax == a:
		bx = int(v * 0.1)
		if bx == b:
			r = v
			break
print(r)

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
a,b=map(int,input().split())
i=1
while i<200:
    if i*0.08//1==a and i*0.1//1==b:
        print(i)
        exit()
    i+=1
print(-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

def solution():
    a, b = map(int, input().split())
    aa = math.floor(a / 0.08)
    ansa = math.floor(aa * 0.08)
    ansb = math.floor(aa * 0.1)
    if a == ansa and b == ansb:
        print(aa)
    else:
        print('-1')

solution()

Submission status: Wrong Answer

Solution code:
import math

def solution():
    a, b = map(int, input().split())
    aa = a / 0.08
    ansa = math.floor(aa * 0.08)
    ansb = math.floor(aa * 0.1)
    if a == ansa and b == ansb:
        print(math.floor(aa))
    else:
        print('-1')

solution()

Submission status: Wrong Answer

Solution code:
# 消費税額
A, B = map(int, input().split())

for i in range(1, 2000):
    if int(i * 0.08) == A and int(i * 0.1) == B:
        print(int(A/0.08))
        break
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
# 消費税額
A, B = map(int, input().split())

# 2000としたのは余裕をもってこした。1500でもよいと思う。
for i in range(2000):
    if int(i * 0.08) == A and int(i * 0.1) == B:
        print(int(A/0.08))
        break
else:
    print(-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(0,1009):
    ans_a=int(i*0.08)
    ans_b=int(i*0.1)
    if A==ans_a&B==ans_b:
        ans=i
        break
    ans=-1

print(ans)

Submission status: Wrong Answer

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

for i in range(1,5000):
    ans_a=int(i*0.08)
    ans_b=i*0.1
    if A==ans_a&B==int(ans_b):
        ans=i
        break
    ans=-1

print(ans)

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
ans_1=[A*100//8]
temp_a=A*100//8
ans_2=[B*100//10]
temp_b=B*100//10

for i in range(1,7):
    ans_1.append(temp_a+i)
for j in range(1,9):
    ans_2.append(temp_b+j)

ans=set(ans_1)&set(ans_2)
ans=list(ans)

if ans!=[]:
    ans=sorted(ans,reverse=False)

else:
    ans.append(-1)

print(ans[0])

Submission status: Wrong Answer

Solution code:
inp = list(map(int,input().split()))
a=inp[0]
b=inp[1]
k=a/0.08
k1=int(k)
if(int(k*0.1)==b):
    print(int(k))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import math
tax1,tax2 = map(int,input().split())
tax_max1 = tax1+1 
if int(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
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 math.ceil(ans[0]) > ans[1]:
        print(-1)
    else:
        print(math.ceil(ans[0]))