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(10000):
  if i * 0.08 == a and i * 0.1 == b:
    print(i)
    exit(0)
    
print('-1')
    


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

for i in range(10000):
  if i == a * 0.08 and i ==  b * 0.1:
    print(i)
    exit(0)
  else:
    print('-1')
    exit(0)
    


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

for i in range(1000):
    if i * 0.08 == a and i * 0.1 == b:
        print(i)
        exit(0)
    else :
        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(0)
  else:
    print('-1')
    exit(0)
    


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

for i in range(10000):
  if i * 0.08 == a and i * 0.1 == b:
    print(i)
    exit(0)
else:
    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(0)
else:
    print(-1)
    
    


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

for i in range(10000):
  if a * 0.08 == b * 0.1:
    print(a)
  else:
    print('-1')
    

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

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

else :
        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(0)
else:
  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(0)
    
print(-1)
    
    


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

for i in range(1001):
    if int(i * 0.08) == a and int(i * 0.1) == b:
        print(i)
        break

else:print(-1)


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

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):
import math
A, B = map(int, input().split())
tmpa = math.floor(A / 0.08)
tmpb = math.floor(B / 0.1)
alst = []
blst = []

indexa = 0
while True:
    tmp = math.floor((tmpa + indexa) * 0.08)
    if tmp == A:
        alst.append(tmpa + indexa)
        indexa += 1
    elif tmp > A:
        break
    else:
        indexa += 1

indexb = 1
while True:
    tmp = math.floor((tmpb + indexb) * 0.1)
    if tmp == B:
        blst.append(tmpb + indexb)
        indexb += 1
    elif tmp == B:
        break
    else:
        indexb += 1
ans = -1
alst.sort()
blst.sort()
for i in alst:
    if blst.count(i) >= 1:
        ans = i
        break

print(ans)

import math
A, B = map(int, input().split())
tmpa = math.floor(A / 0.08)
tmpb = math.floor(B / 0.1)
alst = []
blst = []

indexa = 0
while True:
    tmp = math.floor((tmpa + indexa) * 0.08)
    if tmp == A:
        alst.append(tmpa + indexa)
        indexa += 1
    elif tmp > A:
        break
    else:
        indexa += 1

indexb = 0
while True:
    tmp = math.floor((tmpb + indexb) * 0.1)
    if tmp == B:
        blst.append(tmpb + indexb)
        indexb += 1
    elif tmp > B:
        break
    else:
        indexb += 1
ans = -1
alst.sort()
blst.sort()
for i in alst:
    if blst.count(i) >= 1:
        ans = i
        break

print(ans)

Verdicts: Time Limit Exceeded

Accepted
Problem: Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.)  Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded down to the nearest integer.  If multiple prices satisfy the condition, print the lowest such price; if no price satisfies the condition, print `-1`.

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

Amin = A/0.08
if Amin != int(Amin):
  Amin = int(Amin)+1
else Amin = int(Amin)

Bmin = B/0.1
if Bmin != int(Bmin):
  Bmin = int(Bmin)+1
else Bmin = int(Bmin)

rangea = set(range(Amin,int((A+1)/0.08),1))
rangeb = set(range(Bmin,int((B+1)/0.10),1))

intersection = rangea & rangeb

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

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

Amin = A/0.08
if Amin != int(Amin):
  Amin = int(Amin)+1

Bmin = B/0.1
if Bmin != int(Bmin):
  Bmin = int(Bmin)+1

rangea = set(range(Amin,int((A+1)/0.08),1))
rangeb = set(range(Bmin,int((B+1)/0.10),1))

intersection = rangea & rangeb

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

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

Amin = A/0.08
if Amin != int(Amin):
  Amin = int(Amin)+1
else:
  Amin = int(Amin)

Bmin = B/0.1
if Bmin != int(Bmin):
  Bmin = int(Bmin)+1
else:
  Bmin = int(Bmin)

rangea = set(range(Amin,int((A+1)/0.08),1))
rangeb = set(range(Bmin,int((B+1)/0.10),1))

intersection = rangea & rangeb

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

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

A, B = map(int, input().split())
pre = A / (0.08)
fir = math.floor(pre) - 1
sec = math.floor(pre)
tir = math.floor(pre) + 1

