TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: 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`.

Submission attempts (in order):
import math
A,B = 19,99

eight = ((A*100)/8)
EightYen = math.floor(eight)

ten = (A*10)
TenYen =  math.floor(ten)

if TenYen == EightYen:
    print(TenYen)
else:
    print(-1)

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

eight = ((A*100)/8)
EightYen = math.floor(eight)

ten = (A*10)
TenYen =  math.floor(ten)

if TenYen == EightYen:
    print(TenYen)
else:
    print(-1)

import sys

a, b = [int(w) for w in input().split()]

max_n = (b + 1) * 10

for i in range(max_n):
    if a == int(i * 0.08) and b == int(i * 0.1):
        print(i)
        sys.exit()

print(-1)


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
a,b = map(int,input().split())
a_list = [int(a/0.08) + i for i in range(13)]
b_list = [int(b/0.1) + j for j in range(10)]
com = set(a_list) & set(b_list)
print(a_list)
print(b_list)
print(com)

if len(com) == 0:
    print(-1)
elif len(com) != 0:
    if int(min(com)*0.08) != a or int(min(com)*0.1) != b:
        print(-1)
    else:
        print(min(com))

a,b = map(int,input().split())
if a%2 == 0:
  	a_list = [int(a/0.08) + i for i in range(13)]
else:
  	a_list = [int(a/0.08) + i for i in range(1,13)]
b_list = [int(b/0.1) + j for j in range(10)]
com = set(a_list) & set(b_list)
if len(com) == 0:
    print(-1)
elif len(com) != 0:
    if int(min(com)*0.08) != a or int(min(com)*0.1) != b:
        print(-1)
    else:
        print(min(com))

Verdicts: Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
p=input().split(" ")
a=int(p[0])
b=int(p[1])
c=a*10-1
d=int(a/0.07)-1
num=[]
ans=[]
for i in range(c,d+1):
    if int(i*0.08)==a:
        num.append(i)
l=len(num)
print(num)
for i in range(l):
    if int(num[i]*0.1)==b:
        ans.append(num[i])
if ans==[]:
    print("-1")
else:
    print(ans[0])

p=input().split(" ")
a=int(p[0])
b=int(p[1])
c=a*10-1
d=int(a/0.07)-1
num=[]
ans=[]
for i in range(c,d+1):
    if int(i*0.08)==a:
        num.append(i)
l=len(num)

for i in range(l):
    if int(num[i]*0.1)==b:
        ans.append(num[i])
if ans==[]:
    print("-1")
else:
    print(ans[0])

Verdicts: Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
from sys import stdin


def spam(x, AB, per):
    min_ = x
    max_ = x
    while True:
        min_ -= 1
        tmp = int(min_ * per)
        if AB != tmp:
            min_ += 1
            break
    while True:
        max_ += 1
        tmp = int(max_ * per)
        if AB != tmp:
            max_ -= 1
            break
    return min_, max_


def main():
    A, B = [int(x) for x in stdin.readline().rstrip().split()]
    x = spam(int(A / 0.08), A, 0.08)
    y = spam(int(B / 0.1), B, 0.1)
    print(x)
    print(y)
    if x[0] <= y[0] <= x[1]:
        print(y[0])
    elif y[0] <= x[0] <= y[1]:
        print(x[0])
    else:
        print(-1)


if __name__ == "__main__":
    main()


from sys import stdin


def main():
    A, B = [int(x) for x in stdin.readline().rstrip().split()]
    result = 1
    while True:
        a = int(result * 0.08)
        b = int(result * 0.1)
        if a == A and b == B:
            print(result)
            break
        if A < a and B < b:
            print(-1)
            break
        result += 1


if __name__ == "__main__":
    main()


Verdicts: Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
A, B = list(map(int, input().split()))

P = A / 0.08
PX = (A+1) / 0.08

PP = B / 0.1
PPX = (B+1) /0.1 

if PP <= P and P < PPX: print(P)
elif P <= PP and PP < PX: print(PP)
else:print(-1)

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

P = A / 0.08
PX = (A+1) / 0.08

PP = B / 0.1
PPX = (B+1) /0.1 

if PP <= P and P < PPX: round(print(P))
elif P <= PP and PP < PX: round(print(PP))
elif 
else:print(-1)

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

P = A / 0.08
PX = (A+1) / 0.08

PP = B / 0.1
PPX = (B+1) /0.1 

if PP <= P and P < PPX: print(P)
elif PP <= PX and PX < PPX:print(PP)
else:print(-1)

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

import math
x = math.ceil(A / 0.08)
#print(x)

y = math.ceil(B / 0.1)
#print(y)

if x == y:
    print(int(x))
    exit()

if y < x:
#    print("y < x")
    while y < x:
        y += 1
        z = y * 0.1
    if z >= B + 1:
        print(-1)
        exit()
    else:
        print(int(x))
        exit()

if y > x:
#    print("y > x")
    while y > x:
        x += 1
        z = x * 0.08
    if z >= A + 1:
        print(-1)
        exit()
    else:
        print(int(y))
        exit()

Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
a, b = map(int, input().split())
ax = a / 0.08
bx = b / 0.10
if int(ax) != ax:
    print(-1)
    exit()
if int(bx) != bx:
    print(-1)
    exit()
print(min(int(ax), int(bx)))

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

Verdicts: Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
def tax_increase(a,b):

    al = [a+(i / 10) for i in range(0,10,1)]
    bl = [b+(i / 10) for i in range(0,10,1)]
    #print(al)
    #print(bl)

    atx8 = list(map(lambda x: x/t8 ,al))
    btx10 = list(map(lambda x: x/t10 ,bl))
    #print(atx8)
    #print(btx10)

    for i in atx8:
        if i in btx10:
            return i
        else:
            pass
    return -1

if __name__ == '__main__':
    a,b = map(int,input().split())
    ans = int(tax_increase(a,b))
    print(ans)

def tax_increase(a,b):
    t8  = 0.08
    t10 = 0.1
    for i in range(b*10,(b+1)*10,1):
        if int(i*t8) == a:
            return i
    return -1
    
if __name__ == '__main__':
    a,b = map(int,input().split())
    ans = int(tax_increase(a,b))
    print(ans)


Verdicts: Runtime Error

Accepted
Problem: 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`.

