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:
from math import floor
a, b = map(int, input().split())

a_ = a // 0.08
b_ = b // 0.1

ans = min(floor(a_), floor(b_))

while floor(ans * 0.08) != a or floor(ans * 0.1) != b:
    ans += 1
    if floor(ans * 0.08) > a or floor(ans * 0.1) > b:
        print('-1')
        exit()
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

for ans in range(max(A, B) * 20 + 1):
    if ans * 8 // 100 == A and ans * 10 // 100 == B: break
    else: continue
else:
    ans = -1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

x = 0
while True:
    if (x*2) // 25 == A and x//10 == B:
        print(x)
        exit()
    if (x*2) // 25 > A and x//10 > B:
        print(-1)
        exit()
    
    x += 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:
        continue
    if math.floor(i * 0.1) != B:
        continue
    print(i)
    exit()

print(-1)

Submission status: Accepted

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

for i in range(1, 2000):
    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())
import math
for i in range(10000):
    p = math.floor(i*0.08)
    q = math.floor(i*0.10)
    if p == a and q == b:
        print(i)
        exit()
else:
    print(-1)

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(10000):
    x = floor(i * 0.08)
    y = floor(i * 0.1)
    if x == a and y == b:
        print(i)
        exit(0)

print(-1)

Submission status: Accepted

Solution code:
import math
a,b = map(int,input().split())
a1 = math.ceil((25*a)/2)
a2 = (25*(a+1))/2
b1 = 10*b
b2 = 10*(b+1)
f = max(a1,b1)
if f < a2  and f < b2:
  print(f)
else:
  print(-1)

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
for i in range(1, 10001):
    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
def input(): return sys.stdin.readline().rstrip()
sys.setrecursionlimit(10 ** 7)

A, B = map(int, input().split())
ans = -1
for x in range(1100):
    if int(x*0.08) == A and int(x*0.10) == B:
        ans = x
        break

print(ans)

Submission status: Accepted

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

import math
ans=0
for i in range(1,1500):
    price8 = math.floor(i*0.08)
    price10 = math.floor(i*0.10)
    if a==price8 and b==price10:
        ans=1
        break
if ans==1:
    print(i)
else:
    print(-1)

Submission status: Accepted

Solution code:
def main():
    import numpy as numpy
    import sys
    A,B=list(map(int,sys.stdin.readline().split()))
    for price in range(10001):
        if int(price*0.08)==A and int(price*0.1)==B:
            return price
    
    return -1

print(main())

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sun Jan 19 20:52:57 2020

