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

a_plus = a+1
b_plus = b+1

price_a = int(a*(100/8))
price_aplus = int(a_plus*(100/8))
price_b = int(b*(100/10))
price_bplus = int(b_plus*(100/10))


al = list(range(price_a, price_aplus+1))
bl = list(range(price_b, price_bplus))
print(al)
print(bl)

ans = list(set(al) & set(bl))

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

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

def is_integer_num(n):
    if isinstance(n, int):
        return True
    if isinstance(n, float):
        return n.is_integer()
    return False

a_plus = a+1
b_plus = b+1

price_a = int(a*(100/8))
price_aplus = int(a_plus*(100/8))
price_b = int(b*(100/10))
price_bplus = int(b_plus*(100/10))


if is_integer_num(a_plus*(100/8)):
  al = list(range(price_a+1, price_aplus))
else:
  al = list(range(price_a, price_aplus+1))
bl = list(range(price_b, price_bplus))
print(al)
print(bl)

ans = list(set(al) & set(bl))

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

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

def is_integer_num(n):
    if isinstance(n, int):
        return True
    if isinstance(n, float):
        return n.is_integer()
    return False

a_plus = a+1
b_plus = b+1

price_a = int(a*(100/8))
price_aplus = int(a_plus*(100/8))
price_b = int(b*(100/10))
price_bplus = int(b_plus*(100/10))


if is_integer_num(a_plus*(100/8)):
  al = list(range(price_a+1, price_aplus))
else:
  al = list(range(price_a, price_aplus+1))
bl = list(range(price_b, price_bplus))

ans = list(set(al) & set(bl))

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

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):
data = input().split

a = int(data[0])
b = int(data[1])

pricea = a // 0.08
priceb = b // 0.1

if a == b:
  ans = a
elif a + 1 == b:
  ans = b
elif a == b + 1:
  ans = a
else:
  ans = -1
  
print(ans)


data = input().split()

a = int(data[0])
b = int(data[1])

n = min(int(a / 0.08), int(b / 0.1))

def lookup():    
    for i in range(n, 10000):
        tax_a = int(i * 0.08)
        tax_b = int(i * 0.1)
        if tax_a == tax_b:
            print(tax_a)
            return
    print(-1)

lookup()


data = input().split()

a = int(data[0])
b = int(data[1])

n = min(a, b)

def lookup():    
    for i in range(n, 10000):
        tax_a = int(i * 0.08)
        tax_b = int(i * 0.1)
        if tax_a == tax_b:
            print(tax_a)
            return
    print(-1)

lookup()


data = input().split()

a = int(data[0])
b = int(data[1])

n = min(int(a / 0.08), int(b / 0.1))

def lookup():    
    for i in range(n, 10000):
        tax_a = int(i * 0.08)
        tax_b = int(i * 0.1)
        if tax_a == a and tax_b == b:
            print(i)
            return
    print(-1)

lookup()


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

A, B = list(map(int, input().split()))
ans = -1
for i in range(1, 1009):
    if int(i*0.08) == A and int(i*0.10) == B:
        ans = i
print(ans)

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

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(100):
  if int(i*1.08)==a and int(i*1.1)==b:
    print(i)
    exit(0)
print(-1)


a,b,c=map(int,input().split())
for i in range(100):
  if int(i*1.08)==a and int(i*1.1)==b:
    print(i)
    exit(0)
print(-1)

