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

ans = -1
i = 1
while i < 2000:

    a = int(i * 1.08) - i
    b = int(i * 1.1) - i
    if A == a and B == b:
        ans = i
        break
    i += 1
print(ans)

Submission status: Accepted

Solution code:
import sys
a,b=map(int,input().split())
A=(a*100+8-1)//8
B=b*10
if a%2==0:
  for i in range(13):
    AA=A+i
    for j in range(10):
      BB=B+j
      if AA==BB:
        print(AA)
        sys.exit()
else:
  for i in range(12):
    AA=A+i
    for j in range(10):
      BB=B+j
      if AA==BB:
        print(AA)
        sys.exit()
print(-1)

Submission status: Accepted

Solution code:
from math import floor
import sys

# print('input >>')
A, B = map(int,(input().split()))

# print('-----output-----')
for i in range(20000):
    if floor(i * 0.08) == A and floor(i * 0.1) == B:
        print(i)
        sys.exit()

print('-1')

Submission status: Accepted

Solution code:
import math


def submit():
    a, b = map(int, input().split())
    b_price_min, b_price_max = b * 10, (b + 1) * 10 - 1

    for b_price in range(b_price_min, b_price_max + 1):
        if math.floor(b_price * 0.08) == a:
            print(b_price)
            return

    print(-1)


if __name__ == "__main__":
    submit()

Submission status: Accepted

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

i = int(a / 0.08)


while (1):
    if (a == int(i*0.08) and b == int(i*0.1)):
        print(i)
        break
    if (int(i*0.08) > a):
        print(-1)
        break;
    i += 1

Submission status: Accepted

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

import sys

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

Submission status: Accepted

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

Submission status: Accepted

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

