Problem:


Score : 300 points

Problem Statement

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

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

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

Constraints

1 \leq A \leq B \leq 100

A and B are integers.

Input

Input is given from Standard Input in the following format:

A B

Output

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

Sample Input 1

2 2

Sample Output 1

25

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

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

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

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

Sample Input 2

8 10

Sample Output 2

100

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

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

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

Sample Input 3

19 99

Sample Output 3

-1

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



Sample input:
2 2


Sample output:
25

Submission status: Wrong Answer

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip() 
import math

def resolve():
    A, B = map(int, input().split())
    aa_min = A / 0.08
    aa_max = (A+1) / 0.08
    bb_min = B / 0.1
    bb_max = (B+1) / 0.08
    if aa_min < bb_max and bb_min < aa_max:
        print(math.ceil(max(aa_min, bb_min)))
    else:
        print('-1')

if __name__ == '__main__':
    resolve()

Submission status: Wrong Answer

Solution code:
from math import floor
a,b=map(int, input().split())
aa=a/0.08
bb=b/0.1
if floor(aa)==floor(bb):
    print(floor(aa))
elif floor(aa*0.08)==floor(aa*0.1):
    print(floor(aa))
elif floor(bb*0.08)==floor(bb*0.1):
    print(floor(bb))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip() 
import math

def resolve():
    A, B = map(int, input().split())
    aa_min = A / 0.08
    aa_max = (A+1) / 0.08
    bb_min = B / 0.1
    bb_max = (B+1) / 0.08
    if aa_min <= bb_max and bb_min <= aa_max:
        print(math.ceil(max(aa_min, bb_min)))
    else:
        print('-1')

if __name__ == '__main__':
    resolve()

Submission status: Wrong Answer

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip() 
import math

def resolve():
    A, B = map(int, input().split())
    aa_min = A / 0.08
    aa_max = (A+1) / 0.08
    bb_min = B / 0.1
    bb_max = (B+1) / 0.08
    if aa_min <= bb_max and bb_min <= aa_max:
        print(int(max(aa_min, bb_min)))
    else:
        print('-1')

if __name__ == '__main__':
    resolve()

Submission status: Wrong Answer

Solution code:
from math import floor
a,b=map(int, input().split())
aa=floor(a/0.08)
bb=floor(b/0.1)
if aa==bb:
    print(aa)
elif floor(aa*0.08)==floor(aa*0.1):
    print(aa)
elif floor(bb*0.08)==floor(bb*0.1):
    print(bb)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
a = input().split(" ")
t8 = int(a[0])
t10 = int(a[1])