a,b=map(int,input().split())
for i in range(10010):
  if i*8//100==a and i//10==b:
    print(i)
    exit(0)
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):
def tax():
    a, b = map(int, input().strip().split())
    p1 = int(a//0.08)
    p2 = int(b//0.1)

    for i in range(p2, p1):
        if int(i*0.1) == b and int(i*0.08) == a:
            print(i)
            return
    print(-1)
    return
tax()

from math import ceil
def tax(a, b):
    mina, maxa = a/0.08, (a+1)/0.08
    minb, maxb = b/0.1, (b+1)/0.1
    print(mina, maxa, minb, maxb)
    if(mina >= maxb or minb >= maxa): return -1

    return max(ceil(mina), ceil(minb))

a, b= map(int, input().strip().split())
print(tax(a, b))

def tax():
    a, b = map(int, input().strip().split())
    p1 = int(a//0.08)
    p2 = int(b//0.1)

    for i in range(p1,p2):
        if int(i*0.1) == b and int(i*0.08) == a:
            print(i)
            return
    print(-1)
    return
tax()

from math import floor

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

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

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):
d8 = {}
d10 = {}
for i in range(1, 100):
    d8[int(i * 1.08)] = i
    d10[int(i * 1.1)] = i

A, B = map(int, input().rstrip().split())
a = d8.get(A, None)
b = d10.get(B, None)
if a!= b or a is None or b is None:
    print(-1)
else:
    print(a)


d8 = {}
d10 = {}
for i in range(1, 10000):
    if int(i * 0.08) not in d8:
        d8[int(i * 0.08)] = i
    if int(i * 0.1) not in d10:
        d10[int(i * 0.1)] = i

A, B = map(int, input().rstrip().split())
a = d8.get(A, None)
b = d10.get(B, None)
if a != b or a is None or b is None:
    print(-1)
else:
    print(a)


d8 = {}
d10 = {}
for i in range(1, 10000):
    if int(i * 0.08) not in d8:
        d8[int(i * 0.08)] = i
    if int(i * 0.1) not in d10:
        d10[int(i * 0.1)] = i

A, B = map(int, input().rstrip().split())
a = d8.get(A, None)
aa = d8.get(A + 1, None)
b = d10.get(B, None)
bb = d10.get(B + 1, None)
if a is None or b is None:
    print(-1)
elif max(a, b) < min(aa, bb):
    print(max(a, b))
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):
import math

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

a_l = A / 0.08
a_m = (A+1) /0.08

l = max(a_l, b_l)
m = min(a_m, b_m)

c = math.ceil(l)

if c < m:
  print(int(c))
else:
  print(-1)

import math

def main():

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

    a_l = A / 0.08
    a_m = (A + 1) / 0.08

    b_l = B / 0.1
    b_m = (B + 1) / 0.1

    l = max(a_l, b_l)
    m = min(a_m, b_m)

    c = math.ceil(l)

    if c < m:
        print(int(c))
    else:
        print(-1)


if __name__ == '__main__':
    main()


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())
I = 0
b = B/0.1
 
b_list = []
for _ in range(10):
  b_list.append(b+_)
 
for i in b_list:
  pre_cnt = i*0.08
  cnt = int(pre_cnt)
  if cnt == A:
    print(i)
    I = 1
  break
if I == 0:
  print(-1)

A,B = map(int,input().split())
I = 0
b = B/0.1
 
b_list = []
for _ in range(10):
  b_list.append(b+_)
 
for i in b_list:
  pre_cnt = i*0.08
  cnt = int(pre_cnt)
  if cnt == A:
    print(int(i))
    I = 1
  break
if I == 0:
  print('-1')

A,B = map(int,input().split())
I = 0
b = B/0.1
 
b_list = []
for _ in range(10):
  b_list.append(b+_)

for i in b_list:
  pre_cnt = i*0.08
  cnt = int(pre_cnt)
  if cnt == A:
    print(int(i))
    I = 1
  break
if I == 0:
  print(-1)

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

b_list = []
for i in range(10):
  b_list.append(b+i)

for i in b_list:
  pre_cnt = i*0.08
  cnt = math.floor(pre_cnt)
  if cnt == A:
    print(i)
    exit()

print(-1)

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

import math
b = B/0.1

b_list = []
for _ in range(10):
  b_list.append(b+_)

for i in b_list:
  pre_cnt = i*0.08
  cnt = math.floor(pre_cnt)
  if cnt == A:
    print(i)
  exit()

print(-1)

A,B = map(int,input().split())
I = 0
b = B/0.1
 
b_list = []
for _ in range(10):
  b_list.append(b+_)
 
for i in b_list:
  pre_cnt = i*0.08
  cnt = int(pre_cnt)
  if cnt == A:
    print(int(i))
    I = 1
  break
if I == 0:
  print(-1)

A,B = map(int,input().split())
I = 0
b = B/0.1

b_list = []
for _ in range(10):
  b_list.append(b+_)

for i in b_list:
  pre_cnt = i*0.08
  cnt = int(pre_cnt)
  if cnt == A:
    print(i)
    I = 1
  break
if I == 0:
  print(-1)

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

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):
def calc_list(X, z):

  root = int(X * (100 / z))
  origin = root
  l = [root]
  while True:
    if int((root + 1) * (z / 100)) == X:
      l.append(root + 1)
      root += 1
    else: break
  
  root = origin

  while True:
    if int((root - 1) * (z / 100)) == X:
      l.append(root - 1)
      root -= 1
    else: break

  return set(l)

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


