Problem:


Score : 300 points

Problem Statement

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

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

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

Constraints

1 \leq A \leq B \leq 100

A and B are integers.

Input

Input is given from Standard Input in the following format:

A B

Output

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

Sample Input 1

2 2

Sample Output 1

25

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

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

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

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

Sample Input 2

8 10

Sample Output 2

100

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

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

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

Sample Input 3

19 99

Sample Output 3

-1

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



Sample input:
2 2


Sample output:
25

Submission status: Wrong Answer

Solution code:
from __future__ import print_function

import sys

import re
import array
import copy
import functools
import operator

import math
import string
import fractions
from fractions import Fraction
from fractions import gcd
# fractions.gcd() を用いること
# math.log2()はatcoderでは対応していない．留意せよ．

import collections
import itertools
import bisect

import random
import time

import heapq
from heapq import heappush
from heapq import heappop
from heapq import heappushpop
from heapq import heapify
from heapq import heapreplace
from queue import PriorityQueue as pq
from queue import Queue

from itertools import accumulate

from collections import deque
from collections import Counter

from operator import mul
from functools import reduce

input = sys.stdin.readline


def eprint(*args, **kwargs):
    print(*args, file=sys.stderr, **kwargs)
    return


def lcm(n, m):
    return int(n * m / gcd(n, m))


