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: Accepted

Solution code:
A, B=list(map(int, input().split()))
for n in range(10001):
    tax_A = n*8//100
    tax_B = n*10//100
    if A==tax_A and B==tax_B:
        print(n)
        exit()
print(-1)

Submission status: Accepted

Solution code:
import math

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

na=a/0.08
nb=b/0.10

na_min=math.ceil(na)
na_max=math.ceil((a+1)/0.08)
nb_min=math.ceil(nb)
nb_max=math.ceil((b+1)/0.10)

if (na_max <= nb_min) or (nb_max <= na_min):
    print(-1)
else:
    if na_min > nb_min:
        print(na_min)
    else:
        print(nb_min)

Submission status: Accepted

Solution code:
import math
a,b=map(int,input().split())
ok=0
x=0
ans=0
while ok<1:
    aa=math.floor(x*0.08)
    bb=math.floor(x*0.1)
    #print(aa)
    #print(bb)
    if aa==a and bb==b:
        ans=x
        break
    x+=1
    if x==100000:
        ans=-1
        break
print(ans)

Submission status: Accepted

Solution code:
import math
import sys
A, B = map(int, input().split())
for x in range(0, 10**5 + 1):
    if math.floor(x * 0.08) == A and math.floor(x * 0.1) == B:
        print(x)
        sys.exit()

print(-1)

Submission status: Accepted

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

isOK = False
for i in range(1, 10001):
    a = i*0.08
    b = i*0.1
    if int(a) == A and B == int(b) :
        isOK = True
        print(i)
        break
if not isOK:
    print(-1)

Submission status: Accepted

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

for i in range(1251):
    if a <= 0.08 * i < a + 1 and b <= 0.1 * i < b + 1:
        print(i)
        break
    elif i == 1250:
        print(-1)

Submission status: Accepted

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

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

Submission status: Accepted

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

ans = -1
for i in range(1251, 0, -1):
    av = int(i * 0.08)
    bv = int(i * 0.1)
    # print(i, av, bv)

    if av > 0 and bv > 0:
        if av == A and bv == B:
            ans = i

print(ans)

Submission status: Accepted

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

MAX_VAL = 100
res = -1
for i in range(1, int(MAX_VAL/0.08)+1):
    if int(i*0.08) == a and int(i*0.1) == b:
        res = i
        break

print(res)

Submission status: Accepted

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

ans=-1
for i in range(1,1001):
    if i*8//100==A and i//10==B:
        ans=i
        break

print(ans)

Submission status: Accepted

Solution code:
#!/usr/bin/python3
# -*- coding: utf-8 -*-
a, b = map(int, input().split())
ans = -1
for i in range(b * 10, b * 10 + 10):
    if int(i * 0.08) == a:
        ans = i
        break
print(ans)

Submission status: Accepted

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

for i in range(10, 1251):
    if int(i * 0.08) == a and int(i * 0.1) == b:
        print(i)
        exit()

print(-1)

Submission status: Accepted

Solution code:
import math
A,B = map(int,input().split())
for i in range(1,10001):
    if math.floor(i*0.08) == A and math.floor(i*0.1) == B:
        print(i)
        break
else:
    print('-1')

Submission status: Accepted

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

for i in range(1,1000001):
    if int(i*0.08) == a and int(i*0.1) == b:
        print(i)
        exit()
print(-1)

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
for i in range(1500000):
  if (i*0.08)//1==A:
    if (i*0.1)//1==B:
      print(i)
      exit()
print(-1)

Submission status: Accepted

Solution code:
def main():
    a,b = map(int,input().split())
    for x in range(1,10001):
        x_a = int(x * 0.08)
        x_b = int(x * 0.1)
        if x_a == a and x_b == b:
            print(x)
            return
    print(-1)
if __name__=='__main__':
    main()

Submission status: Accepted

Solution code:
import math
a,b=map(int,input().split())
m=max(math.ceil(100*a/8),math.ceil(100*b/10))
if a<=m*8/100<a+1 and b<=m*10/100<b+1:
    print(m)