a = calc_list(A, 8)


b = calc_list(B, 10)

print(a, b)


c = a & b
if len(c) > 0:
  c = list(c)
  list(c).sort()
  print(int(c[0]))
else:
  print(-1)

import math
import sys

A, B = list(map(lambda x: int(x), input().split()))
ten_pats = [i for i in range(B*10, B*10 + 10)]

for num in ten_pats:
  if int(num * 0.08) == A:
    print(num)
    sys.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 main():
  a, b = int(input().split())
  for i in range(1100):
    if int(i * 0.08) == a and int(i * 0.1) == b:
      print(i)
      return
  print(-1)

main()


def main():
  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)
      return
  print(-1)

main()

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

if a % 8 == 0:
    a_min = int(a * 12.5)
else:
    a_min = int(a * 12.5) + 1
if (a + 1) % 8 == 0:
    a_max = int((a + 1) * 12.5) - 1
else:
    a_max = int((a + 1) * 12.5)

b_min = b * 10
b_max = (b + 1) * 10 - 1

if a_max < b_min:
    print("-1")
elif a_min <= b_min:
    print(int(b_min))
elif b_max >= a_min:
    print(int(a_min))
else:
    print("-1")

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

if a % 2 == 0:
    a_min = int(a * 12.5)
else:
    a_min = int(a * 12.5) + 1

if (a + 1) % 2 == 0:
    a_max = int((a + 1) * 12.5) - 1
else:
    a_max = int((a + 1) * 12.5)

b_min = b * 10
b_max = (b + 1) * 10 - 1

if a_max < b_min:
    print("-1")
elif a_min <= b_min:
    print(int(b_min))
elif b_max >= a_min:
    print(int(a_min))
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):
x = 1
while True:
    if (int(x*0.08) == a and int(x*0.1) == b):
        print(x)
        break
    else:
        if (x > 1500):
            print(-1)
            break
        else:
            x += 1


a, b = [int(x) for x in input().split()]
 
if (b < a):
    temp = b
    b = a
    a = temp
 
 
x = 1
while True:
    if (int(x*0.08) == a and int(x*0.1) == b):
        print(x)
        break
    else:
        if (x > 1500):
            print(-1)
            break
        else:
            x += 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):
a, b = map(int, input().split())

x = max((a//0.08)+1, int(a/0.08))
y = b//0.1*0.1

if int(x*0.08) == int(y*0.08):
    print(x)
elif int(y*0.1) == int(x*0.1):
    print(y)
else:
    print(-1)


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

x = max((a//0.08)+1, int(a/0.08))
y = b//0.1*0.1

if int(x*0.08) == int(x*0.1):
    print(x)
elif int(y*0.08) == int(y*0.1):
    print(y)
else:
    print(-1)


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

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

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

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

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

if int(a / 0.08 * 0.1) == b:
    print(round(a / 0.08 + 0.0001))
elif int(b / 0.1 * 0.08) == a:
    print(round(b / 0.1 + 0.0001))
else:
    print(-1)


Verdicts: Wrong Answer

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):
import math
A, B = map(float, input().split())
Ap = math.floor(A / 0.08)
Bp = math.floor(B / 0.1)

if Ap == Bp:
    print(Ap)
else:
    print(-1)

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

A = list(range(int((a / 0.08)),int((a+1)/0.08))-1)
B = list(range(int((b / 0.1)),int((b+1)/0.1))-1)
price = set(A) & set(B)
if len(price) == 0:
    ans = -1
else:
    ans = min(price)
print(ans)

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

A = list(range(math.ceil((a / 0.08)),int((a+1)/0.08)))
B = list(range(int((b / 0.1)),int((b+1)/0.1)-1))
price = set(A) & set(B)
if len(price) == 0:
    ans = -1
else:
    ans = min(price)
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):
print(-1)

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

while PA <= 1000:
    if PA*0.1 >= B:
        break
    else:
        PA += 1

if A+1 > PA*0.08 >= A:
    print(PA)

else:
    print(-1)

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

while PA <= 1250:
    if PA*0.08 >= A:
        break
    else:
        PA += 1

if int(PA*0.1) == B:
    print(PA)

elif PA*0.1 >= B+1:
    print(-1)

else:
    while PA <= 1000:
        if PA*0.1 >= B:
            break
        else:
            PA +=1
    if int(PA*0.08) == A:
        print(PA)
    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())
z,x,c,v=10*b,10*b+10-1,50*a//4,50*(a+1)//4-1
if x<c or v<z:print(-1)
else:print(min(z,c))
  

a,b=map(int,input().split())
z,x,c,v=10*b,10*b+10-1,50*a//4,50*(a+1)//4-1
for i in range(max(z,c),min(x,v)+1):
  if i*8//100==a and i//10==b:print(i);exit()
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):
19 99

