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:
from math import floor

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

min1 = floor(A / 0.08)
max1 = floor((A+1) / 0.08)
min2 = floor(B / 0.1)
max2 = floor((B+1) / 0.1)

if min1 >= min2 and min1 <= max2:
    print(min1)
elif min2 >= min1 and min2 <= max1:
    print(min2)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
A,B =map(int,input().split())
 
# 元の価格ｘ,8%  y、１０％
import math
x = A/0.08
x_1 = math.ceil((A+1)/0.08 )
y = B/0.1
y_1 = math.ceil( (B+1)/0.1 )

x_2 = {i for i in range(int(x),int(x_1) ) }
y_2 = {i for i in range(int(y),int(y_1) ) }
moto_nedan = x_2 & y_2
if len(moto_nedan) == 0:
    print("-1")
else:
    print(min(moto_nedan))

Submission status: Wrong Answer

Solution code:
A,B =map(int,input().split())
 
# 元の価格ｘ,8%  y、１０％
x = A/0.08
x_1 =(A+1)/0.08
y = B/0.1
y_1 = (B+1)/0.1

x_2 = {i for i in range(int(x),int(x_1) +1) }
y_2 = {i for i in range(int(y),int(y_1) +1) }
moto_nedan = x_2 & y_2
if len(moto_nedan) == 0:
    print("-1")
else:
    print(min(moto_nedan))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A,B =map(int,input().split())
 
# 元の価格ｘ,8%  y、１０％
x = A/0.08
x_1 =(A+1)/0.08
y = B/0.1
y_1 = (B+1)/0.1

x_2 = {i for i in range(int(x),int(x_1) +1) }
y_2 = {i for i in range(int(y),int(y_1) +1) }
moto_nedan = x_2 & y_2
if len(moto_nedan) == 0:
    print("-1")
else:
    print(min(moto_nedan))
print(x_2)
print(y_2)
print(38*0.08)

Submission status: Wrong Answer

Solution code:
A,B =map(int,input().split())
 
# 元の価格ｘ,8%  y、１０％
x = A/0.08
x_1 =(A+1)/0.08
y = B/0.1
y_1 = (B+1)/0.1

x_2 = {i for i in range(int(x),int(x_1)) if i<=100}
y_2 = {i for i in range(int(y),int(y_1)) if i<=100}
moto_nedan = x_2 & y_2
if len(moto_nedan) == 0:
    print("-1")
else:
    print(min(moto_nedan))

Submission status: Wrong Answer

Solution code:
A,B =map(int,input().split())
 
# 元の価格ｘ,8%  y、１０％
x = A/0.08
x_1 =(A+1)/0.08
y = B/0.1
y_1 = (B+1)/0.1

x_2 = {i for i in range(int(x),int(x_1))}
y_2 = {i for i in range(int(y),int(y_1))}
moto_nedan = x_2 & y_2
if len(moto_nedan) == 0:
    print("-1")
else:
    print(min(moto_nedan))

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

def check(a, b, x):
    if int(x * 0.08) != a or int(x * 0.1) != b:
        return -1
    return x

def prob_c(a, b):
    yasu = a * 100 / 8
    taka = b * 100 / 10
    ans = int(check(a, b, max(yasu, taka)))
    print(ans)

if __name__ == '__main__':
    a, b = map(int, input().split())
    prob_c(a,b)

Submission status: Wrong Answer

Solution code:
tax8, tax10 = map(int,input().split())
import math

tax10_list = []
list = []
count = 0

for i in range(10):
    tax10_list.append(math.floor(tax10*10+i))

for x in range(10):
    if math.floor(tax10_list[x] * 0.08) == tax8:
        print(tax10_list[x])

        break
    else:
        count += 1

if count == 9:
    print("-1")
else:
    None

Submission status: Wrong Answer

Solution code:
tax8, tax10 = map(int,input().split())
import math

tax10_list = []
list = []
count = 0

for i in range(10):
    tax10_list.append(math.floor(tax10*10+i))

for x in range(tax10_list[0],tax10_list[9]):
    if math.floor(x * 0.08) == tax8:
        print(math.floor(x * 0.08))

        break
    else:
        count += 1