Submission attempts (in order):
import math
a,b = map(int, input().split())
i = 1
while True:
  if math.floor(i*0.08) == a and math.floor(i*0.1) == b:
    print(i)
    break
  if math.floor(i*0.08) > a or math.floor(i*0.1) > b:
    print(-1)
    break

import math
a,b = map(int, input().split())
i = 1
while True:
  if math.floor(i*0.08) == a and math.floor(i*0.1) == b:
    print(i)
    break
  if math.floor(i*0.08) > a or math.floor(i*0.1) > b:
    print(-1)
    break
  i += 1

Verdicts: Time Limit Exceeded

Accepted
Problem: 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`.

Submission attempts (in order):
import math
a,b=map(int,input().split())
tempa1=math.ceil(a/0.08)-1
tempa2=int((a+1)/0.08)
tempb1=math.ceil(b/0.1)
tempb2=int((b+1)/0.1)-1
if tempa1>tempb2 or tempa2<tempb1:
  print(-1)
else:
  print(max(tempa1,tempb1))

import math
a,b=map(int,input().split())
tempa1=math.ceil(a/0.08)
tempa2=int((a+1)/0.08)
print(tempa2)
tempb1=math.ceil(b/0.1)
tempb2=int((b+1)/0.1)+1
if tempa1>tempb2 or tempa2<tempb1:
  print(-1)
else:
  print(max(tempa1,tempb1))

import math
a,b=map(int,input().split())
tempa1=math.ceil(a/0.08)
tempa2=math.ceil((a+1)/0.08)-1
tempb1=math.ceil(b/0.1)
tempb2=int((b+1)/0.1)-1
if tempa1>tempb2 or tempa2<tempb1:
  print(-1)
else:
  print(max(tempa1,tempb1))

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
a,b=map(int,input().split())
x=0
a=int(round(100/8*a,0))
b=int(round(10*b,0))
if a==b:
	x=10*b
	print(x)
else:
  print('-1')

2 2

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

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: 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`.

