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:
A, B = map(int, input().split())
ansA = A / 0.08
ansB = B / 0.1
ans = 0

"""
print(ansA)
print(ansB)
"""

if ansA > ansB:
    ans = int(ansA)
else:
    ans = int(ansB)

#print(ans)

def check_ans(ans):
    ra = int(ans * 0.08)
    rb = int(ans * 0.1)
    wa = int((ans - 1) * 0.08)
    wb = int((ans - 1) * 0.1)

    """
    print(ra)
    print(rb)
    print(wa)
    print(wb)
    """

    if wa == A and wb == B:
        check_ans(ans-1)
    else:
        if ra == A and rb == B:
            return ans
        else:
            return 0

if check_ans(ans) == 0:
    print('-1')
else:
    print(ans)

Submission status: Wrong Answer

Solution code:
import math

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

pricemax_A = math.floor((A+1)/0.08)
pricemin_A = math.floor(A/0.08)

pricemax_B = math.floor((B+1)/0.1)
pricemin_B = math.floor(B/0.1)

if A > B:
    print(-1)

elif pricemin_A >= pricemin_B and pricemin_A < pricemax_B:
    print(pricemin_A)
elif pricemin_A <= pricemin_B and pricemax_A > pricemin_B:
    print(pricemin_B)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
ansA = A / 0.08
ansB = B / 0.1
ans = 0

"""
print(ansA)
print(ansB)
"""

if ansA > ansB:
    ans = ansA
else:
    ans = ansB
def check_ans(ans):
    ra = int(ans * 0.08)
    rb = int(ans * 0.1)
    wa = int((ans - 1) * 0.08)
    wb = int((ans - 1) * 0.1)

    """
    print(ra)
    print(rb)
    print(wa)
    print(wb)
    """
    
    if wa == A and wb == B:
        check_ans(ans-1)
    else:
        if ra == A and rb == B:
            return ans
        else:
            return 0

if check_ans(ans) == 0:
    print('-1')
else:
    print(ans)

Submission status: Wrong Answer

Solution code:
import math

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

pricemax_A = math.floor((A+1)/0.08)
pricemin_A = math.floor(A/0.08)

pricemax_B = math.floor((B+1)/0.1)
pricemin_B = math.floor(B/0.1)

if pricemin_A >= pricemin_B and pricemin_A < pricemax_B:
    print(pricemin_A)
elif pricemin_A <= pricemin_B and pricemax_A > pricemin_B:
    print(pricemin_B)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import math

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

pricemax_A = math.floor((A+1)/0.08)
pricemin_A = math.floor(A/0.08)

pricemax_B = math.floor((B+1)/0.1)
pricemin_B = math.floor(B/0.1)

if pricemin_A > pricemin_B and pricemin_A < pricemax_B:
    print(pricemin_A)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import math

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

pricemax_A = math.floor((A+1)/0.08)
pricemin_A = math.floor(A/0.08)

pricemax_B = math.floor((B+1)/0.1)
pricemin_B = math.floor(B/0.1)

if pricemin_A >= pricemin_B and pricemin_A < pricemax_B:
    print(pricemin_A)
else:
    print(-1)

Submission status: Wrong Answer

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

for i in range(0,10,1):
    N1list.append((A+(i/10))/0.08)   
    N2list.append((B+(i/10))/0.1)

N3=-2
N1list.sort(reverse=True)
N2list.sort(reverse=True)
#print(N1list)
#print(N2list)

if N1list[9]<N2list[0]:
    for i in range(10):
        N=N1list[i]
        if N==int(N):
            #print(N)
            for j in range(10):
                if N==N2list[j]:
                    N3=N
                    #print(N3)
                    break
        else:
            N4=-1
else:
    N4=-1
            
print(int(N3) if N4<N3 else N4)

Submission status: Wrong Answer

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

for i in range(0,10,1):
    N1list.append((A+(i/10))/0.08)   
    N2list.append((B+(i/10))/0.1)

