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

for i in range(1010):
  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(1010):
  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):
import math

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

#x * 0.08 = a
#y * 0.1 = b

val1 = a / 0.08
val2 = b / 0.1

if math.floor(val1 * 0.08) == a and math.floor(val1 * 0.1) == b:
    print(val1)
elif math.floor(val2 * 0.08) == a and math.floor(val2 * 0.1) == b:
    print(val2)
else:
    print(-1)

import math

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

val1 = math.floor(a / 0.08)
val2 = math.floor(b / 0.1)
ans = []

for i in range(0, 1250):
    if math.floor(i * 0.08) == a and math.floor(i * 0.1) == b:
        ans.append(i)
if ans:
    print(min(ans))
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):
s = input()
n = int(input())

t = 0
for i in range(n):
  a = input().split()
  if int(a[0]) == 1:
    t += 1
    #s = s[::-1]
  else:
    if t % 2 == 1:
      s = s[::-1]
    t = 0
    if int(a[1]) == 1:
      s = a[2] + s
    if int(a[1]) == 2:
      s = s + a[2]
    
print(s)

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

flag = False
for i in range(1001):
  if math.floor(i*0.08) == a[0]:
    if math.floor(i*0.1) == a[1]:
      flag = True
      break

if flag:
  print(i)
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 = [int(i) for i in input().split()]
if B >= A and 4*(B-A) == A and 5*(B-A) == B:
  print(50*(B-A))
else:
  print(-1)
  

A, B = [int(i) for i in input().split()]
if B >= A and 4*(B-A) == A and 5*(B-A) == B:
  print(50(B-A))
else:
  print(-1)
  

import math
import sys
A, B = [int(i) for i in input().split()]
for i in range(math.ceil(12.5 * A), math.ceil(12.5 * (A + 1))):
    if math.floor(i//10) == B:
        print(i)
        sys.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())

for i in range(1200):
    tax8 = int(a * 0.08)
    tax10 = int(a * 0.1)

    if a == tax8 and b == tax10:
        print(i)
        exit()
else:
    print(-1)

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

for i in range(1251):
    tax8 = math.floor(a * 0.08)
    tax10 = math.floor(a * 0.1)

    if a == tax8 and b == tax10:
        print(i)
        exit()
else:
    print(-1)

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

for i in range(1200):
    tax8 = math.floor(a * 0.08)
    tax10 = math.floor(a * 0.1)

    if a == tax8 and b == tax10:
        print(i)
        exit()
else:
    print(-1)

for i in range(1010):
    tax8 = int(i * 0.08)
    tax10 = int(i * 0.1)

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

print(-1)

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

for i in range(1009):
    tax8 = math.floor(a * 0.08)
    tax10 = math.floor(a * 0.1)

    if a == tax8 and b == tax10:
        print(i)
        exit()
else:
    print(-1)

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

for i in range(1010):
    tax8 = math.floor(a * 0.08)
    tax10 = math.floor(a * 0.1)

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

print(-1)

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

for i in range(111):
    tax8 = int(a * 1.08)
    tax10 = int(a * 1.1)

    if a == tax8 and b == tax10:
        print(i)
        exit()
else:
    print(-1)

a, b = map(int, input().split())
for i in range(1010):
    tax8 = int(i * 0.08)
    tax10 = int(i * 0.1)

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

print(-1)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Runtime Error

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
import fractions

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


if fractions.gcd(A, B) == 1:
    print('-1')


c = min(A, B) + 1
isFinish = True
while isFinish:
    c += 1

    if math.floor(c * 0.08) == A and math.floor(c * 0.1) == B:
        print(str(c))
        isFinish = False

import fractions

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


if fractions.gcd(A, B) == 1:
    print('-1')

print(max(12.5 * A, 10*B))



def main(A, B):
    flag = '-1'

    for N in range(1, 10000):
        if int(N * 0.08) == A and int(N * 0.1) == B:
            flag = N
            print(flag)
            break
    print(flag)



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

main(A, B)

import fractions