list = [fir, sec, tir]
val = 0

for k, x in enumerate(list):
    f, i = math.modf(x * 0.08)
    if (i == A):
        F, I = math.modf(x * 0.1)
        if (I == B):
            val += 1
            break

if (val == 0):
    print(-1)

import math

A, B = map(int, input().split())
min = B * 10
max = B * 10 + 9
flag = False
for i in range(min, max + 1):
    temp = math.floor(i * 0.08)
    if (temp == A):
        flag = True
        ans = i
        break
if flag:
    print(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):
a, b = map(int, input().split())

for i in range(1001):
    if int(i*0.08) == a and int(i*0.1) == b:
        num = i
        break

    elif i*0.08 < i*0.1:
        num =-1
        break

print(num)


a, b = map(int, input().split())
num = -1

if a <= b:
    for i in range(1000000):
        if int(i*0.08) == a and int(i*0.1) == b:
            num = i
            break

        elif int(i*0.08) > a or int(i*0.1) > b:
            break

print(num)

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())
ansA = A / 0.08
ansB = B / 0.1
ans = 0



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

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

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


A, B = map(int, input().split())
Nmax = int(100//0.08)
ans = -1
for N in range(1, Nmax + 1):
    ja = int(N * 0.08)
    jb = int(N * 0.1)
    if ja == A and jb == B:
        ans = N
        break
    else:
        pass
print(ans)



Verdicts: Wrong Answer

Accepted
Problem: Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.)  Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded down to the nearest integer.  If multiple prices satisfy the condition, print the lowest such price; if no price satisfies the condition, print `-1`.

Submission attempts (in order):
A,B = map(int,input().split())
mina= 100
minb=100
a = set()
b = set()
C = A/0.08
D= B/0.08
E = (A+1)/0.08
F= (B+1)/0.08
if C.is_integer() ==False:
  C= C//0.08 +1

if D.is_integer() ==False:
  D= D//0.08

if E.is_integer() ==False:
  E= E//0.08 +1

if F.is_integer() ==False:
  F= F//0.08

for i in range(C,D):
  a.add(i)

for i in range(E,F):
  b.add(i)
c = a&b
d = list(c)
d.sort()
if d[0] == True:
  print(d[0])
else:
  print(-1)




A,B = map(int,input().split())
mina= 100
minb=100
a = set()
b = set()
C = A/0.08
D= B/0.1
E=(A+1)/0.08
F=(B+1)/0.1 
if C.is_integer() ==False:
  C= A//0.08 +1
if D.is_integer() ==False:
  D= B//0.1 +1

if E.is_integer() ==False:
  E= (A+1)//0.08 

if F.is_integer() ==False:
  F= (B+1)//0.1

C=int(C)
D=int(D)
E=int(E)
F=int(F)
for i in range(C,E):
  a.add(i)
for i in range(D,F):
  b.add(i)
c = a&b
d = list(c)
d.sort()
if len(d) ==0:
  print(-1)
else:
  print(d[0])




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,2000):
  if a // 1.08 == i and b // 1.1 == i:
    print(i)
    exit()
print(-1)

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

for i in range(1,2000):
    tax8 = math.floor(i*0.08)
    tax1 = math.floor(i*0.1)
    if a == tax8 and b == tax1:
        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 sys
A, B = map(int,input().split())
amin, amax = A / 0.08, (A + 1) / 0.08
bmin, bmax = B / 0.10, (B + 1) / 0.10

if amax <= bmin or bmax <= amin:
    print(-1)
    sys.exit()

ans = np.ceil(max(amin, bmin)).astype(int)

if ans >= amax or ans >= bmax:
    print(-1)
else:
    print(ans)

import sys
import numpy as np
A, B = map(int,input().split())
amin, amax = A / 0.08, (A + 1) / 0.08
bmin, bmax = B / 0.10, (B + 1) / 0.10

if amax <= bmin or bmax <= amin:
    print(-1)
    sys.exit()

ans = np.ceil(max(amin, bmin)).astype(int)

if ans >= amax or ans >= bmax:
    print(-1)
else:
    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):
# -*- coding: utf-8 -*-

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

a_koho = int(A/0.08)
b_koho = int(A/0.1)

print(a_koho,b_koho)

if a_koho == b_koho:
    
    exit()