N3=-2
N1list.sort(reverse=True)
N2list.sort(reverse=True)
print(N1list)
print(N2list)

if N1list[9]<N2list[0]:
    for i in range(10):
        N=N1list[i]
        if N==int(N):
            print(N)
            for j in range(10):
                if N==N2list[j]:
                    N3=N
                    print(N3)
                    break
        else:
            N4=-1
else:
    N4=-1
            
print(int(N3) if N4<N3 else N4)

Submission status: Wrong Answer

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

for i in range(0,10,1):
    N1list.append((A+(i/10))/0.08)   
    N2list.append((B+(i/10))/0.1)

N3=-2
N1list.sort(reverse=True)
N2list.sort(reverse=True)

for i in range(10):
    N=N1list[i]
    if N==int(N):
        for j in range(10):
            if N==N2list[j]:
                N3=N
                break
    else:
        N4=-1

print(int(N3) if N4<N3 else N4)

Submission status: Wrong Answer

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

for i in range(0,10,1):
    N1list.append((A+(i/10))/0.08)   
    N2list.append((B+(i/10))/0.1)

N3=-2
N1list.sort(reverse=True)
N2list.sort(reverse=True)

for i in range(len(N1list)):
    N=N1list[i]
    if N==int(N):
        for j in range(len(N2list)):
            if N==N2list[j]:
                N3=N
                break
    else:
        N4=-1

print(int(N3) if N4<N3 else N4)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = 0

for i in range(1900):
    if i * 0.08 == A and i* 0.1 == B:
        ans = i
        break
    else:
        ans = -1

print(ans)

Submission status: Wrong Answer