def main(A, B):
    if fractions.gcd(A, B) == 1:
        print('-1')

    for N in range(10000):
        if N * 8 // 100 == A and N * 10 // 100 == B:
            print(N)
            return



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

main(A, B)

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


out = '-1'

for N in range(1, 1100):
    if int(N * 0.08) == A and int(N * 0.1) == B:
        out = N
        break
print(out)



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):
A,B= map(int,input().split())
for i in range(1300):
    if int(i*0.08)==A and int(i*0.1)==B:
        print(int(i*0.08))
        exit()
print(-1)


A,B= map(int,input().split())
for i in range(1300):
    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):
#C
import math

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


c=0
d=0
c=max([math.floor(A/0.08),math.floor(B/0.1)])
d=min([math.ceil((A+1)/0.08),math.ceil((B+1)/0.1)])
print(c,d)
x=-1
for i in range(c,d+1):
    if math.floor(i*0.08)==A and math.floor(i*0.1)==B:
        z=i
        break
print(z)


#C
import math

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


c=0
d=0
c=max([math.floor(A/0.08),math.floor(B/0.1)])
d=min([math.ceil((A+1)/0.08),math.ceil((B+1)/0.1)])
z=-1
for i in range(c,d+1):
    if math.floor(i*0.08)==A and math.floor(i*0.1)==B:
        z=i
        break
print(z)

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):
#C
import sys

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

print(ans)


import sys
a,b=map(int,input().split())
for i in range(1,1100):#max_a=1
    if int(i*0.08)==a and int(i*0.1)==b:
        ans=i
        bresak
    if i==1099:
        ans=-1

print(ans)

import sys
a,b=map(int,input().split())
f=True
for i in range(1,1010):#max_a=1
    if int(i*0.08)==a and int(i*0.1)==b:
        ans=i
        f=False
        break
if f:
  print(-1)
else:
  print(ans)


Verdicts: 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):
a,b = map(int,input().split())
if a/0.08 == a//0.08:
    emin = a//0.08
else:
    emin = a//0.08+1
if (a+1)/0.08 == (a+1)//0.08:
    emax = (a+1)//0.08-1
else:
    emax = (a+1)//0.08
tmin = b/0.1
tmax = (b+1)/0.1-1
if tmax > emax:
    if tmin <= emax:
        print(tmin)
    else:
        print(-1)
else:
    if emin <= tmax:
        print(emin)
    else:
        print(-1)

a,b = map(int,input().split())
if a/0.08 == a//0.08:
    emin = a//0.08
else:
    emin = a//0.08+1
if (a+1)/0.08 == (a+1)//0.08:
    emax = (a+1)//0.08-1
else:
    emax = (a+1)//0.08
tmin = b/0.1
tmax = (b+1)/0.1-1
if tmax >= emax:
    if tmin <= emax:
        print(int(tmin))
    else:
        print(-1)
else:
    if emin <= tmax:
        print(int(emin))
    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())

a = A//0.08
b = B//0.1
a2 = (A+1)//0.08
b2 = (B+1)//0.1
ans = max(a,b)
if a > b:
    if a > b2:
        ans = -1
else:
    if b > a2:
        ans = -1
print(int(ans))

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

a = math.ceil(A/0.08)
b = math.ceil(B/0.1)
a2 = math.ceil((A+1)/0.08)
b2 = math.ceil((B+1)/0.1)
ans = max(a,b)
if a > b:
    if a >= b2:
        ans = -1
else:
    if b >= a2:
        ans = -1
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(1, 101):
    if int(i*1.08) == A and int(i*1.1) == B:
        print(i)
        break
else:
    print(-1)

A, B = map(int, input().split())
for i in range(1, 10001):
    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())
a_interval = [a/0.08,(a+1)/0.08]
b_interval = [b/0.1,(b+1)/0.1]
a_interval = [x for x in range(int(a_interval[0]),int(a_interval[1])+1) if (x < a_interval[1])&(x > a_interval[0])]
b_interval = [x for x in range(int(b_interval[0]),int(b_interval[1])+1) if (x < b_interval[1])&(x > b_interval[0])]
tmp = set(a_interval) & set(b_interval)
if tmp == set():
    print(-1)