else:
    print(-1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

import math
a_ans = list(range(math.ceil(a*12.5), math.ceil((a+1)*12.5)))
b_ans = list(range(b*10, (b+1)*10))

l_ans = sorted(list(set(a_ans) & set(b_ans)))

if len(l_ans) == 0:
  print(-1)
else:
  print(l_ans[0])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

saitei = math.ceil(a/0.08)

for i in range(10000):
    if int((saitei+i)*0.1) == b and int((saitei+i)*0.08) == a:
        print(saitei+i)
        exit()

print(-1)

Submission status: Accepted

Solution code:

# -*- coding: utf-8 -*-

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

min_price = -1

for price in range(10000):
    if int(price * 0.08) == A and int(price * 0.10) == B:
        min_price = price
        break

print(min_price)

Submission status: Accepted

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

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

    N = (b + 1) * 10
    ans = -1

    for i in range(N):
        if int(i * 0.08) == a and int(i * 0.1) == b:
            ans = i
            break

    print(ans)

if __name__ == "__main__":
    main()

Submission status: Accepted

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

ans = 0
while True:
    ans += 1
    if floor(ans * 0.08) == a and floor(ans * 0.1) == b:
        print(ans)
        exit()
    elif floor(ans * 0.08) > a and floor(ans * 0.1) > b:
        break
print('-1')

Submission status: Accepted

Solution code:
A, B = map(int,input().split())
left = max(12.5*A,10*B)
right = min(12.5*(A+1),10*(B+1))
LEFT = int(left)
if left != LEFT:
    LEFT += 1
RIGHT = int(right)
if right == RIGHT:
    RIGHT -= 1
if LEFT <= RIGHT:
    print(LEFT)
else:
    print(-1)

Submission status: Accepted

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

def ok(x):
    return int(x * 0.08) == A and int(x * 0.10) == B 
l = list(filter(ok, range(1, 1001)))
if l:
    print(min(l))
else:
    print(-1)

Submission status: Accepted

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

from math import floor

def main():
  a, b = map(int, input().strip().split())
  for x in range(10**4+1):
    if floor(x * 0.08) == a and floor(x * 0.10) == b:
      print(x)
      return
  print(-1)

if __name__=='__main__':
  main()

Submission status: Accepted

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

ans=float("inf")
for x in range(1500):
    if x*8/100==A and x*10/100==B:
        ans=min(ans,x)

if ans==float("inf"):
    print -1
else:
    print ans

Submission status: Accepted

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

flag = False
for i in range(1, 12501):
	if (i*8)//100 == a and i//10 == b:
		flag = True
		ans = i
	if flag:
		print(ans)
		exit(0)
print(-1)

Submission status: Accepted

Solution code:
def main():
    A,B=map(int,input().split())
    for i in range(1,1000000):
        if i*0.08//1 == A and i*0.1//1==B:
            print(i)
            return 0
    print(-1)
main()

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(4100000)

import math

import logging

logging.basicConfig(level=logging.DEBUG)

logger = logging.getLogger(__name__)


def resolve():
    # S = [x for x in sys.stdin.readline().split()][0]  # 文字列 一つ
    # N = [int(x) for x in sys.stdin.readline().split()][0]  # int 一つ
    A, B = [int(x) for x in sys.stdin.readline().split()]  # 複数int
    # h_list = [int(x) for x in sys.stdin.readline().split()]  # 複数int

    # grid = [list(sys.stdin.readline().split()[0]) for _ in range(N)]  # 文字列grid
    # v_list = [int(sys.stdin.readline().split()[0]) for _ in range(N)]
    # grid = [[int(x) for x in sys.stdin.readline().split()]
    #         for _ in range(N)]  # int grid

    logger.debug('{}'.format([]))

    for i in range(0, 1001):
        if int(i * 0.08) == A and int(i * 0.1) == B:
            print(i)
            return

    print(-1)


if __name__ == "__main__":
    resolve()

# AtCoder Unit Test で自動生成できる, 最後のunittest.main は消す
# python -m unittest template/template.py で実行できる
# pypy3 -m unittest template/template.py で実行できる

import sys
from io import StringIO
import unittest


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """2 2"""
        output = """25"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """8 10"""
        output = """100"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """19 99"""
        output = """-1"""
        self.assertIO(input, output)

Submission status: Accepted

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

Submission status: Accepted

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

for x in range(1,100001):
    if int(x * 0.08) == a and int(x * 0.10) == b:
        print(x)
        break
else:
    print(-1)

Submission status: Accepted

Solution code:
import math

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

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

if flag:
    print(-1)

Submission status: Accepted

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

def solve(A, B):
    a = A / 0.08
    b = B / 0.10
    c = int(max(a, b)) + 1
    answer = -1
    while int(c * 0.08) == A and int(c * 0.10) == B:
        answer = c
        c -= 1
    return answer


def main():
    A, B = [int(n) for n in input().split()]
    print(solve(A, B))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

print(-1)

Submission status: Accepted

Solution code:
A, B = list(map(int, input().split()))
min_ = max(A/0.08, B/0.1)
max_ = min(int((A+1)/0.08),int((B+1)/0.1))

if min_%1!=0:
    min_ = int(min_)+1
else:
    min_ = int(min_)

if min_>=max_:
    print(-1)
else:
    print(min_)

Submission status: Accepted

Solution code:
# x = 10B + y と表現できるので...

A, B = map(int, input().split())
for i in range(10):
    if int((10*B + i) * 0.08) == A:
        print(10*B + i)
        exit()
print(-1)

Submission status: Accepted

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

ans = -1
for x in range(1001):
    if int(x * 0.08) == a and int(x * 0.1) == b:
        ans = x
        break
print(ans)

Submission status: Accepted

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

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

print(-1)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
import math
import bisect
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop


def LI(): return [int(x) for x in sys.stdin.readline().split()]


def I(): return int(sys.stdin.readline())


def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res


def IR(n):
    return [I() for i in range(n)]


# A
def A():
    S = input()
    if S == 'AAA' or S == 'BBB':
        print('No')
    else:
        print('Yes')
    return


# B
def B():
    N, A, B = LI()
    ans = N // (A + B) * A + min(N % (A + B), A)
    print(ans)
    return


# C
def C():
    A, B = LI()
    for i in range(1, 1001):
        if i * 8 // 100 == A and i * 10 // 100 == B:
            print(i)
            return
    print(-1)
    return


# D
def D():
    return


# E
def E():
    return


# F
def F():
    return


# Solve
if __name__ == "__main__":
    C()

Submission status: Accepted

Solution code:
import math
A,B=map(int,input().split())
for i in range(10000):
    if math.floor(i*0.08)==A and math.floor(i*0.1)==B:
        print(i)
        exit()
else:
    print("-1")

Submission status: Accepted

Solution code:
from sys import stdin
a,b = map(int,stdin.readline().rstrip().split())
for i in range(1001):
    if int(i*0.08) == a and int(i*0.1) == b:
        print(i)
        exit()
print(-1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math



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


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

print(-1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
A, B = map(int, input().split(' '))
for n in range(1, 1001):
    a = int(math.floor(n * 0.08))
    b = int(math.floor(n * 0.1))
    # print(n, a, b)
    if a == A and b == B:
        print(n)
        exit()

print(-1)

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(stdin.readline().rstrip())
nm = lambda: map(int, stdin.readline().split())
nl = lambda: list(map(int, stdin.readline().split()))

eps = 10**-7
a,b = nm()
for i in range(10000):
    if int(i*.08 + eps) == a and int(i*.1 + eps) == b:
        print(i); break
else:
    print(-1)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**6)
from math import floor,ceil,sqrt,factorial,log
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from operator import itemgetter
from fractions import gcd
mod = 10 ** 9 + 7
inf = float('inf')
ninf = -float('inf')
 
#整数input
def ii(): return int(sys.stdin.readline().rstrip()) #int(input())
def mii(): return map(int,sys.stdin.readline().rstrip().split())
def limii(): return list(mii()) #list(map(int,input().split()))
def lin(n:int): return [ii() for _ in range(n)]
def llint(n: int): return [limii() for _ in range(n)]
#文字列input
def ss(): return sys.stdin.readline().rstrip() #input()
def mss(): return sys.stdin.readline().rstrip().split()
def limss(): return list(mss()) #list(input().split())
def lst(n:int): return [ss() for _ in range(n)]
def llstr(n: int): return [limss() for _ in range(n)]

#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？

a,b=mii()

for i in range(1,10001):
    c=floor(i*0.08)
    d=floor(i*0.10)

    if c==a and d==b:
        print(i)
        exit()
print(-1)

Submission status: Accepted

Solution code:
def inp():
    return input()
def iinp():
    return int(input())
def inps():
    return input().split()
def miinps():
    return map(int,input().split())
def linps():
    return list(input().split())
def lmiinps():
    return list(map(int,input().split()))
def lmiinpsf(n):
    return [list(map(int,input().split()))for _ in range(n)]

a,b = miinps()

for i in range(1250):
  x = int(i*0.08)
  y = int(i*0.1)
  if x == a and y == b:
    print(i)
    exit()
  
print("-1")

Submission status: Accepted

Solution code:
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))

A, B = MAP()

ans = -1
for i in range(1, 1250):
    if int(i * 0.08) == A and int(i*0.1) == B:
        ans = i
        break

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def c_tax_increase():
    A, B = [int(i) for i in input().split()]
    for k in range(1, 10**6):
        t1 = 8 * k // 100
        t2 = k // 10
        if t1 > 0 and t2 > 0 and t1 == A and t2 == B:
            return k
    return -1

print(c_tax_increase())

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
p = 1
while True:
    temp1 = int(p * 0.08)
    temp2 = int(p * 0.1)
    if temp1==a and temp2==b:
        print(p)
        break
    p+=1
    if p>1000000:
        print(-1)
        break

Submission status: Accepted

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

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

for i in range(10 ** 6):
    if math.floor(i * 0.08) == A and math.floor(i * 0.1) == B:
        print(i)
        sys.exit()
print(-1)

Submission status: Accepted

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

#整数値龍力　複数の入力
def input_multiple_number():
    return map(int, input().split())

A,B = input_multiple_number()

for i in range(10000):
    price = i+1
    eight = int(price * 0.08)
    ten = int(price * 0.1)
    if eight == A and ten == B:
        if(A > 100 or B > 100):
            print(-1)
            exit(0)
        print(price)
        exit(0)

print(-1)

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
L=[]
for i in range (10001):
	if int(i*0.08)==A and int(i*0.1)==B:
		L.append(i)
if L==[]:
	print(-1)
else:
	print(min(L))

Submission status: Accepted

Solution code:
import math
a, b = [ int(v) for v in input().split() ]
ans = -1
for i in range(1, 10001):
    if math.floor(i * 0.08) == a and math.floor(i * 0.1) == b:
        ans = i
        break
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


ans = None
for i in range(100000):
    a = int(i * 0.08)
    b = int(i * 0.1)
    if a == A and b == B:
        ans = i
        break

if ans is None:
    print(-1)
else:
    print(ans)

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines

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

    for i in range(1, 1300):
        x1 = int(i * 0.08)
        x2 = int(i * 0.1)

        if x1 == A and x2 == B:
            print(i)
            exit()

    print(-1)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
A,B=list(map(int,input().split()))
x1=int(A/0.08)
x2=int(B/0.1)
poss=[]
for x in range(min(0,x1-10),x1+11):
    poss.append(x)
for x in range(min(0,x2-10),x2+11):
    poss.append(x)
poss=sorted(poss)

for p in poss:
    if int(p*0.08)==A and int(p*0.1)==B:
        print(p)
        exit()
print(-1)

Submission status: Accepted

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

    ans=0
    while True:
        if int(ans*0.08)==A and int(ans*0.1)==B:
            print(ans)
            break
        elif int(ans*0.08)>A or int(ans*0.1)>B:
            print(-1)
            break
        else:
            ans+=1

resolve()

Submission status: Accepted

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

ans = -1
for i in range(1,10000):
    a_tax = int((i * 0.08)//1)
    b_tax = int((i * 0.1)//1)
    if a == a_tax and b == b_tax:
        ans = i
        break
print(ans)

Submission status: Accepted

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

x1 = a / 0.08
x2 = b / 0.1

ans = -1
zeinuki = int(min(x1,x2))
while zeinuki < max(x1,x2)+1:
  if math.floor(zeinuki * 0.08) == a and math.floor(zeinuki * 0.1) == b:
    ans = zeinuki
    break
  zeinuki += 1

print(int(ans))

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
cnt=1
for i in range(100000):
    if i*8//100==a and i*10//100==b:
        print(i)
        cnt=0
        break
if cnt==1:
    print(-1)

Submission status: Accepted

Solution code:
A,B=map(int,input().split())                            # 1行2列

A_TAX = 0.08
B_TAX = 0.10

bl = 0
for i in range(0,10000):
	if int(i*A_TAX) == A and int(i*B_TAX) == B:
		bl = 1
		print(i)
		break

if bl == 0:
	print(-1)

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
for i in range(1,100000):
    if i*8//100==a and i*1//10==b:
        print(i)
        exit()
print(-1)

Submission status: Accepted

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

# ans * 1.08
# ans * 1.10

ans = -1
for i in range(1, 1010):
    if i*0.08 // 1 == A and i*0.1 // 1 == B:
        ans = i
        break

print(ans)

Submission status: Accepted

Solution code:
# li = [[0] * 4 for i in range(3)]

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


A, B = map(int, input().split())
ans = 0
for i in range(20000):
    if (i * 0.08) // 1 != A:
        continue

    if (i * 0.1) // 1 != B:
        continue

    print(i)
    ans = 1
    break

if ans == 0:
    print(-1)

Submission status: Accepted

Solution code:
import math
import sys

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

for i in range(10**5):
  if (math.floor(i*0.08)==a) and (math.floor(i*0.1)==b):
    print(i)
    sys.exit()

print(-1)

Submission status: Accepted

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

priA = A * 100 // 108
priB = B * 100 // 110

for i in range(100000):
    if int(0.08 * i) == A and int(0.1 * i) == B:
        print(i)
        break

else:
    print(-1)

Submission status: Accepted

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

ans = -1

for i in reversed(range(int(100 / 0.08) * 2)):
    if (int(i * 0.08) == A) and (int(i * 0.10) == B):
        ans = i

print(ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
import itertools
input = sys.stdin.readline

##### リストの 二分木検索 #####
# bisect_left(lists, 3)
# bisect_right(lists, 3)

##### プライオリティキュー #####
# heapq.heapify(a) #リストaのheap化
# heapq.heappush(a,x) #heap化されたリストaに要素xを追加
# heapq.heappop(a) #heap化されたリストaから最小値を削除＆その最小値を出力

# heapq.heappush(a, -x) #最大値を取り出す時は、pushする時にマイナスにして入れよう
# heapq.heappop(a) * (-1) #取り出す時は、-1を掛けて取り出すこと

##### タプルリストのソート #####
# sorted(ans) #(a, b) -> 1st : aの昇順, 2nd : bの昇順
# sorted(SP, key=lambda x:(x[0],-x[1])) #(a, b) -> 1st : aの昇順, 2nd : bの降順
# sorted(SP, key=lambda x:(-x[0],x[1])) #(a, b) -> 1st : aの降順, 2nd : bの昇順
# sorted(SP, key=lambda x:(-x[0],-x[1])) #(a, b) -> 1st : aの降順, 2nd : bの降順

# sorted(SP, key=lambda x:(x[1])) #(a, b) -> 1st : bの昇順
# sorted(SP, key=lambda x:(-x[1])) #(a, b) -> 1st : bの降順

##### 累乗 #####
# pow(x, y, z) -> x**y % z

def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))

inf = float('inf')
mod = 1000000007

#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-

def main():
	A,B = inputMap()

	for i in range(1,100000000):
		tmp = int(i * 0.1)
		tmp2 = int(i * 0.08)

		#print("{} {}".format(tmp,tmp2))

		if tmp2 == A and tmp == B:
			print(i)
			sys.exit()

	print(-1)



#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
# special thanks :
#  https://nagiss.hateblo.jp/entry/2019/07/01/185421
#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
# nCr mod m
# rがn/2に近いと非常に重くなる
def combination(n, r, mod=10**9+7):
    r = min(r, n-r)
    res = 1
    for i in range(r):
        res = res * (n - i) * modinv(i+1, mod) % mod
    return res

# mを法とするaの乗法的逆元
def modinv(a, mod=10**9+7):
    return pow(a, mod-2, mod)

def egcd(a, b):
    if a == 0:
        return b, 0, 1
    else:
        g, y, x = egcd(b % a, a)
        return g, x - (b // a) * y, y

# nHr mod m
# 問題によって、combination()を切り替えること
def H(n, r, mod=10**9+7):
	# comb = Combination(n+r-1, mod)
	# return comb(n+r-1, r)
    return combination(n+r-1, r, mod)

class Combination:
    """
    O(n)の前計算を1回行うことで，O(1)でnCr mod mを求められる
    n_max = 10**6のとき前処理は約950ms (PyPyなら約340ms, 10**7で約1800ms)
    使用例：
    comb = Combination(1000000)
    print(comb(5, 3))  # 10
    """
    def __init__(self, n_max, mod=10**9+7):
        self.mod = mod
        self.modinv = self.make_modinv_list(n_max)
        self.fac, self.facinv = self.make_factorial_list(n_max)

    def __call__(self, n, r):
        return self.fac[n] * self.facinv[r] % self.mod * self.facinv[n-r] % self.mod

    def make_factorial_list(self, n):
        # 階乗のリストと階乗のmod逆元のリストを返す O(n)
        # self.make_modinv_list()が先に実行されている必要がある
        fac = [1]
        facinv = [1]
        for i in range(1, n+1):
            fac.append(fac[i-1] * i % self.mod)
            facinv.append(facinv[i-1] * self.modinv[i] % self.mod)
        return fac, facinv

    def make_modinv_list(self, n):
        # 0からnまでのmod逆元のリストを返す O(n)
        modinv = [0] * (n+1)
        modinv[1] = 1
        for i in range(2, n+1):
            modinv[i] = self.mod - self.mod//i * modinv[self.mod%i] % self.mod
        return modinv

if __name__ == "__main__":
	main()

Submission status: Accepted

Solution code:
from math import ceil
inpl = lambda: list(map(int,input().split()))
A, B = inpl()
Amin = int(ceil(A * (100/8)))
Amax = int((A+1)*(100/8) - 0.1)
Bmin = int(ceil(B * (100/10)))
Bmax = int((B+1)*(100/10) - 0.1)
Tmax = min(Amax,Bmax)
Tmin = max(Amin,Bmin)
if Tmax < Tmin:
    print(-1)
else:
    print(Tmin)

Submission status: Accepted

Solution code:


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


# 総当たり
from math import floor
for i in range(12, 1010):
    if floor(i*0.08) == a and floor(i*0.1) == b:
        print(i)
        exit()

print(-1)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# vim:fenc=utf-8 ff=unix


def solv(A, B):
    for price in range(B*10, B*10+10):
        if (price * 8) // 100 == A:
            return price
    return -1


if __name__ == "__main__":

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

    print(ans)

Submission status: Accepted

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

for i in range(100000):
    if (i*8)//100 == a and (i*10)//100 == b:
        print(i)
        exit()

print(-1)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
for i in range(1,10100):
    if i*8//100==a and i//10==b:
        print(i)
        break
else:
    print(-1)

Submission status: Accepted

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

for i in range(1, 1011):
    a = i * 0.08
    b = i * 0.1
    if A <= a < A+1 and B <= b < B + 1:
        print(i)
        exit()

print('-1')

Submission status: Accepted

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

for j in range(1250):
    if int(j*0.08) == A and int(j*0.10) == B:
        print(j)
        flag = 1
        break

if flag == 0:
    print(-1)

Submission status: Accepted

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

ans = -1

for i in range(1011):
    _a = int(i * 0.08)
    _b = int(i * 0.1)
    if _a == a and _b == b:
        ans = i
        break
print(ans)

Submission status: Accepted

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

b_small = int(B * 10)
b_big = int((B+1) * 10)
flag = True
for i in range(b_small, b_big):
    if int(i * 0.08) == A:
        print(i)
        flag = False
        break

if flag:
    print('-1')

Submission status: Accepted

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

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

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

print(-1)