if count == 9:
    print("-1")
else:
    None

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
i=1
while True:
  if (int(i*0.08)==a and int(i*0.1)==b):
    print(i)
    exit()
  if i>200:
    print(-1)
    exit()
  i=i+1

Submission status: Wrong Answer

Solution code:
import math
a,b=map(int,input().split())
i=1
while True:
  if math.floor(i*0.08)==a and math.floor(i*0.1)==b:
    print(i)
    exit()
  if i>100:
    print(-1)
    exit()
  i=i+1

Submission status: Wrong Answer

Solution code:
import math
a,b=map(int,input().split())
i=1
while True:
  if math.floor(i*0.08)==a and math.floor(i*0.1)==b:
    print(i)
    exit()
  if i>=100:
    print(-1)
    exit()
  i=i+1

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
i=1
while True:
  if (i*0.08)//1==a and (i*0.1)==b:
    print(i)
    exit()
  if i>=100:
    print(-1)
    exit()
  i=i+1

Submission status: Wrong Answer

Solution code:
from math import ceil
def tax(a, b):
    mina, maxa = a/0.08, (a+1)/0.08
    minb, maxb = b/0.1, (b+1)/0.1
    print(mina, maxa, minb, maxb)
    if(mina >= maxb or minb >= maxa): return -1

    return max(ceil(mina), ceil(minb))

a, b= map(int, input().strip().split())
print(tax(a, b))

Submission status: Wrong Answer

Solution code:
import math
def marumeru(a):
  return math.floor(a)
 
a, b = input().split(' ')
a = int(a)
b = int(b)
result = -1
for i in range(1000):
  if marumeru(i * 0.08) == a and marumeru(i * 0.1) == b:
    result = i
    break
print(result)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def tax(a, b):
    mina, maxa = a/0.08, (a+1)/0.08
    minb, maxb = b/0.1, (b+1)/0.1
    print(mina, maxa, minb, maxb)
    if(mina >= maxb or minb >= maxa): return -1

    return max(int(mina), int(minb))

