Problem:


Score : 300 points

Problem Statement

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

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

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

Constraints

1 \leq A \leq B \leq 100

A and B are integers.

Input

Input is given from Standard Input in the following format:

A B

Output

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

Sample Input 1

2 2

Sample Output 1

25

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

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

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

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

Sample Input 2

8 10

Sample Output 2

100

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

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

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

Sample Input 3

19 99

Sample Output 3

-1

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



Sample input:
2 2


Sample output:
25

Submission status: Wrong Answer

Solution code:
import math
a , b = map(int,input().split())
al = math.ceil(a / 0.08)
ar = math.floor((a + 1)/0.08)
bl = math.ceil(b/0.1)
br = math.floor((b+1)/0.08)
ans = 0
if al <= bl and ar >= bl:
    ans = bl
elif al >= bl and br >= al:
    ans = al
else:
    ans = -1
# if al == bl:
#     ans = al
# elif al > bl:
#     if al > br:
#         ans = -1
#     else:
#         ans = al
# elif al < bl:
#     if ar < bl:
#         ans = -1
#     else:
#         ans = bl
print(ans)

Submission status: Wrong Answer

Solution code:
import math
a , b = map(int,input().split())
al = math.ceil(a / 0.08)
ar = math.floor((a + 1)/0.08)
bl = math.ceil(b/0.1)
br = math.floor((b+1)/0.08)
ans = 0
if al == bl:
    ans = al
elif al > bl:
    if al > br:
        ans = -1
    else:
        ans = al
elif al < bl:
    if ar < bl:
        ans = -1
    else:
        ans = bl
print(ans)

Submission status: Wrong Answer

Solution code:
s = input().split(' ')
a = int(s[0])
b = int(s[1])
a1 = a / 0.08
a += 0.99
a2 = a / 0.08
b1 = b / 0.1
b += 0.99
b2 = b / 0.1

# print(a1, a2, b1, b2)
if a2 < b1 or b2 < a1:
    print(-1)
elif a1 >= b1:
    print(int(a1))