root=floor(a*100//8)

while True:
    if (a==int(floor(root*0.08)))&(b==int(floor(root*0.1))):
        ans=int(root)
        break
    else:
        if (int(floor(root*0.08))>a)|(int(floor(root*0.1))>b):
            ans=-1
            break
        root+=1
print(ans)

Submission status: Accepted

Solution code:
x,y = list(map(lambda x:int(x),input().split(" ")))
start = int(x*12.5)-1
for i in range(start,start+30):
  if int(i*.08)==x and int(i*0.1)==y:
    print(i)
    break
  if i==start+29:
    print(-1)

Submission status: Accepted

Solution code:
# coding:utf-8

import sys
import math
import time
#import numpy as np
import collections
from collections import deque
import queue
import copy
import bisect


def dfs(s, prev, pre):
  val[s] += Ope[s] + prev
  for i in G[s]:
    if(i == pre):
      continue
    dfs(i, val[s], s)

def bfs(sx, sy, n):
  que = deque([[sy,sx]])
  while que:
    y,x = que.popleft()
    for i,j in D:
      if(x+i<0 or y+j<0 or x+i>W-1 or y+j>H-1):
        continue
      dist = G[y+j][x+i]
      if(G[y+j][x+i] != "X"):
        if(type(G[y+j][x+i]) is str):
          G[y+j][x+i] = G[y][x]+1
          que.append([y+j,x+i])
        elif(dist>G[y][x]+1):
          G[y+j][x+i] = G[y][x]+1
          que.append([y+j,x+i])
        

#X = str(input()).split()
#a = [int(x) for x in input().split()]
#sys.setrecursionlimit(10**7)
#N, Q = map(int, input().split())
#G = [list(input()) for i in range(H)]

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

for i in range(10000):
  if(int(math.floor(i*0.08)) == A and int(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(10000):
  if (i*0.08)//1==A and (i*0.1)//1==B:
    print(i)
    exit()
print(-1)

Submission status: Accepted

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

def solve():
    A, B = list(map(int, input().split()))
    x1 = A*(100/8)
    x2 = B*(10)
    x = min(x1, x2)

    while True:
        a = math.floor(x*0.08)
        b = math.floor(x*0.1)
        if a>A and b>B:
            print(-1)
            return

        if A==a and B==b:
            break
        # print(a, b, x)
        # input()
        x += 1
    print(int(x))

if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
i=list(map(int, input().split()))
a=i[0]
b=i[1]
k=1001
for j in range (1000,0,-1):
    if int(j*0.08)==a and int(j*0.1)==b:
        k=j
if k==1001:
    print(-1)
else:
    print(k)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(700000)

def s_in():
    return input()

def n_in():
    return int(input())

def l_in():
    return list(map(int, input().split()))

def print_l(l):
    print(' '.join(map(str, l)))

class Interval():
    def __init__(self, li):
        self.li = li
        self.n = len(li)
        self.sum_li = [li[0]]
        for i in range(1, self.n):
            self.sum_li.append(self.sum_li[i-1] + li[i])

    def sum(self, a, b=None):
        if b is None:
            return self.sum(0, a)

        res = self.sum_li[min(self.n-1, b-1)]
        if a > 0:
            res -= self.sum_li[a-1]
        return res

a,b=l_in()

for x in range(1001):
    if x*8//100 == a and x*10//100 == b:
        print(x)
        break
else:
    print(-1)

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
# a <= x * 1.08 < a + 1
# b <= x * 1.1 < b + 1
x_min = min(int(a / 0.08), int(b / 0.1))
x_max = max(int((a + 1) / 0.08), int((b + 1) / 0.1))
for x in range(x_min, x_max + 1):
    if int(x * 0.08) == a and int(x * 0.1) == b:
        print(x)
        break
else:
    print(-1)

Submission status: Accepted

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

import math

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

x = max(math.ceil(A*100/8), math.ceil(B*10))

if math.floor(x*0.08) != A or math.floor(x*0.1) != B:
    print(-1)
else:
    print(x)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import math
a,b = map(int,input().split())
ans = -1
for i in range(1,12500):
    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.1) == B:
        print(i)
        exit()
print(-1)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
c = 0
for i in range(1, 10 ** 4):
    if int(i * 1.08) == a + i and int(i * 1.1) == b + i:
        print(i)
        c = 1
        break
if c == 0:
    print(-1)

Submission status: Accepted

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

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

print(-1)

Submission status: Accepted

Solution code:
import math
A, B = map(int, input().split())
ans = []
for i in range(1, 2000):
    if math.floor(i * 0.08) == A and math.floor(i * 0.1) == B:
        ans.append(i)
if len(ans) == 0:
    print(-1)
    exit()
print(min(ans))

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
import math
x=min(math.floor(a/0.08),math.floor(b/0.1))
y=max(math.floor((a+1)/0.08),math.floor((b+1)/0.1))
for i in range(x,y):
    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())

for n in range(1, 1251):
    if int(n * 0.08) == A and int(n * 0.10) == B:
        print(n)
        break
else:
    print(-1)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math
A,B = (int(i) for i in input().split())

ans = -1
for i in range(10**5):
  if math.floor(i * 0.08) == A and math.floor(i * 0.1) == B:
    ans = i
    break


print(ans)

Submission status: Accepted

Solution code:
import sys
import math
sys.setrecursionlimit(10 ** 7)

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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

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

print(ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
a,b = list(map(int,input().split()))

from decimal import Decimal

n_list = [(int(i*0.08),int(i*0.1)) for i in range(1500)]

for i,v in enumerate(n_list):
    if v==(a,b):
        print(i)
        import sys
        sys.exit()
print(-1)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:


def resolve():
    A,B=map(int,input().split())
    for i in range(1,20000):
        a=int(i*0.08)
        b=int(i*0.1)
        if a==A and b==B:
            print(i)
            return
    else:
        print(-1)


if __name__ == "__main__":
    resolve()

Submission status: Accepted

Solution code:
import math
A,B=map(int,input().split())
ans=-1
for i in range(1,10001):
    n1=int(math.floor(i * 0.08))
    n2=int(math.floor(i * 0.1))

    if n1 == A and n2 == B:
        ans=i
        break

print(ans)

Submission status: Accepted

Solution code:
import math
a,b = map(int,input().split())
for i in range(1,1251):
    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())
ans = -1
for i in range(1, 100000):
    if int(i*0.08) == a and int(i*0.10) == b:
        ans = i
        break
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

for n in range(1,20000):
    if int(n * 0.08) == a:
        if int(n * 0.10) == b:
            print(n)
            exit()

print(-1)

Submission status: Accepted

Solution code:
A,B = map (int,input().split())
eight = [0] * 2000
ten = [0] * 2000
for i in range(2000):
    eight[i] =(float(i+1) * 0.08)//1
    ten[i] = (float(i+1) * 0.1)//1
ans = 0
for i in range(2000):
    if A == eight[i] and B == ten[i]:
        ans =  i + 1
        break
if ans == 0:
    print(-1)
else:
    print(ans)

Submission status: Accepted

Solution code:
from math import floor

if __name__ == "__main__":
    a, b = map(int, input().split())

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

    print('-1')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
a, b = map(int, input().split())
for yen in range(1, 10000):
    ap = math.floor(yen*0.08)
    bp = math.floor(yen*0.10)
    #print(yen, ap, bp)
    if ap == a and bp == b:
        print(yen)
        exit()
print(-1)

Submission status: Accepted

Solution code:
A,B = map(int,input().split())
check = 0
for i in range(100000):
    if i * 8 // 100 == A:
        if i * 10 // 100 == B:
            ans = i
            check = 1
            break
if check == 0:
    ans = -1
print(ans)

Submission status: Accepted

Solution code:
import math
import sys
a,b = map(int, input().split())
for ans in range(1, 1500):
    if math.floor(ans * 0.08) == a and math.floor(ans * 0.10) == b:
        print(ans)
        sys.exit()
print(-1)

Submission status: Accepted

Solution code:
def main():
    A, B = map( int, input().split())
    ans = -1
    for i in range(100000):
        if i*8//100 == A and i*10//100 == B:
            ans = i
            break
    print(ans)
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import math

A, B = map(int, input().split())
jdg = False
ans = 1000
for i in range(B*10, (B+1)*10-1):
    M = math.floor(i*0.08)
    if M == A:
        jdg = True
        ans = min(ans,i)

if jdg:
    print(ans)
else:
    print(-1)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import math
import bisect
import random
from itertools import permutations, accumulate, combinations, product
import sys
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, floor
from operator import mul
from functools import reduce
import pprint
sys.setrecursionlimit(10 ** 9)


INF = 10 ** 20
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 1000000007

a, b = LI()
for i in range(10000):
    if i * 8 //100 == a and i // 10 == b:
        print(i)
        break
else:
    print(-1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

print(r)

Submission status: Accepted

Solution code:
import math

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

if a%2==0:
    koho1=[(a*25)//2, ((a*25)//2) +12]
else:
    koho1=[int((a*12.5)+0.5), int((a*12.5)+11.5)]

koho2=[b*10, b*10+9]

if koho2[0]<=koho1[0] and koho1[0]<=koho2[1]:
    print(koho1[0])
elif koho1[0]<=koho2[0] and koho2[0]<=koho1[1]:
    print(koho2[0])
else:
    print(-1)

Submission status: Accepted

Solution code:
''' بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ '''
#codeforces
gi = lambda : list(map(int,input().split()))
a, b = gi()
for k in range(1001):
	if int(k * .08) == a and int(k * .1) == b:
		print(k)
		exit()
print(-1)

Submission status: Accepted

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

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

print("-1")

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

for i in range(100000):
    if i*108//100-i==A and i*110//100-i==B:
        print(i)
        exit()

print(-1)

Submission status: Accepted

Solution code:
from math import floor

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

for i in range(1260):
    if floor(i*0.08) == A and floor(i*0.1) == B:
        print(i)
        break
else:
    print(-1)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math

NN = 2020202
MOD = 10**9+7
INF = float("inf")


a, b = map(int, input().split())
low = max(a/0.08, b/0.1)
high = min((a+1)/0.08, (b+1)/0.1)

price = math.ceil(low)

# print(a/0.08, b/0.1, (a+1)/0.08, (b+1)/0.1, price)
if price >= high:
    print(-1)
else:
    print(price)

Submission status: Accepted

Solution code:
from math import floor


def solve():
    A, B = map(int, input().split())
    for i in range(1, 10000):
        if A == floor(i * 0.08) and B == floor(i * 0.1):
            print(i)
            exit()
    print(-1)


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
[A,B] = list(map(int,input().split()))
C1 = A*(100/8)
C2 = (A+1)*(100/8)
D1 = B*(100/10)
D2 = (B+1)*(100/10)
flag = 0
for n in range(int(C1//1), int(C2//1)+1):
    if (C1<=n<C2) and (D1<=n<D2):
        print(n)
        flag = 1
        break
if flag==0:
    print(-1)

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
for i in range(11000):
    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 = map(int, input().split())

for i in range(1, 1000000):
    if int(i*0.10) > 100:
        print(-1)
        exit()
    if int(i*0.08) == a and int(i*0.10) == b:
        print(i)
        exit()
print(-1)

Submission status: Accepted

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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from math import ceil
a,b=map(int,input().split())
l=max(a/0.08,b/0.1)
r=min((a+1)/0.08,(b+1)/0.1)
if r-l>=1:
    print(ceil(l))
else:
    print(-1)

Submission status: Accepted

Solution code:
#n = int(input())
#l = list(map(int, input().split()))

'''
A=[]
B=[]
for i in range():
    a, b = map(int, input().split())
    A.append(a)
    B.append(b)'''

#import sys
#sinput = sys.stdin.readline

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

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

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
n=10**4
for i in range(n):
    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=map(int, input().split())  
import math
x=math.floor(a/0.08)
y=math.floor(b/0.1)
minxy=min(x,y)
for i in range(minxy, minxy+100):
    if math.floor(i*0.08)==a and math.floor(i*0.1)==b:
        print(i)
        exit()
print(-1)

Submission status: Accepted

Solution code:
import math

a, b = map(int, input().split())
"""
ax = range()
bx = range(b*10,b*10+10)
"""

for i in range(10 * a, 1251):
    if (math.floor(i * (8 / 100)) == a and math.floor(i * (10 / 100)) == b):
        print(i)
        break
else:
    print(-1)

Submission status: Accepted

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

res = -1
for i in range(10000):
    if math.floor(i*0.08) == A and math.floor(i*0.1) == B:
        res = i
        break

print(res)

Submission status: Accepted

Solution code:
import math
a,b=map(int,input().split())
ans=-1
tmp=b*10
for x in range(tmp-20,tmp+20):
    if math.floor(x*0.08)==a and math.floor(x*0.10)==b:
        ans=x
        break
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from collections import defaultdict, Counter, deque
from itertools import accumulate, permutations, combinations
from operator import itemgetter
from bisect import bisect_left, bisect_right, bisect
from heapq import heappop, heappush
from fractions import gcd
from math import ceil, floor, sqrt, cos, sin, pi
from copy import deepcopy

# If you use recursive call, uncomment this code
#sys.setrecursionlimit(10**6)

def main():
    a,b = map(int, input().split())
    for x in range(1250):
        if int(0.08*x) == a and int(0.1*x) == b:
            return x
    return -1

if __name__ == '__main__':
    print(main())

Submission status: Accepted

Solution code:
import sys

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

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

Submission status: Accepted

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

Submission status: Accepted

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

def solve(A: int, B: int):
    for i in range(1,1001):
        if A == math.floor(0.08*float(i)) and B == math.floor(0.1*float(i)):
            print(i)
            return
    print(-1)


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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from math import ceil

A, B = map(int, input().split())
x = max(ceil(A / 0.08), ceil(B / 0.1))
if x < (A + 1) / 0.08 and x < (B + 1) / 0.1:
    print(x)
else:
    print(-1)

Submission status: Accepted

Solution code:
#!python3

iim = lambda: map(int, input().rstrip().split())

def resolve():
    A, B = iim()
    ans = 10 * B
    for i in range(ans, ans+10):
        if (8*i) // 100 == A:
            print(i)
            return
    print(-1)


if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

for i in range(1,10000):
    pa=int(i*0.08)
    pb=int(i*0.10)
    if pa>100 or pb >100:
        break
    if pa==a and pb==b:
        print(i)
        ans=1
        break
if ans==0:
    print(-1)

Submission status: Accepted

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

Submission status: Accepted

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


def solve(A: int, B: int):
    for i in range(10000):
        per8 = math.floor(i * 0.08)
        per10 = math.floor(i * 0.10)
        if per8 == A and per10 == B:
            print(i)
            exit()

    print(-1)
    return


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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

a,b = mi()

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
a,b = map(int,input().split())

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

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:
# from fractions import gcd
# mod = 10 ** 9 + 7
# N = int(input())
# a = list(map(int,input().split()))
# a,b,c = map(int,input().split())
# ans = [0] * N
# math.ceilで切り上げ
# dp = [[0] * 4 for i in range(3)] #2次元配列初期化
# dp = [[[0] * 2 for i in range(3)] for j in range(5)]
# (ord('A'))でASCII出力 Aは65
import math
import statistics
import string


def intinput():
    return int(input())
def listintinput():
    return list(map(int, input().split()))
def splitintinput():
    return map(int, input().split())
def factorialsurplus(x, y, z):  # xからyまでの階乗をzで割ったあまりを求める
    ret = 1
    for i in range(x, y + 1):
        ret = (ret * i) % z
    return (ret)
def isprime(x):
    if x == 1:
        return False
    if x == 2:
        return True
    sq = int(math.sqrt(x))
    for i in range(2,sq+1):
        if x % i == 0:
            return False
    return True
def hcfnaive(a,b):#最大公約数 math.gcdが使えない時の手段として入れとく。pythonが更新されたらいらなくなるはず
    if(b==0):
        return a
    else:
        return hcfnaive(b,a%b)

A, B = splitintinput()

for i in range(100001):
    if int(i * 0.08) == A and int(i*0.1) == B:
        print(i)
        break
else:
    print(-1)

Submission status: Accepted

Solution code:
import sys
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)
        sys.exit()
print(-1)

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

Submission status: Accepted

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

ans = -1
for i in range(1, 20001):
    a = int(i * 1.08) - i
    b = int(i * 1.1) - i
    if A == a and B == b:
        ans = i
        break
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    a, b = map(int, input().split())
    for x in range(1, 100005):
        aa = x * 8 // 100
        bb = x // 10
        if aa == a and bb == b:
            print(x)
            return

    print(-1)

main()

Submission status: Accepted

Solution code:
def main():
    A, B = (int(i) for i in input().split())
    ans = -1
    from math import floor
    for y in range(100000 + 1):
        a = floor(y*0.08)
        b = floor(y*0.1)
        if a == A and b == B:

            ans = y
            break
    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

ans = -1

for i in range(1,1300):
  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().rstrip().split(" "))
e = False
for i in range(10 ** 4):
  if int(i * 0.08) == A and int(i * 0.10) == B:
    print(i)
    e = True
    break
if e == False:
  print(-1)

Submission status: Accepted

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

ans = -1

for i in range(1, 10**5):
    if a * 12.5 <= i and i < (a+1)*12.5 and 10 * b <= i and i < 10 * (b + 1):
        ans = i
        break

print(ans)

Submission status: Accepted

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

for i in range(10000):
    if int(i * 1.08) - i == a and int(i * 1.1) - i == b:
        print(i)
        exit()

print(-1)

Submission status: Accepted

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

def gcd(a: int, b: int):
    """ https://cocodrips.hateblo.jp/entry/2014/03/05/143623
    """
    while b:
        a, b = b, a%b
    return a

def lcm(a: int, b: int):
    return a * b // gcd(a, b)


def main():
	A,B = map(int, input().split())
	#S = input().rstrip()
	#vA = list(map(int, input().split()))
	#vX = [input().rstrip() for _ in [0,]*N]
	
	X = 0.08
	Y = 0.10
	
	res = 0
	for i in range(1, 1101):
		if int(i*X)==A and int(i*Y)==B:
			res = i
			break
	else:
		res = -1
	
	#res = "No" if (S=="AAA" or S=="BBB") else "Yes"
	#res = -(-N//M)
	#res = gcd(N,M)
	print(res)
	
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
from math import floor
A,B = map(int,input().split())
flag = 0
for i in range(1,15000):
  if floor(i*0.08)==A and floor(i*0.10)==B:
    print(i)
    flag = 1
    break
    
if flag==0:
  print("-1")

Submission status: Accepted

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

def solve(A, B):
    for x in range(0, 100000):
        if (x * 8) // 100 == A and (x * 10) // 100 == B:
            return x
    return -1

print(solve(A, B))

Submission status: Accepted

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

x = 1
while True:
    A = int(x * 0.08)
    B = int(x * 0.1)
    if A == a and B == b:
        print(x)
        break
    elif A > a or B > b:
        print(-1) 
        break
    x += 1

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
flag = True
for i in range(1250):
  n = i+1
  if int(n*0.08) == a and int(n*0.1) == b:
    flag = False
    print(n)
    break
if flag:
  print(-1)