start = min(a_koho,b_koho)
end = max(a_koho,b_koho)

for i in range(start,end+1):


    a = int(i*0.08)
    b = int(i*0.1)

    # print(a,b)

    if a == A and B == b:
        print(i)
        exit()

print("-1")



# -*- coding: utf-8 -*-

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

a_koho = int(A/0.08)
b_koho = int(A/0.1)



if a_koho == b_koho:
    
    exit()

start = min(a_koho,b_koho)
end = max(a_koho,b_koho)

for i in range(start-100,end+1+100):
    if i < 1:
        continue

    a = int(i*0.08)
    b = int(i*0.1)

    # print(a,b)

    if a == A and B == 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())

start_plice = math.ceil(A / 0.08) if math.ceil(A / 0.08) < math.ceil(B / 0.1) else math.ceil(B / 0.1)

while True:
  if math.floor(start_plice * 0.08) > A:
    print(-1)
    break
  
  if math.floor(start_plice * 0.1) >= B:
    print(start_plice)
    break
  
  start_plice += 1

import math

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

if math.ceil(A / 0.08) < math.ceil(B / 0.1):
  start_plice = math.ceil(A / 0.08)
  
  while True:
    if math.floor(start_plice * 0.08) > A:
      print(-1)
      break

    if math.floor(start_plice * 0.1) >= B:
      print(start_plice)
      break

    start_plice += 1
    
else:
  start_plice = math.ceil(B / 0.1)
  
  while True:
    if math.floor(start_plice * 0.1) > B:
      print(-1)
      break

    if math.floor(start_plice * 0.08) >= A:
      print(start_plice)
      break

    start_plice += 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())

a_1 = math.ceil(a/0.08)
a_2 = math.ceil((a+1)/0.08)
b_1 = b * 10
b_2 = (b+1) * 10

if a_1 >=b_2 or b_1 >= a_2:
    print(-1)
else:
    print(min(a_1,b_1))

import math

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

a_1 = math.ceil(a/0.08)
a_2 = math.ceil((a+1)/0.08)
b_1 = b * 10
b_2 = (b+1) * 10

if a_1 >=b_2 or b_1 >= a_2:
    print(-1)