else:
    print(int(b1))

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
S=set(range(25*A//2,25*(A+1)//2))&set(range(10*B,10*(B+1)))
print(S.pop() if len(S)>0 else -1)

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
S=set(range(25*A//2,25*(A+1)//2+1))&set(range(10*B,10*(B+1)+1))
print(S.pop() if len(S)>0 else -1)

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
S=set(range(25*A//2,25*(A+1)//2))&set(range(10*B,10*(B+1)-1))
print(S.pop() if len(S)>0 else -1)

Submission status: Wrong Answer

Solution code:
import math

a = input().split()
A = int(a[0])
B = int(a[1])

A_8 = round(A/0.08)
tax_10 = math.floor(A_8*0.1)


if int(B) == int(tax_10):
  print(int(A_8))
else:
  print(-1)

Submission status: Wrong Answer

Solution code:
import math

a = input().split()
A = int(a[0])
B = int(a[1])

A_8 = math.floor(A/0.08)
tax_10 = math.floor(A_8*0.1)

if int(B) == int(tax_10):
  print(int(A_8))
else:
  print(-1)

Submission status: Wrong Answer

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

A_8 = A/0.08
B_10 = B/0.1
B_10_5 = (B+0.5)/0.1

if int(A_8) == int(B_10) or int(A_8) == int(B_10_5):
  print(int(A_8))
else:
  print(-1)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
ans=-1
for i in range(b*10+1,b*50):
	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=(int(x) for x in input().split())
for N in range(1000):
    a=int(N*0.08)
    b=int(N*0.1)
    if a==A and b==B:
        print(N)
        break
    if N==999:
        print("-1")

Submission status: Wrong Answer

Solution code:
def main():
    a, b = map(int, input().split())
    
    tmp_8 = int(a / 0.08)
    tmp_10 = int(b / 0.1)
    
    check_10 = int(tmp_8*0.1)
    check_8 = int(tmp_10*0.08)

    if check_10 != b and check_8+1 != a:
        print(-1)
    else:
        print(tmp_8)




if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def main():
    a, b = map(int, input().split())
    
    tmp_8 = int(a / 0.08)
    tmp_10 = int(b / 0.1)
    
    check_10 = int(tmp_8*0.1)
    check_8 = int(tmp_10*0.08)

    if check_10 != b and check_8 != a:
        print(-1)
    else:
        print(tmp_8)




if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

    check_10 = int(tmp_8*0.1)
    check_8 = int(tmp_10*0.1)

    if check_8 != check_10:
        print(-1)
    else:
        print(tmp_8)




if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
a,b=map(int,input().split())
A=math.floor(a/0.08)
if math.floor(A*0.1)==b:
    print(A)
else:
    print("-1")

Submission status: Wrong Answer

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

a=-(-A//0.08)
b=-(-B//0.1)
c=-(-(A-1)//0.08)
d=-(-(A+1)//0.08)

if a==b or c < b < d:
    print(int(a))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import math

def main():

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

    a_l = A / 0.08
    a_m = (A + 1) / 0.08

    b_l = B / 0.08
    b_m = (B + 1) / 0.08

    l = max(a_l, b_l)
    m = min(a_m, b_m)

    c = math.ceil(l)

    if c < m:
        print(int(c))
    else:
        print(-1)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

a=-(-A//0.08)
b=-(-B//0.1)
c=-(-(A-1)//0.08)
d=-(-(A+1)//0.08)

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

Submission status: Wrong Answer

Solution code:
import math 

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

withOutA = round(A / 0.08)
withOutB = round(B / 0.10)
mark = True

for i in range(min(int(withOutA), int(withOutB)), max(int(withOutA), int(withOutB)) + 1):  
  if math.floor(i * 0.08) == A and math.floor(i * 0.10) == B:
    print(i)
    mark = True
  else:
    mark = False

if not mark:
  print(-1)

Submission status: Wrong Answer

Solution code:
import math
ab = input().split(' ')
if len(ab) != 2:
    raise Exception

a = int(ab[0])
b = int(ab[1])

min_x_a = math.ceil(a / 0.08)
max_x_a = int((a + 1) / 0.08 + 1) - 1
min_x_b = math.ceil(b / 0.1)
max_x_b = int((b + 1) / 0.1 + 1) - 1

if min_x_a < min_x_b and max_x_a < min_x_b:
    print(-1)
elif min_x_b < min_x_a and max_x_b < min_x_a:
    print(-1)
else:
    print(max(min_x_a, min_x_b))

Submission status: Wrong Answer

Solution code:
import math
ab = input().split(' ')
if len(ab) != 2:
    raise Exception

a = int(ab[0])
b = int(ab[1])

min_x_a = math.ceil(a / 0.08)
max_x_a = int((a + 1) / 0.08 + 1) - 1
min_x_b = math.ceil(b / 0.1)
max_x_b = int((b + 1) / 0.1 + 1) - 1

if min_x_a <= min_x_b and max_x_a < min_x_b:
    print(-1)
elif min_x_b <= min_x_a and max_x_b < min_x_a:
    print(-1)
else:
    print(max(min_x_a, min_x_b))

Submission status: Wrong Answer

Solution code:
import math 

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

withOutA = round(A / 0.08)
withOutB = round(B / 0.10)

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

Submission status: Wrong Answer

Solution code:
import math 

from sys import stdin
 



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

A_min = int(math.ceil(100*A/8))
A_max = int(math.floor((100*A + 1)/8))
B_min = 10*B 


A_ = []
c = int(math.ceil(100*A/8))
while c < (A + 1)*100/8:
	A_.append(c)
	c += 1
B_ = []
c = 10*B 
while c < 10*B + 10:
	B_.append(c)
	c += 1 

C = list(set(A_) & set(B_))
if len(C) == 0:
	print (-1)
else:
	print (C[0])

Submission status: Wrong Answer

Solution code:
import math 

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

withOutA = A / 0.08
withOutB = B / 0.10 

if withOutA != withOutB:
  if math.floor(withOutA * 0.08) == A and math.floor(withOutA * 0.10) == B:
    print(int(withOutA))
  elif math.floor(withOutB * 0.08) == A and math.floor(withOutB * 0.10) == B:
    print(int(withOutB))
  else:
    print(-1)
elif withOutA == withOutB:
  print(int(withOutA))

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
cnt = 0
for i in range(1, 1002):
    if int(i * 0.08) == A and int(i * 0.10) == B:
        cnt = i
        break
if i > 0:
    print(i)
else:
    print(-1)

Submission status: Wrong Answer

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

A_raw = A / 0.08
B_raw = B / 0.10

if int(A_raw * 0.08) == A and int(A_raw * 0.10) == B:
    print(int(A_raw))
elif int(B_raw * 0.08) == A and int(B_raw * 0.10) == B:
    print(int(B_raw))
else:
    print(-1)

Submission status: Wrong Answer

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

for x in range(1010):
    if(x * 8 // 100 == A and x * 10 // 100):
        print(x)
        exit()
    
print(-1)

Submission status: Wrong Answer

Solution code:
# coding: utf-8

import math

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

lower = math.ceil(a / 0.08)
upper = math.floor(lower + 12.5)

if upper >= b * 10 and lower <= b * 10 + 9:
    print(max(b * 10, lower))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import numpy as np

# get input
eight, ten = map(lambda x: int(x), input().split(' '))

def oriPrice(a, b):
  """
  <int> a = round(0.08 * ori)
  <int> b = round(0.10 * ori)
  """
  # ori = b*10 ~ (b+1)*10 - 1
  for i in range(10, 0, -1):
    possibleOri = (b+1)/0.10-i
    if np.int(np.floor(possibleOri*0.08)) == a:
      return possibleOri
    
  return -1

print(oriPrice(eight, ten))

Submission status: Wrong Answer

Solution code:
import numpy as np

# get input
eight, ten = map(lambda x: int(x), input().split(' '))

def oriPrice(a, b):
  """
  <int> a = round(0.08 * ori)
  <int> b = round(0.10 * ori)
  """
  # ori = b * 10 ~ (b+1)*10 - 1
  possibleOri = [(b+1)/0.10-i for i in range(10, 0, -1)]
  
  for i in range(len(possibleOri)):
    if np.int(np.floor(possibleOri[i]*0.08)) == a:
      return possibleOri[i]
  
  return -1

print(oriPrice(eight, ten))

Submission status: Wrong Answer

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

a = math.floor(A * (100/8))
b = math.floor(B * 10)

if math.floor(a * 0.1) == B:
    print(a)
elif math.floor(b * 0.08) == A:
    print(b)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
A, B = map(int,input().split())
base_A = int(A / 0.08)
base_Aplus = int((A+1) / 0.08)
count = 0
for i in range(base_A, base_Aplus):
  if (int(i * 0.1) == B):
    ans = i
    count += 1
    break
if count > 0:
  print(ans)
else:
  print(-1)

Submission status: Wrong Answer

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

max_1 = int((a+1)/0.08)
min_1 = int(a/0.08)
li1 = list(range(min_1, (max_1+1)))

max_2 = int((b+1)/0.1)
min_2 = int(b/0.1)
li2 = list(range(min_2, (max_2+1)))

if max_1 < min_2 or max_2 < min_1:
    print(-1)
else:
    aaa = list(set(li1) & set(li2))
    print(min(aaa))

Submission status: Wrong Answer

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

min_8 = A / 0.08
max_8 = (A+1) / 0.08

min_10 = int(B // 0.1)
max_10 = int((B+1) // 0.1)

tmp = int(min_8//1) #小数点以下を切り捨て
tmp_end = int((max_8//1)+1)

if tmp < min_8:
    tmp += 1

ans = -1

for i in range(tmp,tmp_end):
    if i in range(min_10,max_10+1):
        ans = i
        break

print(ans)

Submission status: Wrong Answer

Solution code:
import math

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

INF = 10**3
for x in range(INF):
    if math.floor(x * 0.08) == A:
        if math.floor(x * 0.10) == B:
            print(x)
            exit()

print(-1)

Submission status: Wrong Answer

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

min_8 = A / 0.08
max_8 = (A+1) / 0.08

# print(min_8)
# print(max_8)

min_10 = int(B // 0.1)
max_10 = int((B+1) // 0.1)

# print(min_10)
# print(max_10)

tmp = int(min_8//1) #小数点以下を切り捨て
tmp_end = int((max_8//1)+1)

if tmp < min_8:
    tmp += 1

ans = -1

for i in range(tmp,tmp_end):
    if i in range(min_10,max_10):
        ans = i
        break

print(ans)

Submission status: Wrong Answer

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

eight = ((A*100)/8)
EightYen = math.floor(eight)

ten = (A*10)
TenYen =  math.floor(ten)

if TenYen == EightYen:
    print(TenYen)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import math
A,B = 19,99

eight = ((A*100)/8)
EightYen = math.floor(eight)

ten = (A*10)
TenYen =  math.floor(ten)

if TenYen == EightYen:
    print(TenYen)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
from math import ceil, floor

def tax(yen, percent):
  start = yen * 100 / percent
  end = (yen + 1) * 100 / percent
  return set(range(ceil(start), ceil(end)))

A, B = map(int, input().split(" "))
r = tax(A, 8) & tax(B, 10)
if len(r):
  print(list(r)[0])
else:
  print(-1)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
ans = -1
for candidate in range(max(A, B), 1001):
    print(candidate)
    if (int(candidate * 0.08) == A) and (int(candidate * 0.1) == B):
        ans = candidate
        break
print(ans)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
ans = -1
for candidate in range(max(A, B), 101):
    if (int(candidate * 0.08) == A) and (int(candidate * 0.1) == B):
        ans = candidate
        break
print(ans)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
ans = -1
for candidate in range(max(A, B), 101):
    if int(candidate * 0.08) == A and int(candidate * 0.1) == B:
        ans = candidate
        break
print(ans)

Submission status: Wrong Answer

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

for i in range(10, 1300):
  if int(i*0.08) == a:
    if int(i*0.1) == b:
      print(i)
      break

Submission status: Wrong Answer

Solution code:
import math

S = input().split(' ')
A = int(S[0])
B = int(S[1])
p = -1
for x in range(210):
    if math.floor(x*0.08) == A and math.floor(x*0.1) == B:
        p = x
        break
print(p)

Submission status: Wrong Answer

Solution code:
S = input().split(' ')
A = int(S[0])
B = int(S[1])
A_t = A/0.08
B_t = B/0.1
if A_t == B_t:
    print(A_t)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
inputs=input().split()
a=float(inputs[0])
b=float(inputs[1])

p8=a/0.08 
p10=b/0.1

if p8 >= p10:
  print(int(p8))
else:
  print(-1)

Submission status: Wrong Answer

Solution code:
from math import ceil,floor
def without_tax(a,b):
    w_a = ceil(a/0.08)
    m_w_a = ceil((a+1)/0.08) -1
    w_b = ceil(b/0.1)
    m_w_b = ceil((b+1)/0.1) -1
    if m_w_b < w_a or m_w_a < m_w_b:
        return -1
    return max(w_a,w_b)
a,b = [int(e) for e in input().split()]
print(without_tax(a,b))

Submission status: Wrong Answer

Solution code:
from math import ceil,floor
def without_tax(a,b):
    w_a = ceil(a/0.08)
    m_w_a = floor((a+1)/0.08)
    w_b = ceil(b/0.1)
    m_w_b = floor((b+1)/0.1)
    if m_w_b < w_a or m_w_a < m_w_b:
        return -1
    return max(w_a,w_b)
a,b = [int(e) for e in input().split()]
print(without_tax(a,b))

Submission status: Wrong Answer

Solution code:
from math import ceil
def without_tax(a,b):
    w_a = ceil(a/0.08)
    m_w_a = ceil((a+1)/0.08)
    w_b = ceil(b/0.1)
    m_w_b = ceil((b+1)/0.1)
    if m_w_b < w_a or m_w_a < m_w_b:
        return -1
    return max(w_a,w_b)
a,b = [int(e) for e in input().split()]
print(without_tax(a,b))

Submission status: Wrong Answer

Solution code:
import math
a,b=map(int,input().split())
x=math.floor(100*a/8)
# print(x)
if math.floor(x/10)==b:
    # print(x)
# else:
    y=math.floor(100*b/10)
    if math.floor(8*y/100)==a:
        print(min(x,y))
    else:
        print(x)
else:
    y=math.floor(100*b/10)
    if math.floor(8*y/100)==a:
        print(y)
    else:
        print(-1)

Submission status: Wrong Answer

Solution code:
import math
a,b=map(int,input().split())
x=math.floor(100*a/8)
# print(x)
if math.floor(x/10)==b:
    print(x)
else:
    y=math.floor(100*b/10)
    if math.floor(8*y/100)==a:
        print(y)
    else:
        print(-1)

Submission status: Wrong Answer

Solution code:
import math
a,b=map(int,input().split())
x=math.floor(100*a/8)
# print(x)
if math.floor(x/10)==b:
    print(x)
else:
    print(-1)

Submission status: Wrong Answer

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

while True:
  p=i*8//100
  q=i//10
  if p==a and q==b:
    break
  i+=1
  if i>=a*11 or i>b*11:
    print(-1)
    exit()
print(i)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
i=min(a,b)*100//8
while i*0.08<a or i*0.10<b:
  if i*8//100 == i*10//100:
    break
  i+=1
  if i>=a*11 or b*11:
    print(-1)
    exit()
print(i)

Submission status: Wrong Answer

Solution code:
cuts = []
for i in range(2000):
  cuts+= [[int(i*0.08), int(i*0.10)]]
  
A, B = map(int,input().split())

for i in range(1,2000):
  if [A, B] == cuts[i]:
    print(i)
    break
else:
  print(0)

Submission status: Wrong Answer

Solution code:
cuts = []
for i in range(2000):
  cuts+= [[int(i*0.08), int(i*0.10)]]
  
A, B = map(int,input().split())

for i in range(1,2000):
  if [A, B] == cuts[i]:
    print(i)
    break

Submission status: Wrong Answer

Solution code:
cuts = []
for i in range(2000):
  cuts+= [[int(i*0.08), int(i*0.10)]]
  
A, B = map(int,input().split())

for i in range(2000):
  if [A, B] == cuts[i]:
    print(i)
    break

Submission status: Wrong Answer

Solution code:
cuts = []
for i in range(2000):
  cuts+= [[i*0.08, i*0.10]]
  
A, B = map(int,input().split())

for i in range(2000):
  if [A, B] == cuts[i]:
    print(i)
    break

Submission status: Wrong Answer

Solution code:
import math
taxA, taxB= map(int,input().split())

minPriceA = math.floor(taxA / 0.08)
maxPriceA = math.ceil((taxA + 1) / 0.08) 

minPriceB = math.floor(taxB / 0.1)
maxPriceB = math.ceil((taxB + 1) / 0.1) 

minPrice = None
finish = False
for a in range(minPriceA, maxPriceA):
	for b in range(minPriceB, maxPriceB):
		if (a == b):
			minPrice = a
			finish = True
			break
	if (finish):
		break
if minPrice == None:
	print(-1)
else:
	print(minPrice)

Submission status: Wrong Answer

Solution code:
import math
taxA, taxB= map(int,input().split())

minPriceA = math.floor(taxA / 0.08)
maxPriceA = math.ceil((taxA + 1) / 0.08) 

minPriceB = math.floor(taxB / 0.1)
maxPriceB = math.ceil((taxB + 1) / 0.1) 

 
minPrice = None
finish = False
for a in range(minPriceA, maxPriceA + 1):
	for b in range(minPriceB, maxPriceB + 1):
		if (a == b):
			minPrice = a
			finish = True
			break
	if (finish):
		break
if minPrice == None:
	print(-1)
else:
	print(minPrice)

Submission status: Wrong Answer

Solution code:
import math
taxA, taxB= map(int,input().split())

minPriceA = math.floor(taxA / 0.08)
maxPriceA = math.ceil((taxA + 1) / 0.08) #exclusive

minPriceB = math.floor(taxB / 0.1)
maxPriceB = math.ceil((taxB + 1) / 0.1) #exclusive


minPrice = None
finish = False
for a in range(minPriceA, maxPriceA):
	for b in range(minPriceB, maxPriceB):
		if (a == b):
			minPrice = a
			finish = True
			break
	if (finish):
		break
if minPrice == None:
	print(-1)
else:
	print(minPrice)

Submission status: Wrong Answer

Solution code:
A, B = map(int,input().split())
#消費税0.08 0.1
import math

ans = -1

for n in range(1001):##最大値を間違えていた
        if math.floor(n*0.08) == A and math.floor(n*0.1) == B:
            a = n
            break

print(ans)

Submission status: Wrong Answer

Solution code:
A, B = map(int,input().split())
#消費税0.08 0.1
import math

ans = -1

for n in range(1,1009):##最大値を間違えていた
        if math.floor(n*0.08) == A and math.floor(n*0.1) == B:
            a = n
            break

print(ans)

Submission status: Wrong Answer

Solution code:
A, B = map(int,input().split())
#消費税0.08 0.1
import math

ans = -1

for n in range(1,101):
        if math.floor(n*0.08) == A and math.floor(n*0.1) == B:
            a = n
            break

print(ans)

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
a=set(map(int,[A/0.08,(A+0.5)/0.1]))
b=set(map(int,[B/0.1,(B+0.5)/0.1]))
ab=a & b
print(list(ab)[0] if len(ab) >= 1 else -1)

Submission status: Wrong Answer

Solution code:
#input
A, B = map(int,input().split())
#消費税0.08 0.1
import math

a = 0

for n in range(101):
        if math.floor(n*0.08) == A and math.floor(n*0.1) == B:
            a = n
            break

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

Submission status: Wrong Answer

Solution code:
import math

A, B = map(int, input().split())
pre = A / (0.08)
fir = math.floor(pre) - 1
sec = math.floor(pre)
tir = math.floor(pre) + 1

list = [fir, sec, tir]
val = 0

for k, x in enumerate(list):
    f, i = math.modf(x * 0.08)
    if (i == A):
        F, I = math.modf(x * 0.1)
        if (I == B):
            val += 1
            print(x)
            break

if (val == 0):
    print(-1)

Submission status: Wrong Answer

Solution code:
import math

A, B = map(int, input().split())
pre = A / (0.08)
fir = math.floor(pre) - 1
sec = math.floor(pre)
tir = math.floor(pre) + 1

list = [fir, sec, tir]
val = 0

for k, x in enumerate(list):
    f, i = math.modf(x * 0.08)
    if (i == A):
        F, I = math.modf(x * 0.1)
        if (I == B):
            val += 1
            break

if (val == 0):
    print(-1)

Submission status: Wrong Answer

Solution code:
import math

A, B = map(int, input().split())
pre = A / (0.08)
#fir = math.floor(pre) - 1
sec = math.floor(pre)
tir = math.floor(pre) + 1

list = [sec, tir]
val = 0

for k, x in enumerate(list):
    f, i = math.modf(x * 0.08)
    if (i == A):
        F, I = math.modf(x * 0.1)
        if (I == B):
            print(x)
            val +=1
            break

if (val == 0):
    print(-1)

Submission status: Wrong Answer

Solution code:
import math
A, B = map(int, input().split())
x = math.ceil((A+1)/0.08)
y = math.ceil((B)/0.1)
if x >= y:
  print(max(math.ceil(A/0.08), y))
else:
  print(-1)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
x=a*100//8
y=b*10
i=1
f=False
while(i<=1250):
  if i*8//100 == x and i//10 == y:
    print(i)
    f=True
    break
  i+=1
if not f:
  print(-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
if abs(b-a)<=10:
  print(max(a*100//8, b*10))
else:
  print(-1)

Submission status: Wrong Answer

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

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

set_a = set(range(min_a, max_a + 1))
set_b = set(range(min_b, max_b + 1))

w_s = set_a.intersection(set_b)

if len(w_s):
    print(min(w_s))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
num=B*10
if num*0.08==A:
  ans=num
else:
  com=int(A*12.5) if A%2==0 else int(A*12.5)+1
  if B<=com*0.10<B+1:
    ans=com
  else:
    ans=-1
print(ans)

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
num=B*10
if num*0.08==A:
  ans=num
else:
  com=int(A*12.5) if A%2==0 else int(A*12.5)+1
  if B<com*0.10<B+1:
    ans=com
  else:
    ans=-1
print(ans)

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
num=B*10
if num*0.08==A:
  ans=num
else:
  com=int(A*12.5) if A%2==0 else int(A*12.5)+1
  if int(com*0.10)==B:
    ans=com
  else:
    ans=-1
print(ans)

Submission status: Wrong Answer

Solution code:
'''input
8 10
'''
import math

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

a_low = math.ceil((a + 0) * 12.5)
a_hig = math.floor((a + 1) * 12.5)

b_low = math.ceil((b + 0) * 10)
b_hig = math.floor((b + 1) * 10)

if b_low <= a_low and a_low <= b_hig:
    print(a_low)
    exit()

if a_low <= b_low and b_low <= a_hig:
    print(b_low)
    exit()

print(-1)

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
num=B*10
if num*0.08==A:
  ans=num
else:
  com=A*12.5 if A%2==0 else int(A*12.5)+1
  if int(com*0.10)==B:
    ans=com
  else:
    ans=-1
print(ans)

Submission status: Wrong Answer

Solution code:
'''input
8 10
'''
import math

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

a_low = math.floor((a + 0.000) / 0.08)
a_hig = math.floor((a + 0.999) / 0.08)

b_low = math.floor((b + 0.000) / 0.1)
b_hig = math.floor((b + 0.999) / 0.1)

if b_low <= a_low and a_low <= b_hig:
    print(a_low)
    exit()

if a_low <= b_low and b_low <= a_hig:
    print(b_low)
    exit()

print(-1)

Submission status: Wrong Answer

Solution code:
'''input
8 10
'''
import math

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

a_low = round((a + 0.000) / 0.08)
a_hig = round((a + 0.99999) / 0.08)

b_low = round((b + 0.000) / 0.1)
b_hig = round((b + 0.99999) / 0.1)

if b_low <= a_low and a_low <= b_hig:
    print(a_low)
    exit()

if a_low <= b_low and b_low <= a_hig:
    print(b_low)
    exit()

print(-1)

Submission status: Wrong Answer

Solution code:
import math

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

a_low = int((a + 0.000) / 0.08)
a_hig = int((a + 0.9999) / 0.08)

b_low = int((b + 0.000) / 0.1)
b_hig = int((b + 0.9999) / 0.1)

if b_low <= a_low and a_low <= b_hig:
    print(a_low)
    exit()

if a_low <= b_low and b_low <= a_hig:
    print(b_low)
    exit()

print(-1)

Submission status: Wrong Answer

Solution code:
'''input
19 99
'''
import math

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

a_low = int((a + 0.0) / 0.08)
a_hig = int((a + 0.9) / 0.08)

b_low = int((b + 0.0) / 0.1)
b_hig = int((b + 0.9) / 0.1)

if b_low <= a_low and a_low <= b_hig:
    print(a_low)
    exit()

if a_low <= b_low and b_low <= a_hig:
    print(b_low)
    exit()

print(-1)

Submission status: Wrong Answer

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

a_min = A * 12.5
a_max = a_min + 12.5
a_min = int(a_min)
a_max = int(a_max)

b_min = B * 10.0
b_max = b_min + 10.0
b_min = int(b_min)
b_max = int(b_max)

if b_min <= a_min < b_max:
    print(a_min)
elif a_min <= b_min < a_max:
    print(b_min)
else:
    print(-1)

Submission status: Wrong Answer

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

a_min = A * 12.5
a_max = a_min + 12.5

b_min = B * 10.0
b_max = b_min + 10.0

if b_min <= a_min < b_max:
    print(int(a_min))
elif a_min <= b_min < a_max:
    print(int(b_min))
else:
    print(-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# coding: utf-8

num = input().split()
a, b = [int(N) for N in num]

if int(a/0.08) > int(b/0.1):
    if int((b+1)/0.1) > int(a/0.08):
        print(int(a/0.08))
    else:
        print(-1)
if int(a/0.08) < int(b/0.1):
    if int((a+1)/0.08) > int(b/0.1):
        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,1001):
    if int(i*0.08)==a and int(i*0.1)==b:
        print(i)
        exit()

Submission status: Wrong Answer

Solution code:
import math

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

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

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

Submission status: Wrong Answer

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

Ad = A/0.08
Bd = B/0.1

#print(Ad)
#print(Bd)

if int(max(Ad, Bd)*0.08) == A and int(max(Ad, Bd)*0.1) == B:
  print(int(max(Ad, Bd)))
elif int(min(Ad, Bd)*0.08) == A and int(min(Ad, Bd)*0.1) == B:
  print(int(min(Ad, Bd)))
else:
  print(-1)

Submission status: Wrong Answer

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

Ad = A/0.08
Bd = B/0.1

#print(Ad)
#print(Bd)

if int(max(Ad, Bd)*0.08) == A and int(max(Ad, Bd)*0.1) == B:
  print(int(max(Ad, Bd)))
else:
  print(-1)

Submission status: Wrong Answer

Solution code:
i = input()
j = i.split(' ')
a,b= int(j[0]),int(j[1])
if a/0.08 > a//0.08:
    p1 = a//0.08 + 1
else:
    p1 = a//0.08
if a/0.09 > a//0.09:
    p3 = a//0.09
else:
    p3 = p1
if (p1*0.1 >= b+1 or p1*0.1 < b) and (p3*0.1 >= b+1 or p3*0.1 < b):
    print(-1)
else:
    print(int(p1))

Submission status: Wrong Answer

Solution code:
i = input()
j = i.split(' ')
a,b= int(j[0]),int(j[1])
if a/0.08 > a//0.08:
    p1 = a//0.08 + 1
else:
    p1 = a//0.08
if p1*0.1 >= b+1 or p1*0.1 < b:
    print(-1)
else:
    print(int(p1))

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split());l=max(a*25+1>>1,b*10);print(l*(~a*13<-l>~b*10)or-1)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split());l=max(a*25+1>>1,b*10);print(l*(~a*12<-l>~b*10)or-1)

Submission status: Wrong Answer

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

"""
O(1)でとく
"""

# pattern1
ans_A = int(12.5 * A)
ans_B = int(10 * B)
X = max(ans_A,ans_B)

# error check
if (B / A) > 1.25:
  print('-1')
elif (B / A) < 1:
  print('-1')
else:
  print(X)

Submission status: Wrong Answer

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

"""
O(1)でとく
"""

# pattern1
ans_A = 12.5 * A
ans_B = 10 * B
X = max(ans_A,ans_B)

# error check
if (B / A) > 1.25:
  print('-1')
elif (B / A) < 1:
  print('-1')
else:
  print(int(X))

Submission status: Wrong Answer

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

for i in range(10000):
  if i * 0.08 == a and i * 0.1 == b:
    print(i)
    exit(0)
    
print(-1)

Submission status: Wrong Answer

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

for i in range(10000):
  if i * 0.08 == a and i * 0.1 == b:
    print(i)
    exit(0)
else:
  print(-1)

Submission status: Wrong Answer

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

for i in range(10000):
  if i * 0.08 == a and i * 0.1 == b:
    print(i)
    exit(0)
else:
    print(-1)

Submission status: Wrong Answer

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

for i in range(10000):
  if i * 0.08 == a and i * 0.1 == b:
    print(i)
    exit(0)
    
print('-1')

Submission status: Wrong Answer

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

for i in range(10000):
  if i * 0.08 == a and i * 0.1 == b:
    print(i)
    exit(0)
  else:
    print('-1')
    exit(0)

Submission status: Wrong Answer

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

for i in range(10000):
  if i == a * 0.08 and i ==  b * 0.1:
    print(i)
    exit(0)
  else:
    print('-1')
    exit(0)

Submission status: Wrong Answer

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

for i in range(10000):
  if a * 0.08 == b * 0.1:
    print(a)
  else:
    print('-1')

Submission status: Wrong Answer

Solution code:
# 全探索で十分間に合う

eight, ten = list(map(int, input().split()))
for i in range(1000+5):
    if eight == int(i * 0.08) & ten == int(i * 0.1):
        print(i)
        exit()

print(-1)