Submission attempts (in order):
A, B = map(int, input().split())
x_a = int((A-1) * 100 / 8)
x_b = int((B+1) * 100 / 10)
l = [i for i in range(min(x_a, x_b)-1, max(x_a, x_b)+1)]
print(l)
for n in l:
    if int(n * 0.08) == A and int(n * 0.10) == B:
        print(n)
        break
else:
    print(-1)

A, B = map(int, input().split())
x_a = int(A * 100 / 8)
x_b = int(B * 100 / 10)
l = [i for i in range(x_b, x_a + 1)]
print(l)
for n in l:
    if int(n * 0.08) == A and int(n * 0.10) == B:
        print(n)
        break
else:
    print(-1)

A, B = map(int, input().split())
x_a = int((A-1) * 100 / 8)
x_b = int((B+1) * 100 / 10)
l = [i for i in range(min(x_a, x_b)-1, max(x_a, x_b)+1)]
for n in l:
    if int(n * 0.08) == A and int(n * 0.10) == B:
        print(n)
        break
else:
    print(-1)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
A, B = map(int, input().split(' '))
import math
asil1_1 = (100*(A))/8
asil1_2 = (100*(A+1))/8
asil2_1 = 10*(B)
asil2_2 = 10*(B+1)

sonuc_1 = max(asil1_1, asil2_1)
sonuc_2 = min(asil2_2, asil1_2)
print(sonuc_1, sonuc_2)
if sonuc_1>sonuc_2:
    print(-1)
else:
    print(math.ceil(sonuc_1))

A, B = map(int, input().split(' '))
import math
asil1_1 = (100*(A))/8
asil1_2 = (100*(A+1))/8
asil2_1 = 10*(B)
asil2_2 = 10*(B+1)

sonuc_1 = max(asil1_1, asil2_1)
sonuc_2 = min(asil2_2, asil1_2)
print(sonuc_1, sonuc_2)
if sonuc_1>=sonuc_2:
    print(-1)
else:
    print(math.ceil(sonuc_1))

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

# 1. YONTEM:
import math
asil1_1 = (100*(A))/8
asil1_2 = (100*(A+1))/8
asil2_1 = 10*(B)
asil2_2 = 10*(B+1)
sonuc_1 = max(asil1_1, asil2_1)
sonuc_2 = min(asil2_2, asil1_2)
if math.ceil(sonuc_1)>=sonuc_2:
    print(-1)
else:
    print(math.ceil(sonuc_1))

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
import math
A,B = map(int,input().split())
#print(A/0.08)
#print(B/0.1)
ga = math.ceil(A/0.08)
gb = math.ceil(B/0.1)

for i in range(ga,gb+1):
  #print(math.floor(i*0.08) ,math.floor(i*0.1))
  if math.floor(i*0.08) == A and math.floor(i*0.1) == B:
    print(i)
    exit()
print(-1)

import math
A,B = map(int,input().split())
#print(A/0.08)
#print(B/0.1)
ga = math.ceil(A/0.08)
gb = math.ceil(B/0.1)

small = min(ga,gb)
big = max(ga,gb)

for i in range(small,big+1):
  #print(math.floor(i*0.08) ,math.floor(i*0.1))
  if math.floor(i*0.08) == A and math.floor(i*0.1) == B:
    print(i)
    exit()
print(-1)

Verdicts: Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
A,B=map(int, input().split())

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


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

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


Verdicts: Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
a = list(map(int,input().split()))
 
for i in range(0, 1251):
  if a[0]/0.08 >= i and (a[0]-1)/0.08 < i and a[1]/0.1 >= i and (a[1]-1)/0.1 < i:
    print(i)
    return