@author: over-
"""


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


ans=-1
for i in range(2000):
    r=i*0.08
    if int(r) == A:
        l=i*0.1
        if int(l)==B:
            ans=i
            break

print(ans)

Submission status: Accepted

Solution code:
a,b = map(int, input().split())
ans=-1
for i in range(10000):
    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())
flag = True
for i in range(13000):
  if int(i * 0.08) == a and int(i * 0.1) == b:
    print(i)
    flag = False
    break
if flag:
  print(-1)

Submission status: Accepted

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

def ans():

    for x in range(0, 100000):
        if A == int(x * 0.08) and B == int(x * 0.1):
            print(x)
            return
    print(-1)

ans()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
a,b = map(int,input().split())
for i in range(2000):
  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())
for i in range(100000):
    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())
for i in range(10**4):
    if math.floor((i*2)/25) == A and math.floor(i/10) == B:
        print(i)
        exit()
print(-1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
a,b=list(map(int,input().split()))
ans=float("inf")
for i in range(2000,0,-1):
    if math.floor(i*0.1)==b and math.floor(i*0.08)==a:
        ans=min(ans,i)
if ans==float("inf"):
    ans=-1
print(ans)

Submission status: Accepted

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

def f():
	for i in range(10 ** 4 + 1):
		if math.floor(i * 0.08) == A and math.floor(i * 0.1) == B:
			return i
	return -1

print(f())

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# import bisect
# from collections import Counter, deque
# import copy
# from heapq import heappush, heappop, heapify
# from fractions import gcd
# import itertools
# from operator import attrgetter, itemgetter
import math

import sys

# import numpy as np

ipti = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)

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

    for price in range(0, 10001):
        aa = math.floor(price * 0.08)
        bb = math.floor(price * 0.10)

        if a == aa and b == bb:
            print(price)
            sys.exit()

    print(-1)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
import math

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

A, B = lr()
answer = -1
for x in range(1001):
    if math.floor(x * 0.08) == A and math.floor(x * 0.1) == B:
        answer = x
        break

print(answer)

Submission status: Accepted

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


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

for n in range(1,10**5):
    a = n*0.08 // 1
    b = n*0.10 // 1
    if a==A and b==B:
        print(n)
        sys.exit()

print(-1)

Submission status: Accepted

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

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

    print(-1)
    
if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from collections import *
import heapq
import math
import bisect
from itertools import permutations,accumulate,combinations,product
from fractions import gcd
def input():
    return sys.stdin.readline()[:-1]
def ruiseki(lst):
    return [0]+list(accumulate(lst))
mod=pow(10,9)+7

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

for i in range(100000):
    tmp=int(i*0.08)
    tmp2=int(i*0.1)
    if a==tmp and b==tmp2:
        print(i)
        break
else:
    print(-1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def mi():return map(int,input().split())
def li():return list(mi())

a,b=mi()
import math
for i in range(100100):
    if math.floor(0.08*i)==a and math.floor(0.10*i)==b:
        print(i)
        exit()
        
print(-1)

Submission status: Accepted

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

for i in range(2000):
    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
i = 0
while True:
    A8 = i*0.08//1
    B10 = i*0.1//1
    if A == A8 and B == B10:
        ans = i
        break
    elif A < A8 and B < B10:
        break
    i += 1
print(ans)

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

Submission status: Accepted

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

for i in range(1, 5000):
    a = int(i*0.08)
    b = int(i*0.1)

    if a==A and b==B:
        print(i)
        quit()

print(-1)

Submission status: Accepted

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

Submission status: Accepted

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

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

for i in range(1,10**6):
    if math.floor(i*0.08) == a:
        if math.floor(i*0.10) == b:
            print(i)
            exit()
            """
    elif math.ceil(i*0.08) == a:
        if math.floor(i*0.10) == b:
            print(i)
            exit()
        elif math.ceil(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.1) == b and int(i*0.08) ==a:
    print(i)
    break
else:
  print(-1)

Submission status: Accepted

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

for i in range(10**6):
    if i*8//100==A and i*10//100==B:
        print(i)
        break
else:
    print(-1)

Submission status: Accepted

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

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