a,b=map(int,input().split())
i=1
while 1:
    if int(i*0.08)==a:
        if int(i*0.1)==b:
            print(i)
            break
    else:
        if int(i*0.08)>a:
            print(-1)
            break
    i+=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):
def C158():
    A, B = [int(_) for _ in input().split()]
    X1 = int(A / 0.08)
    X2 = int(B / 0.1)
    if X1 == X2:
        print(X1)
    else:
        print("-1")


if __name__ == "__main__":
    C158()

def C158():
    A, B = [int(_) for _ in input().split()]
    N = 1
    while N <= 10000:
        if int(N * 8/100) == A and int(N * 10/100) == B:
            break
        N += 1
    if N <= 10000:
        print(N)
    else:
        print(-1)
        
if __name__ == "__main__":
    C158()

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 math import floor
A, B = map(int, input().split())
OK = False
for n in range(1, 1001):
    if int(floor(n*0.08)) == A and int(floor(n*0.10)) == B:
        OK = True
        ans = n
print(ans if OK else '-1')

from math import floor
A, B = map(int, input().split())
OK = False
for n in range(1, 101):
    if floor(n*0.08) == A and floor(n*0.10) == B:
        OK = True
        ans = n
print(ans if OK else '-1')

A, B = map(int, input().split())
for n in range(1, 1001):
    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())
if a < 1 or b < 1:
    print(-1)
else:
    amin = a*100//8 + ((a*100)%8 and 1)
    amax = (a+1)*100//8 + (max((a+1)*100)%8, 1) or 1)
    bmin = b*100//10 + ((b*100)%10 and 1)
    bmax = (b+1)*100//10 + (max(((b+1)*100)%10, 1) or 1)
    A = set(range(amin, amax))
    B = set(range(bmin, bmax))
    if (A & B):
        print(min(A&B))
    else:
        print(-1)

a, b = map(int, input().split())
ass = 1 if ((100/8 * (a+1))-int(100/8 * (a+1))) else 0
asss = 1 if ((100/8 * a)-int(100/8 * a)) else 0
bss = 1 if ((100/10 * (b+1))-int(100/10 * (b+1))) else 0
bsss = 1 if ((100/10 * b)-int(100/10 * b)) else 0
As = set(range(int(100/8 * a)+asss, int(100/8 * (a+1))+ ass))
Bs = set(range(int(100/10 * b)+bsss, int(100/10 * (b+1))+bss))
if As & Bs:
    print(min(As&Bs))
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):
a, b = map(int, input().split())
for i in range(1, 10**5):
    if (i*8) // 100 == a and i // 10 == b:
        print(n)
        exit()
print(-1)

a, b = map(int, input().split())
for i in range(1, 10**5):
    if (i*8) // 100 == a and i // 10 == 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):
    import math
    a,b=map(int,input().split())
    answer=False
    for i in range(1,1009):
        if int(i*0.08)==a and int(i*0.10)==b:
            print(i)
            answer=True
            break
    if not answer:
        print(-1)