Solution code:
def calc_range(x, rate):
    return -(-x//rate), -(-(x+1)//rate)

a,b = list(map(int, input().split()))
a_min, a_max = calc_range(a, 0.08)
b_min, b_max = calc_range(b, 0.10)
if b_max < a_min or a_max < b_min:
    print(-1)
elif a_min <= b_min:
    print(int(b_min))
elif b_min < a_min:
    print(int(a_min))

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
amult = a / 0.08
bmult = b / 0.10
ans = -1
for i in range(1000 - 1):
    tempa = i * 0.08
    tempb = i * 0.10
    if int(tempa) == int(a) and int(tempb) == int(b):
        ans = i
        break
print(ans)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
amult = a / 0.08
bmult = b / 0.10
ans = -1
for i in range(1000 - 1):
    tempa = i * 0.08
    tempb = i * 0.10
    if tempa == int(a) and tempb == int(b):
        ans = i
        break
print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

print(str(a * 12.5)[:-2])

Submission status: Wrong Answer

Solution code:
#!/usr/local/bin python
# -*- coding: utf-8 -*-
#
# /home/remina/PycharmProjects/atcoder/C-TaxIncrease.py
#
import sys
import math


def calc_notaxincluded_min_from_tax8(tax8: int) -> int:
    notaxincluded_min = int(tax8 / 0.08)
    return notaxincluded_min


def calc_notaxincluded_max_from_tax8(tax8: int) -> int:
    notaxincluded_max = math.ceil((tax8 + 1) / 0.08)
    return notaxincluded_max


def calc_notaxincluded_min_from_tax10(tax10: int) -> int:
    notaxincluded_min = int(tax10 / 0.1)
    return notaxincluded_min


def calc_notaxincluded_max_from_tax10(tax10: int) -> int:
    notaxincluded_max = math.ceil((tax10 + 1) / 0.1)
    return notaxincluded_max


tax_8, tax_10 = map(int, sys.stdin.readline().split())
notax_min_from8 = calc_notaxincluded_min_from_tax8(tax_8)
notax_min_from10 = calc_notaxincluded_min_from_tax10(tax_10)
notax_max_from8 = calc_notaxincluded_max_from_tax8(tax_8)
notax_max_from10 = calc_notaxincluded_max_from_tax10(tax_10)

# print(notax_min_from8)
# print(notax_min_from10)
# print(notax_max_from8)
# print(notax_max_from10)
# print(notax_min_from10 > notax_max_from8)
# 

if (notax_min_from10 > notax_max_from8) or (notax_min_from8 > notax_max_from10):
    print(-1)
elif notax_min_from8 <= notax_min_from10:
    print(notax_min_from8)
else:
    print(notax_min_from10)

Submission status: Wrong Answer

Solution code:
#!/usr/local/bin python
# -*- coding: utf-8 -*-
#
# /home/remina/PycharmProjects/atcoder/C-TaxIncrease.py
#
import sys
import math


def calc_notaxincluded_min_from_tax8(tax8: int) -> int:
    notaxincluded_min = int(tax8 / 0.08)
    return notaxincluded_min


def calc_notaxincluded_max_from_tax8(tax8: int) -> int:
    notaxincluded_max = math.ceil((tax8 + 1) / 0.08)
    return notaxincluded_max


def calc_notaxincluded_min_from_tax10(tax10: int) -> int:
    notaxincluded_min = int(tax10 / 0.1)
    return notaxincluded_min


def calc_notaxincluded_max_from_tax10(tax10: int) -> int:
    notaxincluded_max = math.ceil((tax10 + 1) / 0.1)
    return notaxincluded_max


tax_8, tax_10 = map(int, sys.stdin.readline().split())
notax_min_from8 = calc_notaxincluded_min_from_tax8(tax_8)
notax_min_from10 = calc_notaxincluded_min_from_tax10(tax_10)
notax_max_from8 = calc_notaxincluded_max_from_tax8(tax_8)
notax_max_from10 = calc_notaxincluded_max_from_tax10(tax_10)

print(notax_min_from8)
print(notax_min_from10)
print(notax_max_from8)
print(notax_max_from10)


if (notax_min_from10 > notax_max_from8) or (notax_min_from8 > notax_min_from10):
    print(-1)
elif notax_min_from8 <= notax_min_from10:
    print(notax_min_from8)
else:
    print(notax_min_from10)

Submission status: Wrong Answer

Solution code:
#!/usr/local/bin python
# -*- coding: utf-8 -*-
#
# /home/remina/PycharmProjects/atcoder/C-TaxIncrease.py
#
import math


def calc_notaxincluded_min_from_tax8(tax8: int) -> int:
    notaxincluded_min = int(tax8 / 0.08)
    return notaxincluded_min


def calc_notaxincluded_max_from_tax8(tax8: int) -> int:
    notaxincluded_max = math.ceil((tax8 + 1) / 0.08)
    return notaxincluded_max


def calc_notaxincluded_min_from_tax10(tax10: int) -> int:
    notaxincluded_min = int(tax10 / 0.1)
    return notaxincluded_min


def calc_notaxincluded_max_from_tax10(tax10: int) -> int:
    notaxincluded_max = math.ceil((tax10 + 1) / 0.1)
    return notaxincluded_max


tax_8, tax_10 = (int(x) for x in input().split())
notax_min_from8 = calc_notaxincluded_min_from_tax8(tax_8)
notax_min_from10 = calc_notaxincluded_min_from_tax10(tax_10)
notax_max_from8 = calc_notaxincluded_max_from_tax8(tax_8)
notax_max_from10 = calc_notaxincluded_max_from_tax10(tax_10)

if (notax_min_from10 > notax_max_from8) or (notax_min_from8 > notax_min_from10):
    print("{}".format(-1))
elif notax_min_from8 <= notax_min_from10:
    print(notax_min_from8)
else:
    print(notax_min_from10)

Submission status: Wrong Answer

Solution code:
#!/usr/local/bin python
# -*- coding: utf-8 -*-
#
# /home/remina/PycharmProjects/atcoder/C-TaxIncrease.py
#
import math


def calc_notaxincluded_min_from_tax8(tax8: int) -> int:
    notaxincluded_min = int(tax8 / 0.08)
    return notaxincluded_min


def calc_notaxincluded_max_from_tax8(tax8: int) -> int:
    notaxincluded_max = math.ceil((tax8 + 1) / 0.08)
    return notaxincluded_max


def calc_notaxincluded_min_from_tax10(tax10: int) -> int:
    notaxincluded_min = int(tax10 / 0.1)
    return notaxincluded_min


def calc_notaxincluded_max_from_tax10(tax10: int) -> int:
    notaxincluded_max = math.ceil((tax10 + 1) / 0.1)
    return notaxincluded_max


tax_8, tax_10 = (int(x) for x in input().split())
notax_min_from8 = calc_notaxincluded_min_from_tax8(tax_8)
notax_min_from10 = calc_notaxincluded_min_from_tax10(tax_10)
notax_max_from8 = calc_notaxincluded_max_from_tax8(tax_8)
notax_max_from10 = calc_notaxincluded_max_from_tax10(tax_10)

if (notax_min_from10 > notax_max_from8) or (notax_min_from8 > notax_min_from10):
    print("{}".format('-1'))
elif notax_min_from8 <= notax_min_from10:
    print(notax_min_from8)
else:
    print(notax_min_from10)

Submission status: Wrong Answer

Solution code:
#!/usr/local/bin python
# -*- coding: utf-8 -*-
#
# /home/remina/PycharmProjects/atcoder/C-TaxIncrease.py
#
import math


def calc_notaxincluded_min_from_tax8(tax8: int) -> int:
    notaxincluded_min = int(tax8 / 0.08)
    return notaxincluded_min


def calc_notaxincluded_max_from_tax8(tax8: int) -> int:
    notaxincluded_max = math.ceil((tax8 + 1) / 0.08)
    return notaxincluded_max


def calc_notaxincluded_min_from_tax10(tax10: int) -> int:
    notaxincluded_min = int(tax10 / 0.1)
    return notaxincluded_min


def calc_notaxincluded_max_from_tax10(tax10: int) -> int:
    notaxincluded_max = math.ceil((tax10 + 1) / 0.1)
    return notaxincluded_max


tax_8, tax_10 = (int(x) for x in input().split())
notax_min_from8 = calc_notaxincluded_min_from_tax8(tax_8)
notax_min_from10 = calc_notaxincluded_min_from_tax10(tax_10)
notax_max_from8 = calc_notaxincluded_max_from_tax8(tax_8)
notax_max_from10 = calc_notaxincluded_max_from_tax10(tax_10)

if (notax_min_from10 > notax_max_from8) or (notax_min_from8 > notax_min_from10):
    print('-1')
elif notax_min_from8 <= notax_min_from10:
    print(notax_min_from8)
else:
    print(notax_min_from10)

Submission status: Wrong Answer

Solution code:
#!/usr/local/bin python
# -*- coding: utf-8 -*-
#
# /home/remina/PycharmProjects/atcoder/C-TaxIncrease.py
#
import math


def calc_notaxincluded_min_from_tax8(tax8: int) -> int:
    notaxincluded_min = int(tax8 / 0.08)
    return notaxincluded_min


def calc_notaxincluded_max_from_tax8(tax8: int) -> int:
    notaxincluded_max = math.ceil((tax8 + 1) / 0.08)
    return notaxincluded_max


def calc_notaxincluded_min_from_tax10(tax10: int) -> int:
    notaxincluded_min = int(tax10 / 0.1)
    return notaxincluded_min


def calc_notaxincluded_max_from_tax10(tax10: int) -> int:
    notaxincluded_max = math.ceil((tax10 + 1) / 0.1)
    return notaxincluded_max


tax_8, tax_10 = (int(x) for x in input().split())
notax_min_from8 = calc_notaxincluded_min_from_tax8(tax_8)
notax_min_from10 = calc_notaxincluded_min_from_tax10(tax_10)
notax_max_from8 = calc_notaxincluded_max_from_tax8(tax_8)
notax_max_from10 = calc_notaxincluded_max_from_tax10(tax_10)

if (notax_min_from10 > notax_max_from8) or (notax_min_from8 > notax_min_from10):
    print(-1)
elif notax_min_from8 <= notax_min_from10:
    print(notax_min_from8)
else:
    print(notax_min_from10)

Submission status: Wrong Answer

Solution code:
import math
A,B=map(int,input().split())
a_low=A/0.08
a_high=(A+1)/0.08
b_low=B*10
b_high=(B+1)*10

if a_high.is_integer():
  if a_high<b_low or a_low>=b_high:
    print(-1)
  else:
    print(max(math.floor(a_low),math.floor(b_low)))
else:
  if a_high<=b_low or a_low>=b_high:
    print(-1)
  else:
    print(max(math.floor(a_low),math.floor(b_low)))

Submission status: Wrong Answer

Solution code:
import math
A,B=map(int,input().split())
a_low=A/0.08
a_high=(A+1)/0.08
b_low=B*10
b_high=(B+1)*10

if a_high<=b_low or a_low>=b_high:
  print(-1)
else:
  print(max(math.floor(a_low),math.floor(b_low)))

Submission status: Wrong Answer

Solution code:
import math
A,B=map(int,input().split())
a_low=math.floor(A/0.08)
a_high=math.floor((A+1)/0.08)
b_low=B*10
b_high=(B+1)*10

if a_high<=b_low or a_low>=b_high:
  print(-1)
else:
  print(max(a_low,b_low))

Submission status: Wrong Answer

Solution code:
import math
A,B=map(int,input().split())
a_low=math.floor(A/0.08)
a_high=math.floor((A+1)/0.08)
b_low=B*10
b_high=(B+1)*10

if a_high<b_low or a_low>b_high:
  print(-1)
else:
  print(max(a_low,b_low))

Submission status: Wrong Answer

Solution code:
import math
A,B=map(int,input().split())
a_low=math.floor(A/0.08)
a_high=math.floor((A+1)/0.08)
b_low=B*10
b_high=(B+1)*10

if a_high<b_high:
  print(-1)
else:
  print(max(a_low,b_low))

Submission status: Wrong Answer

Solution code:
import math

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

e=math.floor(a / 0.08)
for i in range(b, 1001):
    if (i == math.floor(e * 0.1)):
        print(math.floor(i/0.1))
        exit (0)

print(-1)

Submission status: Wrong Answer

Solution code:
import math

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

e=math.floor(a / 0.08)
for i in range(b, 1001):
    if (i == math.floor(e * 0.1)):
        print(i)
        exit (0)

print(-1)

Submission status: Wrong Answer

Solution code:
import math

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

e=math.floor(a / 0.08)
for i in range(b, 1001):
    if (b == math.floor(e * 0.1)):
        print(i)
        exit (0)

print(-1)

Submission status: Wrong Answer

Solution code:
import math

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

e=math.floor(a / 0.08)
print(e)
for i in range(b, 1001):
    if (b == math.floor(e * 0.1)):
        print(i)
        exit (0)

print(-1)

Submission status: Wrong Answer

Solution code:
import math

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

e=int(a / 0.08)

for i in range(e, 1001):
    if (b == math.floor(e * 0.1)):
        print(i)
        exit (0)

print(-1)

Submission status: Wrong Answer

Solution code:
import math

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

e=int(a / 0.08)

for i in range(e, 101):
    if (b == math.floor(e * 0.1)):
        print(i)
        exit (0)

print(-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
res1 = a/0.08
res2 = b/0.1
if abs(res1-res2)<=0.5*max(res1,res2):
  print(max(int(res1),int(res2)))
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.10) == B):
        print(i)
        break