def coprimize(p, q):
    common = fractions.gcd(p, q)
    return (p // common, q // common)


def combinations_count(n, r):
    r = min(r, n - r)
    numer = reduce(mul, range(n, n - r, -1), 1)
    denom = reduce(mul, range(1, r + 1), 1)
    return numer // denom


def main():
    a,b = map(int,input().strip().split())
    # 100*a//8 <= x < 100*(a+1)//8
    # range(100*a//8,100*(a+1)//8)
    x=100*a//8
    while 100*a//8<=x<100*(a+1)//8:
        if 100*b <= 10*x < 100*(b+1):
            print(x)
            return
        x+=1
    print(-1)
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
from __future__ import print_function

import sys

import re
import array
import copy
import functools
import operator

import math
import string
import fractions
from fractions import Fraction
from fractions import gcd
# fractions.gcd() を用いること
# math.log2()はatcoderでは対応していない．留意せよ．

import collections
import itertools
import bisect

import random
import time

import heapq
from heapq import heappush
from heapq import heappop
from heapq import heappushpop
from heapq import heapify
from heapq import heapreplace
from queue import PriorityQueue as pq
from queue import Queue

from itertools import accumulate

from collections import deque
from collections import Counter

from operator import mul
from functools import reduce

input = sys.stdin.readline


def eprint(*args, **kwargs):
    print(*args, file=sys.stderr, **kwargs)
    return


def lcm(n, m):
    return int(n * m / gcd(n, m))


def coprimize(p, q):
    common = fractions.gcd(p, q)
    return (p // common, q // common)


def combinations_count(n, r):
    r = min(r, n - r)
    numer = reduce(mul, range(n, n - r, -1), 1)
    denom = reduce(mul, range(1, r + 1), 1)
    return numer // denom


def main():
    a,b = map(int,input().strip().split())
    # 100*a//8 <= x < 100*(a+1)//8
    # range(100*a//8,100*(a+1)//8)
    x=100*a//8
    while 100*a//8<=x<100*(a+1)//8:
        if 100*b <= 10*x < 100*(b+1):
            print(x)
            return
        x+=1

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

#原価を推定
a = ceil(12.5*A)
b = ceil(10*B)

#print(a)
#print(b)

if A%2==0:
    if (a+12 < b) or (b+9 < a):
        print(-1)
    else:
        if a==b:
            print(a)
        elif a > b:
            print(a)
        else:
            print(b)
            
else:
    if (a+13 < b) or (b+9 < a):
        print(-1)
    else:
        if a==b:
            print(a)
        elif a > b:
            print(a)
        else:
            print(b)

Submission status: Wrong Answer

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

#原価を推定
a = ceil(12.5*A)
b = ceil(10*B)

#print(a)
#print(b)

if A%2==0:
    if (a+12 < b) or (b+9 < a):
        print(-1)
    else:
        if a==b:
            print(a)
        elif a > b:
            print(a)
        else:
            print(b)
            
else:
    if (a+13 <= b) or (b+9 < a):
        print(-1)
    else:
        if a==b:
            print(a)
        elif a > b:
            print(a)
        else:
            print(b)

Submission status: Wrong Answer

Solution code:
import math
a, b = map(int,input().split())
ans = []
for i in range(1000):
    price_8 = math.floor(i * 0.08)
    price_10 = math.floor(i * 0.1)
    if price_8 == a and price_10 == b:
        ans.append(i)

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

Submission status: Wrong Answer

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

# スペース区切りの文字列の入力
st = input().split()

for i in range(1000):
  #切り捨て
  a = int(i * 0.08)
  b = int(i * 0.1)
  if(a == int(st[0]) and b == int(st[1])):
    print(i)
    break;
  elif(i == 999):
    print('-1')

Submission status: Wrong Answer

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

# スペース区切りの文字列の入力
st = input().split()

for i in range(1000):
  #切り捨て
  a = int(i * 0.08)
  b = int(i * 0.1)
  if(a == int(st[0]) and b == int(st[1])):
    print(i)
    break;
  if(i == 999):
    print('-1')

Submission status: Wrong Answer

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

# スペース区切りの文字列の入力
st = input().split()

#切り捨て
a = int(int(st[0]) / 0.08)

if(int(a * 0.1) == int(st[1])):
  print(a)
else:
  print('-1')

Submission status: Wrong Answer

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

# スペース区切りの文字列の入力
st = input().split()

#切り捨て
a = int(int(st[0]) / 0.08)

if(int(a * 0.1) == int(st[1])):
  print(a)
else:
  print(-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a , b = map(int, input().split())
for i in range(1 , 10100) :
  a1 = int(i*0.08)
  b1 = int(i*0.10)
  if a1 == a and b1 == b :
    print(i)
  else :
    print(-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

A = ceil(a*100/8)

if b == int(A/10):
    print(A)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
a,b = (int(x) for x in input().split())
n = b + 1
num = a + 1
t = a
m = b
key = 0
while b < n:
    bi = b * 100 // 10
    y = bi * 10 // 100
    a = t
    while a < num:
          pas = 0
          ai = a * 100 // 8
          x = ai * 8 // 100
          if y == m and x == t:
             pas = 1
          
          if ai == bi and pas == 1:
             answer = int(ai)
             print(answer)
             key += 1
             break
          a += 0.1
    if key > 0:
       break
    b += 0.1

if key == 0:
   print(-1)

Submission status: Wrong Answer

Solution code:
a,b = (int(x) for x in input().split())
n = b + 1
num = a + 1
t = a
m = b
key = 0
while b < n:
    bi = b * 100 // 10
    y = bi * 10 // 100
    
    a = t
    pas = 0
    while a < num:
          ai = a * 100 // 8
          x = ai * 8 // 100
          if y == m and x == t:
             pas = 1
          
          if ai == bi and pas == 1:
             answer = int(ai)
             print(answer)
             key += 1
             break
          a += 0.1
    if key > 0:
       break
    b += 0.1

if key == 0:
   print(-1)

Submission status: Wrong Answer

Solution code:
a,b = (int(x) for x in input().split())
ai = int(a * 100 // 8)
n = b + 1
num = a + 1
t = a
key = 0
while b < n:
    bi = b * 100 // 10
    y = bi * 10 // 100
    
    a = t
    while a < num:
          ai = a * 100 // 8
          x = ai * 8 // 100
         
          
          if ai == bi and x == y:
             answer = int(ai)
             print(answer)
             key += 1
             break
          a += 0.1
    if key > 0:
       break
    b += 0.1

if key == 0:
   print(-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
import math

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

minA = math.floor(A / 0.08)
maxA = math.ceil((A + 1) /0.08)
minB = math.floor(B / 0.10)
maxB = math.ceil((B + 1) / 0.10)

for i in range(minA, maxA + 1, 1):
	if(minB <= i and i <= maxB):
		print(i)
		sys.exit(0)

print("-1")

Submission status: Wrong Answer

Solution code:
import sys
import math

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

minA = math.floor(A / 0.08)
maxA = math.ceil((A + 1) /0.08)
minB = math.floor(B / 0.10)
maxB = math.floor((B + 1) / 0.10)

for i in range(minA, maxA + 1, 1):
	if(minB <= i and i <= maxB):
		print(i)
		sys.exit(0)

print("-1")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

a = A/0.08
b = B/0.1
answer = '-1'
if a != b:
    c = max(a, b)
    if round(c * 0.08) == round(c* 0.1):
          answer = round(c)
else:
    answer = round(a)
print(str(answer))

Submission status: Wrong Answer

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

ret = -1
for i in range(1,101):
	tax_A = int(i * 0.08)
	tax_B = int(i * 0.10)
	if tax_A == A and tax_B == B:
		ret = i
		break

print(ret)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split(' '))
a_min = int(-(-a // 0.08))
a_max = int((a + 1) / 0.08)
b_min = int(-(-b // 0.1))
b_max = int((b + 1) / 0.1)
if(a_max < b_min or b_max < a_min):
    print(-1)
elif(a_min <= b_min):
    print(b_min)
elif(b_min <= a_min):
    print(a_min)

Submission status: Wrong Answer

Solution code:
import math
A,B = map(int,input().split())
c = 0
for i in range(math.ceil(A/0.08),math.floor((A+1)/0.08)+1):
    if c == 1:
        break
    for j in range(math.ceil(B/0.1),math.floor((B+1)/0.1)+1):
        if i == j:
            print(i)
            c = 1
            break
if c == 0:
    print(-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
 
a = input().split()
A = int(a[0])
B = int(a[1])
 
B_10 = math.floor(B/0.1)

j = 0

for i in range(13):
  tax_10 = math.floor((B_10+i)*0.08)
  if int(A) == int(tax_10):
    j = 1
if j == 1:
  print(B_10)
else:
  print(-1)

Submission status: Wrong Answer

Solution code:
import math
 
a = input().split()
A = int(a[0])
B = int(a[1])
 
A_8 = math.floor(A/0.08)
tax_10 = math.floor(A_8*0.1)

j = 0

for i in range(10):
  tax_10 = math.floor((A_8+i)*0.1)
  if int(B) == int(tax_10):
    j = 1
if j == 1:
  print(A_8)
else:
  print(-1)

Submission status: Wrong Answer

Solution code:
a,b = (int(x) for x in input().split())
ai = a * 100 // 8
n = b + 1
num = a + 1
t = a
key = 0
while b < n:
    bi = b * 100 // 10
    a = t
    while a < num:
          ai = a * 100 // 8
          if ai == bi:
             answer = int(ai)
             print(answer)
             key += 1
             break
          a += 0.1
    if key > 0:
       break
    b += 0.1

if key == 0:
   print(-1)

Submission status: Wrong Answer

Solution code:
import sys

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

def CalculationTax(List,Tax,Value):
    Answer1 = Value *100 // Tax
    List.append (Answer1)
    Result = (Answer1 + 1) * Tax // 100
    while Result < Value + 1:
        Answer1 += 1
        Result = (Answer1 + 1) * Tax // 100
        List.append (Answer1)

List8 = []
List10 = []
CalculationTax(List8,8,A)
CalculationTax(List10,10,B)

for Index in range(len(List8)):
    for Index2 in range(len(List10)):
        if List8[Index] == List10[Index2]:
            print(List8[Index])
            sys.exit()
print('-1')

Submission status: Wrong Answer

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

res = a / 0.08
if res == int(res):
  res = int(res)
else:
  res = int(res) + 1

if int(res * 0.1) == b:
  print(res)
else:
  print(-1)

Submission status: Wrong Answer

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

res = a / 0.08
if int(res * 0.1) == b:
  print(int(res))
else:
  print(-1)

Submission status: Wrong Answer

Solution code:
import math

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

A1 = A * 12.5
A2 = (A + 0.9) * 12.5
B1 = B * 10
B2 = (B + 0.9) * 10

if B1 <= A1 and A1 < (B + 1) * 10:
    print(math.floor(A1 + 1))
elif A1 <= B1 and B1 < (A + 1) *12.5 :
    print(math.floor(B1))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
# input
A,B = map(int, input().split())
# calculate
price = -1
for n in range(100):
  if int(n * 0.08) == A and int(n * 0.1) == B:
    price = n
    break
  else:
    pass
# output
print(price)

Submission status: Wrong Answer

Solution code:
import math

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

A1 = A * 12.5
A2 = (A + 0.9) * 12.5
B1 = B * 10
B2 = (B + 0.9) * 10

if B1 <= A1 and A1 < (B + 1) * 10:
    print(math.floor(A1))
elif A1 <= B1 and B1 < (A + 1) *12.5 :
    print(math.floor(B1))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import math

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

A1 = math.floor(A * 12.5)
A2 = math.floor((A + 0.99999) * 12.5)
B1 = math.floor(B * 10)
B2 = math.floor((B + 0.99999) * 10)

if B1 <= A1 and A1 <= B2:
    print(A1)
elif A1 <= B1 and B1 <= A2:
    print(B1)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import math

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

A1 = A * 12.5
A2 = (A + 0.99999) * 12.5
B1 = B * 10
B2 = (B + 0.99999) * 10

if B1 <= A1 and A1 <= B2:
    print(math.floor(A1))
elif A1 <= B1 and B1 <= A2:
    print(math.floor(B1))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import math

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

A1 = A * 12.5
A2 = (A + 0.9) * 12.5
B1 = B * 10
B2 = (B + 0.9) * 10

if B1 <= A1 and A1 <= B2:
    print(math.floor(A1))
elif A1 <= B1 and B1 <= A2:
    print(math.floor(B1))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import sys

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

Answer1 = A *100 // 8
if Answer1 * 10 // 100 == B:
    print(Answer1)
else:
    print('-1')

Submission status: Wrong Answer

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

a = set(range(int(12.5 * A), int(12.5 * (A + 1)+1)))
b = set(range(int(10 * B), int(10 * (B + 1)+1)))

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

Submission status: Wrong Answer

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

a = set(range(int(12.5 * A), int(12.5 * (A + 1))))
b = set(range(int(10 * B), int(10 * (B + 1))))

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

Submission status: Wrong Answer

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

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

print('-1')

Submission status: Wrong Answer

Solution code:
ret = "-1"

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

for i in range(1,2000):
    if int(i*0.08) == A and int(i * 0.1) == B:
        ret = str(i)
        break

print(i)

Submission status: Wrong Answer

Solution code:
ret = -1

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

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

print(i)

Submission status: Wrong Answer

Solution code:
ret = -1

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

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

print(i)

Submission status: Wrong Answer

Solution code:
ret = -1

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

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

print(i)

Submission status: Wrong Answer

Solution code:
ret = -1

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

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

#print(minA, maxA, minB, maxB)

for i in range(minA, maxA):
    if i >= minB and i <= maxB:
        ret = i
        break

print(ret)

Submission status: Wrong Answer

Solution code:
ret = -1

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

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

print(minA, maxA, minB, maxB)

for i in range(minA, maxA):
    if i >= minB and i <= maxB:
        ret = i
        break

print(ret)

Submission status: Wrong Answer

Solution code:
ret = -1

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

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


for i in range(minA, maxA):
    if i >= minB and i < maxB:
        ret = i
        break

print(ret)

Submission status: Wrong Answer

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

for i in range (1251):
  if int(i*0.08)==a and int(i/10)==b:
    print(i)
  
print(-1)

Submission status: Wrong Answer

Solution code:
ret = -1

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

if A<0 or B<0:
    print("-1")
    exit()

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


for i in range(minA, maxA):
    if i >= minB and i < maxB:
        ret = i
        break

print(ret)

Submission status: Wrong Answer

Solution code:
ret = -1

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

if A<0 or B<0:
    print("-1")
    exit()

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

print(minA, maxA, minB, maxB)

for i in range(minA, maxA):
    if i >= minB and i < maxB:
        ret = i
        break

print(ret)

Submission status: Wrong Answer

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

if A<0 or B<0:
    print("-1")
    exit()

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

for i in range(minA, maxA):
    if i >= minB and i < maxB:
        print(i)
        exit()

print("-1")

Submission status: Wrong Answer

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

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

for i in range(minA, maxA):
    if i >= minB and i < maxB:
        print(i)
        exit()

print("-1")

Submission status: Wrong Answer

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

def tax(A,B):
    count=0
    x=B/0.1
    if x*0.08>A:
        return '-1'
    y=int(x*0.08)
    while True:
        if y<A:
            count+=1
            x+=1
            y=int(x*0.08)
        else:
            if count>9:
                return '-1'
            else:
                return int(x)
            break

print(tax(A,B))

Submission status: Wrong Answer

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

def tax(A,B):
    count=0
    x=B/0.1
    if x*0.08>A:
        return '-1'
    y=int(x*0.08)
    while True:
        if y<A:
            count+=0
            x+=1
            y=int(x*0.08)
        else:
            if count>9:
                return '-1'
            else:
                return int(x)
            break

print(tax(A,B))

Submission status: Wrong Answer

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

def tax(A,B):
    count=0
    x=B/0.1
    if x*0.08>A:
        return -1
    y=int(x*0.08)
    while True:
        if y<A:
            count+=0
            x+=1
            y=int(x*0.08)
        else:
            if count>9:
                return -1
            else:
                return int(x)
            break

print(tax(A,B))

Submission status: Wrong Answer

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

def tax(A,B):
    x=B/0.1
    if x*0.08>A:
        return -1
    y=int(x*0.08)
    while True:
        if y<A:
            x+=1
            y=int(x*0.08)
        else:
            return int(x)
            break

print(tax(A,B))

Submission status: Wrong Answer

Solution code:
a,b = map(int, input().split())
v = int(a*12.5)
w = int(a*12.5+11.5)
x = int(b*10)
y = int(b*10+9)
if(max(v,x) <= min(w,y)):
    print(max(v,x))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
a,b = map(int, input().split())
if(a == 0 and b == 0):
    print(0)
else:
    v = int(a*12.5)
    w = int(a*12.5+11.5)
    x = int(b*10)
    y = int(b*10+9)
    if(max(v,x) < min(w,y)):
        print(max(v,x))
    else:
        print(-1)

Submission status: Wrong Answer

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

if t1 == t2:
    print(int(t1))

elif math.floor(t1 * 0.08) == math.floor(t1 * 0.1):
    print(int(t1))
    
elif math.floor(t2 * 0.08) == math.floor(t2 * 0.1):
    print(int(t2))
    
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import math
a,b = map(int, input().split())
t1 = (a / 0.08)
t2 = (b / 0.1)

if t1 == t2:
    print(int(t1))

elif math.floor(t1 * 0.08) == math.floor(t1 * 0.1):
    print(int(t1))
elif math.floor(t2 * 0.08) == math.floor(t2 * 0.1):
    print(int(t2))
else:
    print(-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

ans = int(A / 0.08)

if(int(ans*0.1) == B):
  print(ans)
else:
  print("-1")

Submission status: Wrong Answer

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

ans = int(A / 0.08)

print(ans)
print(ans/10)

if(int(ans*0.1) == B):
  print(ans)
else:
  print("-1")

Submission status: Wrong Answer

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

ans = int(A / 0.08)

if(ans*0.1 == B):
  print(ans)
else:
  print("-1")

Submission status: Wrong Answer

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

ans_A = A / 0.08
ans_B = B / 0.1

if(ans_A == ans_B):
  print(ans_A)
else:
  print("-1")

Submission status: Wrong Answer

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

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

else :
        print(-1)

Submission status: Wrong Answer

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

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

else :
        print(-1)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
Acand = []
if isinstance((A+1)*(100/8), int):
  a = int((A+1)*(100/8))
else:
  a = int((A+1)*(100/8))+1
for i in range(int(A*(100/8)),a):
  Acand.append(i)
if isinstance((B+1)*(100/8), int):
  b = int((B+1)*(100/8))
else:
  b = int((B+1)*(100/8))+1
Bcand = []
for i in range(int(B*10),b):
  Bcand.append(i)
doub = list(set(Acand) & set(Bcand))
doub.sort()
if len(doub) == 0:
  print(-1)
else:
  print(doub[0])

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
Acand = []
for i in range(int(A*(100/8)),int((A+1)*(100/8))+1):
  Acand.append(i)
Bcand = []
for i in range(int(B*10),int((B+1)*10)+1):
  Bcand.append(i)
doub = list(set(Acand) & set(Bcand))
doub.sort()
if len(doub) == 0:
  print(-1)
else:
  print(doub[0])

Submission status: Wrong Answer

Solution code:
A, B =map(int, input().split())
max_A=(A+1)*25/2
max_B=10*(B+1)
p=int(round(max([A*12.5,B*10])+0.4999999999,0))
print(p if(p<min([(A+1)*25/2, 10*(B+1)]) or 4<5*A-4*B or 5*A-4*B<-5) else -1)

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
Acand = []
for i in range(int(A*(100/8)),int((A+1)*(100/8))):
  Acand.append(i)
Bcand = []
for i in range(int(B*10),int((B+1)*10)):
  Bcand.append(i)
doub = list(set(Acand) & set(Bcand))
doub.sort()
if len(doub) == 0:
  print(-1)
else:
  print(doub[0])

Submission status: Wrong Answer

Solution code:
A, B =map(int, input().split())
max_A=(A+1)*25/2
min_A=A*25/2
max_B=10*(B+1)
min_B=10*B
if(4<5*A-4*B or 5*A-4*B<-5):
    print(-1)
else:
    print(int(round(max([A*12.5,B*10])+0.4999999999,0)))

Submission status: Wrong Answer

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

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

if flg==0:
    print(-1)

Submission status: Wrong Answer

Solution code:
import sys

f = sys.stdin.readline()
xx = f.split(' ')
x = [int(str) for str in xx]

a = x[0]
aa = a+1
b = x[1]
bb = b+1


x = int(a / 0.08)
xx = int(aa / 0.08)
y = int(b / 0.1)
yy = int(bb / 0.1)

if ( x > y ):
	min = x
	if( min >= yy):
		print "-1"
	else:
		print min
else:
	min = y
	if( min >= xx):
		print "-1"
	else:
		print min

sys.stdout.flush()

Submission status: Wrong Answer

Solution code:
import sys

f = sys.stdin.readline()
xx = f.split(' ')
x = [int(str) for str in xx]

a = x[0]
aa = a+1
b = x[1]
bb = b+1


x = int(a / 0.08)
xx = int(aa / 0.08)
y = int(b / 0.1)
yy = int(bb / 0.1)

if ( x > y ):
	min = x
	if( min > yy):
		print "-1"
	else:
		print min
else:
	min = y
	if( min > xx):
		print "-1"
	else:
		print min

sys.stdout.flush()

Submission status: Wrong Answer

Solution code:
import sys

f = sys.stdin.readline()
xx = f.split(' ')
x = [int(str) for str in xx]

a = x[0]
aa = a+1
b = x[1]
bb = b+1


x = int(a / 0.08)
xx = int(aa / 0.08)
y = int(b / 0.1)
yy = int(bb / 0.1)

print x
print xx
print y
print yy
if ( x > y ):
	min = x
	if( min > yy):
		print "-1"
	else:
		print min
else:
	min = y
	if( min > xx):
		print "-1"
	else:
		print min

sys.stdout.flush()

Submission status: Wrong Answer

Solution code:
import sys

f = sys.stdin.readline()
xx = f.split(' ')
x = [int(str) for str in xx]

a = x[0]
aa = a+1
b = x[1]
bb = b+1


x = int(a / 0.08)
xx = int(aa / 0.08)
y = int(b / 0.1)
yy = int(bb / 0.1)

if ( x > y ):
	min = x
	if( min > yy):
		print "-1"
	else:
		print min
else:
	min = y
	if( min > x):
		print "-1"
	else:
		print min

sys.stdout.flush()

Submission status: Wrong Answer

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

for p in range(10*4):
    tax8 = p*0.08
    tax10 = p*0.1

    if int(tax8)==a and int(tax10)==b:
        print(p)
        exit()

print(-1)

Submission status: Wrong Answer

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

print(j)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
x = int(a / 0.08)
y = int(b / 0.1)
print(max(x, y))

Submission status: Wrong Answer

Solution code:
s = input().split(' ')
a = int(s[0])
b = int(s[1])
a1 = round(a / 0.08)
a += 0.9999
a2 = round(a / 0.08)
b1 = round(b / 0.1)
b += 0.9999
b2 = round(b / 0.1)

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

Submission status: Wrong Answer

Solution code:
import math
a , b = map(int,input().split())
al = math.ceil(a / 0.08)
ar = math.floor((a + 1)/0.08)
bl = math.ceil(b/0.1)
br = math.floor((b+1)/0.1)
ans = 0
if al <= bl and ar >= bl:
    ans = bl
elif al >= bl and br >= al:
    ans = al
else:
    ans = -1
# if al == bl:
#     ans = al
# elif al > bl:
#     if al > br:
#         ans = -1
#     else:
#         ans = al
# elif al < bl:
#     if ar < bl:
#         ans = -1
#     else:
#         ans = bl
if ar < al or br < bl:
    ans = -1
print(ans)

Submission status: Wrong Answer

Solution code:
import math
a , b = map(int,input().split())
al = math.ceil(a / 0.08)
ar = math.floor((a + 1)/0.08)
bl = math.ceil(b/0.1)
br = math.floor((b+1)/0.1)
ans = 0
if al == bl:
    ans = al
elif al > bl:
    if al > br:
        ans = -1
    else:
        ans = al
elif al < bl:
    if ar < bl:
        ans = -1
    else:
        ans = bl
print(ans)

Submission status: Wrong Answer

Solution code:
import math
a , b = map(int,input().split())
al = math.ceil(a / 0.08)
ar = math.floor((a + 1)/0.08)
bl = math.ceil(b/0.1)
br = math.floor((b+1)/0.1)
ans = 0
if al <= bl and ar >= bl:
    ans = bl
elif al >= bl and br >= al:
    ans = al
else:
    ans = -1
print(ans)