def ta():
    (n,m)=input().split()
    n=int(n)
    m=int(m)
    # l=[0,0.05,0.07,0.09,0.1,0.13,0.15,0.17,0.19,0.2,0.23,0.25,0.27,0.29,0.3,0.33,0.35,0.37,0.4,0.43,0.45,0.47,0.49,0.5,0.55,0.6,0.65,0.7,0.75,0.8,0.85,0.9,0.95,]
    l1=[]
    l2=[]
    if n<=m<=100:
        o=0
        for i in range(100):
            b=(n+o)/0.08
            c=(m+o)/0.1
            o=o+0.01
            l2.append(c)
            l1.append(b)
        print(l1,l2)
        for j in l1:
            for k in l2:
                if int(j)==int(k):
                    return int(j)
                # else:
        return int('-1')
print(ta())


def ta():
    (n,m)=input().split()
    n=int(n)
    m=int(m)
    l=[0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9]
    l1=[]
    l2=[]
    for i in l:
        b=(n+i)/0.08
        c=(m+i)/0.1
        l2.append(c)
        l1.append(b)
    l1=sorted(set(l1))
    l2=sorted(set(l2))
    for j in l1:
        for k in l2:
            if int(j)==int(k):
                return int(j)
            else:
                return int("-1")
print(ta())


a,b=map(int,input().split())
answer=False
for i in range(1,1009):
    if int(i*0.08)==a and int(i*0.10)==b:
        print(i)
        answer=True
        break
if not answer:
     print("-1")

Verdicts: 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):
import sys
a,b = map(lambda x: int(x),input().split())

for i in range(100) :
    a_tax = int(a* (1/0.08) + i*0.01)
    for j in range(100) :
        b_tax = int(b * (1/0.1) + j*0.01)
        if a_tax == b_tax :
            print(int(a_tax))
            sys.exit()
print(-1)



a,b = map(lambda x: int(x),input().split())
ans = -1
for i in reversed(range(1,1011)) :
    a_ans =int(i *0.08)
    b_ans =int(i *0.1)

    if a == a_ans and b == b_ans :
        ans = i
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):
mport math

eight, ten = map(int, input().split())

eight_price = eight / 0.08
ten_price = ten / 0.1