else:
    print(-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if (12.5*a)>=(10*b):
  if (12.5*a)<=((10*b)+10):
    if a%2==0:
      print(int(12.5*a))
    else:
      print(int((12.5*a)+0.5))
  else:
    print(-1)
else:
  if (10*b)<=((12.5*a)+12.5):
    print(int(10*b))
  else:
    print(-1)

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
import math
a=math.ceil(A*100/8)
b=math.ceil((A+1)*100/8)
while math.floor(a*0.1)!=B and a<b:
  a+=1
  if a==b:
    print(-1)
  else:
    print(a)

Submission status: Wrong Answer

Solution code:
E,T=map(int,input().split())

Emotone=(E/0.08)
A=int(E/0.08)

if Emotone>A:
  Emotone=int(A+1)

if T<=((0.1/0.08)*E)<T+1:
  print(int(Emotone))
else:
  print(-1)

Submission status: Wrong Answer

Solution code:
E,T=map(int,input().split())

Emotone=int(E/0.08)
        
if T<=((0.1/0.08)*E)<T+1:
  print(Emotone)
else:
  print(-1)

Submission status: Wrong Answer

Solution code:
A, B = list(map(int, input().split()))
Amin, Amax, Bmin, Bmax = A/0.08, (A+1)/0.08, B/0.1, (B+1)/0.1
min_price = int(max(Amin, Bmin))
if min_price != max(Amin, Bmin):
    min_price += 1
max_price = int(min(Amax, Bmax))
if min_price > max_price:
    print("-1")
else:
    print(min_price)

Submission status: Wrong Answer

Solution code:
A, B = list(map(int, input().split()))
Amin, Amax, Bmin, Bmax = A/0.08, (A+1)/0.08, B/0.1, (B+1)/0.1
min_price = int(max(Amin, Bmin))
if min_price not in [Amin, Bmin]:
    min_price += 1
max_price = int(min(Amax, Bmax))
if min_price > max_price:
    print("-1")
else:
    print(min_price)

Submission status: Wrong Answer

Solution code:
import math
A,B = list(map(int,input().split()))
A_ans_mini = math.ceil(A/8*100)
A_ans_max = math.floor((A+0.99)/8*100)
B_ans_mini = math.ceil(B/10*100)
B_ans_max = math.floor((B+0.99)/10*100)
if A_ans_max <B_ans_mini or B_ans_max < A_ans_mini:
    print("-1")
else:
    if B_ans_mini<A_ans_mini:
        ans = A_ans_mini
    else: ans = B_ans_mini
    print(int(ans))

Submission status: Wrong Answer

Solution code:
A,B = list(map(int,input().split()))
if (A+0.999)/8*100<B/10*100 or (B+0.999)/10*100 < A/8*100:
    print("-1")
else:
    if A/8*100>B/10*100:
        ans = A/8*100
    else: ans = B/10*100
    print(int(ans))

Submission status: Wrong Answer

Solution code:
A,B = list(map(int,input().split()))
ans = A/8*100
if int(ans*0.1)!=B:
    print("-1")
else:print(ans)

Submission status: Wrong Answer

Solution code:
import math
eight,ten = map(int,input().split())
dummy = 12.5*eight
ans1 = math.floor(dummy)
ans2 = math.ceil(dummy)
if math.floor(ans1*0.08) == eight and math.floor(ans1*0.1) == ten:
  print(ans1)
elif math.floor(ans2*0.08) == eight and math.floor(ans2*0.1) == ten:
  print(ans2)
else:
  print(-1)

Submission status: Wrong Answer

Solution code:
A, B = map(float, input().split())
C = int(A/0.08)
if(int(C*0.1) == B):
  print(C)
else:
  print(-1)

Submission status: Wrong Answer

Solution code:
import sys
def LI(): return list(map(int, sys.stdin.readline().split()))
a = LI()
i = 0.1
elist,blist= [],[]
for b in range(10):
  elist.append(int((a[0]+1-i)/0.08))
  blist.append(int((a[1]+1-i)/0.1))
  i += 0.1
blist.sort()
for b in blist:
  if b in elist:
    print(b)
    sys.exit()
print(-1)

Submission status: Wrong Answer

Solution code:
import sys
def LI(): return list(map(int, sys.stdin.readline().split()))
a = LI()
i = 0.1
elist,blist= [],[]
for b in range(9):
  elist.append(int((a[0]+1-i)/0.08))
  blist.append(int((a[1]+1-i)/0.1))
  i += 0.1
elist.append(int(a[0]/0.08))
blist.append(int(a[1]/0.1))
blist.sort()
for b in blist:
  if b in elist:
    print(b)
    sys.exit()
print(-1)

Submission status: Wrong Answer

Solution code:
import math

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


def without_tax(tax_fee, tax_rate):
    result = tax_fee / tax_rate
    if result < 0:
        print(-1)
        quit()
    return int(result)


print(max(without_tax(A, 0.08), without_tax(B, 0.10)))

Submission status: Wrong Answer

Solution code:
import math

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


def without_tax(tax_fee, tax_rate):
    result = tax_fee / tax_rate
    if result < 0:
        return -1
    return int(result)


print(max(without_tax(A, 0.08), without_tax(B, 0.10)))

Submission status: Wrong Answer

Solution code:
import math

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


def without_tax(tax_fee, tax_rate):
    result = tax_fee / tax_rate
    if result < 0:
        return -1
    return math.floor(result)


print(max(without_tax(A, 0.08), without_tax(B, 0.10)))

Submission status: Wrong Answer

Solution code:
import math

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


def without_tax(tax_fee, tax_rate):
    result = tax_fee / tax_rate
    if result < 0:
        return -1
    return math.floor(result)


print(min(without_tax(A, 0.08), without_tax(B, 0.10)))

Submission status: Wrong Answer

Solution code:
import math

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


def without_tax(tax_fee, tax_rate):
    result = tax_fee / tax_rate
    if result < 0:
        return -1
    return math.ceil(result)


print(min(without_tax(A, 0.08), without_tax(B, 0.10)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
def calc(A, B):
  Amin = int(A/0.08)
  if int(Amin) != Amin:
    Amin = int(Amin+1)
  Amax = int((A+1)/0.08)
  Arange = set(range(Amin, Amax))
  Bmin = int(B/0.1)
  if int(Bmin) != Bmin:
    Bmin = int(Bmin+1)
  Bmax = int((B+1)/0.1)
  Brange = set(range(Bmin, Bmax))
  intersection = Arange & Brange
  if len(intersection) == 0:
    print(-1) 
  else:
    print(min(intersection))
calc(A, B)

Submission status: Wrong Answer

Solution code:
A, B = map(int,input().split())
rangea = set(range(int(A/0.08),int((A+1)/0.08),1))
rangeb = set(range(int(B/0.10),int((B+1)/0.10),1))

intersection = rangea & rangeb

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

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
def calc(A, B):
  Amin = int(A/0.08)
  Amax = int((A+1)/0.08)
  Arange = set(range(Amin, Amax))
  Bmin = int(B/0.1)
  Bmax = int((B+1)/0.1)
  Brange = set(range(Bmin, Bmax))
  intersection = Arange & Brange
  if len(intersection) == 0:
    print(-1) 
  else:
    print(min(intersection))
calc(A, B)

Submission status: Wrong Answer

Solution code:
A, B = map(int,input().split())
rangea = set(range(int(A/0.08),int((A+1)/0.08),1))
rangeb = set(range(int(B/0.08),int((B+1)/0.08),1))

intersection = rangea & rangeb

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

Submission status: Wrong Answer

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

Amin = int(A/0.08)
Amax = int((A+1)/0.08)
Arange = set(range(Amin, Amax))

Bmin = int(B/0.1)
Bmax = int((B+1)/0.1)
Brange = set(range(Bmin, Bmax))

intersection = Arange & Brange

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

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
Amin = int(A/0.08)
Amax = int((A+1)/0.08)
Arange = set(range(Amin, Amax+1))
Bmin = int(B/0.1)
Bmax = int((B+1)/0.1)
Brange = set(range(Bmin, Bmax+1))
intersection = Arange & Brange
if len(intersection) > 0:
  print(min(intersection))
else:
  print(-1)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
Amin = int(A/0.08)
Amax = int((A+1)/0.08)+1
Arange = set(range(Amin, Amax))
Bmin = int(B/0.1)
Bmax = int((B+1)/0.1)+1
Brange = set(range(Bmin, Bmax))
intersection = Arange & Brange
if len(intersection) > 0:
  print(min(intersection))
else:
  print("-1")

Submission status: Wrong Answer

Solution code:
import math
tax_eight, tax_ten = map(int, input().split())
min_eight_price = math.ceil(tax_eight / 0.08)
max_eight_price = math.floor((tax_eight + 1) / 0.08 - 1)
min_ten_price = tax_ten / 0.1 
max_ten_price = (tax_ten + 1) / 0.1 - 1
print(min_eight_price, max_eight_price)
print(min_ten_price, max_ten_price)
min_price = max(min_eight_price, min_ten_price)
max_price = min(max_eight_price, max_ten_price)
if max_price < min_price:
    print(-1)
else:
    print(int(min_price))

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
Amin = int(A/0.08)
Amax = int(A+1/0.08+1e-06)
Arange = set(range(Amin, Amax+1))
Bmin = int(B/0.1)
Bmax = int(B+1/0.1+1e-06)
Brange = set(range(Bmin, Bmax+1))
intersection = Arange & Brange
if len(intersection) > 0:
  print(min(intersection))
else:
  print("-1")

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
Amin = int(A/0.08)
Amax = int(A+1/0.08)
Arange = set(range(Amin, Amax+1))
Bmin = int(B/0.1)
Bmax = int(B+1/0.1)
Brange = set(range(Bmin, Bmax+1))
intersection = Arange & Brange
if len(intersection) > 0:
  print(min(intersection))
else:
  print("-1")

Submission status: Wrong Answer

Solution code:
import math
a, b = map(int, input().split(" "))
for n in range(100):
    n += 1
    if math.floor(n*0.08) == a and math.floor(n*0.1) == b:
        print(n)
        break
    else:
        if n == 100:
            print(-1)

Submission status: Wrong Answer

Solution code:
A,B = [int(i) for i in input().rstrip().split(' ')]
_8 = 0.08
_10 = 0.10

retA = int(A / _8)
retB = int(B / _10)

if retA == retB:
    print(retA)
else:
    maxs = max(retA, retB)
    retA = int(maxs * _8)
    retB = int(maxs * _10)
    print(retA) if retA == retB else print(-1)

Submission status: Wrong Answer

Solution code:
def dev(num, rate):
    if (num + 1) % rate == 0:
        return (num + 1)// rate - 1
    else:
        return (num + 1) // rate
    
a = [list(map(int, s.split())) for s in open(0)] [0]
x1_min= int(a[0] / 0.08)
x2_min = int(a[1] / 0.1)

x1_max = dev(a[0], 0.08)
x2_max = dev(a[1], 0.1)

if x1_min > x2_max or x1_max < x2_min:
    print(-1)
else:
    print(max(x1_min, x2_min))

Submission status: Wrong Answer

Solution code:
a = [list(map(int, s.split())) for s in open(0)] [0]
x1 = int(a[0] / 0.08)
x2= int(a[1] / 0.10)

if x1 * 0.08 < a[0] or x2 * 0.10 < a[1]:
    print(-1)
else:
    print(max(x1, x2))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from math import floor

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

min1 = floor(A / 0.08)
max1 = floor((A+1) / 0.08 - 0.0001)
min2 = floor(B / 0.1)
max2 = floor((B+1) / 0.1 - 0.0001)

print(min1, max1)
print(min2, max2)
if min1 >= min2 and min1 <= max2:
    print(min1)
    print(min1 * 0.08, min1 * 0.1)
elif min2 >= min1 and min2 <= max1:
    print(min2)
    print(min2 * 0.08, min2 * 0.1)
else:
    print(-1)