else:
    print(max(a_1,b_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 = A//0.08
if(C*0.1 = B):
  print(C)
else:
  print(-1)

A, B = 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: 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_s=a/1.08
a_t=(a+1)/1.08
b_s=b/1.1
b_t=(b+1)/1.1

a0=int(a_s)
a1=int(a_t)
b0=int(b_s)
b1=int(b_t)


if (a_s-a0)>0:
  a0+=1
if (a_t-a1)<=0:
  a1-=1
if (b_s-b0)>0:
  b0+=1
if (b_t-b1)<=0:
  b1-=1

lista=[i for i in range(a0,a1+1)]
listb=[i for i in range(b0,b1+1)]

ansl=[]
for j in range(len(lista)):
  if lista[j] in listb:
    ansl.append(lista[j])

if not ansl==[]:
  ans=ansl[0]
  print(ans)
else:
  print(-1)

a,b=map(int,input().split())
a_s=a/0.08
a_t=(a+1)/0.08
b_s=b/0.1
b_t=(b+1)/0.1

a0=int(a_s)
a1=int(a_t)
b0=int(b_s)
b1=int(b_t)


if (a_s-a0)>0:
  a0+=1
if (a_t-a1)<=0:
  a1-=1
if (b_s-b0)>0:
  b0+=1
if (b_t-b1)<=0:
  b1-=1

lista=[i for i in range(a0,a1+1)]
listb=[i for i in range(b0,b1+1)]

ansl=[]
for j in range(len(lista)):
  if lista[j] in listb:
    ansl.append(lista[j])

if not ansl==[]:
  ans=ansl[0]
  print(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):
def main():
    args = input().rstrip().split(' ')
    A, B = int(args[0]), int(args[1])
    p_A = [int(A * 12.5)+1, int((A+1.) * 12.5)]
    p_B = [int(B * 10.)+1, int((B+1.) * 10.)]
    
    if(p_A[1] <= p_B[0] or p_B[1] <= p_A[0]):
        print('-1')
    else:
        print(int(max(p_A[0], p_B[0])))
    
if __name__ == "__main__":
    main()

def main():
    args = input().rstrip().split(' ')
    A, B = int(args[0]), int(args[1])
    p_A = [A * 12.5, (A+1.) * 12.5]
    p_B = [B * 10., (B+1.) * 10.]
    
    if(p_A[1] <= p_B[0] or p_B[1] <= p_A[0]):
        print('-1')
    elif(abs(p_A[1]-p_B[0]) < 1):
        print('-1')
    elif(abs(p_B[1]-p_A[0]) < 1):
        print('-1')    
    else:
        print(int(max(p_A[0], p_B[0]))+1)
    
if __name__ == "__main__":
    main()


def main():
    args = input().rstrip().split(' ')
    A, B = int(args[0]), int(args[1])
    p_A = [A * 12.5, (A+1.) * 12.5]
    p_B = [B * 10., (B+1.) * 10.]
    if(p_A[0].is_integer() == False):
        p_A[0] = int(p_A[0])+1
    else:
        p_A[0] = int(p_A[0])
    if(p_B[0].is_integer() == False):
        p_B[0] = int(p_B[0])+1
    else:
        p_B[0] = int(p_B[0])
    if(p_A[1].is_integer == False):
        p_A[1] = int(p_A[1])
    else:
        p_A[1] = int(p_A[1]) -1
    if(p_B[1].is_integer() == False):
        p_B[1] = int(p_B[0])
    else:
        p_B[1] = int(p_B[1]) -1
        
        
    if(p_A[1] <= p_B[0] or p_B[1] <= p_A[0]):
        print('-1')
    else:
        print(int(max(p_A[0], p_B[0])))
    
if __name__ == "__main__":
    main()

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=input().split()
A,B=int(a[0]),int(a[1])
p=math.floor(A/0.08)
p1=math.floor(B/0.10)
if(p==p1):
  while True:
    l=p-1
    if(l*0.08!=A or l*0.1!=B):
      break
    p=l
    
  print(p)
else:
  print(-1)

import math
a=input().split()
A,B=int(a[0]),int(a[1])
p=math.floor(A/0.08)
p1=math.floor(B/0.10)
if(p==p1):
  print(p)
else:
  print(-1)

import math
a=input().split()
A,B=int(a[0]),int(a[1])
flg=0
for i in range(1,1001):
    if(math.floor(i*0.08)==A and math.floor(i*0.10)==B):
        print(i)
        flg=1
        break
if(flg==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):
a,b=map(int,input().split())
list1 = []
list2 = []
if (a/0.08).is_integer():
    c1 = int(a/0.08)
else:
    c1=int(a/0.08)+1
if ((a+1)/0.08).is_integer():
    c2 = int((a+1)/0.08)
else:
    c2=int((a+1)/0.08)+1

for i in range(c1,c2):
    list1.append(i)

if (b/0.10).is_integer():
    c3 = int(b/0.10)
else:
    c3=int(b/0.10)+1
if ((b+1)/0.10).is_integer():
    c4 = int((b+1)/0.10)
else:
    c4=int((b+1)/0.10)+1
for i in range(c3,c4):
    list2.append(i)
print(c1)
print(c2)
print(c3)
print(c4)
print(list1)
print(list2)
l3 = set(list1) & set(list2)
l3 = list(l3)
if len(l3) > 0:
    print(min(l3))
else:
    print(-1)

a,b=map(int,input().split())
list1 = []
list2 = []
if (a/0.08).is_integer():
    c1 = int(a/0.08)
else:
    c1=int(a/0.08)+1
if ((a+1)/0.08).is_integer():
    c2 = int((a+1)/0.08)
else:
    c2=int((a+1)/0.08)+1

for i in range(c1,c2):
    list1.append(i)

if (b/0.10).is_integer():
    c3 = int(b/0.10)
else:
    c3=int(b/0.10)+1
if ((b+1)/0.10).is_integer():
    c4 = int((b+1)/0.10)
else:
    c4=int((b+1)/0.10)+1
for i in range(c3,c4):
    list2.append(i)

l3 = set(list1) & set(list2)
l3 = list(l3)
if len(l3) > 0:
    print(min(l3))
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):
import math
a,b = map(int, input().split())

for i in range(10000):
    ans1 = math.floor(i*0.08)
    ans2 = math.floor(i*0.1)
    if ans1 == ans2:
        print(ans1)
        exit()
print(-1)


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

for i in range(1010):
    s = math.floor(i*0.08)
    t = math.floor(i*0.10)
    if s == a and t == 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())