print(-1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

x = A * 12
l = 0
while l == 0:
  if (x * 0.08) // 1 == A:
    if (x * 0.1) // 1 == B:
      print(x)
      quit()
  x += 1
  if (x * 0.08) // 1 > A:
    if (x * 0.1) // 1 > B:
      l = 1
      
print("-1")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import exit

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 = list(map(int,input().split()))
for i in range(1300):
    if int(i*0.08) == A and int(i*0.1) == B:
        print(i)
        break
else:
    print(-1)

Submission status: Accepted

Solution code:
import math
a, b = map(int, input().split())
res = None
for i in range(1, 200000):
    if math.floor(i * 0.08) == a and math.floor(i * 0.1) == b:
        res = i
        break
if res is not None:
    print(res)
else:
    print(-1)

Submission status: Accepted

Solution code:

from math import floor

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

def calc(A, B):
	i = 0
	while True:
		ta = floor(i * 0.08)
		tb = floor(i * 0.10)
		if ta == A and tb == B:
			return i
		if ta > A and tb > B:
			return -1
		i += 1

print(calc(A, B))

Submission status: Accepted

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

def check(x):
    a = int(x * 0.08)
    b = int(x * 0.10)
    if (a == A) and (b == B):
        return True
    else:
        return False

for i in range(1, 10000):
    if check(i):
        print (i)
        exit()
print (-1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B = [int(i) for i in input().split()]
N = 10000
ret = -1
for n in range(N):
  nA = int(n * 0.08)
  nB = int(n * 0.1)
  if A == nA and B == nB:
    ret = n
    break
print(ret)

Submission status: Accepted

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

Submission status: Accepted

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

import array
from bisect import *
from collections import *
import fractions
import heapq
from itertools import *
import math
import random
import re
import string
import sys

A, B = map(int, input().split())
for i in range(1, 1100):
    a = i * 8 // 100
    b = i * 10 // 100
    if a == A and b == B:
        print(i)
        sys.exit(0)
print(-1)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
import math

if __name__ == "__main__":
    A,B = map(float, input().split())
    for i in range(1, 2001):
        n1 = math.floor(i * 0.08)
        n2 = math.floor(i * 0.1)
        if n1 == A and n2 == B:
            print(i)
            exit()
    print(-1)

Submission status: Accepted

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

for i in range(100000):
    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, 2000):
    if int(i * 1.08) - i == A and int(i * 1.1) - i == B:
        print(i)
        exit()
print(-1)

Submission status: Accepted

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

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

Submission status: Accepted

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


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

print(-1)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math
a,b = map(int,input().split())
c = b - a
if c < 0:
    print(-1)
    exit()
d = math.floor(c / 2 * 100)
for i in range(max(0, d - 10000), d + 10000):
    if math.floor(i * 1.08) - i == a and math.floor(i * 1.1) - i == 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:
A,B = map(int, input().split())

for n in range(1500):
    if A == n * 8 // 100 and B == n * 10 // 100:
        print(n)
        break
else:
    print(-1)

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
ans=-1
for i in range(1500):
    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())
for i in range(1,1001):
    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(100000):
        if i//12.5==a and i//10==b:
                ans = i
                break
print(ans)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
inf = float('inf') ;mod = 10**9+7
mans = inf ;ans = 0 ;count = 0 ;pro = 1

a,b = map(int,input().split())
for i in range(2000):
  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(15000):
    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, 20000):
    if int(i * 0.08) == a and int(i * 0.1) == b:
        print(i)
        exit()
print(-1)

Submission status: Accepted

Solution code:
import sys
import math
import bisect

def solve(a, b):
    for i in range(1, 3000):
        c = math.floor(i * 0.08)
        d = math.floor(i * 0.10)
        if c == a and d == b:
            return i
    return -1

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

ans = -1
for i in range(b, 100000):
	if i*8//100 == a and i*10//100 == b:
		ans = i
		break

print(ans)

Submission status: Accepted

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

for i in range(10 ** 6):
    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,1010):
    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()))

for n in range(10000):
  if int(0.08*n)==A and int(0.10*n)==B:
    print(n)
    exit()

print(-1)

Submission status: Accepted

Solution code:
def main():
    A, B = map(int, input().split())
    for i in range(1, 2000):
        tmp_A = int(i * 0.08)
        tmp_B = int(i * 0.10)
        if tmp_A == A and tmp_B == B:
            print(i)
            exit()

    print(-1)



if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

import sys
sys.setrecursionlimit(300000)


def solve(A: int, B: int):
    ret = -1
    for i in range(0, 10000):
        if int(i * 0.08) == A and int(i * 0.1) == B:
            ret = i
            break
    print(ret)
    return

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:
a,b=map(int,input().split())
for i in range(1,2000):
  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 p in range(2000):
    if int(p * 0.08) == A and int(p * 0.1) == B:
        print(p)
        break
else:
    print(-1)

Submission status: Accepted

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


def solve(A: int, B: int):
    for num in range(1,2000):
        if int(num*0.08) == A and int(num*0.1)==B:
            print(num)
            return
    else:
        print(-1)
    return


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:
a, b = map(int, raw_input().strip().split())
for x in xrange(10000):
    c1 = int(x * 0.08)
    c2 = int(x * 0.10)

    if c1 == a and c2 == b:
        print x
        exit()