a, b= map(int, input().strip().split())
print(tax(a, b))

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
minA=float(A/0.08)
supA=float((A+1)/0.08)
minB=float(B/0.10)
supB=float((A+1)/0.01)
x=[]
y=[]
zmina=int(minA//1)
zmaxa=int(supA//1+1)
zminb=int(minB//1)
zmaxb=int(supB//1+1)
for i in range(zmina,zmaxa):
  x.append(i)
for j in range(zminb,zmaxb):
  y.append(j)
x=set(x)
y=set(y)
z=x & y
z=list(z)
if z:
  print(z[0])
else:
  print("-1")

Submission status: Wrong Answer

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

x = math.ceil(a / .08)
b1 = math.floor(x * .1)

if(b==b1):
    print(x)
else:
    print(-1)

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(1009):
            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:
import math
a,b=map(int,input().split())
answer=False
for i in range(1,1009):
    if math.floor(i*0.8)==math.floor(b*10):
        print(i)
        answer=True
        break
if not answer:
    print(-1)

Submission status: Wrong Answer

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

xa = int(a/0.08)
xb = int(b/0.1)

if xa == xb:
    print(xa)
else:
    ans = -1
    for i in range(1, max(xa, xb) + 1):
        if int(i*0.08) == a and  int(i*0.1) == b:
            ans = i
            break
    print(ans)

Submission status: Wrong Answer

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

xa = int(a/0.08)
xb = int(b/0.1)

if xa == xb:
    print(xa)
else:
    if int(xa*0.1) == b:
        print(xa)
    elif int(xb*0.08) == a:
        print(xb)
    else:
        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)
        break

else:print(-1)

Submission status: Wrong Answer

Solution code:
P8, P10 = map(int, input().split())


import math
price1_min = math.ceil(P8/0.08)

price1_max = math.floor((P8+1)/0.08)

price2_min = math.ceil(P10/0.10)

price2_max = math.floor((P10+1)/0.10)



if (price1_max >= price2_min) and (price2_max >= price1_min):
    print(max(price2_min, price1_min))
else: 
    print(-1)

Submission status: Wrong Answer

Solution code:
P8, P10 = map(int, input().split())
 
import math
 
 
price1_min = math.floor(P8/0.08)
 
price1_max = math.floor((P8+1)/0.08)-1
 
price2_min = math.floor(P10/0.10)
 
price2_max = math.floor((P10+1)/0.10)-1
 
 
 
if (price1_max >= price2_min) and (price2_max >= price1_min):
    print(max(price2_min, price1_min))
else: 
    print(-1)

Submission status: Wrong Answer

Solution code:
P8, P10 = (8, 10)

import math
price1_min = math.floor(P8/0.08)

price1_max = math.floor((P8+1)/0.08)

price2_min = math.floor(P10/0.10)

price2_max = math.floor((P10+1)/0.10)



if (price1_max >= price2_min) and (price2_max >= price1_min):
    print(max(price2_min, price1_min))
else: 
    print(-1)

Submission status: Wrong Answer

Solution code:
P8, P10 = (8, 10)

import math
price1_min = math.floor(P8/0.08)

price1_max = math.floor((P8+1)/0.08)-1

price2_min = math.floor(P10/0.10)

price2_max = math.floor((P10+1)/0.10)-1



if (price1_max >= price2_min) and (price2_max >= price1_min):
    print(max(price2_min, price1_min))
else: 
    print(-1)

Submission status: Wrong Answer

Solution code:
P8, P10 = (8, 10)

import math
price1_min = math.floor(P8/0.08)

price1_max = math.floor((P8+1)/0.08)-1

price2_min = math.floor(P10/0.10)

price2_max = math.floor((P10+1)/0.10)-1



if (price1_max > price2_min) and (price2_max > price1_min):
    print(max(price2_min, price1_min))
else: 
    print(-1)

Submission status: Wrong Answer

Solution code:
P8, P10 = (8, 10)

import math
price1_min = math.floor(P8/0.08)
print(price1_min)

price1_max = math.floor((P8+1)/0.08)-1
print(price1_max)

price2_min = math.floor(P10/0.10)
print(price2_min)

price2_max = math.floor((P10+1)/0.10)-1
print(price2_max)



if (price1_max > price2_min) and (price2_max > price1_min):
    print(max(price2_min, price1_min))
else: 
    print(-1)

Submission status: Wrong Answer

Solution code:
import math
 
 
P8, P10 = map(int, input().split())
 
price1_min = math.floor(P8/0.08)
 
price1_max = math.floor((P8+1)/0.08)
 
price2_min = math.floor(P10/0.10)
 
price2_max = math.floor((P10+1)/0.10)
 
 
 
if (price1_max > price2_min) and (price2_max > price1_min):
    print(max(price2_min, price1_min))
else: 
    print(-1)

Submission status: Wrong Answer

Solution code:
import math


P8, P10 = map(int, input().split())

price1_min = math.floor(P8/0.08)
print(price1_min)

price1_max = math.floor((P8+1)/0.08)
print(price1_max)

price2_min = math.floor(P10/0.10)
print(price2_min)

price2_max = math.floor((P10+1)/0.10)
print(price2_max)



if (price1_max > price2_min) and (price2_max > price1_min):
    print(max(price2_min, price1_min))
else: 
    print(-1)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
"""
Spyderエディタ

これは一時的なスクリプトファイルです。
"""
import math

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

alpha = []
beta = []

for x in range(math.floor(a/0.08), math.floor(a/0.05)):
    if math.floor(x * 0.08) == a:
        alpha.append(x)
for y in range(math.floor(a/0.10), math.floor(a/0.05)):
    if math.floor(y * 0.1) == a:
        beta.append(y)

if min(alpha) in beta:
    print(min(alpha))
elif min(beta) in alpha:
    print(min(beta))
else:
    print("-1")

Submission status: Wrong Answer

Solution code:
from math import floor, ceil

a, b = map(int, input().split())
print(ceil(a / 0.08), ceil(b/0.1)+10)
for i in range(ceil(a / 0.08), ceil(b/0.1)+10):
    if floor(i*0.08) == a and floor(i*0.10) == b and i >= 1:
        print(i)
        break
else:
    print('-1')

Submission status: Wrong Answer

Solution code:
from sys import exit, stdin
A, B = [int(_) for _ in stdin.readline().rstrip().split()]
for i in range(1, 101):
    if int(i*0.08) == A and int(i*0.1) == B:
        print(i)
        exit()
print(-1)

Submission status: Wrong Answer

Solution code:
import numpy as np
from sys import exit, stdin
A, B = [int(_) for _ in stdin.readline().rstrip().split()]
for i in range(1, 101):
    if np.floor(i*0.08) == A and np.floor(i*0.1) == B:
        print(int(i))
        exit()
print(-1)

Submission status: Wrong Answer

Solution code:
import numpy as np
from sys import exit, stdin
A, B = [int(_) for _ in stdin.readline().rstrip().split()]
for i in range(1, 101):
    if np.floor(i*0.08) == A and np.floor(i*0.1) == B:
        print(i)
        exit()
print(-1)

Submission status: Wrong Answer

Solution code:
from math import floor
from sys import exit, stdin
A, B = [int(_) for _ in stdin.readline().rstrip().split()]
for i in range(1, 101):
    if floor(i*0.08) == A and floor(i*0.1) == B:
        print(i)
        exit()
print(-1)

Submission status: Wrong Answer

Solution code:
from math import floor

a, b = map(int, input().split())
for i in range(int(b / 0.1), int(a / 0.08)+1):
    if floor(i*0.08) == a and  floor(i*0.10) == b and i >= 1:
        print(i)
        break
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
from math import floor

a, b = map(int, input().split())
for i in range(int(b / 0.1), int(a / 0.08)+1):
    if floor(i*0.08) == a and  floor(i*0.10) == b:
        print(i)
        break
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import math
A,B = (int(x) for x in input().split())
a = range(math.ceil(A/0.08), math.floor(((A+1)/0.08)+1))
b = range(math.ceil(B/0.1), math.floor(((B+1)/0.1)+1))
c = set(a) & set(b)
if len(c) == 0:
          print(-1)
else:
          print(min(c))

Submission status: Wrong Answer

Solution code:
import math
A, B = list(map(int, input().split()))
cand_A_min = math.ceil(A * (1.0 / 0.08))
cand_A_max = math.floor((A + 1) * (1.0 / 0.08))

cand_B_min = math.ceil(B * (1.0 / 0.1))
cand_B_max = math.floor((B + 1) * (1.0 / 0.1))
cand_B_set = set(range(cand_B_min, cand_B_max + 1))

ans = -1
for a in range(cand_A_min, cand_A_max + 1):
    if a in cand_B_set:
        ans = a
        break
print(ans)

Submission status: Wrong Answer

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

ans_b_min = b * 10
ans_b_list = []
for i in range(0, 10):
    ans_b_tmp = ans_b_min + i
    ans_b_list.append(ans_b_tmp)
    # print(ans_b_tmp)

# print('--------')

ans_a_min = a * 12.5
ans_a_list = []
for i in range(0, 13):
    ans_a_tmp = ans_a_min + i
    if ans_a_tmp.is_integer():
        ans_a_list.append(int(ans_a_tmp))
        # print(ans_a_tmp)

# print('--------')

for ans_a in ans_a_list:
    if ans_a in ans_b_list:
        print(int(ans_a))
        exit(0)

print(-1)

Submission status: Wrong Answer

Solution code:
A, B = list(map(int, input().split()))
cand_A_min = int(A * (1.0 / 0.08))
cand_A_max = int((A + 1) * (1.0 / 0.08))

cand_B_min = int(B * (1.0 / 0.1))
cand_B_max = int((B + 1) * (1.0 / 0.1))
cand_B_set = set(range(cand_B_min, cand_B_max + 1))

ans = -1
for a in range(cand_A_min, cand_A_max + 1):
    if a in cand_B_set:
        ans = a
        break
print(ans)

Submission status: Wrong Answer

Solution code:
# coding: utf-8

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

x = int(A / 0.08)

y = int(B / 0.1)

result = max(x, y)

if x < y:
    print('-1')
else:
    print(result)

Submission status: Wrong Answer

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

ans_b_min = b * 10
ans_b_list = []
for i in range(0, 10):
    ans_b_tmp = ans_b_min + i
    ans_b_list.append(ans_b_tmp)
    # print(ans_b_tmp)

# print('--------')

ans_a_min = a * 12.5
ans_a_list = []
for i in range(0, 13):
    ans_a_tmp = ans_a_min + i
    if ans_a_tmp.is_integer():
        ans_a_list.append(ans_a_tmp)
        # print(ans_a_tmp)

# print('--------')

for ans_a in ans_a_list:
    if ans_a in ans_b_list:
        print(int(ans_a))
        exit(0)

print(-1)

Submission status: Wrong Answer

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

ans_b_min = b * 10
ans_b_list = []
for i in range(0, 10):
    ans_b_tmp = ans_b_min + i
    ans_b_list.append(ans_b_tmp)
    # print(ans_b_tmp)

# print('--------')

ans_a_min = a * 12.5
ans_a_list = []
for i in range(0, 12):
    ans_a_tmp = ans_a_min + i
    if ans_a_tmp.is_integer():
        ans_a_list.append(ans_a_tmp)
        # print(ans_a_tmp)

# print('--------')

for ans_a in ans_a_list:
    if ans_a in ans_b_list:
        print(int(ans_a))
        exit(0)

print(-1)

Submission status: Wrong Answer

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

ans_b_min = b * 10
ans_b_list = []
for i in range(0, 10):
    ans_b_list.append(ans_b_min + i)

ans_a_min = a * 12.5
ans_a_list = []
for i in range(0, 8):
    ans_a_tmp = ans_a_min + i
    if ans_a_tmp.is_integer():
        ans_a_list.append(ans_a_tmp)

for ans_a in ans_a_list:
    if ans_a in ans_b_list:
        print(int(ans_a))
        exit(0)

print(-1)

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
tmp=0
for i in range(1250):
    x=int(a/0.08)
    y=int(b/0.1)
    if int(x)==int(y):
        print(int(x))
        tmp=1
        break
if tmp==0:
    print(-1)

Submission status: Wrong Answer

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

x=int(a/0.08)
y=int(b/0.1)
if int(x)==int(y):
    print(int(x))

elif x!=y:
    n=x*0.1
    m=y*0.08
    if int(n)==int(a):
        x=int(x)
        for i in range(int(x-x*0.1),int(x+x*0.1)):
            if int(i*0.1)==a and int(i*0.08)==b:
                print(i)
                break
    elif int(m)==int(b):
        y=int(y)
        for i in range(int(y-y*0.1),int(y+y*0.1)):
            if int(i*0.1)==a and int(i*0.08)==b:
                print(i)
                break
    else:
        print(-1)

Submission status: Wrong Answer

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

x=a/0.08
y=b/0.1
if int(x)==int(y):
    print(int(x))

elif x!=y:
    n=x*0.1
    m=y*0.08
    if int(n)==int(a):
        print(int(x))
    elif int(m)==int(b):
        print(int(y))
    else:
        print(-1)

Submission status: Wrong Answer

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

ans = b * 10
status = ''
for i in range(10):
  8*(ans + i)//100
  if(a == 8*(ans + i)//100):
    ans += i
    status = 'ok'
    break;

if status =='ok':
  print(ans+i)
  
else:
  print(-1)

Submission status: Wrong Answer

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

ans = min(a*100//8,b*100//10)
if ans < 0:
  ans = -1
  
print(ans)

Submission status: Wrong Answer

Solution code:
import math

def per8_and_per10(n, a, b):
  per8  = n * 0.08 
  per10 = n * 0.1
  if f01_rounding(per8) >= a and f01_rounding(per10) >= b:
    return True
  else:
    return False

def f01_rounding(number):
  number_str = list(str(number))
  number_str_slice = "".join(number_str[:(number_str.index("."))])
  number_int = int(number_str_slice)
  return number_int

a, b = map(int, input().split())
for i in range(1,1010):

  if per8_and_per10(i, a, b):
    print(i)
    exit()
print(-1)

Submission status: Wrong Answer

Solution code:
from math import ceil,floor

numA,numB = map(int,input().split())
for i in range(10000):
  testA = floor(i * 0.08)
  testB = floor(i * 0.10)
  if testA >= numA and testB >= numB:
    print(i)
    break
else:
  print("-1")

Submission status: Wrong Answer

Solution code:
from math import ceil,floor
out = []

numA,numB = map(int,input().split())
for i in range(101):
  testA = floor(i * 0.08)
  testB = floor(i * 0.10)
  if testA >= numA and testB >= numB:
    out.append(i)

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

Submission status: Wrong Answer

Solution code:
from math import ceil,floor
out = []

numA,numB = map(int,input().split())
for i in range(101):
  testA = floor(i * 0.08)
  testB = floor(i * 0.10)
  if testA == numA and testB == numB:
    out.append(i)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def gcd(a,b):
  if(b==0):
    return a
  
  return gcd(b,a%b)
n,m=map(int,input().split())
if gcd(n,m)==1:
  print(-1)
else:
  i=2
  while(i):
    if int(i*0.08)==n and int(i*0.1)==m:
      print(i)
      break
    i+=1

Submission status: Wrong Answer

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

xa_e = floor(a / 0.08)
xb_e = floor(b / 0.1)

xa_list = []
tmp_a = xa_e
while True:
    if floor(tmp_a * 0.08) == a:
        xa_list.append(tmp_a)
        tmp_a += 1
    else:
        break
# print(xa_list)

xb_list = []
tmp_b = xb_e
while True:
    if floor(tmp_b * 0.1) == b:
        xb_list.append(tmp_b)
        tmp_b += 1
    else:
        break
# print(xb_list)

same_set = list(set(xa_list) & set(xb_list))
same_set.sort()
if same_set:
    print(same_set[0])
else:
    print(-1)

Submission status: Wrong Answer

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

xa_e = floor(a / 0.08)
xb_e = floor(b / 0.1)

xa_list = []
tmp_a = xa_e
while True:
    if floor(tmp_a * 0.08) == a:
        xa_list.append(tmp_a)
        tmp_a += 1
    else:
        break
# print(xa_list)

xb_list = []
tmp_b = xb_e
while True:
    if floor(tmp_b * 0.1) == b:
        xb_list.append(tmp_b)
        tmp_b += 1
    else:
        break
# print(xb_list)

same_set = list(set(xa_list) & set(xb_list))
if same_set:
    print(same_set[0])
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
if (A+1)/0.08 > B/0.1 and (B+1)/0.1 > A/0.08:
    print(max(int(2*int(A/0.08) - A/0.08), int(2*int(B/0.1) - B/0.1)))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
if (A+1)/0.08 > B/0.1 and (B+1)/0.1 > A/0.08:
    print(max(int(2*int(A/0.08) - A/0.08), int(2*int(A/0.1) - A/0.1)))
else:
    print(-1)

Submission status: Wrong Answer

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

min8 = a/8*100
max8 = (a+1)/8*100
min10 = b*10/1
max10 = (b+1)*10/1
ans = -1
for i in range(max(int(max8),int(max10))+1,min(int(min8),int(min10)),-1):
    i = float(i)
    if min8 <= i and max8 > i and min10 <= i and max10 > i:
        ans =  int(i)
print(ans)
#デバッグ用
#print(ans/100*8,ans/100*10)

Submission status: Wrong Answer

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

min8 = a/8*100
max8 = (a+1)/8*100
min10 = b*10/1
max10 = (b+1)*10/1
ans = -1
for i in range(min(int(min8),int(min10)),max(int(max8),int(max10))+1,-1):
    i = float(i)
    if min8 <= i and max8 > i and min10 <= i and max10 > i:
        ans =  int(i)
print(ans)
#デバッグ用
#print(ans/100*8,ans/100*10)

Submission status: Wrong Answer

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

min8 = a/8*100
max8 = (a+1)/8*100
min10 = b*10/1
max10 = (b+1)*10/1
ans = -1
for i in range(min(int(min8),int(min10)),max(int(max8),int(max10))+1):
    i = float(i)
    if min8 <= i and max8 > i and min10 <= i and max10 > i:
        ans =  int(i)
print(ans)
#デバッグ用
#print(ans/100*8,ans/100*10)

Submission status: Wrong Answer

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

min8 = a/8*100
max8 = (a+1)/8*100
min10 = b*10/1
max10 = (b+1)*10/1
ans = -1
for i in range(min(int(min8),int(min10)),max(int(max8),int(max10))+1):
    i = float(i)
    if min8 < i and max8 > i and min10 < i and max10 > i:
        ans =  int(i)
print(ans)
#デバッグ用
#print(ans/100*8,ans/100*10)

Submission status: Wrong Answer

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

min8 = a/8*100
max8 = (a+1)/8*100
min10 = b*10/1
max10 = (b+1)*10/1
print(min8,max8,min10,max10)
ans = -1
for i in range(min(int(min8),int(min10)),max(int(max8),int(max10))+1):
    i = float(i)
    if min8 < i and max8 > i and min10 < i and max10 > i:
        ans =  int(i)
print(ans)

Submission status: Wrong Answer

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

min8 = a/8*100
max8 = (a+1)/8*100
min10 = b*10/1
max10 = (b+1)*10/1
print(min8,max8,min10,max10)
ans = -1
for i in range(min(int(min8),int(min10)),max(int(max8),int(max10))+1):
    i = float(i)
    print(i)
    if min8 < i and max8 > i and min10 < i and max10 > i:
        ans =  int(i)
print(ans)

Submission status: Wrong Answer

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

ans = min(math.ceil(a*12.5), b*10)
if int(ans*0.1) != b:
    print('-1')
    exit()
if int(ans*0.08) != a:
    print('-1')
    exit()

print(ans)

# for i in range(1100):
#     if int(i*0.08) == a and int(i*0.1) == b:
#         print(i)
#         exit()

# print('-1')

Submission status: Wrong Answer

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

ans = math.ceil(a*12.5)
if int(ans*0.1) != b:
    print('-1')
    exit()

print(ans)

Submission status: Wrong Answer

Solution code:
from decimal import *
import math
 
i = list(map(int, input().split()))
A = Decimal(i[0])
B = Decimal(i[1])
 
A_min = A // Decimal("0.08")
A_max = Decimal(math.ceil(Decimal(A + 1) / Decimal("0.08")))
B_min = B // Decimal("0.1")
B_max = Decimal(math.ceil(Decimal(B+1) / Decimal("0.1")))
 
if A_max < B_min:
    print(-1)
elif A_min > B_max:
    print(-1)
elif A_min <= B_min:
    print(B_min)
else:
    print(A_min)

Submission status: Wrong Answer

Solution code:
from decimal import *
import math

i = list(map(int, input().split()))
A = Decimal(i[0])
B = Decimal(i[1])

A_min = A // Decimal("0.08")
A_max = Decimal(math.ceil(Decimal(A + 1) / Decimal("0.08")))
B_min = B // Decimal("0.1")
B_max = Decimal(math.ceil(Decimal(B+1) / Decimal("0.1")))

if A_max < B_min:
    print(-1)
elif A_min > B_max:
    print(-1)
elif 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(' '))

if a == b:

    ans = math.ceil(a*12.5)
    if ans*0.08 == a:
        if ans*0.1 == b:
            print(ans)
            exit()
    print('-1')
    exit()


ans = (b-a)*50

if ans*0.08 == a:
    if ans*0.1 == b:
        while(1):
            ans -= 1
            if ans * 0.1 != b:
                ans += 1
                break
        print(ans)
        exit()

print('-1')

Submission status: Wrong Answer

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

if a == b:

    ans = math.ceil(a*12.5)
    print(ans)
    exit()

ans = (b-a)*50

if ans*0.08 == a:
    if ans*0.1 == b:
        while(1):
            ans -= 1
            if ans * 0.1 != b:
                ans += 1
                break
        print(ans)
        exit()

print('-1')

Submission status: Wrong Answer

Solution code:
from decimal import *
i = list(map(int, input().split()))

A = Decimal(i[0])
B = Decimal(i[1])


A_min = A // Decimal("0.08")
A_max = (Decimal(A + 1) // Decimal("0.08"))  + 1
B_min = B // Decimal("0.1")
B_max = (Decimal(B+1) // Decimal(0.1)) + 1

if A_max < B_min:
    print(-1)
elif A_min > B_max:
    print(-1)
elif A_min < B_min:
    print(B_min)
else:
    print(A_min)

Submission status: Wrong Answer

Solution code:
from decimal import *
i = list(map(int, input().split()))

A = Decimal(i[0])
B = Decimal(i[1])

from decimal import *
A_min = A // Decimal("0.08")
A_max = (Decimal(A + 1) // Decimal("0.08"))
B_min = B // Decimal("0.1")
B_max = (Decimal(B+1) // Decimal(0.1))

if A_max < B_min:
    print(-1)
elif A_min > B_max:
    print(-1)
elif 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(' '))

if a == b:

    ans = math.ceil(a*12.5)
    print(ans)
    exit()

ans = (b-a)*50
if ans*0.08 == a:
    if ans*0.1 == b:
        print(ans)
        exit()

print('-1')

Submission status: Wrong Answer

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

if a == b:

    ans = int(a*12.5)
    print(ans)
    exit()

ans = (b-a)*50
if ans*0.08 == a:
    if ans*0.1 == b:
        print(ans)
        exit()

print('-1')

Submission status: Wrong Answer

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

ans = (b-a)*50
if ans == 0:
    ans = 25
    print(ans)
    exit()
if ans*0.08 == a:
    if ans*0.1 == b:
        print(ans)
        exit()

print('-1')

Submission status: Wrong Answer

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

A = int(i[0])
B = int(i[1])

A_min = A // 0.08 + 1
A_max = ((A + 1) // 0.08)
B_min = B // 0.1 + 1
B_max = ((B+1) // 0.1)

if A_max < B_min:
    print(-1)
elif A_min > B_max:
    print(-1)
elif A_min < B_min:
    print(B_min)
else:
    print(A_min)

Submission status: Wrong Answer

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

c = a + 1
d = b + 1

a = a // 0.08
c = c // 0.08

b = b // 0.1
d = d // 0.1

a, b, c, d = int(a), int(b), int(c), int(d)

if a > d or c < b :
    print(-1)

else:
    for num1 in range (a+1, c+1):
        for num2 in range (b+1, d+1):
            if num1 == num2 :
                print(num1)
                break
        else:
            continue

        break

Submission status: Wrong Answer

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

c = a + 1
d = b + 1

a = a // 0.08
c = c // 0.08

b = b // 0.1
d = d // 0.1

a, b, c, d = int(a), int(b), int(c), int(d)

if a > d or c < b :
    print(-1)

else:
    for num1 in range (a+1, c-1):
        for num2 in range (b+1, d-1):
            if num1 == num2 :
                print(num1)
                break
        else:
            continue

        break

Submission status: Wrong Answer

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

c = a + 1
d = b + 1

a = a // 0.08
c = c // 0.08

b = b // 0.1
d = d // 0.1

a, b, c, d = int(a), int(b), int(c), int(d)

if a > d or c < b :
    print(-1)

else:
    for num1 in range (a+1, c):
        for num2 in range (b+1, d):
            if num1 == num2 :
                print(num1)
                break
        else:
            continue

        break

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
a=(A/0.08)
b=(B/0.1)
N=[a,b]
X=min(N)
if b-a<1:
	print(int(X))
else:
	print("-1")

Submission status: Wrong Answer

Solution code:
a,b=input().split()
a,b=int(a),int(b)
x=a/0.08
y=b/0.1
x=int(x)
y=int(y)
z=max(x,y)
c=z*0.08
d=z*0.1
c=int(c)
d=int(d)
if c!=a or d!=b:
    print("-1")
else:
    print(z)