q = 0
for i in range(math.ceil(12.5*A),int(12.5*(A+1))):
    if 10*B <= i < 10*(B+1):
        q = i
        break
if q != 0:
    print(i)
else:
    print(-1)

A,B = map(int,input().split())
import math
q = 0
for i in range(math.ceil(12.5*A),int(12.5*(A+1))):
    if 10*B <= i < 10*(B+1):
        q = i
        break
if q != 0:
    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):
import sys
stdin = sys.stdin
sys.setrecursionlimit(10 ** 7)

def LI(): return list(map(int, stdin.readline().split()))
def LS(): return list(stdin.readline())

a,b = LI()
tax8 = int(100/8*a)
tax10 = int(100/10*b)
# print(tax8,tax10)
print(max(tax8,tax10) if tax8==tax10 else -1)

import sys
stdin = sys.stdin
sys.setrecursionlimit(10 ** 7)

def LI(): return list(map(int, stdin.readline().split()))
def LS(): return list(stdin.readline())

import math
a,b = LI()
tax8 = [i for i in range(math.ceil(100/8*a), int(100/8*(a+1)))]
tax10 = [i for i in range(math.ceil(100/10*b), int(100/10*(b+1)))]
print(tax8,tax10)
c = max(tax8[0], tax10[0])
if c in tax8 and c in tax10:
    print(c)
else:
    print(-1)

import sys
stdin = sys.stdin
sys.setrecursionlimit(10 ** 7)

def LI(): return list(map(int, stdin.readline().split()))
def LS(): return list(stdin.readline())

import math
a,b = LI()
tax8 = [i for i in range(math.ceil(100/8*a), int(100/8*(a+1)))]
tax10 = [i for i in range(math.ceil(100/10*b), int(100/10*(b+1)))]
# print(tax8,tax10)
c = max(tax8[0], tax10[0])
if c in tax8 and c in tax10:
    print(c)
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 = [int(i) for i in input().split()]

for n in range(1,101):
  print(n)
  if int(n*0.08) == A and int(n*0.1) == B:
    print(n)
    exit()
print("-1")

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

for n in range(1,1200):
  if int(n*0.08) == A and int(n*0.1) == B:
    print(n)
    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())
if a%2==0:
    aa=a*12.5
else:
    aa=a*12.5-0.5
bb=b*10

if bb<=aa and aa<bb+10:
    print(aa)
else:
    print(-1)

a,b=map(int,input().split())
if a%2==0:
    aa=a*12.5
else:
    aa=a*12.5+0.5
bb=b*10

if bb<=aa and aa<bb+10:
    print(aa)
else:
    print(-1)

a,b=map(int,input().split())
for i in range(10*b,15*b):
  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())
if (A/0.08)%1==0.0:
    a1=int(A/0.08)
else:
    a1=int(A/0.08)+1
if (A/0.08)%1!=0.0:
    a2=int((A+1)/0.08)
else:
    a2=int((A+1)/0.08)-1

if (B/0.1)%1==0.0:
    b1=int(B/0.1)
else:
    b1=int(B/0.08)+1
if (B/0.1)%1!=0.0:
    b2=int((B+1)/0.1)
else:
    b2=int((B+1)/0.1)-1

#a=[]
#b=[]
for i in range(a1,a2+1):
    s=i
    a.append(s)
for i in range(b1,b2+1):
    t=i
    b.append(t)
print(a)
print(b)
if max(a)<min(b):
    print(-1)
elif max(b)<min(a):
    print(-1)
elif min(a)>=min(b):
    print(min(a))
else:
    print(min(b))

A,B=map(int,input().split())
if (A/0.08)%1==0.0:
    a1=int(A/0.08)
else:
    a1=int(A/0.08)+1
if ((A+1)/0.08)%1!=0.0:
    a2=int((A+1)/0.08)
else:
    a2=int((A+1)/0.08)-1

if (B/0.1)%1==0.0:
    b1=int(B/0.1)