print(-1)

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

for i in range(0, 1251):
  if a[0]/0.08 >= i and (a[0]-1)/0.08 < i and a[1]/0.1 >= i and (a[1]-1)/0.1:
    print(i)
    return
print(-1)

a = list(map(float,input().split()))
 
for i in range(0, 1251):
  if a[0]/0.08 >= i and (a[0]-1.0)/0.08 < i and a[1]/0.1 >= i and (a[1]-1.0)/0.1 < i:
    print(i)
    return
print(-1)

b = input()
a = list(map(float,b.split()))
 
for i in range(0, 1251):
  if i >= a[0]/0.08 and i < (a[0]+1)/0.08 and i >= a[1]/0.1 and i < (a[1]+1)/0.1:
    print(i)
    return

print(-1)

a = list(map(float,input().split()))

for i in range(0, 1251):
  if i >= a[0]/0.08 and i < (a[0]+1)/0.08 and i >= a[1]/0.1 and i < (a[1]+1)/0.1:
    print(i)
    return

print(-1)

def f():
  a = list(map(float,input().split()))

  for i in range(0, 1251):
    if i >= a[0]/0.08 and i < (a[0]+1)/0.08 and i >= a[1]/0.1 and i < (a[1]+1)/0.1:
      print(i)
      return

  print(-1)

f()

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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`.

Submission attempts (in order):
from math import ceil
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines

def main():
    A,B = map(int, readline().split())

    x1 = ceil(A / 0.08)
    x2 = ceil(B / 0.1)
    print(x1, x2)

    if int(x1 * 0.1) == B:
        print(x1)
    elif int(x2 * 0.08) == A:
        print(x2)
    else:
        print(-1)


if __name__ == "__main__":
    main()


from math import ceil
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines

def main():
    A,B = map(int, readline().split())

    x1 = ceil(A / 0.08)
    x2 = ceil(B / 0.1)

    if int(x1 * 0.1) == B:
        print(x1)
    elif int(x2 * 0.08) == A:
        print(x2)
    else:
        print(-1)


if __name__ == "__main__":
    main()


Verdicts: Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
A, B= map(int, input().split())
money = B*10
ans=-1
while money//10==B:
	print(money, money//10, int(money*0.08))
	if int(money*0.08)==A:
		ans=money
		break
	money+=1
print(ans)


A, B= map(int, input().split())
money = B*10
ans=-1
while money//10==B:
	if int(money*0.08)==A:
		ans=money
		break
	money+=1
print(ans)


Verdicts: Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
A,B = map(int,input().split())
if 100*A/8==10*B:
    print(int(100*A/8))
else:
    print('-1') 

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

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

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
a,b=map(int,input().split())
k=[]
o=[]
p=[]
for i in range(1,101):
    if i==A//1.08:
        k.append(i)
for j in range(1,101):
    if j==b//1.1:
        o.append(j)
for t in range(len(k)):
    for u in range(len(o)):
        if k[t]==o[u]:
            p.append(k[t])
if p==[]:
    print(-1)
else:
    print(min(p))

a,b=map(int,input().split())
k=[]
o=[]
p=[]
for i in range(1,5000):
    if int(i*0.08)==a:
        k.append(i)
for j in range(1,5000):
    if int(j*0.1)==b:
        o.append(j)
for t in range(len(k)):
    for u in range(len(o)):
        if k[t]==o[u]:
            p.append(k[t])
if p==[]:
    print(-1)
else:
    print(min(p))


Verdicts: Runtime Error

Accepted
Problem: 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`.

Submission attempts (in order):
# A: 0.08 tax, B: 0.10 tax
A, B = list(map(int, input().split()))

# find candidate prices
candidate_prices = [(B*10) + i for i in range(0 , 6)]

# find minimum possible price
for p in candidate_prices:  
    if int(p*(0.08)) == A:
        print(p)

print(-1)

