Problem:


Score : 300 points

Problem Statement

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

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

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

Constraints

1 \leq A \leq B \leq 100

A and B are integers.

Input

Input is given from Standard Input in the following format:

A B

Output

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

Sample Input 1

2 2

Sample Output 1

25

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

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

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

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

Sample Input 2

8 10

Sample Output 2

100

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

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

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

Sample Input 3

19 99

Sample Output 3

-1

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



Sample input:
2 2


Sample output:
25

Submission status: Wrong Answer

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


def tax8(p):
    return (p * 0.08 // 1)


def tax10(p):
    return (p * 0.1 // 1)


for p in range(1, 1000):
    tmp8 = tax8(p)
    tmp10 = tax10(p)
    if tmp8 == a and tmp10 == b:
        print(p)
        exit(0)

print('-1')

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(max(min_a, min_b))
    max_n = int(min(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:
A, B = map(int,input().split())
a = int(A / 0.08)
b = B / 0.1

if (A / 0.08) % 10 - a > 0:
    a += 1

ans = int(max(a, b))

aa = int((A+1) / 0.08)
bb = int((B+1) / 0.1) - 1

if ((A+1) / 0.08) - aa == 0:
    aa -= 1
    
if aa < b or bb < a:
    print("-1")
else:
    print(ans)

Submission status: Wrong Answer

Solution code:
from math import floor

a, b = map(int, input().split())
m = a * 12.5
if floor(m * 0.08) == a and floor(m * 0.1) == b:
    print(int(m))
else:
    print(-1)

Submission status: Wrong Answer

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

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

start = int(((a * 100)/8) + 0.5)
candidate1 = list(range(start, start + 13))
start = (b * 10)
candidate2 = list(range(start, start + 10))

ans = -1
for i in candidate2:
    if i in candidate1:
        ans = i
        break
print(ans)

Submission status: Wrong Answer

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

X = round(A/0.08)
Y = round(B/0.1)

if(round(X*0.08)==A and round(Y*0.1)==B):
    print(min(X,Y))
else:
    print(-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


def main():
    A, B = map(int, input().split())
    result = int(max(A / 0.08, B / 0.1))
    if int(result * 0.08) == A and int(result * 0.1) == B:
        print(result)
    else:
        print(-1)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import math

a,b = (int(x) for x in input().split())

a_low = math.ceil(a/0.08)
b_low = math.ceil(b/0.1)

a_high = math.floor(a/0.08+13)
b_high = math.floor(b/0.1+9)

if b_low > a_high or a_low > b_high:
  print(-1)
else:
  print(max(a_low,b_low))

Submission status: Wrong Answer

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

tax008 = [int(a / 0.08), int((a + 1) / 0.08)]
tax010 = [int(b / 0.1), int((b + 1) / 0.1)]
min_value = max(tax008[0], tax010[0])
max_value = min(tax008[1], tax010[1])
if min_value > max_value:
    print(-1)
else:
    print(min_value)

Submission status: Wrong Answer

Solution code:
import math
A,B=map(int,input().split())
sup=min((A+1)/0.08,(B+1)/0.1)
inf=max(A/0.08,B/0.1)
inf2=math.ceil(inf)
if inf2<sup:
  print(inf2)
else:
  print(-1)
print(math.ceil(101.0))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A,B = [int(x) for x in input().split()]
 
number1 = int(A*100//8)
number2 = int(B*100//10)
 
if number1//10 == B:
    if number2*8//100 == A:
        if number1 <= number2:
            print(number1)
        else:
            print(number2)
    else:
        print(number1)
else:
    if number2*8//100 == A:
        print(number2)
    else:
        print(-1)

Submission status: Wrong Answer

Solution code:
import sys
import math

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

c_A = math.floor(A/0.08)
c_B = math.floor(B/0.10)

#print(c_A, c_B)

if c_A == A and c_B == B:
    print(c_A)
    sys.exit()


mymin = min(c_A, c_B)
mymax = max(c_A, c_B)

for i in range(mymin, mymax+1):
    #print(i, math.floor(i*0.08),math.floor(i*0.10))
    if math.floor(i*0.08) == A and  math.floor(i*0.10) == B:
        print(i)
        sys.exit()
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)+1
la=list(range(a_1,a_2))

b_1=round(B*10)
b_2=round((B+1)*10)+1
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
A,B = list(map(int,input().split()))
min = int(A / 0.08)
max = int((A + 1) / 0.08 + 1)
ans = -1

for i in range(min,max):
    C = math.floor(i * 0.1)
    if B == C:
        ans = i
        break
print(ans)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
c=0
a1=int(a/0.08)
b1=(b*10)//1
for i in range(0,10):
    for j in range(0,13):
        a2=a1+i
        b2=b1+j
        d=a2-b2
        if d==0:
            c=a2
            break
    if c>0:
        break
if c==0:
    print("-1")
else:
    print(c)

Submission status: Wrong Answer

Solution code:
import numpy as np
import math as m

def main(**kwargs):
    if len(range(int(max(a / 0.08, b / 0.1)), int(min((a + 1) / 0.08, (b + 1) / 0.1)))) > 0:
        res = max(int(a / 0.08), int(b / 0.1))
        
    else:
        res = -1

    return res

if __name__ == "__main__":
    cin = np.array(input().split(" ")).astype("int")
    a, b, *_ = cin

    cout = main(a=a, b=b)
    print(cout)

Submission status: Wrong Answer

Solution code:
from math import floor

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

pa1 = floor(A * 100 / 8)
pa2 = floor((A * 100 + 100) / 8)
pb1 = floor(B * 100 / 10)
pb2 = floor((B * 100 + 100) / 10)

p1 = max(pa1, pb1)
if p1 >= pa2 or p1 >= pb2:
    print(-1)
else:
    print(p1)

Submission status: Wrong Answer

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

amin = (a/0.08)*-1//1*-1
amax = ((a+1)/0.08)//1
if ((a+1)/0.08)%1 == 0:
    amax -= 1

bmin = (b/0.1)*-1//1*-1
bmax = ((b+1)/0.1)//1
if ((b+1)/0.1)%1 == 0:
    bmax -= 1

if amin <= bmax:
    ans = amin
elif bmin <= amax:
    ans = bmin
else:
    ans = -1

print(int(ans))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


answer = a * 12.5

while int(answer*0.1) != b:
    answer=answer+1
    if answer > 100:
        answer = -1
        break;

print(int(answer))

Submission status: Wrong Answer

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

# check
if B != int(1.25*A):
    print(-1)
    exit()

print(int(12.5 * A))

Submission status: Wrong Answer

Solution code:
def main():
    a,b = map(int,input().split())
    lst = calc_task(a,b)
    answer = 0
    if len(lst) == 0:
        answer = -1
    else:
        answer = lst[0]
    print(answer)

def calc_task(a,b):
    return [n for n in range(1,101) if ((n * 8 // 100)==a and (n * 10 // 100)==b)]



if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

X = round(A/0.08)
Y = round(B/0.1)

if(X*0.08==A and Y*0.1==B):
    print(min(X,Y))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
# coding: utf-8
import math

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

x = int(math.ceil(a / 0.08))
bb = int(math.floor(x * 0.1))

#print x
#print bb
print [-1, x][bb == b]

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

a_sita = A/0.08 
a_ue = (A+1)/0.08 

b_sita = B/0.10
b_ue = (B+1)/0.10

if a_ue < b_sita or b_ue < a_sita:
  print(-1)

else:
  ans = max(a_sita,b_sita)
  ans = math.ceil(ans)
  print(int(ans))

Submission status: Wrong Answer

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

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

for i in range(1, 101):
    if math.floor(i*0.08) == a and math.floor(i*0.1) == b:
        print(i)
        break
else:
    print(-1)

Submission status: Wrong Answer

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

minA = A / 0.08
maxA = (A+1) / 0.08
minB = B / 0.1
maxB = (B+1) / 0.1

print(minA, maxA, minB, maxB)

if minB <= minA and minA < maxB: print(int(minA))
elif minA <= minB and minB < maxA: print(int(minB))
else: print("-1")

Submission status: Wrong Answer

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

if int(a/0.08) < int((b+1)/0.1) and int(b/0.1) < int((a+1)/0.08):
    print(max(int(a/0.08), int(b/0.1)))
else:
    print(-1)

Submission status: Wrong Answer

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

def solve(A: int, B: int):
    ten = B * 10
    ans = int(ten)

    while True:
        if math.floor(ans * 0.08) == A:
            print(ans)
            return
        elif ans // 10 != B :
            print(-1)
            return
        ans += 1

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
    solve(A, B)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:

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

for i in range(10):
    if b / 0.1 + i == a / 0.08:
        print(int(a / 0.08))
        exit()

print(-1)

Submission status: Wrong Answer

Solution code:
s = list(map(int, input().split()))
n = s[0]
a = s[1]
flag = 0
if n/0.08 > a/0.1:
    ans = int(a/0.1)
    while ans <= n/0.08:
        if ans*0.08 == n and ans*0.1==a:
            flag = 1
            break
        ans += 1
else:
    ans = int(n/0.08)
    while ans <= a/0.1:
        if ans*0.1 == a and ans*0.08==n:
            flag = 1
            break
        ans += 1
if flag == 1:
    print(ans)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import sys
from math import floor, ceil

def input():
    return sys.stdin.readline()[:-1]


A, B = map(int, input().split())
let1 = ceil(A*100/8)
ov1 = ceil((A+1)*100/8)
let2 = B*10
ov2 = (B+1)*10
select1 = set([i for i in range(let1 , ov1+1)])
select2 = set([i for i in range(let2 , ov2+1)])
sel = select1 & select2
if sel == set():
	print(-1)
else:
	print(min(sel))

Submission status: Wrong Answer

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

lsta = list(range(int(12.5*A), math.ceil((A+1)*12.5)))

ans = -1

for i in lsta:
    if int(i*0.1)==B:ans=i
    break
print(ans)

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
a = int(A / 0.08)
b = int(B / 0.1)
if a < b:
    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 = list(map(int,input().split()))

res1 = math.floor(a / 0.08)

if math.floor(res1 * 0.1) == b:
    print(res1)
else:
    print(-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

a = int(A*100/8)
b = int(B*100/10)

x = int(a*0.10)
y = int(b*0.08)

if x == B:
    print(a)
elif y == A:
    print(b)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import math
A, B = list(map(int, input().split(' ')))
x = math.floor(A / 0.08)
y = math.floor(B / 0.10)
print(x if x == y else -1)

Submission status: Wrong Answer

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

a_lower = int(a/0.08)
a_upper = int((a+1)/0.08)
b_lower = int(b/0.1)
b_upper = int((b+1)/0.10)

#print(a_lower,a_upper,b_lower,b_upper)
g = 0
for i in range((a_lower),(a_upper)):
  if (b_lower <= i < b_upper):
    print(str(int(i)))
    g = 1
    break
if g == 0:
  print("-1")

Submission status: Wrong Answer

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

at = int(A/0.08)
bt = int(B/0.1)
if at == bt:
    print(at)
    exit()

for i in range(min(at, bt), max(at, bt)):
    i += 1
    aa = int(i*0.08)
    bb = int(i*0.1)
    if aa == bb:
        print(i)
        exit()
print("-1")

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
ans=0
a1=int(A/0.08)
a2=int((A+1)/0.08)
b1=int(B/0.1)
b2=int((B+1)/0.1)
for i in range(a1,a2):
    if b1<=i and i<=b2:
        ans=i
        break
if ans==0:
    print(-1)
else:
    print(ans)

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
ansA=A*100/8
ansB=B*100/10

# print(ansA,ansB)
# print(int(ansA*0.08))
# print(int(ansA*0.10))
if 0<=ansA-ansB and ansA-ansB<12.5 and int(ansA*0.08)==A and int(ansA*0.10)==B:
    print(int(max(ansA,ansB)))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import math

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

# floor(0.08*x)=A
# floor(0.1*x)=B
# means
# A <= 0.08*x < A+1
# B <= 0.1*x < B+1
# therefore
# A/0.08 <= x < (A+1)/0.08
# B/0.1 <= x < (B+1)/0.1

x_lower1 = A/0.08
x_lower2 = B/0.1
x_upper1 = (A+1)/0.08
x_upper2 = (B+1)/0.1

x_lower = max(x_lower1, x_lower2)
x_upper = min(x_upper1, x_upper2)

x_candidate = math.ceil(x_lower)
if x_candidate <= x_upper:
  print(x_candidate)
else:
  print(-1)

Submission status: Wrong Answer

Solution code:
# AtCoder Beginner Contest 157: C (2020/03/07)
import math
A, B = map(int, input().split())
X = math.ceil(A/0.08)
if int(X*0.1) == B:
    print(X)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
# coding: utf-8
import re
import math
import itertools
from copy import deepcopy
import fractions
import random
from functools import lru_cache
from heapq import heappop,heappush
import time
import sys
readline = sys.stdin.readline
sys.setrecursionlimit(2000)
#import numpy as np
alphabet="abcdefghijklmnopqrstuvwxyz"
mod=int(10**9+7)
inf=int(10**20)
def yn(b):
    if b:
        print("yes")
    else:
        print("no")
def Yn(b):
    if b:
        print("Yes")
    else:
        print("No")
def YN(b):
    if b:
        print("YES")
    else:
        print("NO")
class union_find():
    def __init__(self,n):
        self.n=n
        self.P=[a for a in range(N)]
        self.rank=[0]*n
 
    def find(self,x):
        if(x!=self.P[x]):self.P[x]=self.find(self.P[x])
        return self.P[x]
 
    def same(self,x,y):
        return self.find(x)==self.find(y)
 
    def link(self,x,y):
        if self.rank[x]<self.rank[y]:
            self.P[x]=y
        elif self.rank[y]<self.rank[x]:
            self.P[y]=x
        else:
            self.P[x]=y
            self.rank[y]+=1
 
    def unite(self,x,y):
        self.link(self.find(x),self.find(y))
 
    def size(self):
        S=set()
        for a in range(self.n):
            S.add(self.find(a))
        return len(S)
def bin_(num,size):
    A=[0]*size
    for a in range(size):
        if (num>>(size-a-1))&1==1:
            A[a]=1
        else:
            A[a]=0
    return A
def fac_list(n,mod_=0):
    A=[1]*(n+1)
    for a in range(2,len(A)):
        A[a]=A[a-1]*a
        if(mod>0):A[a]%=mod_
    return A
def comb(n,r,mod,fac):
    if(n-r<0):return 0
    return (fac[n]*pow(fac[n-r],mod-2,mod)*pow(fac[r],mod-2,mod))%mod
def next_comb(num,size):
    x=num&(-num)
    y=num+x
    z=num&(~y)
    z//=x
    z=z>>1
    num=(y|z)
    if(num>=(1<<size)):return False
    else:
        return num
def get_primes(n,type="int"):
    A=[True]*(n+1)
    A[0]=False
    A[1]=False
    for a in range(2,n+1):
        if A[a]:
            for b in range(a*2,n+1,a):
                A[b]=False
    if(type=="bool"):return A
    B=[]
    for a in range(n+1):
        if(A[a]):B.append(a)
    return B
def is_prime(num):
    if(num<=2):return False
    i=2
    while i*i<=num:
       if(num%i==0):return False
       i+=1
    return True
def join(A,c=" "):
    n=len(A)
    A=list(map(str,A))
    s=""
    for a in range(n):
        s+=A[a]
        if(a<n-1):s+=c
    return s

#main
A,B=map(int,input().split())
#n*0.08=A         n*0.1=B
#n=A/0.08 n=B/0.1
c=[int(A/0.08),math.ceil((A+1)/0.08)]
d=[int(B/0.1),math.ceil((B+1)/0.1)]
for a in range(min(c[0],d[0]),max(c[1],d[1])):
    if c[0]<=a and a<=c[1] and d[0]<=a and a<=d[1]:
        print(a)
        break
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
def main():
    A,B = map(int,input().split())
    C = B*10
    while(not(2*C//25 == A and C//10 == B)):
        C += 1
        if(C>A*100/8):
            print(-1)
            return 0
    print(C)

main()

Submission status: Wrong Answer

Solution code:
ab=list(map(int, input().split()))
a=ab[0]
b=ab[1]
a0=12.5*a
a1=12.5*(a+1)
b0=10*b
b1=10*(b+1)
answer=0
if(a0>=b1):
    answer=-1
elif(a1<=b0):
    answer=-1
else:
    if(a0<b0):
        answer=b0//1
    else:
        answer=a0//1
print(int(answer))

Submission status: Wrong Answer

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

import sys
import math


debug = False

def log(text):
    if debug:
        print(text)

def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False
        # for line in sys.stdin:
        #     lines.append(line)
        lines.append(input())
    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]
    
    (a, b) = [int(e) for e in lines[0].split(" ")]

    return (a, b)


def solve(a, b):

    
    x1 = math.floor(a / 0.08)
    x2 = math.floor(b / 0.1)
    if debug:
        log("x1=%d" % x1)
        log("x2=%d" % x2)

    both = []
    if math.floor(x1 * 0.08) == a and math.floor(x1 * 0.1) == b:
        both.append(x1)

    if math.floor(x2 * 0.08) == a and math.floor(x2 * 0.1) == b:
        both.append(x2)

    result = -1
    if len(both):
        result = min(both)
    

    return  result


def main():
    # 出力
    result = solve(*parse_input())
    if isinstance(result, list):
        for r in result:
            print("%s" % r, sep='')
    else:
        print("%s" % result, sep='')

if __name__ == '__main__':

    main()

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split(" "))
_min = int(A / 0.10)
_max = int(B / 0.08)
flg = True
for i in range(_min-1, _max+1):
  if int(i *  0.08) == A and int(i * 0.10) == B:
    print(i)
    flg = False
    break
if flg:
  print(-1)

Submission status: Wrong Answer

Solution code:
from sys import stdin


def spam(x, AB, per):
    min_ = x
    max_ = x
    while True:
        min_ -= 1
        tmp = int(min_ * per)
        if AB != tmp:
            min_ += 1
            break
    while True:
        max_ += 1
        tmp = int(max_ * per)
        if AB != tmp:
            max_ -= 1
            break
    return min_, max_


def main():
    A, B = [int(x) for x in stdin.readline().rstrip().split()]
    x = spam(int(A / 0.08), A, 0.08)
    y = spam(int(B // 0.1), B, 0.1)
    if x[0] <= y[0] <= x[1]:
        print(y[0])
    elif y[0] <= x[0] <= y[1]:
        print(x[0])
    else:
        print(-1)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import math
A,B=map(int,input().split())
C=max(100*A/8,10*B)
D=min(100*(A+1)/8,10*(B+1))
if math.ceil(C)>math.floor(D):
    print("-1")
else:
    print(math.ceil(C))

Submission status: Wrong Answer

Solution code:
if __name__ == '__main__':
    a,b = [int(a.strip()) for a in input().strip().split(' ')]
    min_a = int(12.5*a)
    max_a = int(12.5*(a+1))

    min_b = 10*b
    max_b = 10*(b+1)

    flg = 0
    for i in range(min_a,max_a+1):
        if i in range(min_b,max_b):
            print(i)
            flg = 1
            break

    if flg == 0:
        print('-1')

Submission status: Wrong Answer

Solution code:
from math import floor
A,B = map(int,input().split(" "))
s = 10*B
t = 10*(B+1)
ans = 2**60
for tmp in range(s,t+1):
    if floor(tmp*0.08) == A:
        ans = tmp
        break
s = 125*A
t = 125*(A+1)
for tmp in range(s,t+1):
    if floor(tmp/10) == B:
        ans = min(ans,tmp)
        break
if ans == 2**60:
    ans = -1
print(ans)

Submission status: Wrong Answer

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

for i in range(1,101):
  if math.floor(i*0.08) == a and math.floor(i*0.1) == b:
    print(i)
    quit()
print(-1)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
list1 = []
list2 = []
if (a/0.08).is_integer():
    c1 = int(a/0.08)
else:
    c1=int(a/0.08)+1
if ((a+1)/0.08).is_integer():
    c2 = int((a+1)/0.08)
else:
    c2=int((a+1)/0.08)+1

for i in range(c1,c2):
    list1.append(i)

if (b/0.10).is_integer():
    c3 = int(b/0.10)
else:
    c3=int(b/0.10)+1
if ((b+1)/0.10).is_integer():
    c4 = int((b+1)/0.10)
else:
    c4=int((b+1)/0.10)+1
for i in range(c3,c4):
    list2.append(i)
print(c1)
print(c2)
print(c3)
print(c4)
print(list1)
print(list2)
l3 = set(list1) & set(list2)
l3 = list(l3)
if len(l3) > 0:
    print(min(l3))
else:
    print(-1)

Submission status: Wrong Answer

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

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

temp_a1 = 100 * a // 8
temp_a2 = math.ceil(100 * (a + 1) / 8)
temp_b1 = 100 * b // 10
temp_b2 = math.ceil(100 * (b + 1) / 10)

result = -1
for i in range(int(temp_a1), int(temp_a2) + 1):
    if temp_b1 <= i <= temp_b2:
        result = i
        break

print(result)

Submission status: Wrong Answer

Solution code:
import math

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

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

Submission status: Wrong Answer

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

no_tax_1 = a * 100 // 8
no_tax_2 = (a + 1) * 100 // 8

while no_tax_1 <= no_tax_2:
    if round(no_tax_1 * 0.1) == b:
        print(no_tax_1)
        exit()
    no_tax_1 += 1
print(-1)

Submission status: Wrong Answer

Solution code:
import math

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

min = int(a / 0.08)
max = int(math.floor((a + 1) / 0.08))
for i in range(min, max + 1):
    if math.floor(i * 0.1) == b:
        print(i)
        break
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import math

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

# 消費税が8%のときA円になる税抜き価格xの範囲
per8_set = set(range(math.floor(A / 0.08), math.floor(A / 0.08)+13))
per10_set = set(range(math.floor(B / 0.1), math.floor(B / 0.1)+11))

x = per8_set & per10_set
if len(x) == 0:
  print(-1)
else:
  print(min(x))

Submission status: Wrong Answer

Solution code:
# coding: utf-8

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(int(a_target1), int(a_target2)):
    if i >= b_target1 and i < b_target2:
        result_list.append(i)

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

Submission status: Wrong Answer

Solution code:
from math import ceil

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

if b - a < 0 or b / a > 10 / 8:
    ans = -1
else:
    ans = ceil(max(a / 0.08, b / 0.1))
print(ans)

Submission status: Wrong Answer

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

a = A / 0.08
b = B / 0.1

if a / 10 == b / 10 or abs(a / 10 - b/10) <= 1:
    print(int(max(a, b)))
else:
    print('-1')

Submission status: Wrong Answer

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


def main():
    a, b = map(int, input().split())
    numbers1 = list()
    numbers2 = list()

    for i in range(10 * a, 10 * (a + 1) + 1):
        ai = 25 * i // 20
        numbers1.append(ai)

    for i in range(10 * b, 10 * (b + 1) + 1):
        bi = 10 * i // 10
        numbers2.append(bi)

    c = set(numbers1) & set(numbers2)

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
from math import floor
A, B = map(int, input().split(' '))
x0 = floor(A / 0.08)
x1 = floor((A+1) / 0.08)
y0 = floor(B / 0.1)
y1 = floor((B+1) / 0.1)
if x1 < y0:
  print(-1)
else:
  print(min(max(x0, y0), min(x1, y1)))

Submission status: Wrong Answer

Solution code:
import math

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


ARangemin = math.ceil(A * (100/8))
BRangemin = math.ceil(B * (100/10))

ARangemax = ARangemin
BRangemax = BRangemin
while int(ARangemax * 0.08) == A:
    ARangemax = ARangemax + 1
while int(BRangemax* 0.08) == B:
    BRangemax = BRangemax + 1
ARangemax = ARangemax -1
BRangemax = BRangemax -1

if ARangemax > BRangemin or ARangemin > BRangemax:
    if ARangemin < BRangemin:
        print(ARangemin)
    else:
        print(BRangemin)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
a1,b1=(100*a)//8,10*b
#print(a1,b1)
if a1//10==b and (b1*8)//100==a:
    print(min(a1,b1))
elif a1//10==b:
    print(a1)
elif (b1*8)//100==a:
    print(b1)
else:
    print(-1)
#print(max((100*a)//8,10*b))

Submission status: Wrong Answer

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

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

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

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

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
ans1 = int(A *100// 8) 
ans2 = int(B *100 // 10)
ans2_2 = int((B+1) *100 // 10)
list = [int(ans2)]
for i in range(ans2+1,ans2_2+1):
    list.append(int(i))
       
if int(ans1) in list:
    print(ans1)
else:
    print(-1)

Submission status: Wrong Answer

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

if (A / 0.08) % 10 != 0:
    a += 1

ans = int(max(a, b))

aa = int((A+1) / 0.08)
bb = int((B+1) / 0.1) - 1

if ((A+1) / 0.08)%10 == 0:
    aa -= 1
    
if aa < b or bb < a:
    print("-1")
else:
    print(ans)

Submission status: Wrong Answer

Solution code:
from sys import stdin

a, b = [int(x) for x in stdin.readline().rstrip().split()]

x1 = a / 0.08
x11 = (a + 1) / 0.08
x2 = b / 0.1
x22 = (b + 1) / 0.1

result = -1
if (x1 >= x2) and (x1 < x22):
    result = x1
if (x2 >= x1) and (x2 < x11):
    result = x2

print(int(result))

Submission status: Wrong Answer

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

amin = (a/0.08)*-1//1*-1
amax = ((a+1)/0.08)//1
if ((a+1)/0.1)%1 == 0:
    amax -= 1

bmin = (b/0.1)*-1//1*-1
bmax = ((b+1)/0.1)//1
if ((b+1)/0.1)%1 == 0:
    bmax -= 1

if amin <= bmax:
    ans = amin
elif bmin <= amax:
    ans = bmin
else:
    ans = -1

print(int(ans))

Submission status: Wrong Answer

Solution code:
ab=list(map(int, input().split()))
a=ab[0]
b=ab[1]
a0=12.5*a
a1=12.5*(a+1)
b0=10*b
b1=10*(b+1)
answer=0
if(a0>=b1):
    answer=-1
elif(a1<=b0):
    answer=-1
else:
    if(a0<b0):
        answer=a0//1
    else:
        answer=b0//1
print(int(answer))

Submission status: Wrong Answer

Solution code:

import glob


# 問題ごとのディレクトリのトップからの相対パス
REL_PATH = 'ABC\\158\\C'

# テスト用ファイル置き場のトップ
TOP_PATH = 'C:\\AtCoder'

class Common:

    problem = []
    index = 0

    def __init__(self, rel_path):
        self.rel_path = rel_path

    def initialize(self, path):
        file = open(path)
        self.problem = file.readlines()
        self.index = 0
        return

    def input_data(self):
        try:
            IS_TEST
            self.index += 1
            return self.problem[self.index-1]

        except NameError:
            return input()

    def resolve(self):
        pass

    def exec_resolve(self):
        try:
            IS_TEST
            for path in glob.glob(TOP_PATH + '\\' + self.rel_path + '/*.txt'):
                print("Test: " + path)
                self.initialize(path)
                self.resolve()
                print("\n\n")
        except NameError:
            self.resolve()


class Solver(Common):

    def resolve(self):

        q = [int(i) for i in self.input_data().split()]

        A = q[0]
        B = q[1]

        no_tax_A = int(A / 0.08) # + 0 - 12
        no_tax_B = int(B / 0.1)  # + 0 - 9

        if int(no_tax_A) * 0.08 != A:
            no_tax_A += 1

        if no_tax_A == no_tax_B:
            result = no_tax_A
        elif no_tax_A > no_tax_B:
            if no_tax_A - no_tax_B <= 9:
                result = no_tax_A
            else:
                result = -1
        else:
            if no_tax_B - no_tax_A <= 12:
                result = no_tax_B
            else:
                result = -1

        print(str(result))

solver = Solver(REL_PATH)
solver.exec_resolve()

Submission status: Wrong Answer

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

for i in range(5, 10000000, 5):
  if int(i * 0.08) == a and int(i * 0.10) == b:
    print(i)
    sys.exit(0)
print(-1)

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)