if eight_price >= ten_price:
    bigger = eight_price
    if (bigger // 10) != ten:
        print("-1")
    else:
        print(math.ceil(bigger))
else:
    bigger = ten_price
    if (bigger * 8 // 100) != eight:
        print("-1")
    else:
        print(math.ceil(bigger))

import math

eight, ten = map(int, input().split())

eight_price = eight / 0.08
ten_price = ten / 0.1

if eight_price >= ten_price:
    bigger = eight_price
    if (bigger // 10) != ten:
        print("-1")
    else:
        print(math.ceil(bigger))
else:
    bigger = ten_price
    if (bigger * 8 // 100) != eight:
        print("-1")
    else:
        print(math.ceil(bigger))

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(1300):
    if int(i/25)==a and int(i/10)==b:
        ans=i
        break
print(ans)

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

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

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

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):
import sympy

A,B = map(int,input().split())
sympy.var("x")
sol1 = sympy.solve(x*0.08-A,x)
sol2 = sympy.solve(x*0.10-B,x)
ans = lambda x1,x2 : x1 if x1 == x2 else -1
print(int(ans(sol1[0],sol2[0])))

A,B = map(int,input().split())
sol1 = A/0.08
sol2 = B/0.10
ans = lambda x1,x2 : x1 if x1 == x2 else -1
print(int(ans(sol1,sol2)))

import math
A,B = map(int,input().split())
sol1 = math.ceil(A/0.08)
sol2 = math.ceil(B/0.10)
ans = lambda x1,x2 : x1 if x1 == x2 else -1
flagA = True
flagB = True
while True:
    if(sol1 * 0.08 < A and flagA):
        flagA = False
        if(math.floor((sol1+1)*0.10) == B):
            print(sol1+1)
            break
    sol1 -= 1
    if(sol2 * 0.10 < B and flagB):
        flagB = False
        if(math.floor((sol2+1)*0.08) == A):
            print(sol2+1)
            break
    if(not flagA and not flagB):
        print(-1)
        break
    sol2 -= 1

Verdicts: 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 = [int(x) for x in input().split()]
res = -1
for i in range(20000):
  if i * 108 // 100 == a and i * 110 // 100:
    res = i
print(res)

a,b = [int(x) for x in input().split()]
res = -1
for i in range(20000):
  if i * 8 // 100 == a and i * 10 // 100 == b:
    res = i
    break
print(res)

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=(int(x) for x in input().split())
if int(25*(a+1)/2)<int(10*b):
  print(-1)
if int(25*(a+1)/2)=int(10*b):
  if a%2==0:
    print(-1)
  else:
    print(int(25*a/2))
if int(10*(b+1))<=int(25*a/2):
  print(-1)
else:
  if a%2==1:
    print(max([int(25*a/2+1),int(10*b)]))
  else:
    print(max([int(25*a/2),int(10*b)]))
    

a,b=(int(x) for x in input().split())
if int(50*(b-a-1))<int(50*(b-a+1)):
  print(int(50*(b-a-1))+1)
else:
  print(-1)

a,b=(int(x) for x in input().split())
if int(25*(a+1)/2)<int(10*b):
  print(-1)
elif int(25*(a+1)/2)==int(10*b):
  if a%2==1:
    print(-1)
  else:
    print(int(10*b))
elif int(10*(b+1))<=int(25*a/2):
  print(-1)
elif int(10*(b+1)-1)==int(25*a/2):
  if a%2==1:
    print(-1)
  else:
    print(int(25*a/2))  
else:
  if a%2==1:
    print(max([int(25*a/2+1),int(10*b)]))
  else:
    print(max([int(25*a/2),int(10*b)]))

Verdicts: 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):
ab=list(map(int, input().split()))
a=ab[0]
b=ab[1]
a0=12.5*a
a1=12.5*(a+1)
b0=10*b
b1=10*(b+1)
answer=0
if(a0>=b1):
    answer=-1
elif(a1<=b0):
    answer=-1
else:
    if(a0<b0):
        answer=a0//1
    else:
        answer=b0//1
print(int(answer))

import math
ab=list(map(int, input().split()))
a=ab[0]
b=ab[1]
a0=12.5*a
a1=12.5*(a+1)
b0=10*b
b1=10*(b+1)
answer=0
if(a0>=b1):
    answer=-1
elif(a1<=b0):
    answer=-1
else:
    if(a0<b0):
        answer=math.ceil(b0)
    else:
        answer=math.ceil(a0)
print(int(answer))

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 sys

a, b = map(int, input().split())
for i in range(1, 10001):
    ax = i*0.08
    bx = i*0.10
    if ax >= a and a > i*0.09:
        if bx >= b:
            print(i)
            sys.exit()
print("-1")

import sys

a, b = map(int, input().split())
for i in range(1, 1010):
    if int(i*0.08) == a and int(i*0.10) == b:
        print(i)
        sys.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):
import math

if __name__ == "__main__":
    A, B = map(int, input().split())
    par = A / B
    if par < 0.8:
        print("-1")
        exit(0)
    else:
        a = math.ceil(A / 0.08)
        b = math.ceil(B / 0.1)
        print(a , b)
        if math.floor(a * 0.08) == A and math.floor(a * 0.1) == B:
            ret = a
        elif math.floor(b * 0.08) == A and math.floor(b * 0.1) == B:
            ret = b
        else:
            ret = max(a, b) +1
        print(ret)

import math

if __name__ == "__main__":
    N, A, B = map(int, input().split())
    S = "b" * A + "r" * B
    S = S * math.ceil(1000000000000000000 / len(S))
    ret = S[:N].count("b")
    print(ret)import math

if __name__ == "__main__":
    A, B = map(int, input().split())
    par = A / B
    if par < 0.8:
        print("-1")
        exit(0)
    else:
        a = math.ceil(A / 0.08)
        b = math.ceil(B / 0.1)
        # print(a , b)
        ret = a
        print(a)

import math

if __name__ == "__main__":
    A, B = map(int, input().split())
    a = math.ceil(A / 0.08)
    b = math.ceil(B / 0.1)
    # print(a , b)
    if math.floor(a * 0.08) == A and math.floor(a * 0.1) == B:
        ret = a
    elif math.floor(b * 0.08) == A and math.floor(b * 0.1) == B:
        ret = b
    else : 
        ret = -1
    print(ret)

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())
c = a*(5/4)
d = a*(11/8)
if c<=b and b<d:
  print(max(int(12.5*a),int(10*b)))