# A: 0.08 tax, B: 0.10 tax
A, B = list(map(int, input().split()))

# find candidate prices
candidate_prices = [(B * 10) + i for i in range(0, 9)]

# find minimum possible price
min_price = -1
for p in candidate_prices:
    if int(p * (0.08)) == A:
        min_price = p
        break

print(min_price)

Verdicts: Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
import numpy as np

s = np.array(input().split()).astype(int)
# =============================================================================
# if s.find("A") >= 0 and s.find("B") >= 0:
#     print("Yes")
# else:
#     print("No")
# =============================================================================

# =============================================================================
# N,A,B = s
# 

# =============================================================================

A,B = s

eight =  100/8
ten = 100/10
x1 = A*eight
x2 = A*ten
ans = []
ans2 = []
if x1 == x2:
    ans.append(x1)
else:
    for i in range(0,np.array([x1,x2]).max().astype(int)):
        if int(i * 1/eight) == A and int(i * 1/ten) == B:
            ans.append(i)
        ans2.append(i)
if (int)(A * 10/8) != B:
    print(-1)
else:
    print(np.array(ans).min().astype(int))


import numpy as np

s = np.array(input().split()).astype(int)
# =============================================================================
# if s.find("A") >= 0 and s.find("B") >= 0:
#     print("Yes")
# else:
#     print("No")
# =============================================================================

# =============================================================================
# N,A,B = s
# 

# =============================================================================

A,B = s

eight =  100/8
ten = 100/10
x1 = A*eight
x2 = A*ten
ans = []

for i in np.arange(0,np.array([x1,x2]).max().astype(int) + 100):
    if int(i * 1/eight) == A and int(i * 1/ten) == B:
        ans.append(i)
if len(ans) == 0:
    print(-1)
else:
    print(np.array(ans).min().astype(int))


Verdicts: Runtime Error

Accepted
Problem: 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`.

Submission attempts (in order):
a, b = map(int, input().split())

min_a = int(a // 0.08) + 1
max_a = int((a + 1) // 0.08)
min_b = int(b // 0.1) + 1
max_b = int(b // 0.1) + 1

if max_a < min_b or max_b < min_a:
    print(-1)
else:
    print(min(min_a, min_b))

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

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

Verdicts: Wrong Answer

Accepted
Problem: 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`.

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

import math
A,B = list(map(int,input().split()))
A_ans_mini = math.ceil(A/0.08)
A_ans_max = math.floor((A+0.9999)/0.08)
B_ans_mini = math.ceil(B/0.1)
B_ans_max = math.floor((B+0.9999)/0.1)
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))

Verdicts: Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
a, b = map(int, input().split())
for i in range(int(a/0.08)+1, int((a+1)/0.08)):
    if int(i * 0.1) == b:
        print(i)
        break
else: print(-1)

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

Verdicts: Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
a, b = map(int, input().split())
c=[]
for i in range(1250):
    if int(i*0.08) == a and int(i*0.1) == b:
        c.append(i)
c.append(-1)

print(c)
print(c[0])

a, b = map(int, input().split())
c=[]
for i in range(1250):
    if int(i*0.08) == a and int(i*0.1) == b:
        c.append(i)
c.append(-1)

print(c[0])

Verdicts: Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
a, b = map(int, input().split())