else:
    print(min(tmp))

a,b = map(int,input().split())
a_interval = list(map(int,[a/0.08,(a+1)/0.08]))
b_interval = list(map(int,[b/0.1,(b+1)/0.1]))
a_interval = [x for x in range(a_interval[0],a_interval[1]+1)]
b_interval = [x for x in range(b_inaterval[0],b_interval[1]+1)]
tmp = set(a_interval) & set(b_interval)
if tmp == set():
    print(-1)
else:
    print(min(tmp))

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

import math 
a = [x for x in range(math.ceil(A*12.5),math.ceil((A+1)*12.5))]
b = [x for x in range(math.ceil(B*10),math.ceil((B+1)*10))]

c = set(a) & set(b)

if c != set():
  print(min(c))
else:
  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 = list(map(float, input().split()))

c = float((b/0.1)//1)


while True:
    if (c*0.0800)//1 == a:
        print(c)
        exit()
    elif (c*0.080)//1 > a or (c*0.1)//1 != b:
        print('-1')
        exit()
    else:
        c += 1.0


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

for i in range(1, 100000):
    if (i*0.08)//1 == a and (i*0.1)//1 == b:
        print(i)
        exit()

print(-1)



"""
while True:
    if (c*0.080)//1 == a:
        print(int(c))
        exit()
    elif (c*0.080)//1 >= a or (c*0.1)//1 != b:
        print(-1)
        exit()
    else:
        c += 1.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())

for i in range(25, 32):
  print(25 * 0.08)

ans = -1
for i in range(int(B / 0.1), int(A / 0.08) + 5):
  if int(i * 0.08) == A and int(i * 0.1) == B:
    ans = i
    break
print(ans)

A, B = map(int, input().split())
#print((A + 1) / 0.08)
ans = -1
for i in range(int(B / 0.1), int((A + 1) / 0.08)):
  if int(i * 0.08) == A and int(i * 0.1) == B:
    ans = i
    break
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):
s = input().split()
A = int(s[0])
B = int(s[1])

A_price_low = A / 0.08
B_price_low = B / 0.1
A_price_high = (A+1) / 0.08
B_price_high = (B+1) / 0.1

if B_price_low <= A_price_low < B_price_high:
    if A_price_low % 2 == 0:
        print(int(A_price_low))
    else:
        print(int(A_price_low) + 1)
else:
    print(-1)


s = input().split()
A = int(s[0])
B = int(s[1])

A_price_low = A / 0.08
B_price_low = B / 0.1
A_price_high = (A+1) / 0.08
B_price_high = (B+1) / 0.1

if B_price_low <= A_price_low < B_price_high:
    if A % 2 == 0:
        print(int(A_price_low))
    else:
        print(int(A_price_low) + 1)
elif A_price_low <= B_price_low < A_price_high:
    print(int(B_price_low))
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())

x = -1

xa = 0
xb = 0

a_arr = []
b_arr = []

for temp_a in range(10001):
    xa = temp_a * 0.08
    if xa // 1 == a:
        a_arr.append(temp_a)

for temp_b in range(10001):
    xb = temp_b * 0.1
    if xb // 1 == b:
        b_arr.append(temp_b)



print(a_arr)
print(b_arr)

for aa in a_arr:
    if aa in b_arr:
        print(aa)
        exit(0)

print('-1')


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

x = -1

xa = 0
xb = 0

a_arr = []
b_arr = []

for temp_a in range(10001):
    xa = temp_a * 0.08
    if xa // 1 == a:
        a_arr.append(temp_a)

for temp_b in range(10001):
    xb = temp_b * 0.1
    if xb // 1 == b:
        b_arr.append(temp_b)



print(a_arr)
print(b_arr)

for aa in a_arr:
    if aa in b_arr:
        print(aa)
        exit(0)

print('-1')

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

x = -1

xa = 0
xb = 0

a_arr = []
b_arr = []

for temp_a in range(10001):
    xa = temp_a * 0.08
    if xa // 1 == a:
        a_arr.append(temp_a)

for temp_b in range(10001):
    xb = temp_b * 0.1
    if xb // 1 == b:
        b_arr.append(temp_b)




for aa in a_arr:
    if aa in b_arr:
        print(aa)
        exit(0)

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):
num = {}

num = input().split()

print(num)

answer1 = int(int(num[0]) / 0.08)
answer2 = int(int(num[1]) / 0.1)

kensyo1 = int(answer1 * 0.1) == int(num[1])
kensyo2 = int(answer2 * 0.08) == int(num[0])

print(kensyo1, kensyo2)

if kensyo1:
  print(int(int(num[0]) / 0.08))
elif kensyo2:
  print(int(int(num[1]) / 0.1))
else:
  print(-1)

import math

num = {}

num = input().split()

# print(num)

answer1 = math.ceil(int(num[0]) / 0.08)
answer2 = math.ceil(int(num[1]) / 0.1)

kensyo1 = math.floor(answer1 * 0.1) == int(num[1])
kensyo2 = math.floor(answer2 * 0.08) == int(num[0])

# print(answer1, answer2)


if int(num[0]) < 0 or int(num[1]) < 0:
  print(-1)
elif kensyo1:
  print(answer1)
elif kensyo2:
  print(answer2)
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 = input().split();
a = int(a);
b = int(b);

for x in range(1,101):
  tax_8 = int(x * 0.08);
  tax_10= int(x * 0.1);
  if tax_8 == a and tax_10 == b:
  	ans = x;
    break;
  elif x == 101:
    ans = -1;
  else:
    pass;
  
print(ans);
  

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

for x in range(1,1001):
  tax_8 = int(x * 0.08);
  tax_10= int(x * 0.1);
  if tax_8 == a and tax_10 == b:
    ans = x;
    break;
  elif x == 100:
    ans = -1;
  else:
    pass;
  
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 = (int(x) for x in input().split())
minA = math.ceil(A/0.08)
minB = math.ceil(B/0.1)
if minA >= minB:
  if minB*0.08 >= A:
    print(minA)
  else:
    print(-1)
else:
  if minA*0.1>= B:
    print(minB)
  else:
    print(-1)
  

import math
A,B = (int(x) for x in input().split())
minA = math.ceil(A/0.08)
minB = math.ceil(B/0.1)
if minA > minB:
  if math.floor(minA*0.08) == A and math.floor(minA*0.1) == B:
    print(minA)
  else:
    print(-1)
else:
  if math.floor(minB*0.08) == A and math.floor(minB*0.1) == B:
    print(minB)
  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())
i = 0
ans = 0
while i<=1000:
    i += 1
    if i*0.08>=a and i*0.1>=b:
        ans=i
        break
    else:
        ans=-1
        break
print(ans)

import math
a,b = map(int,input().split())
i = 0
ans = []
while i<=1000:
    i += 1
    if math.floor(i*0.08)==a and math.floor(i*0.1)==b:
        ans.append(i)
    if ans == []:
        ans.append(-1)

#print(ans)
if len(ans)==1:
    print(-1)
else:
    ans.remove(-1)
    print(min(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())

amin = a//0.08
amax = (a+1)//0.08
bmin = b//0.1
bmax = (b+1)//0.1

if a%0.08 > 0:
	amin += 1
if (a+1)%0.08:
	amax -= 1
if b%0.1 > 0:
	bmin += 1
if (b+1)%0.1 > 0:
	bmax -= 1

if amin <= bmin:
	if bmin <= amax:
		print(bmin)
	else:
		print('-1')
else:
	if amin <= bmax:
		print(amin)
	else:
		print('-1')


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 a%0.08 > 0:
	amin += 1
if (a+1)%0.08:
	amax -= 1
if b%0.1 > 0:
	bmin += 1
if (b+1)%0.1 > 0:
	bmax -= 1

if amin <= bmin:
	if bmin <= amax:
		print(bmin)
	else:
		print(-1)
else:
	if amin <= bmax:
		print(amin)
	else:
		print(-1)


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

amin = int(a//0.08)
amax = int((a+1)//0.08)
bmin = int(b//0.1)
bmax = int((b+1)//0.1)

if a%0.08 > 0:
	amin += 1
if (a+1)%0.08 > 0:
	amax -= 1
if b%0.1 > 0:
	bmin += 1
if (b+1)%0.1 > 0:
	bmax -= 1

if amin <= bmin:
	if bmin <= amax:
		print(bmin)
	else:
		print('-1')
else:
	if amin <= bmax:
		print(amin)
	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 = list(map(int, input().split()))
 
rangeA = [A / 0.08, (A + 1) / 0.08]
rangeB = [B / 0.1, (B + 1) / 0.1]
 
if rangeA[0] < rangeB[0]:
  if math.ceil(rangeB[0]) < rangeA[1]:
    print(math.ceil(rangeB[0]))
    exit(0)
elif rangeA[0] > rangeB[0]:
  if math.ceil(rangeA[0]) < rangeB[1]:
    print(math.ceil(rangeA[0]))
    exit(0)
else:  # rangeA[0] == rangeB[0]
  if math.ceil(rangeA[0]) < rangeB[1] and math.ceil(rangeA[0]) < rangeA[1]: 
    print(math.ceil(rangeA[0]))
  	exit(0)
print(-1)

import math
 
A, B = list(map(int, input().split()))
 
rangeA = [A / 0.08, (A + 1) / 0.08]
rangeB = [B / 0.1, (B + 1) / 0.1]
 
if rangeA[0] < rangeB[0]:
  if math.ceil(rangeB[0]) < rangeA[1]:
    print(math.ceil(rangeB[0]))
    exit(0)
elif rangeA[0] > rangeB[0]:
  if math.ceil(rangeA[0]) < rangeB[1]:
    print(math.ceil(rangeA[0]))
    exit(0)
else:  # rangeA[0] == rangeB[0]
  if math.ceil(rangeA[0]) < rangeB[1] and math.ceil(rangeA[0]) < rangeA[1]: 
    print(math.ceil(rangeA[0]))
    exit(0)
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())
big = math.floor(max(A, B) / 0.08)
sma = math.floor(min(A, B) / 0.1)
num_list = [int(i) for i in range(sma, big + 1)]

for i in num_list:
    if i * 0.08 == A and i * 0.1 == B:
        print(i)
        break
else:
    print(-1)

import math

A, B = map(int, input().split())
big = math.floor(max(A, B) / 0.08)
sma = math.floor(min(A, B) / 0.1)
num_list = [int(i) for i in range(sma - 1, big + 2)]

for i in num_list:
    if math.floor(i * 0.08) == A and math.floor(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())
a = int(A // 0.08)
ans_lst = []
for i in range(20):
    print(a, int(a * 0.08) == A)
    if int(a * 0.08) == A:
        ans_lst.append(a)
    a += 1
for i in ans_lst:
    if int(i * 0.1) == B:
        print(i)
        break
else:
    print(-1)

A, B = map(int, input().split())
a = int(A // 0.08)
ans_lst = []
for i in range(20):
    # print(a, int(a * 0.08) == A)
    if int(a * 0.08) == A:
        ans_lst.append(a)
    a += 1
for i in ans_lst:
    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())

ans = -1

for i in range(1011):
    _a = i * 0.08
    _b = i * 0.1
    if _a == a and _b == b:
        ans = i
        break
print(ans)

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

ans = -1

for i in range(1011):
    _a = int(i * 0.08)
    _b = int(i * 0.1)
    if _a == a and _b == b:
        ans = i
        break
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):
import sys 
import math
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
A, B = map(int, readline().split())
A1 = math.ceil(A / 0.08)
B1 = math.ceil(B / 0.1)
A2 = int((A+1) / 0.08)
B2 = int((B+1) / 0.1)
print(A1,A2)
a = min(A1,B1)
b = max(A2,B2)
for i in range(a,b+1):
    if A1 <= i <= A2 and B1 <= i <= B2:
        print(i)
        sys.exit()
print(-1)
        
    

import sys 
import math
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
A, B = map(int, readline().split())
A1 = math.ceil(A * 12.5)
B1 = B * 10
A2 = math.ceil((A+1) * 12.5)
B2 = (B+1) * 10 
a = min(A1,B1)
b = max(A2,B2)
for i in range(a,b+1):
    if A1 <= i < A2 and B1 <= i < B2:
        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):
A, B = [int(i) for i in input().split()]

ans = []

true_A_max = A + 0.999
true_B_max = B + 0.999

X_A = math.floor(A / 0.08)
X_max_A = math.ceil(true_A_max /0.08)
X_B = math.floor(B / 0.1)
X_max_B = math.ceil(true_B_max /0.08)

if X_max_A - X_A >= X_max_B - X_B:
    X_min = X_B
    X_max = X_max_B

else:
    X_min = X_A
    X_max = X_max_A

for X in range(X_min, X_max):
    cal_A = math.floor(X * 0.08)
    cal_B = math.floor(X * 0.1)
    
    if cal_A == A and cal_B == B:
        ans.append(X)
            
if len(ans) > 0:
    print(min(ans))
else:
    print(-1)

import math

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

ans = []

true_A_max = A + 0.999
true_B_max = B + 0.999

X_A = math.floor(A / 0.08)
X_max_A = math.ceil(true_A_max /0.08)
X_B = math.floor(B / 0.1)
X_max_B = math.ceil(true_B_max /0.08)

if X_max_A - X_A >= X_max_B - X_B:
    X_min = X_B
    X_max = X_max_B

else:
    X_min = X_A
    X_max = X_max_A

for X in range(X_min, X_max):
    cal_A = math.floor(X * 0.08)
    cal_B = math.floor(X * 0.1)
    
    if cal_A == A and cal_B == B:
        ans.append(X)
            
if len(ans) > 0:
    print(min(ans))
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 sys
import math
import numpy as np
import itertools


a, b = (int(i) for i in input().split())

p = []
answer=-1
for i in range(1,101):
    if int(i*0.08) == a:
        p.append(i)

for i in p:
    if int(i*0.1) == b:
        answer = i
        break

#print(answer)
print("-1")



#
import sys
import math
import numpy as np
import itertools


a, b = (int(i) for i in input().split())

p = []
answer=-1
for i in range(1,1001):
    if int(i*0.08) == a:
        p.append(i)

for i in p:
    if int(i*0.1) == b:
        answer = i
        break

print(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 math
N = list(map(int, input().split()))
X = [i for i in range(math.ceil((N[0]-1)*(1/0.08)), int((N[0])*(1/0.08))+1)]
Y = [i for i in range(math.ceil((N[1]-1)*(1/0.10)), int((N[1])*(1/0.10))+1)]




cand = set(X) & set(Y)
if len(cand) == 0:
  print(-1)
else:
  print(min(cand))


import math
N = list(map(int, input().split()))
X = [i for i in range(int(N[0]*(1/0.08)), math.ceil((N[0]+1)*(1/0.08))+1)]
Y = [i for i in range(int(N[1]*(1/0.10)), math.ceil((N[1]+1)*(1/0.10))+1)]
print(X, Y)
cand = set(X) & set(Y)
if len(cand) == 0:
  print(-1)
else:
  print(min(cand))


import math
N = list(map(int, input().split()))
X = [i for i in range(int(N[0]*(1/0.08)), math.ceil((N[0])*(1/0.08)))]
Y = [i for i in range(int(N[1]*(1/0.10)), math.ceil((N[1])*(1/0.10)))]

cand = set(X) & set(Y)
if len(cand) == 0:
  print(-1)
else:
  print(min(cand))


import math
N = list(map(int, input().split()))
X = [i for i in range(int(N[0]*(1/0.08)), math.ceil((N[0])*(1/0.08))+1)]
Y = [i for i in range(int(N[1]*(1/0.10)), math.ceil((N[1])*(1/0.10))+1)]

cand = set(X) & set(Y)
if len(cand) == 0:
  print(-1)
else:
  print(min(cand))


import math
N = list(map(int, input().split()))
X = [i for i in range(int(N[0]*(1/0.08)), math.ceil((N[0]+1)*(1/0.08)))]
Y = [i for i in range(int(N[1]*(1/0.10)), math.ceil((N[1]+1)*(1/0.10)))]
print(X, Y)
cand = set(X) & set(Y)
if len(cand) == 0:
  print(-1)
else:
  print(min(cand))


N = list(map(int, input().split()))
X = [i for i in range(int(N[0]*(1/0.08)), int(N[0]*(1/0.07)))]
Y = [i for i in range(int(N[1]*(1/0.10)), int(N[1]*(1/0.09)))]
cand = set(X) & set(Y)
if len(cand) == 0:
  print(-1)
else:
  print(min(cand))

import math
N = list(map(int, input().split()))
X = [i for i in range(math.ceil((N[0])*(1/0.08)), math.ceil((N[0]+1)*(1/0.08)))]
Y = [i for i in range(math.ceil((N[1])*(1/0.10)), math.ceil((N[1]+1)*(1/0.10)))]


#  print(math.floor(i*0.08))

cand = set(X) & set(Y)
if len(cand) == 0:
  print(-1)
else:
  print(min(cand))


Verdicts: 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):
import sys

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

val_1 = A / 0.08
val_2 = B / 0.10

i = 1

if int(val_1) == int(val_2):
    print(int(val_1))
    sys.exit()

else:
    while val_1 != val_2:
	val_2 = (B + 0.1*i)/0.1
	i += 1
	if val_1 < val_2:
            print(-1)
            sys.exit()

print(int(val_1))

import sys

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

val_1 = A / 0.08
val_2 = B / 0.10

i = 1

if int(val_1) == int(val_2):
    print(int(val_1))
    sys.exit()
else:
    if val_1 > val_2:
        while val_1 != val_2:
            val_2 = (B + 0.1*i)/0.1
            i += 1
            if val_1 < val_2:
				print(-1)
				sys.exit()
		print(int(val_1))
	elif val_1 < val_2:
        while val_1 != val_2:
            val_1 = (A + 0.1*i)/0.1
            i += 1
            if val_1 > val_2:
                print(-1)
                sys.exit()
        print(int(val_1))

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

ans = -1

for i in range(10000,-1,-1):
    tax1 = int(i * 0.08)
    tax2 = int(i * 0.10)
    if tax1 == A and tax2 == B:
        ans = i

print(ans)


Verdicts: 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):
#O(1)
from math import ceil
a,b = map(int, input().split( ))
if int(min(a/0.08,b/0.1))<ceil(max(a/0.08,b/0.1)):
    print(-1)
    exit()
print(ceil(max(a/0.08,b/0.1)))




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

mn = int(a/(0.1))-5
mx = int(b/0.08)+3

for i in range(mn,mx):
    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,b = map(int, input().split())
x = int(a / 0.08)
y = int(b / 0.1)

if x > 0 and y > 0 and x == y:
  print(x)
else:
  print(-1)

a,b = map(int, input().split())
x = int(a / 0.08)
y = int(b / 0.1)

if x > 0 and y > 0 and x == y:
  print(x)
elif x > 0 and y > 0 and x != y:
  print(min(x,y))
else:
  print(-1)

a,b=map(int,input().split())
for i in range(1009):
  if int(i*0.08)==a and int(i*0.1)==b:
    print(i)
    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())
for i in range(1, 10000):
  if int(0.08 * i) == A and int(0.01 * i) == B:
    print(i)
    quit()
print('-1')

A, B = map(int, input().split())
for i in range(1, 10000):
  if int(0.08 * i) == A and int(0.1 * i) == B:
    print(i)
    quit()
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 = [int(c) for c in input()]

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

if (A > B):
  if (floor(B * 0.08) == a):
    print(B);
elif (B > A):
  if (floor(A*0.1) == b):
    print(A);
print(-1);



from math import ceil, floor

a, b = [int(c) for c in input()]
A = ceil(a / 0.08)
B = ceil(b/ 0.1)
 
if (A < B):
  if (floor(B * 0.08) == a):
    print(B)
  else:
    print(-1)
elif (B < A):
  if (floor(A*0.1) == b):
    print(A)
  else:
    print(-1)
else:
	print(-1);


from math import ceil, floor

a, b = [int(c) for c in input()]
A = ceil(a / 0.08)
B = ceil(b/ 0.1)
 
if (A < B):
  if (floor(B * 0.08) == a):
    print(B)
  else:
    print(-1)
elif (B < A):
  if (floor(A*0.1) == b):
    print(A)
  else:
    print(-1)
else:
  print(-1);


from math import ceil, floor
 
a, b = [int(c) for c in input().split(" ")]
A = ceil(a / 0.08)
B = ceil(b/ 0.1)
 
if (A < B):
  if (floor(B * 0.08) == a):
    print(B)
  else:
    print(-1)
elif (B < A):
  if (floor(A*0.1) == b):
    print(A)
  else:
    print(-1)
else:
  print(A);

Verdicts: 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):
A,B=map(int,input().split())
for i in range(1,10010):
	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,10010):
	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, B = map(int, input().split())

ans1 = int(A *100// 8) 
ans2 = int(B *100 // 10)

if ans1 = ans2:
    print(ans1)

elif ans1 > ans2:
    ans2_2 = int((B+1) *100 // 10)
    list = [int(ans2)]

    for i in range(ans2+1,ans2_2):
        list.append(int(i)) 
    
    if int(ans1) in list:
        print(ans1)
    else:
        print(-1)
elif ans1 < ans2:
    ans1_2 = int((A+1) *100 // 8)
    list = [int(ans1)]

    for i in range(ans1+1,ans1_2):
        list.append(int(i)) 
    
    if int(ans2) in list:
        print(ans2)
    else:
        print(-1)

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

ans1 = int(A *100// 8) 
ans2 = int(B *100 // 10)

if ans1 = ans2:
    print(ans1)

elif ans1 > ans2:
    ans2_2 = int((B+1) *100 // 10)
    list = [int(ans2)]

    for i in range(ans2+1,ans2_2):
        list.append(int(i)) 
    
    if int(ans1) in list:
        print(ans1)
    else:
        print(-1)
elif: ans1 < ans2:
    ans1_2 = int((A+1) *100 // 8)
    list = [int(ans1)]

    for i in range(ans1+1,ans1_2):
        list.append(int(i)) 
    
    if int(ans2) in list:
        print(ans2)
    else:
        print(-1)

A, B = map(int, input().split())
ans1 = int(A *100// 8) 
ans2 = int(B *100 // 10)
ans1_2 = int((A+1) *100 // 8)
ans2_2 = int((B+1) *100 // 10)
list1 = []
list2 = []

for i in range(ans1,ans1_2):
    if int(i * 0.08) == A: 
        list1.append(int(i))
for j in range(ans2,ans2_2):
    if int(j * 0.1) == B:
        list2.append(int(j))
if list1[0] == list2[0]:
    print(list1[0])
elif list1[0] > list2[0]:
    if list1[0] in list2:
        print(list1[0])
    else:
        print(-1)
elif list1[0] < list2[0]:
    if list2[0] in list1:
        print(list2[0])
    else:
        print(-1)
        

Verdicts: 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):
A,B=map(int,input().split())

for i in range(1009):
    answer_A=i*0.08
    answer_B=i*0.1
    if answer_A==A and answer_B==B:
        answer=i
        break
    else:
        answer=-1

print(answer)

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

for i in range(1009):
    answer_A=int(i*0.08)
    answer_B=int(i*0.1)
    if answer_A==A and answer_B==B:
        answer=i
        break
    else:
        answer=-1

print(answer)

Verdicts: Wrong Answer

Accepted