for i in range(13, 1001):
	b = i * 0.08
	c = i * 0.1
	if b == t8 and c == t10:
		print(i)
		break
	if i == 1000:
		print(-1)
		break

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split());print(a*25//2 if b*10<=a*25/2<(b+1)*10 else -1)

Submission status: Wrong Answer

Solution code:
a = input().split(" ")
t8 = int(a[0])
t10 = int(a[1])
b = t8 / 0.08
for i in range(12):
	if int(b * 0.1) == t10:
		print(int(b))
		break
	else:
		b += 1
		if i == 11:
			print(-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
a,b=map(int,input().split())
j=[]
for i in range(1,101):
  if math.floor(i*0.08)==a and math.floor(i*0.1)==b:
    j.append(i)
    print(min(j)) 
    break;
if len(j)==0:
 print(-1)

Submission status: Wrong Answer

Solution code:
import math
a,b=map(int,input().split())
j=[]
for i in range(1,101):
  if math.floor(i*0.08)==a and math.floor(i*0.1)==b:
    j.append(i)
    print(i) 
    break;
if len(j)==0:
 print(-1)

Submission status: Wrong Answer

Solution code:
# coding: utf-8

A, B = map(int, input().split())
# print("A:", A, "B:", B)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = input().split(" ")
t8 = int(a[0])
t10 = int(a[1])
b = t8 / 0.08
if int(b * 0.1) == t10:
	print(int(b))
elif int(b + 1.08) == int(b):
	b += 1.08
	if int(b * 0.1) == t10:
		print(int(b * 0.1))
else:
	print(-1)

Submission status: Wrong Answer

Solution code:
a,b = input().split()
a = int(a)
b = int(b)
c = 0
for i in range(10000):
    d = c*0.08
    e = c*0.1
    d = int(d)
    e = int(e)
    if d == a and e == b:
        print(c)
        break
    elif c == 10000:
        print('-1')
    else:
        c += 1

Submission status: Wrong Answer

Solution code:
a,b = input().split()
a = int(a)
b = int(b)
c = 0
for i in range(10000):
    d = c*0.08
    e = c*0.1
    d = int(d)
    e = int(e)
    if d == a and e == b:
        print(c)
        break
    elif c == 100:
        print('-1')
    else:
        c += 1

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

# X * 0.08 = A
# X * 0.1 = B
# となる最小のXを求める
_max = int(A / 0.08)
_min = int(B / 0.1)
# この間の整数に答えがある

for ans in range(_min-1, _max+2):
    if (int(ans * 0.08) == A and int(ans * 0.1) == B):
        print(ans)
        exit()
print(-1)

Submission status: Wrong Answer

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

a = int(A / 0.08)
b = int(B / 0.1)

if int(b*0.08)==A and int(b*0.1)==B:
    print(b)
elif int(a*0.08)==A and int(a*0.1)==B:
    print(a)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
a = input().split(" ")
t8 = int(a[0])
t10 = int(a[1])
b = t8 / 0.08
if int(b * 0.1) == t10:
	print(int(b))
elif int(b + 0.8) == int(b):
	b += 0.8
	if int(b * 0.1) == t10:
		print(int(b * 0.1))
else:
	print(-1)

Submission status: Wrong Answer

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

# X * 0.08 = A
# X * 0.1 = B
# となる最小のXを求める
_max = int(A / 0.08)
_min = int(B / 0.1)
# この間の整数に答えがある

for ans in range(_min-1, _max+1):
    if (int(ans * 0.08) == A and int(ans * 0.1) == B):
        print(ans)
        exit()
print(-1)

Submission status: Wrong Answer

Solution code:
a,b = input().split()
a = int(a)
b = int(b)
c = 0
for i in range(101):
    d = c*0.08
    e = c*0.1
    d = int(d)
    e = int(e)
    if d == a and e == b:
        print(c)
        break
    elif c == 100:
        print('-1')
    else:
        c += 1

Submission status: Wrong Answer

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

# X * 0.08 = A
# X * 0.1 = B
# となる最小のXを求める
_max = int(A / 0.08)
_min = int(B / 0.1)
# この間の整数に答えがある

for ans in range(_min, _max+1):
    if (int(ans * 0.08) == A and int(ans * 0.1) == B):
        print(ans)
        exit()
print(-1)

Submission status: Wrong Answer

Solution code:
taxs = input().split(" ")
 
a = int(taxs[0])
b = int(taxs[1])
 
product_min = int(a / 0.08)
product_max = int((a+1) / 0.08)

setflg = 0
for product in range( product_min, product_max ):
  bpred = int(product * 0.1)
  if( bpred == b ):
    print( product )
    setflg=1
    break

if setflg==0:
  print( -1 )

Submission status: Wrong Answer

Solution code:
a,b = input().split()
a = int(a)
b = int(b)
c = 1
for i in range(100):
    d = c*0.08
    e = c*0.1
    d = int(d)
    e = int(e)
    if d == a and e == b:
        print(int(c))
        break
    elif c == 100:
        print('-1')
        break
    else:
        c += 1

Submission status: Wrong Answer

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

for i in range(100):
    d = c*0.08
    e = c*0.1
    d = int(d)
    e = int(e)
    if d == a and e == b:
        print(c)
        break
    elif c == 100:
        print('-1')
    else:
        c += 1

Submission status: Wrong Answer

Solution code:
import math
a,b = map(int,input().split())
ans = 1
while True:
    if math.floor(ans*0.08) == a:
        while ans*0.08 == a:
            if math.floor(ans*0.1) == b:
                print(ans)
                exit()
            ans+=1
        print(-1)
        exit()
    ans+=1

Submission status: Wrong Answer

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

a = A / 0.08
b = B / 0.1

if int(b*0.08)==A and int(b*0.1)==B:
    print(b)
elif int(a*0.08)==A and int(b*0.1)==B:
    print(a)
else:
    print(-1)

Submission status: Wrong Answer

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

a = A / 0.08
b = B / 0.1

if int(b*0.08)==A and int(b*0.1)==B:
    print(b)
elif int(a*0.08)==A and int(a*0.1)==B:
    print(a)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
x = a*100//8
if x//10 +1 > b:
    print(x)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import sys
# import math
# import decimal
# import queue
# import bisect
# import heapq
# import time
# import itertools
# from fractions import Fraction

mod = int(1e9+7)
INF = 1<<29

def main():
    a,b = map(int,input().split())
    ans = []
    x = int(min(a//0.08,b//0.1))
    y = int(max(a//0.08,b//0.1))
    for i in range(x,y+1):
        if int(i*0.08)==a and int(i*0.1)==b:
            ans.append(i)
    if len(ans):
        print(min(ans))
    else:
        print(-1)
    return

if __name__=='__main__':
    main()

Submission status: Wrong Answer

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

tax_8 = {int(100 / 8 * a + r) for r in range(int(100 / 8))}
tax_10 = {int(100 / 10 * b + r) for r in range(int(100 / 10))}

candids = tax_8.intersection(tax_10)
if candids:
    print(sorted(list(candids))[0])
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
x = a*100//8
if x//10==b:
    print(x)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
# coding: utf-8
import math
A, B = map(int, input().split())
# print("A:", A, "B:", B)

n = math.floor(A / 0.08)
# print("n:", n)
m = math.floor(B / 0.1)
# print("m:", m)
n1 = math.floor((A + 1) / 0.08)
# print("n1:", n)
m1 = math.floor((B + 1) / 0.1)
# print("m1:", m)
m2 = {i for i in range(n, n1)}
m3 = {j for j in range(m, m1)}
# print("m2:", m2)
# print("m3:", m3)
s = set(m2 & m3)
if s:
    print(min(s))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
# coding: utf-8
A, B = map(int, input().split())
for v in range(1, 251):
    if int(v * 0.08) == A and int(v * 0.1) == B:
        print(v)
        exit()
print(-1)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
x = a*100//8
if x*0.1==b:
    print(x)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
# coding: utf-8

A, B = map(int, input().split())
# print("A:", A, "B:", B)

n = int(A / 0.08)
# print("n:", n)
m = int(B / 0.1)
# print("m:", m)
n1 = int((A + 1) / 0.08)
# print("n1:", n)
m1 = int((B + 1) / 0.1)
# print("m1:", m)
m2 = {i for i in range(n, n1)}
m3 = {j for j in range(m, m1)}
# print("m2:", m2)
# print("m3:", m3)
s = set(m2 & m3)
if s:
    print(min(s))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
# coding: utf-8

A, B = map(int, input().split())
# print("A:", A, "B:", B)

n = int(A / 0.08)
m = int(B / 0.1)
n1 = int((A + 1) / 0.08)
m1 = int((B + 1) // 0.1)
m2 = {i for i in range(n, n1)}
m3 = {j for j in range(m, m1)}

s = set(m2 & m3)
if s:
    print(min(s))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
# coding: utf-8

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

n = int(A / 0.08)
m = int(B / 0.1)
n1 = int((A + 1) / 0.08)
m1 = int((B + 1) // 0.1)
m2 = {i for i in range(n, n1)}
m3 = {j for j in range(m, m1)}

s = set(m2 & m3)
if s:
    print(min(s))
else:
    print(-1)

Submission status: Wrong Answer

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

for i in range(99):
    d = c*0.08
    e = c*0.1
    d = int(d)
    e = int(e)
    if d == a and e == b:
        print(c)
        break
    elif c == 100:
        print('-1')
    else:
        c += 1

Submission status: Wrong Answer

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

for i in range(10000):
  A=i*0.08
  B=i*0.1
  if A==a and B==b:
    print(i)
    exit()

print(-1)

Submission status: Wrong Answer

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

p1 = a / 0.08
p2 = int(p1 * 0.1)

if p2 == b:
  print(p1)
else:
  print(-1)

Submission status: Wrong Answer

Solution code:
# C
A,B = map(int,input().split())
Xa = A * 12.5
Xb = B * 10
X = round(max(Xa,Xb))
ansA = round(X * 0.08)
ansB = round(X * 0.1)
# print(ansA,ansB)
if A == ansA and B == ansB:
    print(X)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
 
S=max(12.5*A,10*B)
 
if S%1!=0:
    S=int(S)+1
 
if S<12.5*A+12.5 and S<10*B+10:
    print(S)
else:
    print("-1")

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
x=50*(b-a)
if int(0.08*x)==a and int(0.1*x)==b:
    print(x)
else:
    print(-1)

Submission status: Wrong Answer

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

c_list = []
b_list = []


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

f(b, 0.1, b_list)

for i in b_list:
    tmp = int(i * 0.08)
    if(tmp == a):
        c_list.append(i)

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

Submission status: Wrong Answer

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

c_list = []
b_list = []


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

f(b, 0.1, b_list)

for i in b_list:
    tmp = i * 0.08
    if(tmp == a):
        c_list.append(i)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
a,b=map(int,input().split())
i=0
while i <= 100:
    c=int(i*0.08)
    d=int(i*0.1)
    if c==a and d==b:
        
        print(i)
        sys.exit()
    i+=1

print(-1)

Submission status: Wrong Answer

Solution code:
def c_tax_increase():
    A, B = [int(i) for i in input().split()]
    lower = max((25 * A + 2 - 1) / 2, 10 * B)
    upper = min(25 * (A + 1) // 2, 10 * (B + 1))
    return lower if lower < upper else -1

print(c_tax_increase())

Submission status: Wrong Answer

Solution code:
import sys
a,b=map(int,input().split())
i=0
while i <= 100:

    if a==int(i*0.08) and b==int(i*0.1):
        print(i)
        sys.exit()
    i+=1

print(-1)

Submission status: Wrong Answer

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

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

if ans == 0 :
    ans = -1

print(ans)
print(A)

Submission status: Wrong Answer

Solution code:
#O(1)
from math import ceil
a,b = map(int, input().split( ))
if int(min((a+1)/0.08,(b+1)/0.1))<ceil(max(a/0.08,b/0.1)):
    print(-1)
    exit()
print(ceil(max(a/0.08,b/0.1)))

Submission status: Wrong Answer

Solution code:
#O(1)
from math import ceil
a,b = map(int, input().split( ))
if int(min(a/0.08,b/0.1))<ceil(max(a/0.08,b/0.1)):
    print(-1)
    exit()
print(ceil(max(a/0.08,b/0.1)))

Submission status: Wrong Answer

Solution code:
#O(1)
from math import ceil
a,b = map(int, input().split( ))
if int(min(a/0.08,b/.01))<ceil(max(a/0.08,b/0.1)):
    print(-1)
    exit()
print(ceil(max(a/0.08,b/0.1)))

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
i=0
while i <= 10000:

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

Submission status: Wrong Answer

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

ans_a = A // 0.08
ans_b = B // 0.10

for i in range(1, 10100):
    if A == int(0.08 * i) and B == int(0.10 * i):
        ans = i
        break

print(ans)

Submission status: Wrong Answer

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

print(-1)

Submission status: Wrong Answer

Solution code:
import math as ma
def minCharge810(a, b):
    A0 = 0
    A1 = 0
    B0 = 0
    B1 = 0

    A0 = ma.floor(a / 0.08)
    A1 = ma.floor((a+1) / 0.08)
    B0 = ma.floor(b / 0.1)
    B1 = ma.floor((b+1) / 0.1)

    ans1 = [i for i in range(int(A0), int(A1)+1)]
    ans2 = [i for i in range(int(B0), int(B1)+1)]
    ans = set(ans1) &  set(ans2)
    if ans == set():
        return '-1'
    else:
        return min(ans)
a, b = map(int, input().split())
print(minCharge810(a, b))

Submission status: Wrong Answer

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

ans_a = A // 0.08
ans_b = B // 0.10

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

print(ans)

Submission status: Wrong Answer

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

import math

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

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


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

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

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


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


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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math as ma
def minCharge810(a, b):
    A0 = 0
    A1 = 0
    B0 = 0
    B1 = 0

    A0 = ma.ceil(a / 0.08)
    A1 = ma.floor((a+1) / 0.08)
    B0 = ma.ceil(b / 0.1)
    B1 = ma.floor((b+1) / 0.1)

    ans1 = [i for i in range(int(A0), int(A1)+1)]
    ans2 = [i for i in range(int(B0), int(B1)+1)]
    ans = set(ans1) &  set(ans2)
    if ans == set():
        return '-1'
    else:
        return min(ans)
a, b = map(int, input().split())
print(minCharge810(a, b))

Submission status: Wrong Answer

Solution code:
a, b = input().split() # a = result * 0.08, b = result * 0.1
a, b = int(a), int(b)
 
result_a = int(a / 0.08)
result_b = int(b / 0.1)
 
if result_a > result_b:
  if int(result_a * 0.08) == a:
    result_a += 1
  c = int(result_a * 0.1)
  if b == c:
    print(result_a)
  else:
    print(-1)
else:
  c = int(result_b * 0.08)
  if a == c:
    print(result_b)
  else:
    print(-1)

Submission status: Wrong Answer

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

import math

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

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


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

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

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


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

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

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
i=0
while i<=10000:
    if i*8/100==a or i+10/100==b:
        print(i)
        break
    i+=1
print(-1)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
for i in range(10**6):
  if(i//12.5==a and i//10==b):print(i);exit()
  else:
    print("-1")

Submission status: Wrong Answer

Solution code:
def c_tax_increase():
    from math import floor, ceil
    A, B = [int(i) for i in input().split()]
    lower = ceil(max(25 * A / 2, 10 * B))
    upper = floor(min(25 * (A + 1) / 2, 10 * (B + 1)))
    return lower if lower <= upper else -1

print(c_tax_increase())

Submission status: Wrong Answer

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

import math

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

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


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

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

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


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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b = input().split() # a = result * 0.08, b = result * 0.1
a, b = int(a), int(b)
 
result_a = int(a / 0.08)
result_b = int(b / 0.1)
 
if result_a > result_b:
  if int(result_a * 0.08) == 0:
    result_a += 1
  c = int(result_a * 0.1)
  if b == c:
    print(result_a)
  else:
    print(-1)
else:
  c = int(result_b * 0.08)
  if a == c:
    print(result_b)
  else:
    print(-1)

Submission status: Wrong Answer

Solution code:
a, b = input().split() # a = result * 0.08, b = result * 0.1
a, b = int(a), int(b)
 
result_a = int(a / 0.08)
result_b = int(b / 0.1)
 
if result_a > result_b:
  c = int(result_a * 0.1)
  if b == c:
    if int(result_a * 0.08) == 0:
      result_a += 1
    print(result_a)
  else:
    print(-1)
else:
  c = int(result_b * 0.08)
  if a == c:
    print(result_b)
  else:
    print(-1)

Submission status: Wrong Answer

Solution code:
def c_tax_increase():
    A, B = [int(i) for i in input().split()]
    lower, upper = max((25 * A + 2 - 1) // 2, 10 * B), min(25 * (A + 1) // 2, 10 * (B + 1))
    return lower if lower <= upper else -1

print(c_tax_increase())

Submission status: Wrong Answer

Solution code:
import math
A,B= map(int,input().split())
min_x = round(max(A/8,B/10)*100)
# min_x = max(A//0.08,B//0.10) +1
max_x = (min((A+1)/8,(B+1)/10)*100)

if max_x-min_x>0:
    ans = int(min_x)
else:
    ans = -1
print(ans)

Submission status: Wrong Answer

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

a_list = []
b_list = []


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


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

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

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

c_set = a_set & b_set

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

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
C = [[0, 0] for _ in range(101)]
for i in range(8):
  C[-(-(i + 1) * 100 // 8)][0] += 1
for i in range(10):
  C[(i + 1) * 10][1] += 1
for i in range(100):
  C[i + 1][0] += C[i][0]
  C[i + 1][1] += C[i][1]
for i in range(1, 101):
  if C[i][0] == A and C[i][1] == B:
    print(i)
    break
else:
  print(-1)

Submission status: Wrong Answer

Solution code:
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
 
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

a, b = MAP()

for i in range(1, 2000):
    tax8 = i * 8 // 100
    tax10 = i * 10 // 100
    if tax8 == a and tax10 == b:
        print(i)
        exit()
    
exit()
x1 = a / 0.08
y1 = b /0.1
x2 = (a+1) / 0.08
y2 = (b+1) /0.1


# exit()
if ceil(y1) <= ceil(x1) < y2:
    ans = ceil(x1)
    print(ans)
elif ceil(x1) <= ceil(y1) < x2:
    ans = ceil(y1)
    print(ans)
else:
    print(-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
A, B = [int(x) for x in input().strip().split()]
for i in range(1, 100):
    if int(i * 0.08) == A and int(i * 0.1) == B:
        print(i)
        exit()
print(-1)

Submission status: Wrong Answer

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

import math

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

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


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

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

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


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

tax_increase(a, b)

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

Submission status: Wrong Answer

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

import math

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

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


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

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

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


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

tax_increase(a, b)

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

Submission status: Wrong Answer

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

import math

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

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


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

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

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


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

tax_increase(a, b)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

a_list = []
b_list = []

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


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

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

c_set = a_set & b_set


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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
a,b=map(int,input().split())
for i in range(1,1000):#max_a=1
    if int(i*0.08)==a and int(i*0.1)==b:
        ans=i
        break
    if i==999:
        ans=-1

print(ans)

Submission status: Wrong Answer

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

import math

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

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


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

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

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


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

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

Submission status: Wrong Answer

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