print -1

Submission status: Accepted

Solution code:
import copy

import math
import fractions

def j(n):
    if n:print("Yes")
    else:print("No")
    exit(0)
rem = 10 ** 9 + 7

"""
def ct(x,y):
    if (x>y):print("+")
    elif (x<y): print("-")
    else: print("?")
"""

def ip():
    return int(input())
def iprow():
    return [int(i) for i in input().split()]
def ips():
    return (int(i) for i in input().split())
def ipmultiplerow(n):
    a = []
    for i in range(n):
        a.append(ip())
    return a
def printrow(a):
    for i in a:
        print(i)

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

a,b = ips()

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

Submission status: Accepted

Solution code:
import math
a,b = list(map(int,input().split()))
for i in range(1,1001):
  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(10001):
    if int(i*0.08)==a and int(i*0.1)==b:
        print(i)
        exit()
print(-1)

Submission status: Accepted

Solution code:
import sys
from math import floor
a, b = [int(i) for i in sys.stdin.readline().split()]
flg = False
ans = 0
for i in range(10000):
    if floor(i * 1.08) - i == a and floor(i * 1.1) - i == b:
        flg = True
        ans = i
        break
if flg:
    print(ans)
else:
    print(-1)

Submission status: Accepted

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

for n in range(1, 100001):
    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(10**5):
    if (i*2)//25==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(10**5):
    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(20000):
    if( a== int(i*0.08)):
        if( b == int(i*0.1)):
            print(i)
            exit()

print(-1)

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
for i in range(10100):
    eight = (i*1.08)//1 - i
    ten = (i*1.1)//1 - i
    if eight==a and ten==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(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 = list(map(int, input().split()))
for i in range(10000):
  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,10000):
  if int(i*0.08)==a and int(i*0.1)==b:print(i);exit()
print(-1)

Submission status: Accepted

Solution code:
# ABC158c


def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**6)
    # 再帰関数を使わない限りPypyで出すこと

    def dump(*args):
        sys.stderr.write(str(args))

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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

for x in range(1, 20000):
    hachi = x * 8 // 100
    juu = x * 10 // 100
    if (a,b) == (hachi, juu):
        print(x)
        exit()
print(-1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

def makelist(n, m):
    return [[0 for _ in range(m)] for _ in range(n)]

# n = int(input())
# 
# s = input()

A, B = list(map(int, input().split()))
ans = -1
for n in range(1, 50000):
    if math.floor(n * 0.08) == A and math.floor(n * 0.1) == B:
        ans = n
        break
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#C
A,B = map(int,input().split())
flag = True
for i in range(10):
    c = 10*B+i
    if int(c*0.08) == A:
        print(c)
        flag = False
        break
    
if flag:
    print(-1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys, bisect, math, itertools, string, queue, copy
# import numpy as np
# import scipy
from collections import Counter,defaultdict,deque
from itertools import permutations, combinations
from heapq import heappop, heappush
# input = sys.stdin.readline
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(input())
def inpm(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())
def inplm(n): return list(int(input()) for _ in range(n))
def inplL(n): return [list(input()) for _ in range(n)]
def inplT(n): return [tuple(input()) for _ in range(n)]
def inpll(n): return [list(map(int, input().split())) for _ in range(n)]
def inplls(n): return sorted([list(map(int, input().split())) for _ in range(n)])

def main():
    a,b = inpm()
    for i in range(1,10000):
        if int(i*0.08)==a and int(i*0.1)==b:
            print(i)
            return
    print(-1)
    
if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(pow(10, 5)):
    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 x in range(1,2*10**5):
    if int(x*0.08) == a and int(x*0.1) ==b:
        print(x)
        exit()

print(-1)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
def input(): return sys.stdin.readline().rstrip()

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

if __name__ == '__main__':
    main()