if int(a//0.08) <= int(b//0.1):
    if int(b//0.1) < int((a+1)//0.08):
        print(int(b//0.1))
    else:
        print(-1)
if int(a//0.08) > int(b//0.1):
    if int(a//0.08) < int((b+1)//0.1):
        print(int(a//0.08))
    else:
        print(-1)

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

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

if int(a/0.08) <= int(b/0.1):
    if int(b/0.1) < int((a+1)/0.08):
        print(int(b/0.1))
    else:
        print(-1)
else:
    if int(a/0.08) > int((b+1)/0.1):
        print(int(a/0.08))
    else:
        print(-1)

import math

a, b = map(int, input().split())
 
if math.ceil(a*100/8) <= math.ceil(b*100/10):
    if math.floor(b*100/10) < math.floor((a+1)*100/8):
        print(math.ceil(b*100/10))
    else:
        print(-1)
else:
    if math.floor(a*100/8) < math.floor((b+1)*100/10):
        print(math.ceil(a*100/8))
    else:
        print(-1)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
cuts = []
for i in range(2000):
  cuts+= [[i*0.08, i*0.10]]
  
A, B = map(int,input().split())

for i in range(2000):
  if [A, B] == cuts[i]:
    print(i)
    break

cuts = []
for i in range(2000):
  cuts+= [[int(i*0.08), int(i*0.10)]]
  
A, B = map(int,input().split())

for i in range(1,2000):
  if [A, B] == cuts[i]:
    print(i)
    break
else:
  print(-1)

Verdicts: Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
# -*- coding: utf-8 -*-
"""
Created on Sun Apr 12 20:20:19 2020

@author: Kanaru Sato
"""

a, b = list(map(int, input().split()))
l = []

if a//0.08 - a/0.08 == 0.0:
    i = int(a/0.08)
else:
    i = int(a/0.08)+1

while 0.08*i < a+1:
    l.append(i)
    i += 1

flag = 0

for candidate in l:
    if 0.1*candidate < b+1 and 0.1*candidate >= b:
        print(candidate)
        flag = 1
        break

if flag != 1:
    print(-1)

# -*- coding: utf-8 -*-
"""
Created on Sun Apr 12 20:20:19 2020

@author: Kanaru Sato
"""

a, b = list(map(int, input().split()))
l = []

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

while 0.08*i < a+1:
    l.append(i)
    i += 1

flag = 0

for candidate in l:
    if 0.1*candidate < b+1 and 0.1*candidate >= b:
        print(candidate)
        flag = 1
        break

if flag != 1:
    print(-1)

# -*- coding: utf-8 -*-
"""
Created on Sun Apr 12 20:20:19 2020

@author: Kanaru Sato
"""

a, b = list(map(int, input().split()))
l = []

i = -(-1*a//0.08)

while 0.08*i < a+1:
    l.append(i)
    i += 1

flag = 0

for candidate in l:
    if 0.1*candidate < b+1 and 0.1*candidate >= b:
        print(int(candidate))
        flag = 1
        break

if flag != 1:
    print(-1)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
A,B=map(int,input().split())
for i in range(101):
    if ((i*0.08)+0.5)//1==A and ((i*0.1)+0.5)//1==B:
        print(i)
        exit()
    else:
        pass
print(-1)

A,B=map(int,input().split())
for i in range(20000):
    if (i*8)//100==A and (i*10)//100==B:
        print(i)
        exit()
    else:
        pass
print(-1)

Verdicts: Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
a,b=map(int,input().split())
print(a,b)

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

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

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

Verdicts: Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
a,b= map(int, input().split())
aa = a + 0.9
bb = b + 0.9

if int(bb/0.1) > 1000:
bb = 1000

aaa = set(range(int(a/0.08),int(aa/0.08)))
bbb = set(range(int(b/0.1), int(bb/0.1)))

x = list(aaa.intersection(bbb))

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


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

Verdicts: Runtime Error

Accepted
Problem: 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`.

Submission attempts (in order):
x,y=input(),input()
import math
x1=math.ceil(x*12.5)
x2=math.ceil((x+1)*12.5)-1
y1=math.ceil(y*10)
y2=math.ceil((y+1)*10)-1
if x1>y2 or y1>x2:
	print -1
else:
	print  int(max(x1,y1))

x,y=map(int, input().split())
import math
x1=math.ceil(x*12.5)
x2=math.ceil((x+1)*12.5)-1
y1=math.ceil(y*10)
y2=math.ceil((y+1)*10)-1
if x1>y2 or y1>x2:
	print (-1)
else:
	print (int(max(x1,y1)))

Verdicts: Runtime Error

Accepted
Problem: 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`.

Submission attempts (in order):
A,B = map(int,input().split())

AA = A*100//8
AF = (A+1)*100//8 + 1 if (A+1)*100%8!=0 else (A+1)*100//8
BB = B*10
AAA = [i for i in range(AA,AF]
BBB = [i for i in range(BB,(B+1)*10)]
AB_list = list(set(AAA)&set(BBB))

ans = min(AB_list) if AB_list and (12<min(AB_list)<=1000) else -1
print(ans)

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

AA = A*100//8 + 1 if A*100%8!=0 else A*100//8
AF = (A+1)*100//8 + 1 if (A+1)*100%8!=0 else (A+1)*100//8
BB = B*10
AAA = [i for i in range(AA,AF)]
BBB = [i for i in range(BB,(B+1)*10)]
AB_list = list(set(AAA)&set(BBB))

ans = min(AB_list) if AB_list and (12<min(AB_list)<=1000) else -1
print(ans)

Verdicts: Runtime Error

Accepted
Problem: 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`.

Submission attempts (in order):
A,B=map(int,input().split())
ans=-1
for i in range(1000):
  if int(i/100*8)==a and int(i/10)==b:
    ans==i
    break
print(ans)

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

Verdicts: Runtime Error

Accepted
Problem: 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`.

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

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

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


Verdicts: Runtime Error

Accepted
Problem: 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`.

Submission attempts (in order):

import math
import itertools
import statistics
#import numpy as np
import collections
a, b = list(map(int, input().split()))
#print(a/0.08)
price = a//0.08
while math.floor(price*0.08)==a:
    if b==price*0.1//1:
        ans = int(price//1)
        print(ans)
        exit() 
    price += 1

print("-1")


# print(a/0.08*0.1//1)
#print(b/0.1)



import math
import itertools
import statistics
#import numpy as np
import collections
a, b = list(map(int, input().split()))
#print(a/0.08)
price = math.ceil(a/0.08)
if b==price*0.1//1:
    ans = int(price//1)
    print(ans)
else:
    price += 1
    while math.floor(price*0.08)==a:
        if b==price*0.1//1:
            ans = int(price//1)
            print(ans)
            exit()
        price += 1

    print("-1")


# print(a/0.08*0.1//1)
#print(b/0.1)



Verdicts: Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
a,b = input().split()
a,b = [int(a), int(b)]
min_a = (a * 100) / 8
if min_a != ((a * 100) // 8):
  min_a += 0.5
  
max_a = ((a + 1) * 100) / 8
min_b = b * 10
max_b = (b + 1) * 10

if min_a >= min_b and min_a < max_b:
  print(min_a)
elif min_b >= min_a and min_b < max_a:
  print(min_b)
else:
  print('-1')

a,b = input().split()
a,b = [int(a), int(b)]
min_a = (a * 100) / 8
if min_a != ((a * 100) // 8):
  min_a += 0.5
  
max_a = ((a + 1) * 100) / 8
min_b = b * 10
max_b = (b + 1) * 10

if min_a >= min_b and min_a < max_b:
  print(int(min_a))
elif min_b >= min_a and min_b < max_a:
  print(min_b)
else:
  print('-1')

Verdicts: Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
A, B = map(int,input().split())

one = A/0.08
two = (A+1)/0.08
three = B/0.1
four = (B+1)/0.1

print(one, two, three, four)


if two < three or one > four:
    kai = -1
if three <= one and four >= one:
    kai = one
if one < three and four <= two:
    kai = three

print(kai)
    

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

Amin = A/0.08
Amax = (A+1)/0.08
Bmin = B/0.1
Bmax = (B+1)/0.1

ans = 0
if Amax <= Bmin or Amin > Bmax:
    ans = -1
if Bmin <= Amin and Bmax > Amin:
    ans = Amin
if Amin <= Bmin and Bmax < Amin:
    ans = Bmin

print(ans)



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

Amin = A/0.08
Amax = (A+1)/0.08
Bmin = B/0.1
Bmax = (B+1)/0.1

ans = 0
if Amax <= Bmin or Amin >= Bmax:
    ans = -1
else:
    if Bmin <= Amin:
        ans = Amin
    if Amin <= Bmin:
        ans = Bmin

print(ans)


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

one = A/0.08
two = (A+1)/0.08
three = B/0.1
four = (B+1)/0.1

print(one, two, three, four)


if two < three or one > four:
    kai = -1
if three <= one and one <= four <= two:
    kai = one
if one < three <=two:
    kai = three

print(kai)
    

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

one = A/0.08
two = (A+1)/0.08
three = B/0.1
four = (B+1)/0.1


if two <= three or one >= four:
    kai = -1
if three <= one and four > one:
    kai = one
if one <= three and four <= two:
    kai = three

print(kai)
    

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

Amin = A/0.08
Amax = (A+1)/0.08
Bmin = B/0.1
Bmax = (B+1)/0.1


if Amax <= Bmin or Amin > Bmax:
    kai = -1
if Bmin <= Amin and Bmax > Amin:
    kai = Amin
if Amin <= Bmin and Bmax < Amin:
    kai = Bmin

print(kai)

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

one = A/0.08
two = (A+1)/0.08
three = B/0.1
four = (B+1)/0.1


if two <= three or one > four:
    kai = -1
if three <= one and four > one:
    kai = one
if one <= three and four < two:
    kai = three

print(kai)

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

Amin = A/0.08
Amax = (A+1)/0.08
Bmin = B/0.1
Bmax = (B+1)/0.1

ans = 0
if Amax <= Bmin or Amin > Bmax:
    ans = -1
else:
    if Bmin <= Amin:
        ans = Amin
    if Amin <= Bmin:
        ans = Bmin

print(ans)



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

count = 0
for n in range(10000):
    za = n*0.08
    zb = n*0.1
    count += 1
    if A == za and B == zb:
        print(n)
        break


if count == 10000:
    print(-1)



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

count = 0

for n in range(10000):
    za = n*0.08
    zb = n*0.1
    count += 1
    if A == math.floor(za) and B == math.floor(zb):
        print(n)
        break


if count == 10000:
    print(-1)



Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
x, y = list(map(int,input().split()))
X = x//0.08
Y = y//0.1
if X == Y:
  print(X)
else:
  print(-1)

import sys
# input = sys.stdin.readline
a,b = [int(c) for c in input().split()]
maxa = (a+1) / 0.08
maxb = (b+1) / 0.1
mina = a / 0.08
minb = b / 0.1
mmax = int(min(maxa,maxb)) - 1 if int(min(maxa,maxb))==min(maxa, maxb) else int(min(maxa,maxb))
mmin = int(max(mina,minb)) if int(max(mina,minb))==max(mina,minb) else int(max(mina,minb)) + 1
if mmin>mmax:
    print("-1")
else:
    print(mmin)


Verdicts: Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
import math
tax = [3, 3]
tax_8 = int(tax[0])
tax_10 = int(tax[1])

price_8 = [math.ceil(tax_8*(100/8)), math.ceil((tax_8+1)*(100/8))-1]
price_10 = [math.ceil(tax_10*(10)), math.ceil((tax_10+1)*(10))-1]
if(min(price_8[1], price_10[1]) < max(price_8[0], price_10[0])):
    print(-1)
else:
    print(max(price_8[0], price_10[0]))

import math
tax = input().split(" ")
tax_8 = int(tax[0])
tax_10 = int(tax[1])

price_8 = [math.ceil(tax_8*(100/8)), math.ceil((tax_8+1)*(100/8))-1]
price_10 = [math.ceil(tax_10*(10)), math.ceil((tax_10+1)*(10))-1]
if(min(price_8[1], price_10[1]) < max(price_8[0], price_10[0])):
    print(-1)
else:
    print(max(price_8[0], price_10[0]))


Verdicts: Wrong Answer

Accepted