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())

x0,x1=math.floor(A/0.08),math.floor((A+1)/0.08-1)
y0,y1=math.floor(B/0.1),math.floor((B+1)/0.1-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 = map(int, input().split())

x = -1

xa = 0
xb = 0

a_arr = []
b_arr = []

for temp_a in range(10001):
    xa = temp_a * 0.08
    if xa // 1 == a:
        a_arr.append(temp_a)

for temp_b in range(10001):
    xb = temp_b * 0.1
    if xb // 1 == b:
        b_arr.append(temp_b)



print(a_arr)
print(b_arr)

for aa in a_arr:
    if aa in b_arr:
        print(aa)
        exit(0)

print('-1')

Submission status: Wrong Answer

Solution code:
ans=[]
A,B=map(int,input().split())
for i in range(1,1009):
    if int(i*8/100)==A and int(i*0.1)==B:
        ans.append(i)
        break
    else:
        ans.append(-1)
print(min(ans))

Submission status: Wrong Answer

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

import math

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

if a == 0 and b == 0:
    print(-1)


def tax_increase(a, b):
    tax8 = 12.5
    tax10 = 10

    price8 = math.floor(a * tax8)
    price10 = math.floor(b * tax10)

    # price8を10%で表せるか
    x = math.floor(price8 * 0.1)
    # price10を8%で表せるか
    y = math.floor(price10 * 0.08)


    if x == b:
        # 丸めの問題が発生していないか確認する
        if (price8 * 0.08) == a:
            print(price8)
        else:
            print(-1)
    elif y == a:
        if (price10 * 0.1) == b:
            print("10%", a, b, price10)
        else:
            print(-1)
    else:
        print("-1")

tax_increase(a, b)
"""
for i in range(1000):
    for j in range(1000):
        tax_increase(i, j)
"""

Submission status: Wrong Answer

Solution code:
import math
 
A, B = list(map(int, input().split()))
x_minA = math.ceil(100 / 8 * A)
x_minB =  10 * B
x_maxA = math.floor(100 / 8 * (A+1))
x_maxB = 10 * (B+1)
if x_minA > x_maxB or x_minB > x_maxA:
  print(-1)
else:
  for x in range(max(x_minA, x_minB), min(x_maxA, x_maxB)+1):
    if int(x * 8 / 100) != A or int(x / 10 - B)!=1:
      print(x)
      break
    x += 1
  else:
    print(-1)

Submission status: Wrong Answer

Solution code:
a,b= map(int, input().split())
aa = a + 0.9
bb = b + 0.9
 
if int(bb/0.1) > 1000:
  bb = 1000
 
aaa = set(range(int(a/0.08),int(aa/0.08)))
bbb = set(range(int(b/0.1), int(bb/0.1)))
 
x = list(aaa.intersection(bbb))
 
if len(x) == 0:
  print('-1')
else:
  print(min(x))

Submission status: Wrong Answer

Solution code:
A,B = (int(x) for x in input().split())
for i in range(10,1001):
    Ahan = int(i * 0.08)
    Bhan = int(i * 0.10)
    if (Ahan == A and Bhan == B):
        print(i)
        break
print(-1)

Submission status: Wrong Answer

Solution code:
import math

nums = list(map(int, input().split()))
a = nums[0]
b = nums[1]

for i in range(1200):
  if math.floor(i * 0.08) == a and math.floor(i*0.1) == b:
      print(i)
      break

print(-1)

Submission status: Wrong Answer

Solution code:
import math

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

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

if(math.floor(x*0.1)!=B):
  print("-1")

else:
  while(y<=x):
    if(math.floor(y*0.1)==B & math.floor(y*0.08)==A):
      if(y<r):
        r=y
    y+=1

  print(r)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# coding: utf-8

a, b = map(int, input().split())
# print(a,b)
# x=-1
# y=-1

# xr=[]
# yr=[]
# for i in range(1,101):
#     if i*0.08//1==a:
#         # print("x:{}".format(i))
#         x=i
#         xr.append(x)
# for i in range(1,101):
#     if i *0.1//1==b:
#         # print("y:{}".format(i))
#         y=i
#         yr.append(y)
# flag=False
#
# result=[]
# for i in xr:
#     for j in yr:
#         if i==j:
#             result.append(i)
#
# if len(result)>0:
#     print(result[0])
# else:
#     print('-1')
flag =False
for i in range(1,1010):
    if 1009*0.08//1==a and 1009*0.1//1==b:
        print(i)
        flag=True
        break

if not flag:
    print(-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b = (float(x) for x in input().split())

a_list = []
b_list = []


def f(n, tix, list):
    limit = n + 1
    while(n < limit):
        list.append(round(n / tix, 1))
        n += 0.1


f(a, 0.08, a_list)
f(b, 0.1, b_list)

# print('a = ', a_list, '\n\nb = ', b_list)

a_set = set(a_list)
b_set = set(b_list)

c_set = a_set & b_set

# print('\n\n c = ', c_set)
if(len(c_set) == 0):
    print(-1)
else:
    print(int(min(c_set)))

Submission status: Wrong Answer

Solution code:
import math

nums = list(map(int, input().split()))
a = nums[0]
b = nums[1]

for i in range(10000):
  if math.floor(i * 0.08) == a and math.floor(i*0.1) == b:
      print(i)
      break

print(-1)

Submission status: Wrong Answer

Solution code:
a, b = (float(x) for x in input().split())

a_list = []
b_list = []


def f(n, tix, list):
    limit = n + 1
    while(n < limit):
        list.append(round(n / tix, 1))
        n += 0.1


f(a, 0.08, a_list)
f(b, 0.1, b_list)

a_set = set(a_list)
b_set = set(b_list)

c_set = a_set & b_set

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

Submission status: Wrong Answer

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

for i in range(10000):
    ans1 = math.floor(i*0.08)
    ans2 = math.floor(i*0.1)
    if ans1 == ans2:
        print(ans1)
        exit()
print(-1)

Submission status: Wrong Answer

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

for i in range(1,101):
    if(int(i*0.08) == A and int(i*0.1)==B):
        print(i)
        sys.exit()
print(-1)

Submission status: Wrong Answer

Solution code:
import math
def resolve():
    a, b = map(int, input().split())
    left, right = 0, 10100
    while left < right:
        mid = (left + right) // 2
        eight = math.floor(mid * 0.08)
        ten = math.floor(mid * 0.1)
        if a == eight and ten == b and eight <= ten:
            pre_e = math.floor((mid-1) * 0.08)
            pre_t = math.floor((mid-1) * 0.1)
            while pre_e == a and pre_t == b:
                pre_e = math.floor((mid - 1) * 0.08)
                pre_t = math.floor((mid - 1) * 0.1)
                if pre_e == a and pre_t == b:
                    mid -= 1
            return print(mid)
        elif a <= eight:
            right = mid
        elif a > eight:
            left = mid + 1
    return print(-1)

if __name__ == '__main__':
    resolve()

Submission status: Wrong Answer

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

P = A / 0.08
PX = (A+1) / 0.08

PP = B / 0.1
PPX = (B+1) /0.1 

if PP <= P and P < PPX: print(round(P))
elif P <= PP and PP < PX: print(round(PP))
else:print(-1)

Submission status: Wrong Answer

Solution code:
import math

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

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

    #print(int(answer))

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
from sys import exit
from math import floor

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

a_ans = A / 0.08
b_ans = B / 0.1
#print(a_ans, b_ans)
if floor(a_ans) == floor(b_ans):
    print(floor(a_ans))
    exit()
else:
    a_ans = floor(a_ans)
    b_ans = floor(b_ans)
    for i in range(0, 10):
        for j in range(0, 10):
             pre_a = floor((A+(i/10)) / 0.08)
             pre_b = floor((B+(j/10)) / 0.1)
             #print(pre_a, pre_b)
             if pre_a == pre_b:
                 print(pre_a)
                 exit()
print(-1)

Submission status: Wrong Answer

Solution code:
import math

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

#Process
Ans = -1
tmp08_min = math.ceil(A / 0.08)
tmp08_max = tmp08_min + 13
tmp10_min = math.ceil(B / 0.10)
tmp10_max = tmp10_min + 10

tmp_min = min(tmp08_min, tmp10_min)
tmp_max = max(tmp08_max, tmp10_max)

cnt = 0
while cnt < tmp_max - tmp_min:
    if(A == int((tmp_min + cnt) * 0.08) and B == int((tmp_min + cnt) * 0.10)):
        Ans = tmp10_min + cnt
        break
    cnt += 1

#Output
print(Ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

import math

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

if a == 0 and b == 0:
    print(-1)


def tax_increase(a, b):
    tax8 = 12.5
    tax10 = 10

    price8 = math.floor(a * tax8)
    price10 = math.floor(b * tax10)

    # price8を10%で表せるか
    x = math.floor(price8 * 0.1)
    # price10を8%で表せるか
    y = math.floor(price10 * 0.08)


    if x == b:
        # 丸めの問題が発生していないか確認する
        if (price8 * 0.08) == a:
            print(price8)
    elif y == a:
        if (price10 * 0.1) == b:
            print("10%", a, b, price10)
    else:
        print("-1")

tax_increase(a, b)
"""
for i in range(1000):
    for j in range(1000):
        tax_increase(i, j)
"""

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys
import math
#input = sys.stdin.buffer.readline
 
def inn(func=int):
    return list(map(func,input().split()))
 
def ins():
    return input().split()
 
a,b = inn()
p8 = int(a/2)*25+int(a%2)*13
p10 = b*10
p8_ = p8+12 if a%2 == 0 else p8+12+11
p10_ = p10+9
 
#print(p8,p10,p8_,p10_)
if p8 == p10:
    print(p8)
elif p8 > p10 and p8 <= p10_:
    print(p8)
elif p10 > p8 and p10 <= p8_:
    print(p10)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import math

a,b=map(int,input().split())
if a%2==0:
    s=a*12.5
    s=math.floor(s)
    if s-b*10==5:
        print(s)
    elif b*10-s==5:
        print(b*10)
    elif b*10==s:
        print(s)
    else:
        print(-1)
else:
    t=a*12.5 +0.5
    t=math.floor(t)
    if t-b*10==3 or t-b*10==8:
        print(t)

    elif b*10-t==7 or b*10-t==2:
        print(b*10)
    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)

for i in range(1010):
    if A == int(i * 0.08) and B == int(i * 0.10):
        print(i)
    else:
        print(-1)

Submission status: Wrong Answer

Solution code:
import math

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

for n in range(0, 12):
  for m in range(0, 10):
    x = math.floor((A + n/10) / 0.08)
    y = math.floor((B + m/10) / 0.1)
    print(x, y)
    if x == y:
      if math.floor(x * 0.08) == A and math.floor(y * 0.1):
        print(x)
        exit()
print("-1")

Submission status: Wrong Answer

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

# 0.08 と 0.1 の最小公倍数
# 8と10　//100

# x = a / 0.08
# x_2 = int(x)
# print(x_2)
# y = b / 0.1
# y_2 = int(y)
# print(y_2)

# if x_2 == y_2:
#     print(int(x_2))
# else:
#     print(-1)

for i in range(1, 1000, 1):
    # print(i)
    x = i * 0.08
    # x = i * 8
    x_2 = int(x)
    y = i * 0.1
    # y = i * 10
    y_2 = int(y)
    # print(x)
    # print(y)
    if x_2 == a and y_2 == b:
        # continue
    # if x == y:
        ans = i
        break
    else:
        ans = -1

print(ans)

Submission status: Wrong Answer

Solution code:
import math

def main():

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

    p = a / 0.08

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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

def n(i):
    if i*10//10==i:
        return True
    else :
        return False
max_a=a+1
min_a=a
max_b=b+1
min_b=b
max_an=max_a*100/8
min_an=min_a*100/8
max_bn=max_b*100/10
min_bn=min_b*100/10
if max_an<=min_bn or max_bn<=min_an:
    print(-1)
elif min_an<=min_bn:
    if min_b*100//10==max_a*100//8 and n(max_a*100/8):
        print(-1)
    else:
        print(min_b*100//10)
else :
    if max_b*100//10==min_a*100//8:
        print(-1)
    else:
        if not n(min_a*100/8):
            print(min_a*100//8+1)
        else:
            print(min_a*100/8)

Submission status: Wrong Answer

Solution code:
A,B = (int(x) for x in input().split())
for i in range(1,101):
    Ahan = int(i * 0.08)
    Bhan = int(i * 0.10)
    if (Ahan == A and Bhan == B):
        print(i)
        break
print('-1')

Submission status: Wrong Answer

Solution code:
from math import floor, ceil

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

minx1 = A/0.08
maxx1 = (A+1)/0.08
minx2 = B/0.1
maxx2 = (B+1)/0.1

rangeMin = max(minx1, minx2)
rangeMax = min(maxx1, maxx2)
if rangeMax < rangeMin:
    print(-1)
else:
    print(floor(rangeMin+0.99))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A,B = (int(x) for x in input().split())
for i in range(1,101):
    Ahan = int(i * 0.08)
    Bhan = int(i * 0.10)
    if (Ahan == A and Bhan == B):
        print(i)
        break
print(-1)

Submission status: Wrong Answer

Solution code:
import math
a,b=map(int,input().split())
n = math.ceil(a/0.08)
m = math.floor(b/0.1)

for i in range (min(n,m),max(n,m)+1):
  if math.floor(i * 0.08) == math.floor(i*0.1):
    print(i)
    break
    
if n==m:
  print(n)
elif math.floor(max(n,m)*0.08) != math.floor(max(n,m)*0.1):
  print(-1)

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
if 1<=A<=B<=100:
    A_a=A+1
    B_b=B+1
    A_1=A*(100/8)
    B_1=B*(100/10)
    A_1a=A_a*(100/8)
    B_1b=B_b*(100/10)
    if (A_1<B_1b)and(B_1<A_1a):
        if A_1<B_1:
            A_2=int(A_1)
            print(A_2)
        else:
            B_2=int(B_1)
            print(B_2)
    else:
        print(-1)
else:
    None

Submission status: Wrong Answer

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

x = -1

xa = 0
xb = 0

a_arr = []
b_arr = []

for temp_a in range(10001):
    xa = temp_a * 0.08
    if xa // 1 == a:
        a_arr.append(temp_a)

for temp_b in range(10001):
    xb = temp_b * 0.1
    if xb // 1 == b:
        b_arr.append(temp_b)



print(a_arr)
print(b_arr)

for aa in a_arr:
    if aa in b_arr:
        print(aa)
        exit(0)

print('-1')

Submission status: Wrong Answer

Solution code:
num1 = list(map(int,input().split()))
num2 = sorted(num1)
A = num2[1]
B = num2[0]
import math
x = math.ceil(A / 0.08 )
y = math.ceil((B + 1) / 0.10 )
if x>= y:
  print(-1)
else:
  print(x)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys
import math
#input = sys.stdin.buffer.readline

def inn(func=int):
    return list(map(func,input().split()))

def ins():
    return input().split()

a,b = inn()
p8 = int(a/2)*25+int(a%2)*13
p10 = b*10
p8_ = p8+12 if a%2 == 0 else p8+12+11
p10_ = p10+9

#print(p8,p10,p8_,p10_)
if p8 == p10:
    print(p8)
elif p8 > p10 and p8 <= p10_:
    print(p8)
elif p10 > p8 and p10 <= p8_:
    print(p10)
else:
    print(-1)

Submission status: Wrong Answer

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

a = A / 0.08
b = B / 0.10

if a < b :
    if A == int(a * 0.08) and B == int(a * 0.10):
        print(int(a))
    elif A == int(b * 0.08) and B == int(b * 0.10) :
        print(int(b))
elif b < a :
    if A == int(a * 0.08) and B == int(a * 0.10):
        print(int(a))
    elif A == int(b * 0.08) and B == int(b * 0.10) :
        print(int(b))

else :
    print('-1')

Submission status: Wrong Answer

Solution code:
from math import floor, ceil

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

minx1 = A/0.08
maxx1 = (A+1)/0.08
minx2 = B/0.1
maxx2 = (B+1)/0.1

rangeMin = max(minx1, minx2)
rangeMax = min(maxx1, maxx2)
if rangeMax < rangeMin:
    print(-1)
else:
    print(floor(rangeMin+1))

Submission status: Wrong Answer

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

print(-1)

Submission status: Wrong Answer

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

x1 = a/0.08
x2 = b/0.1

print(x1,x2)

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

print(a2,b2)

if a < 0 or b <0:
    print(-1)
elif 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 math
A, B = list(map(int, input().split(' ')))
a = 0.08
b = 0.10

x_min = math.ceil((A-1) / a)
x_max = math.ceil((A+1) / a)
y_min = math.ceil((B-1) / b)
y_max = math.ceil((B+1) / b)

X = set(range(x_min, x_max))
Y = set(range(y_min, y_max))

r = X & Y
R = min(r) if len(r) > 0 else -1
if len(r) == 1 and R == 0:
  R = -1
  
print(R)

Submission status: Wrong Answer

Solution code:
from math import ceil

a,b = map(int, input().split())
#b*10<= x < (a+1)*12.5
x = ceil(a*12.5)
if x < (a+1)*12.5:
  print(x)
else:
  print('-1')

Submission status: Wrong Answer

Solution code:
A, B = [int(x) for x in input().split()]

tax8 = int(A / 0.08)
tax10 = int(B / 0.1)
window = [min(tax8, tax10), max(tax8, tax10)]

for i in range(0, max(int(A / 0.2), int(B / 0.2))):
    for j in range(window[0], window[1] + 1):
        if int(i * 0.08) == int(j * 0.08) and int(i * 0.08) == A and int(j * 0.1) == B:
            print(i)
            exit()
print(-1)

Submission status: Wrong Answer

Solution code:
a8, a10 = input().split(' ')
a8 = int(a8)
a10 = int(a10)
 
value1 = int(a8 / 0.08)
value2 = int(a10 / 0.1)
if int(value1 * 0.1) == a10:
  if value1 > value2:
    print(value1)
  else:
    print(value1)
elif int(value2 * 0.08) == a8:
  if value1 > value2:
    print(value1)
  else:
    print(value1)
else:
  print(-1)

Submission status: Wrong Answer

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

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

bmin=int(b/0.10)
if (b+1)%0.08==0:
    bmax=int((b+1)/0.10)-1
else:
    bmax=int((b+1)/0.10)


#print(amin,amax,bmin,bmax)
if amax < bmin or bmax < amin:
    print(-1)
else:
    print(max(amin,bmin))

Submission status: Wrong Answer

Solution code:
from math import floor, ceil

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

minx1 = A/0.08
maxx1 = (A+1)//0.08
minx2 = B/0.1
maxx2 = (B+1)//0.1

rangeMin = max(minx1, minx2)
rangeMax = min(maxx1, maxx2)
if rangeMax < rangeMin:
    print(-1)
else:
    print(floor(rangeMin+1))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

a = A / 0.08
b = B / 0.10

if a < b :
    if A == int(a * 0.08) and B == int(a * 0.10):
        print(int(a))
    elif A == int(b * 0.08) and B == int(b * 0.10) :
        print(int(b))
if b < a :
    if A == int(a * 0.08) and B == int(a * 0.10):
        print(int(a))
    elif A == int(b * 0.08) and B == int(b * 0.10) :
        print(int(b))

else :
    print('-1')

Submission status: Wrong Answer

Solution code:
n=list(map(int,input().split()))
import math
A=int(math.ceil(n[0]/0.08))
B=int(n[1]/0.1)
C=int((n[1]+1)/0.1)
D=int(math.ceil((n[0]+1)/0.08))
if A<<C and B<<D:
    if A==B:
        print(A)
    elif A>>B:
        print(A)
    elif A<<B:
        print(B)
else:
    print(-1)

Submission status: Wrong Answer

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

# 切り上げ
amin = math.ceil(a * 8 / 100)
bmin = math.ceil(b / 10)
# 切り捨て
amax = math.floor((a+1) * 8 / 100)
bmax = math.floor((b+1) / 10)
#print("{},{}".format(amin, bmin))
#print("{},{}".format(amax, bmax))

ret = -1
for i in range(amin, amax+1, 1):
    if bmin <= i and i <= bmax:
        ret = i
        break

print("{}".format(ret))

Submission status: Wrong Answer

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

t8 = A * 100 // 8
t10 = A * 10 


if int(t8 * 10) == 0:
    print(int(t8))
else:
    print(-1)

Submission status: Wrong Answer

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

x = -1

xa = 0
xb = 0

a_arr = []
b_arr = []

for temp_a in range(101):
    xa = temp_a * 0.08
    if xa // 1 == a:
        a_arr.append(temp_a)

for temp_b in range(101):
    xb = temp_b * 0.1
    if xb // 1 == b:
        b_arr.append(temp_b)



for aa in a_arr:
    if aa in b_arr:
        print(aa)
        exit(0)

print('-1')

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
A, B = map(int, input().split())

x_list=[]
for num in range(5000):
    if int(num*0.08)==A:
        x_list.append(num)

y_list=[]
for num in range(2000):
    if int(num*0.1)==B:
        y_list.append(num)

l1_l2_and = list(set(x_list)&set(y_list))

if l1_l2_and==[]:
    print(-1)
elif l1_l2_and[0]>0:
    print(l1_l2_and[0])
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
# coding: utf-8

a, b = map(int, input().split())
# print(a,b)
# x=-1
# y=-1

xr=[]
yr=[]
for i in range(1,101):
    if i*0.08//1==a:
        # print("x:{}".format(i))
        x=i
        xr.append(x)
for i in range(1,101):
    if i *0.1//1==b:
        # print("y:{}".format(i))
        y=i
        yr.append(y)
flag=False

result=[]
for i in xr:
    for j in yr:
        if i==j:
            result.append(i)

if len(result)>0:
    print(result[0])
else:
    print('-1')

Submission status: Wrong Answer

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

a_tax_min = a* 12.5
b_tax_min = b * 10
a_tax_max = (a+1) * 12.5
b_tax_max = (b+1) * 10

if b_tax_min <= a_tax_min and a_tax_min < b_tax_max and b_tax_max < a_tax_max :
    if a_tax_min.is_integer() :
        print(int(a_tax_min))
    else :
        print(int(a_tax_min) + 1)
else :
    print(-1)

Submission status: Wrong Answer

Solution code:
import math

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

#Process
Ans = -1
tmp08_min = math.ceil(A / 0.08)
tmp08_max = tmp08_min + 12
tmp10_min = math.ceil(B / 0.10)
tmp10_max = tmp10_min + 9

tmp_min = min(tmp08_min, tmp10_min)
tmp_max = max(tmp08_max, tmp10_max)

cnt = 0
while cnt < tmp_max - tmp_min:
    if(A == int((tmp_min + cnt) * 0.08) and B == int((tmp_min + cnt) * 0.10)):
        Ans = tmp10_min + cnt
        break
    cnt += 1

#Output
print(Ans)

Submission status: Wrong Answer

Solution code:
import math

a,b=map(int,input().split())
if a%2==0:
    s=a*12.5
    s=math.floor(s)
    if s-b*10==5:
        print(s)
    elif b*10-s==5:
        print(b*10)
    elif b*10==s:
        print(s)
    else:
        print(-1)
else:
    t=a*12.5 +0.5
    t=math.floor(t)
    if t-b*10==3 or t-b*10==8:
        
        print(t)

    elif b*10-t==7 or b*10-t==2:
        print(b*10)
    else:
        print(-1)

Submission status: Wrong Answer

Solution code:
import math


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

    ans = -1

    a = math.ceil(A / 0.08)
    b = math.ceil(B / 0.1)

    if a >= b:
        ans = a

    print(int(ans))


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

for i in range(1,101):
    if int(i * 0.08) == a:
        for j in range(1,101):
            if int(j * 0.1) == b and a <= b:
                print(max(i,j))
                exit()

print(-1)

Submission status: Wrong Answer

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

As = a / 0.08
Al = (a + 1) / 0.08
Bs = b / 0.1
Bl = (b + 1) / 0.1
if Bs <= As < Bl:
  if As // 1 == As:
    result = As
  elif Bl > As // 1 + 1:
    result = As // 1 + 1
  else:
    result = -1
else:
  result = -1

print(int(result))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
A,B=map(int,input().split())
if 1<=A<=B<=100:
    A_a=A+1
    B_b=B+1
    A_1=A*(100/8)
    B_1=B*(100/10)
    A_1a=A_a*(100/8)
    B_1b=B_b*(100/10)
    if (A_1<B_1b)and(B_1<A_1a):
        if A_1<B_1:
            A_2=math.ceil(A_1)
            print(A_2)
        else:
            B_2=math.ceil(B_1)
            print(B_2)
    else:
        print("-1")
else:
    None

Submission status: Wrong Answer

Solution code:
import math
a, b = map(float, input().split())
if math.floor(a / 0.08) == math.floor(b / 0.1):
  print(math.floor(a / 0.08))
elif a == b:
  for i in [(b + 0.1), (b + 0.2), (b + 0.3), (b + 0.4), (b + 0.5), (b + 0.6), (b + 0.7), (b + 0.8), (b + 0.9)]:
    for j in [a, (a + 0.1), (a + 0.2), (a + 0.3), (a + 0.4), (a + 0.5), (a + 0.6), (a + 0.7), (a + 0.8), (a + 0.9)]:
      if math.floor(j / 0.08) == math.floor(i / 0.1):
        print(math.floor(i / 0.1))
        break
    else: continue
    break
else:
  print(-1)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys
import math
#input = sys.stdin.buffer.readline

def inn(func=int):
    return list(map(func,input().split()))

def ins():
    return input().split()

a,b = inn()
p8 = int(a/2)*25+int(a%2)*13
p10 = b*10
p8_ = p8+12
p10_ = p10+9

#print(p8,p10,p8_,p10_)
if p8 == p10:
    print(p8)
elif p8 > p10 and p8 <= p10_:
    print(p8)
elif p10 > p8 and p10 <= p8_:
    print(p10)
else:
    print(-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
I = 0
b = B/0.1
 
b_list = []
for _ in range(10):
  b_list.append(b+_)

for i in b_list:
  pre_cnt = i*0.08
  cnt = int(pre_cnt)
  if cnt == A:
    print(int(i))
    I = 1
  break
if I == 0:
  print(-1)

Submission status: Wrong Answer

Solution code:
# coding: utf-8

a, b = map(int, input().split())
# print(a,b)
# x=-1
# y=-1

xr=[]
yr=[]
for i in range(1,100):
    if i*0.08//1==a:
        # print("x:{}".format(i))
        x=i
        xr.append(x)
for i in range(1,100):
    if i *0.1//1==b:
        # print("y:{}".format(i))
        y=i
        yr.append(y)
flag=False

result=[]
for i in xr:
    for j in yr:
        if i==j:
            result.append(i)

if len(result)>0:
    print(result[0])
else:
    print('-1')

Submission status: Wrong Answer

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

x = int(a*12.5)
y = b*10

if x == y:
    print(x)
elif x > y:
    while True:
        y+=1
        ans1 = math.floor(y*0.08)
        ans2 = math.floor(y*0.1)
        if ans1 == ans2:
            print(y)
            break
        elif y > 100:
            print('-1')
            break
elif x < y:
    while True:
        x += 1
        ans1 = math.floor(x*0.08)
        ans2 = math.floor(x*0.1)
        if ans1 == ans2:
            print(x)
            break
        elif x > 100:
            print('-1')
            break

Submission status: Wrong Answer

Solution code:
import math
A, B = list(map(int, input().split(' ')))
a = 0.08
b = 0.10

x_min = math.floor((A-1) / a) +1
x_max = math.ceil((A+1) / a)
y_min = math.floor((B-1) / b) +1
y_max = math.ceil((B+1) / b)

X = set(range(x_min, x_max))
Y = set(range(y_min, y_max))

r = X & Y
R = min(r) if len(r) > 0 else -1
if len(r) == 1 and R == 0:
  R = -1
  
print(R)

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:
        for j in range(1,101):
            if math.floor(j * 0.1) == b and a <= b:
                print(max(i,j))
                exit()

print(-1)

Submission status: Wrong Answer

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

ansA = math.floor(25/2*A)
ansB = math.floor(10*B)
mini = min(ansA,ansB)
maxi = max(ansA,ansB)

if mini == maxi:
    print(mini)
    exit()
for i in range(mini,1250):
    check1 = math.floor(i*0.08)
    check2 = math.floor(maxi*0.1)
    if check1 == check2:
        print(i)
        exit()
print(-1)

Submission status: Wrong Answer

Solution code:
import math

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

Amax = math.floor((A+1) / 0.08)
Bmax = math.floor((B+1) / 0.1)
Ansmin = math.floor(max(A / 0.08, B / 0.1))

if Ansmin < min(Amax, Bmax):
    print(Ansmin)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import math

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

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

if(math.floor(x*0.1)!=B):
  print("-1")

else:
  while(y<=x):
    if(math.floor(y*0.1)==math.floor(y*0.08)):
      if(y<r):
        r=y
    y+=1

  print(r)

Submission status: Wrong Answer

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

a1 = int(a / 0.08)
b1 = int(b / 0.1)

if type((a+1) / 0.08) == 'float':
  a2 = int((a+1) / 0.08)
else:
  a2 = int((a+1) / 0.08) - 1

if type((b+1) / 0.1) == 'float':
  b2 = int((b+1) / 0.1)
else:
  b2 = int((b+1) / 0.1) - 1
  
if int(a2 * 0.08) != a:
  while(int(a2 / 0.08) != a):
    print(a2, 'ng')
    a2 = a2 - 1

if int(b2 * 0.1) != b:
  while(int(b2 / 0.1) != b):
    print(b2, 'ng')
    b2 = b2 - 1

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