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


def main():
    a, b = map(int, input().split())
    if a >= 20:
        ans_a = (a * 100) // 8
        ans = math.floor(ans_a * 0.1)
        if b == ans:
            print(ans_a)
        else:
            print(-1)
    else:
        ary_a = []
        ary_b = []
        ans = []
        for i in range(10):
            ary_a.append((a * 100 + i * 10) // 8)
            ary_b.append((b * 100 + i * 10) // 10)
            for n in ary_b:
                if ary_a.count(n) > 0:
                    ans.append(n)
        if not ans:
            print(-1)
        else:
            print(min(ans))


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys
import math
import re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(str, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

A, B = MAP()
x = math.floor(A / 0.08)
y = math.floor((A+1) / 0.08)

flag = 0
for i in range(x, y):
    if math.floor(i * 0.10) == B:
        print(i)
        flag += 1
        break

if flag == 0:
    print(-1)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split(' '))
import math
asil1_1 = (100*(A))/8
asil1_2 = (100*(A+1))/8
asil2_1 = 10*(B)
asil2_2 = 10*(B+1)

sonuc_1 = max(asil1_1, asil2_1)
sonuc_2 = min(asil2_2, asil1_2)
print(sonuc_1, sonuc_2)
if sonuc_1>sonuc_2:
    print(-1)
else:
    print(math.ceil(sonuc_1))

Submission status: Wrong Answer

Solution code:
cmin = lambda a,b : a if a<b else b
cmax = lambda a,b : a if a>b else b
iin = lambda : int(input())
lin = lambda : list(map(int,input().split()))
rin = lambda n : [int(input()) for _ in range(n)]

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

ia = a/(0.08)
la = int(ia*0.08)
while la==a:
    ia += 1
    la = int(ia*0.08)
ia -= 1
lla =int(ia)

ia = a/(0.08)
la = int(ia*0.08)
while la==a:
    ia -= 1
    la = int(ia*0.08)
ia = int(ia)+1

ib = b/(0.1)
lb = int(ib*0.1)
while lb==b:
    ib += 1
    lb = int(ib*0.1)
ib -= 1
llb = int(ib)

ib = b/(0.1)
lb = int(ib*0.1)
while lb==b:
    ib -= 1
    lb = int(ib*0.1)
ib = int(ib)+1

sa = set(range(ia,lla+1))
sb = set(range(ib,llb+1))
ans = sa & sb
print(min(ans) if ans else -1)

Submission status: Wrong Answer

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

X = math.floor(A/0.08)
Y = math.floor(B/0.1)

if X == Y:
	print(X)
else:
	if X > Y:
		if B == math.floor(Y * 0.08):
			print(Y)
		elif A == math.floor(X * 0.1):
			print(X)
		else:
			print(-1)
	else:
		if A == math.floor(X * 0.1):
			print(X)
		elif B == math.floor(X * 0.08):
			print(Y)
		else:
			print(-1)

Submission status: Wrong Answer

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

Araw = A/0.08
Braw = B/0.10

if Araw <= Braw + 9 and Araw >= Braw:
  print(int(Araw))

else:
  print(-1)

Submission status: Wrong Answer

Solution code:
import numpy as np
a,b = list(map(int,(input().split())))
temp_a = int(a/0.08)
temp_b = int(b/0.1)
ans = 0
temp_a = list(map(lambda i:int(i/0.08) ,np.arange(a,a+0.9,0.1)))
temp_b = list(map(lambda i:int(i/0.1) ,np.arange(b,b+0.9,0.1)))
              
#print(temp_a,temp_b)
dup = set(temp_a) & set(temp_b)
if dup:
  print(min(dup))
else:
  print(-1)

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
a = int(A / 0.08)
b = int(B / 0.1)
#print(a,b)
if a < b:
    a_2 = a + 12
    if a_2 > b:
        print(b)
    else:
        print(-1)
elif b < a:
    b_2 = b + 10
    if b_2 > a:
        print(a)
    else:
        print(-1)
else:
    print(a)

Submission status: Wrong Answer

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

X1=math.floor(A/0.08)
X2=(A+1)//0.08

Y1=math.floor(B/0.1)
Y2=(B+1)//0.1


if (Y1>X2)or(X1>Y2):
  print(-1)
elif X1>=Y1:
  print(X1)
else:
  print(Y1)

Submission status: Wrong Answer

Solution code:
import math
a,b=map(int,input().split())
A=math.ceil((a+1)/0.08)-1
B=math.ceil((b+1)/0.1)-1
A_=math.ceil(a/0.08)
B_=math.ceil(b/0.1)
C=(A_//0.1)-(A_//0.08)
if b>80 or A<B_ or b-a>C:
    print(-1)
else:
    print(A_)

Submission status: Wrong Answer

Solution code:
def main():

    A, B = map(int, input().split())
    v_A = int(A / 0.08)
    v_B = int(B / 0.1)
    v_A2 = int((A+1) / 0.08)
    v_B2 = int((B+1) / 0.1)

    A_cand = [i for i in range(v_A+1, v_A2)]
    B_cand = [i for i in range(v_B+1, v_B2)]

    # print(A_cand)
    # print(B_cand)
    ab_cand = set(A_cand) & set(B_cand)
    if len(ab_cand) == 0:
        print(-1)
    else:
        print(min(ab_cand))
    # print(ab_cand)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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


X1 = B*10
X2 = math.ceil((B+1)*10) - 1
X3 = (A/0.08)
X4 = math.ceil(((A+1)/0.08)) - 1

# print(X1, X2, X3, X4)
if X3<=X1 and X1 <= X4 and X4 <= X2:
    print(int(X1))
elif X3<=X1 and X1 <= X2 and X2 <= X4:
    print(int(X1))
elif X1<=X3 and X3 <= X4 and X4 <= X2:
    print(int(X3))
elif X1<=X3 and X3 <= X2 and X2 <= X4:
    print(int(X3))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import math

char = input().split(" ")
eight = int(char[0])
ten = int(char[1])

eight_min = math.ceil(eight / 0.08)
eight_max = math.ceil(eight+1 / 0.08) - 1
ten_min = ten / 0.1
ten_max = (ten + 1) / 0.1 - 1

if ten_min <= eight_max and ten_min >= eight_min:
  print(ten_min)
elif eight_min <= ten_max and eight_min >= ten_min:
  print(eight_min)
else:
  print(-1)

Submission status: Wrong Answer

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

x = int(A *100 // 8)
y = int(B *10)

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

Submission status: Wrong Answer

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

x = int((a * 100) / 8)
y = int((x * 10) / 100)

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

Submission status: Wrong Answer

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

n0 = math.floor(a / 0.08)
n1 = math.floor((a+1) / 0.08)
m0 = math.floor( b / 0.1)
m1 = math.floor((b+1) / 0.1)

if n0 > m0:
    flag = True
    ans = n0
else:
    flag = False
    ans = m0

if flag:
    if ans in range(m0,m1):
        print(ans)
    else:
        print(-1)
else:
    if ans in range(n0,n1):
        print(ans)
    else:
        print(-1)

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
A0= int(A / 0.08)
B0= int(B / 0.1)
if (A == A0*0.08) & (B == B0*0.1):
    print(A0)
else:
    print("-1")

Submission status: Wrong Answer

Solution code:


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

sum_A = int(A/0.08)
sum_B = int(B/0.10)

if sum_A == sum_B:
    print(sum_A)
elif sum_A > sum_B:
    if sum_B >= 100:
        print(-1)
    else:
        diff = sum_A - sum_B
        if diff >= 10:
            print(-1)
        else:
            print(sum_A)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
A,B=map(float,input().split())
A_min=int(A/8*100)
A_max=int((A+1)/8*100)+1
ans=0
flag=False
if (A+1)*100%8==0:
    A_max=int((A+1)*100/8)
for i in range(A_min,A_max):
    if int(i*0.1)==B:
        ans=i
        flag=True
        break
if flag:
    print(ans)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
A,B=(int(x) for x in input().split())
#N=int(input())
#A=list(map(int, input().split()))

a_1=round(A*12.5)
a_2=round((A+1)*12.5)
la=list(range(a_1,a_2))

b_1=round(B*10)
b_2=round((B+1)*10)
lb=list(range(b_1,b_2))

la_lb_and_list = list(set(la) & set(lb))

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

Submission status: Wrong Answer

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

price_A = 0
price_B = 0

price_A = math.ceil(A / 0.08)
price_B = math.ceil(B / 0.1)
print(price_A,price_B)

min_price = min(price_A, price_B)
max_price = max(price_A, price_B)

for i in range(min_price, max_price+1, 1):
    tax_A = int(i * 0.08)
    tax_B = int(i * 0.1)
#    print(" ", i, tax_A,tax_B)
    if tax_A == A and tax_B == B:
        print(i)
        sys.exit()

print(-1)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
x_a = int(A * 100 / 8)
x_b = int(B * 100 / 10)
l = [i for i in range(x_b, x_a + 1)]
print(l)
for n in l:
    if int(n * 0.08) == A and int(n * 0.10) == B:
        print(n)
        break
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
a = int(A / 0.08)
b = int(B / 0.1)
print(a,b)
if a < b:
    a_2 = a + 12
    if a_2 > b:
        print(b)
    else:
        print(-1)
elif b < a:
    b_2 = b + 10
    if b_2 > a:
        print(a)
    else:
        print(-1)
else:
    print(a)

Submission status: Wrong Answer

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

prc1 = int(A / 0.08)
prc1e = int((A+1) / 0.08)
prc2 = int(B / 0.1)
prc2e = int((B+1) / 0.1)

if prc1<=prc2<prc1e:
    print(prc2)
elif prc2<=prc1<prc2e:
    print(prc1)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import math
a, b = list(map(int,input().split()))
ao = a / 0.08
ao1 = (a+1) / 0.08
bo = b / 0.1
bo1 = (b+1) / 0.1
if bo <= ao < bo1:
    print(math.ceil(ao))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import sys

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

print(i)

Submission status: Wrong Answer

Solution code:
def main():
    A, B = map(int, input().split(' '))
    min_a = A * 100 / 8
    max_a = (A + 1) * 100 / 8
    min_b = B * 10
    max_b = (B + 1) * 10
    min_n = int(min(min_a, min_b))
    max_n = int(max(max_a, max_b))
    result = -1
    for n in range(min_n, max_n + 1):
        if n * 0.08 == A:
            if int(n * 0.1) == B:
                result = n
                break
    print(result)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

a=math.floor(A*12.5)
c=B*10
d=(B+1)*10
if math.floor((A+1)*12.5)==(A+1)*12.5:
  b=(A+1)*12.5
else:
  b=math.floor((A+1)*12.5)

if b-a==0:
  if c<=a<d:
    print(a)
  else:
    print(-1)
else:
  if b<=c or a>=d:
    print(-1)
  else:
    while a+k<c:
      k+=1
    print(a+k)

Submission status: Wrong Answer

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

while PA <= 1250:
    if PA*0.08 >= A:
        break
    else:
        PA += 1

print(PA)

Submission status: Wrong Answer

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

x0,x1=math.floor(A/0.08),math.floor((A+1)/0.08)
y0,y1=math.floor(B/0.1),math.floor((B+1)/0.1)

def  price_notax(): 
    if x1<y0 or y1<x0:
        return -1
    else:
        if  x0<y0:
            return y0
        else:
            return x0
    
print(price_notax())

Submission status: Wrong Answer

Solution code:
a,b = [int(x) for x in input().split()]
amax = (a+1)*12.5
amin = a*12.5
bmax = int((b+1)*10)
bmin = int(b*10)
hantei = bmin
if amax <= bmin:
  hantei = str(-1)
elif bmax <= amin:
  hantei = str(-1)
elif bmin < amin:
  hantei = round(amin)
print(hantei)

Submission status: Wrong Answer

Solution code:
import math

line = input().split(" ")

eight_tax = int(line[0])
ten_tax = int(line[1])

eight_side_price = math.floor(eight_tax / 0.08)
ten_side_price = math.floor(ten_tax / 0.1)

while(1):
    break_flg = 0
    for i in range(eight_side_price - ten_side_price + 1):
        num = i + ten_side_price
        if math.floor(num * 0.08) == eight_tax and math.floor(num * 0.1) == ten_tax:
            print(num)
            break_flg = 1

    if break_flg == 0:
        print("-1")
    break

Submission status: Wrong Answer

Solution code:
import math

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

emin=math.ceil(a/0.08)
emax=math.ceil((a+1)/0.08)
tmin=math.ceil(b/0.1)
tmax=math.ceil((b+1)/0.1)

if tmin<=emin<=tmax:
    print(emin)
elif emin<=tmin<=emax:
    print(tmin)
else:
    print(-1)

Submission status: Wrong Answer

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

ans = -1
for x in range(0,101):
  calc_a = int(x*0.08)
  calc_b = int(x*0.10)
  if calc_a == a and calc_b == b:
    ans = x
    print(ans)
    break
if ans == -1:
  print(ans)

Submission status: Wrong Answer

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

a_plus = a+1
b_plus = b+1

price_a = int(a*(100/8))
price_aplus = int(a_plus*(100/8))
price_b = int(b*(100/10))
price_bplus = int(b_plus*(100/10))

#配列作成
al = list(range(price_a, price_aplus+1))
bl = list(range(price_b, price_bplus))

ans = list(set(al) & set(bl))

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

Submission status: Wrong Answer

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


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

C = -(-A//0.08)
D = -(-B//0.1)

if (D <= C):
    print(int(C))
else:
    print(-1)

Submission status: Wrong Answer

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

x_a = 12.5 * A
x_b = 10 * B

integer_xa = int(x_a / 10)
integer_xb = int(x_b / 10)

if integer_xa == integer_xb:
    print(int(max(x_a, x_b)))

else:
    print("-1")

Submission status: Wrong Answer

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

    a = A / 0.08
    b = B / 0.10
    ans = -1
    for num in range(int(a)+2,int(b)-2,-1):
        numa = int(num * 1.08)
        numb = int(num * 1.10)
        if numa == (A+num) and numb == (B+num):
            ans = num
            #print("ans:"+str(ans))

    print(ans)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

ALimit = (A + 1) / 0.08
BLimit = (B + 1) / 0.1

Amin = A / 0.08
Bmin = B / 0.1

result = -1
if Amin > Bmin:
    for i in range(int(Amin), int(BLimit)):
        if int(i * 0.1) == B:
           result = int(i)
           break
else:
    for i in range(int(Bmin), int(ALimit)):
        if int(i * 0.08) == A:
           result = int(i)
           break
       
print(result)

Submission status: Wrong Answer

Solution code:
import math
x,y = map(int,input().split())
a=int(math.ceil(x/0.08))####
b=int((x+1)/0.08)
xx=[i for i in range(a,b+1)]
c=int(y/0.1)
d=int((y+1)/0.1)
yy=[i for i in range(c,d)]
sx=set(xx)
sy=set(yy)
Q=list(sx&sy)
if len(Q)==0:
  print(-1)
else:
  print(Q[0])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

A0 = 0
A1 = 0
B0 = 0
B1 = 0

A0 = a / 0.08
A1 = (a+1) / 0.08
if A1.is_integer():
    A1 -= 1
B0 = b / 0.1
B1 = (b+1) / 0.1
if B1.is_integer():
    B1 -= 1
ans1 = [i for i in range(int(A0), int(A1)+1)]
ans2 = [i for i in range(int(B0), int(B1)+1)]
ans = set(ans1) &  set(ans2)
if ans == set():
    print('-1')
else:
    print(min(ans))

Submission status: Wrong Answer

Solution code:
# c = list(map(int, input().split()))
a, b = map(int, input().split())
# a = [list(map(int, list(input()))) for i in range(n)]
# n = int(input())
# x = list(map(int, input().split()))

na = int(12.5 * a)
nb = int(10 * b)
ret = -1
for i in range(min(na, nb), max(na, nb) + 1):
    if int(i * 0.08) == a and int(i * 0.1) == b:
        ret = i
        break

print(ret)

Submission status: Wrong Answer

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

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

x1 = math.ceil(a / 0.08)
y1 = math.floor((a+1) / 0.08)

x2 = math.ceil(b / 0.1)
y2 = math.floor((b+1) / 0.1)

if max(x1, x2) > min(y1, y2):
    print(-1)
else:
    print(max(x1, x2))

Submission status: Wrong Answer

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

n=a//0.08
m=b//0.1

if n==m:
  print(m)
else:
  print('-1')

Submission status: Wrong Answer

Solution code:
import math

a,b = map(int,input().split())
min_x_a = math.ceil(a / 0.08)
max_x_a = math.floor((a+1) / 0.08)

min_x_b = math.ceil(b / 0.1)
max_x_b = math.floor((b+1) / 0.1)

length_a = max_x_a - min_x_a + 1
list_a = [ min_x_a + i for i in range(length_a)]

length_b = max_x_b - min_x_b + 1
list_b = [ min_x_b + i for i in range(length_b)]

results = set(list_a) & set(list_b)

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

Submission status: Wrong Answer

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

x1 = a/0.08
x2 = b/0.1

a2 = (x2*0.08)
b2 = (x1*0.1)

if math.floor(a2) == a and math.floor(b2) == b:
    print(min(int(x1),int(x2)))
elif math.floor(a2) == a:
    print(int(x2))
elif math.floor(b2) == b:
    print(int(x1))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import numpy as np
import math
s = input().split()
A = int(s[0])
B = int(s[1])

x_A_list = range(int(100/8*A),int(100/8*A+100/8)+1)
x_B_list = range(int(10*B),int(10*B+10)+1)
xAxB_and = set(x_A_list)&set(x_B_list)
l = list(xAxB_and)
if len(l)==0:
  print('-1')
else:
  print(min(l))

Submission status: Wrong Answer

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

before_A = A/0.08
before_B = B/0.1

if before_A <= before_B:
    ans = before_B
    if int(before_B * 0.08) == A:
        print(int(ans))
    else:
        print(-1)
else:
    ans = before_A
    if int(before_B * 0.1) == B:
        print(int(ans))
    else:
        print(-1)

Submission status: Wrong Answer

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

Amin = A / 0.08
Amax = (A + 0.999999) / 0.08

Bmin = B / 0.10
Bmax = (B + 0.999999) / 0.10

Aset = set(list(range(math.floor(Amin), math.floor(Amax))))
Bset = set(list(range(math.floor(Bmin), math.floor(Bmax))))

result_set = Aset & Bset

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

Submission status: Wrong Answer

Solution code:
import numpy as np
a = list(map(int,input().split()))
b = a[0]/0.08
c = (a[0]+1)/0.08
d = a[1]/0.1
e = (a[1]+1)/0.1
f=20000
if b<d:
    min=b
else :
    min =d
g=int(np.ceil(min))
for i in range(g,10001):
    if i>=b and i<=c:
        if i>=d and i<=e:
            f = i
            break
if f==20000:
    print(-1)
else:
    print(f)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

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

#maxA = A+0.99
#maxB = B+0.99

maxA = A+1
maxB = B+1

gAmin = A/8 * 100
gAmax = maxA/8 * 100

gBmin = B*10
gBmax = maxB * 10

#print(gAmin)
#print(gAmax)
#print(gBmin)
#print(gBmax)

if gAmax <= gBmin or gBmax <= gAmin:
    ans = -1
elif gAmin <= gBmin:
    ans = gBmin
else:
    ans = gAmin

if ans - int(ans) > 0:
    ans = int(ans) + 1

print(ans)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
mod = (a*100) % 8
eightpermin = a * 100 // 8

if mod != 0:
    eightpermin += 1

tenpermax = (b+1) * 10 - 1

if eightpermin >= tenpermax:
    print(eightpermin)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
def main():

    A, B = map(int, input().split())
    v_A = int(A / 0.08)
    v_B = int(B / 0.1)
    v_A2 = int((A+1) / 0.08)
    v_B2 = int((B+1) / 0.1)

    A_cand = [i for i in range(v_A, v_A2)]
    B_cand = [i for i in range(v_B, v_B2)]

    # print(A_cand)
    # print(B_cand)
    ab_cand = set(A_cand) & set(B_cand)
    if len(ab_cand) == 0:
        print(-1)
    else:
        print(min(ab_cand))
    # print(ab_cand)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
import math

A, B = map(int, input().split(' '))
A_list = [i/10+A for i in range(0, 10)]
B_list = [i/10+B for i in range(0, 10)]
x, y = 0, 0
a_set = set()
b_set = set()
for a in A_list:
    a_set.add(math.floor((100*a)/(100*0.08)))
for b in B_list:
    b_set.add(math.floor((100*b)/(100*0.1)))
ans_list = list(a_set & b_set)
if len(ans_list) == 0:
    print(-1)
else:
    print(int(min(ans_list)))

Submission status: Wrong Answer

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

prc1 = int(A / 0.08)
prc1e = int((A+1) / 0.08)
prc2 = int(B / 0.1)
prc2e = int((B+1) / 0.1)

if prc1<=prc2<=prc1e:
    print(prc2)
elif prc2<=prc1<=prc2e:
    print(prc1)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import sys
import re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(str, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

A, B = MAP()
x = int(A / 0.08)
y = int((A+1) / 0.08)

flag = 0
for i in range(x, y):
    if int(i * 0.10) == B:
        print(i)
        flag += 1
        break

if flag == 0:
    print(-1)

Submission status: Wrong Answer

Solution code:
A,B = map(int, input().split())
a = (A/8)*100
b = B*10
if a * 0.1 == B and b * 0.08 == A:
    print(int(a))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import sys

s = sys.stdin.readline().split()

a, b = map(int, s)
orig_a = a/0.08
orig_a_upper = (a+1)/0.08
orig_b = b/0.1
orig_b_upper = (b+1)/0.1

if max(orig_a, orig_b) >= orig_a_upper or max(orig_a, orig_b) >= orig_b_upper:
    print(-1)
else:
    print(int (max(orig_a, orig_b)))

Submission status: Wrong Answer

Solution code:
aa, bb = map(int,input().split())
a = aa / 0.08
b = bb / 0.1
c = []
if (a-int(a))>=0.75:
    for i in range(12):
        for j in range(9):
            if int(a)+i == int(b)+j:
                c.append(int(a)+i)
            else:
                pass
else:
    for i in range(11):
        for j in range(9):
            if int(a)+i == int(b)+j:
                c.append(int(a)+i)
            else:
                pass
if c==[]:
    print(-1)
else:
    print(*c[:1])

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
val=b*10
huta=str(val)[-2]
while True:
    if int(val*0.08)==a:
        print(val)
        break
    if str(val)[-2]!=huta:
        print(-1)
        break
    val+=1

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import math

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

a_min = math.floor(a / 0.08)
a_max = math.floor((a + 1) / 0.08)

b_min = math.floor(b / 0.10)
b_max = math.floor((b + 1) / 0.10)

if (b_min < a_max and a_min < b_max):
    print(max(a_min, b_min))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import math

a, b = map(int, input().split())
x_1 = math.floor(a / 0.08)

max_count = 1
while True:
    zeikomi = math.floor((x_1 + max_count) * 0.08)
    if zeikomi != a:
        break
    max_count += 1

for i in range(max_count + 1):
    value = x_1 + i
    if math.floor(value * 0.1) == b:
        print(value)
        exit()
print(-1)

Submission status: Wrong Answer

Solution code:
import math
x,y = 2,2
a=int(math.ceil(x/0.08))####
b=int((x+1)/0.08)
xx=[i for i in range(a,b+1)]
c=int(y/0.1)
d=int((y+1)/0.1)
yy=[i for i in range(c,d)]
sx=set(xx)
sy=set(yy)
Q=list(sx&sy)
if len(Q)==0:
  print(-1)
else:
  print(Q[0])

Submission status: Wrong Answer

Solution code:
a, b = list(map(int, input().split()))
min = 1
max = 92
result = -1
for i in range(1, 93):
  if int(i*0.08) == a and int(i*0.1) == b:
    result = i
    break
print(result)

Submission status: Wrong Answer

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


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

mid_a = 12.5 * a
mid_b = 10 * b

a_range = [
    i for i in range(
        math.ceil(mid_a),
        math.floor(
            mid_a +
            12 +
            1)) if i > 0]
b_range = [
    i for i in range(
        math.ceil(mid_b),
        math.floor(
            mid_b +
            9 +
            1)) if i > 0]

seki = list(set(a_range) & set(b_range))

if seki:
    print(seki[0])
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import sys
a,b = map(lambda x: int(x),input().split())

for i in range(100) :
    a_tax = int(a* (1/0.08) + i*0.01)
    for j in range(100) :
        b_tax = int(b * (1/0.1) + j*0.01)
        if a_tax == b_tax :
            print(int(a_tax))
            sys.exit()
print(-1)

Submission status: Wrong Answer

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

tax8 = 12.5
tax10 = 10

numA = int(A * tax8)
numB = B * tax10
ans = numA

if numA != numB:
    if round(numA*0.1) == B:
        ans = numA
    else:
        ans = -1

#print(numA,numB)
print(ans)

Submission status: Wrong Answer

Solution code:
import math

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

tmpA = int(A / 0.08)
tmpB = int(B / 0.1)

tmpA2 = math.floor(tmpA * 0.08)
tmpB2 = math.floor(tmpB * 0.1)


tmp_max = max(tmpA, tmpB)
tmp_min = min(tmpA, tmpB)
ans = -1
if tmp_max == tmp_min:
    ans = tmp_max
else:
    for i in range(tmp_max, tmp_min, -1):
        tA = math.floor(i * 0.08)
        tB = math.floor(i * 0.1)
        if tA == tB:
            ans = i
        else:
            break
print(ans)

Submission status: Wrong Answer

Solution code:
import math
a, b = (int(i) for i in input().split())
x = math.ceil(a / 0.08)
flag = False
if (math.floor(x * 0.1) == b):
    flag = True
else:
    for i in range(8):
        x = x + i
        if (math.floor(x * 0.1) == b):
            flag = True
            break
if flag:
    print(int(x))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
# C - Tax Increase
a, b = map((int),(input().split()))


eight = (int)(a / 0.08)
ten = (int)(b / 0.1)

if eight > ten:
    if (int)(ten * 0.1) == (int)(eight * 0.08):
        print(eight)
    else:
        print(-1)
elif ten > eight:
    if (int)(eight * 0.1) == (int)(ten * 0.08):
        print(ten)
    else:
        print(-1)
else:
    print(ten)

Submission status: Wrong Answer

Solution code:
# coding: utf-8

import math

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

a_target1 = a / 0.08
a_target2 = (a + 1) / 0.08

b_target1 = b / 0.1
b_target2 = (b + 1) / 0.1


result_list = []

for i in range(math.floor(a_target1), math.ceil(a_target2)):
    if i >= b_target1 and i < b_target2:
        result_list.append(i)

if result_list == []:
    print(-1)
else:
    result = min(result_list)
    print(result)

Submission status: Wrong Answer

Solution code:
import math

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

i = 1
while i <= 100:
    if math.floor(i * 0.08) == A and math.floor(i*0.1):
        print(i)
        exit()
    else:
        i += 1

print("-1")

Submission status: Wrong Answer

Solution code:
from math import ceil

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

a_btm = ceil(a*100/8)
a_top = ceil((a+1)*100/8)

b_btm = ceil(b*100/10)
b_top = ceil((b+1)*100/10)

ans = -1
for aa in range(a_btm,a_top):
    for bb in range(b_btm,b_top):
        if aa == bb:
            ans = aa
            break
    break

print(ans)

Submission status: Wrong Answer

Solution code:
a,b=(int(x) for x in input().split())
if int(25*(a+1)/2)<int(10*b):
  print(-1)
elif int(25*(a+1)/2)==int(10*b):
  if a%2==0:
    print(-1)
  else:
    print(int(25*a/2))
elif int(10*(b+1))<=int(25*a/2):
  print(-1)
else:
  if a%2==1:
    print(max([int(25*a/2+1),int(10*b)]))
  else:
    print(max([int(25*a/2),int(10*b)]))

Submission status: Wrong Answer

Solution code:
import math

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

X = math.ceil((100 * A + 10 * B) / 9)

aTax = math.floor(X * 0.08)
bTax = math.floor(X * 0.1)

if aTax == A and bTax == B:
  print(X)
else:
  print(-1)

Submission status: Wrong Answer

Solution code:
import math

string = input()
a = int(string.split()[0])
b = int(string.split()[1])

if int(100 * (a + 1) / 8) < 10 * b:
    print(-1)
elif math.ceil(100 * a / 8) <= 10 * b:
    print(10 * b)
elif math.ceil(100 * a / 8) <= 10 * (b + 1):
    print(math.ceil(100 * a / 8))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys
import math


def solve(A: int, B: int):
    price_a = math.floor(A * 100 / 8)
    price_b = math.floor(B * 100 / 10)
    start, end = (price_a, price_b) if price_a < price_b else (price_b, price_a)

    for p in range(start, end+1):
        if math.floor(p * 8/100) == A and math.floor(p * 10/100) == B:
            return p
    return -1


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    print(solve(A, B))

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

while PA <= 1250:
    if PA*0.08 >= A:
        break
    else:
        PA += 1

if B+1 > PA*0.1 >= B:
    print(PA)

else:
    print(-1)