else:
  print(-1)

a,b = map(int, input().split())
ok = True
for i in range(b*10+1):
  if int(i*0.08)==a and int(i*0.1)==b:
    print(i)
    ok = False
    break
if ok: print(-1)

a,b = map(int, input().split())
ok = True
for i in range(1001):
  if int(i*0.08)==a and int(i*0.1)==b:
    print(i)
    ok = False
    break
if ok: 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):
import math
a, b = list(map(int, input().split()))

c = max((a/0.08),(b/0.1))
if math.floor(c*0.1) - math.floor(c*0.08) < abs(a-b):
    print('-1')
else:
    print(c)

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


a1 = a/0.08
a2 = (a+1)/0.08
b1 = b/0.1
b2 = (b+1)/0.1
c = 0

for i in range(1001):
    if a1<= i <a2 and b1<= i <b2:
        print(i)
        c = 1
        break
        
if c==0:
    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 =0 
for n in range(0,10000):
    taxa = n*0.08
    taxb = n*0.1
    if a == taxa and b == taxb:
        print(n)
        break
    else:
        c += 1
if c > 999:
    print(-1)
    
        

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

c =0 
for n in range(0,10000):
    taxa = n*0.08
    taxb = n*0.1
    if a == taxa and b == taxb:
        print(n)
        break
    else:
        c += 1
if c > 9999:
    print(-1)
    


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

c =0 
for n in range(0,10000):
    taxa = int(n*8/100)
    taxb = int(n*10/100)
    if a == taxa and b == taxb:
        print(n)
        break
    else:
        c += 1
if c > 9999:
    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(10000):
  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(10000):
  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(10000):
  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())
 
for x in range(101):
 if (x*0.08*100)//1==a*100 and (x*1.10*100)//1==b*100 and x//1==int(x):
  print(int(x))
  exit()
  
print(-1)

a,b =map(int,input().split())
 
for x in range(1010):
 if (x*0.08*100)//1==a*100 and (x*0.10*100)//1==b*100 and x//1==int(x):
  print(int(x))
  exit()
  
print(-1)

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

for x in range(100):
 if x*1.08==a+x and x*1.10==b+x:
  print(x)
 else:
  print(-1)

a,b =map(int,input().split())
 
for x in range(101):
 if (x*0.08)//1==a and (x*1.10)//1==b and x//1==int(x):
  print(int(x))
  exit()
  
print(-1)

a,b =map(int,input().split())
 
for x in range(1009):
 if (x*0.08*100)//1==a*100 and (x*0.10*100)//1==b*100 and x//1==int(x):
  print(int(x))
  exit()
  
print(-1)

a,b =map(int,input().split())
 
for x in range(101):
 if (x*0.08*100)//1==a*100 and (x*0.10*100)//1==b*100 and x//1==int(x):
  print(int(x))
  exit()
  
print(-1)

a,b =map(int,input().split())
 
for x in range(101):
 if (x*1.08)//1==a+x and (x*1.10)//1==b+x and x//1=int(x):
  print(int(x))
  exit()
  
print(-1)

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

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):
ret = -1

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

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

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

print(minA, maxA, minB, maxB)

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

print(ret)

ret = -1

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

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

print(minA, maxA, minB, maxB)

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

print(ret)

ret = "-1"

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

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

print(ret)

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_tax = int(a / 0.08)
b_tax = int(b / 0.1)
n  = min([a_tax, b_tax])

if b_tax / a_tax > 1.3 or b_tax / a_tax < 1.2:
    n = -1
else:
    while True:
        if a == int(n * 0.08) and b == int(n * 0.1):
            break

        n += 1

print(n)

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

Verdicts: Wrong Answer

Accepted