else:
    b1=int(B/0.08)+1
if ((B+1)/0.1)%1!=0.0:
    b2=int((B+1)/0.1)
else:
    b2=int((B+1)/0.1)-1

a=[]
b=[]
for i in range(a1,a2+1):
    s=i
    a.append(s)
for i in range(b1,b2+1):
    t=i
    b.append(t)
#print(a)
#print(b)
if max(a)<min(b):
    print(-1)
elif max(b)<min(a):
    print(-1)
elif min(a)>=min(b):
    print(min(a))
else:
    print(min(b))

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=0
for i in range(b*9+1,b*10+1):
  if (i*0.08)//1<=i*0.08 and i*0.08<(i*0.08)//1+1:
    print(i)
    x=i
    break
if x==0:
  print('-1')

a,b=map(int,input().split())
for i in range(b*9+1,b*10+1):
  if (i*0.08)//1<=i*0.08:
    print(i)
    break
print('-1')

a,b=map(int,input().split())
x=0
for i in range(1,1010):
  if (i*0.08)//1==a:
    if (i*0.1)//1==b:
      print(i)
      x=i
      break
if x==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):
a, b = map(float, input().split())
lowest = max([-(-a // 0.08), -(-b // 0.1)])
highest = min([-(-(a+1) // 0.08), -(-(b+1) // 0.1)])
comb = [-1, -1]
for target in range(int(lowest), int(highest+1)):
	cand = [(target*0.08)//1, (target*0.1)//1]
	if cand == [a, b]:
		comb = cand
		break
print('{:.0f} {:.0f}'.format(comb[0], comb[1]))

a, b = map(float, input().split())
lowest = max([-(-a // 0.08), -(-b // 0.1)])
highest = min([-(-(a+1) // 0.08), -(-(b+1) // 0.1)])
answer = -1
for target in range(int(lowest), int(highest+1)):
	cand = [(target*0.08)//1, (target*0.1)//1]
	if cand == [a, b]:
		answer = int(target)
		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

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

n = math.floor(a / 0.08)
m = math.floor(b / 0.1)
n2 = n + 1
m2 = m + 1

p = math.floor(n * 0.08)
q = math.floor(n * 0.1)
x = math.floor(m * 0.08)
y = math.floor(m * 0.1)
p2 = math.floor(n2 * 0.08)
q2 = math.floor(n2 * 0.1)
x2 = math.floor(m2 * 0.08)
y2 = math.floor(m2 * 0.1)

if p == a and q == b and x == a and y == b:
    print(min(n,m))
elif p == a and q == b:
    print(n)
elif x == a and y == b:
    print(m)
if p2 == a and q2 == b and x2 == a and y2 == b:
    print(min(n2,m2))
elif p2 == a and q2 == b:
    print(n2)
elif x2 == a and y2 == b:
    print(m2)
else:
    print(-1)

import math

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

A = A / 0.08
math.floor(A)
B = B / 0.1
math.floor(B)

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

from math import floor
from math import ceil
a,b = map(int,input().split())
n = floor(a / 0.08)
m = floor(b / 0.1)
n2 = ceil(a / 0.08)
m2 = ceil(b / 0.1)
p = floor(n * 0.08)
q = floor(n * 0.1)
p2 = floor(n2 * 0.08)
q2 = floor(n2 * 0.1)
x = floor(m * 0.08)
y = floor(m * 0.1)
x2 = floor(m2 * 0.08)
y2 = floor(m2 * 0.1)
if p == a and q == b and x == a and y == b:
    print(min(n,m))
elif p == a and q == b:
    print(n)
elif x == a and y == b:
    print(m)
elif p2 == a and q2 == b and x2 == a and y2 == b:
    print(min(n2,m2))
elif p2 == a and q2 == b:
    print(n2)
elif x2 == a and y2 == b:
    print(m2)
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(' '))

if a == b:

    ans = math.ceil(a*12.5)
    if ans*0.08 == a:
        if ans*0.1 == b:
            print(ans)
            exit()
    print('-1')
    exit()


ans = (b-a)*50

if ans*0.08 == a:
    if ans*0.1 == b:
        while(1):
            ans -= 1
            if ans * 0.1 != b:
                ans += 1
                break
        print(ans)
        exit()

print('-1')


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

ans = min(math.ceil(a*12.5), b*10)
if int(ans*0.1) != b:
    print('-1')
    exit()
if int(ans*0.08) != a:
    print('-1')
    exit()

print(ans)


#     if int(i*0.08) == a and int(i*0.1) == b:
#         print(i)
#         exit()

# print('-1')


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

ans = range(math.ceil(a*12.5), math.ceil((a+1)*12.5))
for i in ans:
    if 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())

print ((B-A)*50)

import math
A, B =map(int, input().split())
a, b = math.ceil(A/0.08), math.ceil(B/0.10)
ans = max(a,b)
print (ans if int(ans*0.08)==A and int(ans*0.10)== B else -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())
a1,a2 = int(A*12.5),int(A*12.5+12.5)
b1,b2 = int(B*10),int(B*10+10)

if (b2 < a1) or (a2 < b1):
    print(-1)
else:
    print(min(a1,b1))

A,B = map(int,input().split())
if A % 2 == 1:
    a1,a2 = int(A*12.5)+1, A*12.5+12.5
else:
    a1,a2 = int(A*12.5),int(A*12.5+12.5)
b1,b2 = B*10,B*10+10

if (b2 < a1) or (a2 < b1):
    print(-1)
else:
    print(min(a1,b1))


A,B = map(int,input().split())
if A % 2 == 1:
    a1,a2 = int(A*12.5)+1, A*12.5+12.5
else:
    a1,a2 = int(A*12.5),int(A*12.5+12.5)
b1,b2 = B*10,B*10+10

if (b2 <= a1) or (a2 <= b1):
    print(-1)
else:
    print(max(a1,b1))


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.)  Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded down to the nearest integer.  If multiple prices satisfy the condition, print the lowest such price; if no price satisfies the condition, print `-1`.

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

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

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):
b, c = map(int, input().split())
b_before_min = b / 0.08
b_before_max = (b+1) / 0.08
c_before_min = c / 0.1
c_before_max = (c+1) / 0.1

if(c_before_min <= b_before_min and b_before_min <= c_before_max):
    print(b_before_min)
elif(b_before_min <= c_before_min and c_before_min <= b_before_max):
    print(c_before_min)
else:
    print(-1)


import math
b, c = map(int, input().split())
b_before_min = math.ceil(b / 0.08)
b_before_max = (b+1) / 0.08
c_before_min = math.ceil(c / 0.1)
c_before_max = (c+1) / 0.1


if(c_before_min <= b_before_min and b_before_min < c_before_max):
    print(int(b_before_min))
elif(b_before_min <= c_before_min and c_before_min < b_before_max):
    print(int(c_before_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):
import math
def conv(a):
    for i in range(len(a)):
        a[i] = int(a[i])
    return a
def main(a,b):
    p_min = math.ceil((12.5)*a)
    q_min = math.ceil(10*b)
    p_maxi = math.ceil((12.5)*(a+1))-1
    q_maxi = q_min = math.ceil(10*(b+1))-1
    if p_min > q_maxi or q_min > p_maxi:
        return -1
    else:
        if p_min > q_min:
            return p_min+1
        else:
            return q_min+1
a,b = conv(input().split())
print(main(a-1,b-1))

import math
def main(a,b):
    p_min = math.ceil((12.5)*a)
    q_min = 10*b
    if p_min > q_min:
        ans = p_min
        if int(ans/10) == b:
            return ans
        return -1
    else:
        ans = q_min
        if int(ans/12.5) == a:
            return ans
        return -1

a,b = input().split()
print(main(int(a),int(b)))

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(1002):
    if i*0.08==a and i*0.1==b:
        print(i)
        exit()
print('-1')

a, b = map(int, input().split())
price = (a // 0.09)+1
while (price * 0.08) => a:
    if (price * 0.1) //1== b:
        print(int(price))
        exit()
    price += 1
print('-1')


a, b = map(int, input().split())
price = (a // 0.09) + 1
while (price * 0.08) <= a:
    if (price * 0.1) // 1 == b:
        print(int(price))
        exit()
    price += 1
print('-1')


a, b = map(int, input().split())
price = (a / 0.09) // 1
while price <= a / 0.08:
    # print(price)
    if (price * 0.1) // 1 == b:
        break
    price += 1
if price <= a / 0.08:
    print(int(price))
else:
    print('-1')


a, b = map(int, input().split())
price = (a / 0.08) // 1
while price < a / 0.09:
    print(price)
    if (price * 0.1) // 1 == b:
        break
    price += 1
if price<a/0.09:
    print(price)
else:
    print(-1)

a, b = map(int, input().split())
price = (a / 0.09) // 1
while price <= a / 0.08:
    # print(price)
    if (price * 0.1) // 1 == b:
        break
    price += 1
if price <= a / 0.08:
    print(int(price))
else:
    print(-1)


a, b = map(int, input().split())
price = (a // 0.08)
while (price * 0.09) > a:
    if (price * 0.1) //1== b:
        print(int(price))
        exit()
    price += 1
print('-1')


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

Verdicts: Wrong Answer

Runtime Error

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 math

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

volume_A = A / 0.08
volume_B = B / 0.1

min_A, max_A = volume_A, volume_A
range_A = 1 / 0.08
min_B, max_B = volume_B, volume_B
range_B = 1 / 0.1

for i in range(math.floor(volume_A - range_A), math.ceil(volume_A + range_A)):
    if math.floor(i * 0.08) == A:
        min_A = min(min_A, i)
        max_A = max(max_A, i)

for j in range(math.floor(volume_B - range_B), math.ceil(volume_B + range_B)):
    if math.floor(j * 0.1) == B:
        min_B = min(min_B, j)
        max_B = max(max_B, j)

ans_A = set()
for i in range(min_A, max_A + 1):
    ans_A.add(i)

ans_B = set()
for j in range(min_B, max_B + 1):
    ans_B.add(j)

ans = ans_A & ans_B

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


import math

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

volume_A = math.floor(A / 0.08)
volume_B = math.floor(B / 0.1)

min_A, max_A = math.inf, -math.inf
range_A = math.floor(1 / 0.08)
min_B, max_B = math.inf, -math.inf
range_B = math.floor(1 / 0.1)
# print(range_A)


for i in range(volume_A - range_A, volume_A + range_A):
    if math.floor(i * 0.08) == A:
        min_A = min(min_A, i)
        max_A = max(max_A, i)

for j in range(volume_B - range_B, volume_B + range_B):
    if math.floor(j * 0.1) == B:
        min_B = min(min_B, j)
        max_B = max(max_B, j)

ans_A = set()
for i in range(min_A, max_A + 1):
    ans_A.add(i)
# print(ans_A)

ans_B = set()
for j in range(min_B, max_B + 1):
    ans_B.add(j)


ans = ans_A & ans_B

if len(ans) == 0:
    print(-1)
else:
    print(min(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):
tax = [int(n) for n in input().split()]

max_8tax = (tax[0]+1) / .08
min_8tax = (tax[0]) / .08)
max_10tax = int((tax[1]+1) / .1) - 1
min_10tax = int((tax[1]) / .1)

r = -1

for i in range(min_10tax, max_10tax):
    if min_8tax <= i and i < max_8tax:
        r = i
        break

print(r)

tax = [int(n) for n in input().split()]

max_8tax = (tax[0]+1) / .08
min_8tax = tax[0] / .08
max_10tax = int((tax[1]+1) / .1) - 1
min_10tax = int(tax[1] / .1)

r = -1

for i in range(min_10tax, max_10tax):
    if min_8tax <= i and i < max_8tax:
        r = i
        break

print(r)

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

while 1:
  to += 100
  c = int(to * 0.08)
  d = int(to * 0.1)
  if c >= a and d >= b:
    
    while 1:
      to -= 1
      c = int(to * 0.08)
      d = int(to * 0.1)
      if c == a and d == b:
        print(to)
        exit()
      elif to % 100 == 0:
        print(-1)
        exit()

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

while 1:
  to += 100
  c = int(to * 0.08)
  d = int(to * 0.1)
  if c >= a and d >= b:
    to -= 100
    while 1:
      to += 1
      c = int(to * 0.08)
      d = int(to * 0.1)
      if c == a and d == b:
        print(to)
        exit()
      elif to % 100 == 0:
        print(-1)
        exit()

Verdicts: Wrong Answer

Accepted