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

Submission attempts (in order):
import numpy as np
import scipy.sparse as sps
import scipy.misc as spm
import collections as col
import functools as func
import itertools as ite
import fractions as frac
import math as ma
import cmath as cma
import copy as cp
import sys
def sinput(): return sys.stdin.readline().strip()
def iinput(): return int(sinput())
def imap(): return map(int, sinput().split())
def fmap(): return map(float, sinput().split())
def iarr(n=0):
    if n: return [0 for _ in range(n)]
    else: return list(imap())
def farr(): return list(fmap())
def sarr(n=0):
    if n: return ["" for _ in range(n)]
    else: return sinput().split()
def barr(n): return [False for _ in range(n)]
sys.setrecursionlimit(10**7)
MOD = 10**9 + 7; EPS = sys.float_info.epsilon
PI = np.pi; EXP = np.e; INF = np.inf

a,b = imap()
amin,amax = int(a*100/8)+1, int((a+1)*100/8)+1
bmin,bmax = b*10, (b+1)*10
ran = set(range(amin,amax)) & set(range(bmin,bmax))
ans = min(ran) if ran else -1
print(ans)


import numpy as np
import scipy.sparse as sps
import scipy.misc as spm
import collections as col
import functools as func
import itertools as ite
import fractions as frac
import math as ma
import cmath as cma
import copy as cp
import sys
def sinput(): return sys.stdin.readline().strip()
def iinput(): return int(sinput())
def imap(): return map(int, sinput().split())
def fmap(): return map(float, sinput().split())
def iarr(n=0):
    if n: return [0 for _ in range(n)]
    else: return list(imap())
def farr(): return list(fmap())
def sarr(n=0):
    if n: return ["" for _ in range(n)]
    else: return sinput().split()
def barr(n): return [False for _ in range(n)]
sys.setrecursionlimit(10**7)
MOD = 10**9 + 7; EPS = sys.float_info.epsilon
PI = np.pi; EXP = np.e; INF = np.inf

a,b = imap()
amin,mod = divmod(a*100, 8)
if mod: amin += 1
amax,mod = divmod((a+1)*100, 8)
if mod: amax += 1
bmin,bmax = b*10, (b+1)*10
ran = set(range(amin,amax)) & set(range(bmin,bmax))
ans = min(ran) if ran else -1
print(ans)


Verdicts: Wrong Answer

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

Submission attempts (in order):
a , b = map(int, input().split())
ar = a/.08
b_r = b/.1

if ar == b_r :
    print(ar)

else:
    if ar > b_r:
        if((ar-b_r)/10) < 1:
            print(ar)
        else:
            print(-1)
    else:
        if (( b_r - ar ) / 8) < 1:
            print(ar)
        else:
            print(-1)

A, B = map(int, input().split())
 
 
def f(A, B):
    for i in range(1, 1010):
        if i//10 == B and (i*2)//25 == A:
            print(i)
            return
    print(-1)
    return
 
 
f(A, 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())
n=0
for i in range(a * 100 // 10):
  if int(i * 0.08) == a and int(i * 0.1) == b:
    print(i)
    n+=1
    break
if n == 0:
  print(-1)

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

Verdicts: Wrong Answer

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

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

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

x = a / 0.08
y = b / 0.1
left = math.floor(min(x, y))
right = math.ceil(max(x, y))
print(x,y,left,right)
for i in range(left , right + 1):
    if int(i * 0.08) == a and int(i * 0.1) == b:
        print(i)
        exit()
print('-1')

import math
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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

x = a / 0.08
y = b / 0.1
left = math.floor(min(x, y))
right = math.ceil(max(x, y))
for i in range(left , right + 1):
    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())
for i in range(1009):
  if int (i*0.08)==a and int(i*0.1)==1:
    print(i)
    exit()
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)
    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(input())
ans = -1
for i in range(1010):
    if int(i*0.08) == A and int(i*0.1) == B:
        ans = i
        break

print(ans)

A,B = int(input())
ans = -1
for i in range(1010):
    if int(i*0.08) == A and int(i*0.1) == B:
        ans = i
        exit()

print(ans)

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: 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 p in range(10, 1010):
  if (8*p//100 == A) and (p//10 == B):
    print(p)
    break

print(-1)

# A: 8%, B: 10%
A, B = map(int, input().split())

# B < 100 -> maxP = 1000
for p in range(10, 1010):
  if 8*p//100 == A and 10*p//100 == B:
    print(p)
    break

print(-1)

import math

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

lst = []
for p in range(10, 1010):
  if (math.floor(0.08*p) == A) and (math.floor(0.10*p) == B):
    lst.append(p)

if lst:
  print(min(lst))
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,1010):
  if i*0.08==A and i*0.1==B:
    print(i)
    break
else:
  print(-1)
  

A,B=map(int,input().split())
for i in range(1,1010):
  if (i*100*0.08)//100==A and (i*100*0.1)//100==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 = list(map(int, input().split()))
for i in range(1,1010):
  if int(i*8/100)==A and if int(i/10)==B:
    print(i)
    break
else:
  print(-1)

import math
import bisect
import numpy as np

x_minA = math.ceil(100 / 8 * A)
x_minB =  10 * B
x_maxA = math.floor(100 / 8 * (A+1))
x_maxB = 10 * (B+1)
if x_minA > x_maxB or x_minB > x_maxA:
  print(-1)
else:x_min = max(x_minA, x_minB)
  x_max = min(x_maxA, x_maxB)
  tansaku = np.array(range(max(x_minA, x_minB), min(x_maxA, x_maxB)+1))
  insert_index_a = bisect.bisect_left(tansaku*8/100-A,1)
  insert_index_b = bisect.bisect_left(tansaku/10-B,1)
  print(int(tansaku[min(insert_index_a, insert_index_b)]))

import math

x_minA = math.ceil(100 / 8 * A)
x_minB =  10 * B
x_maxA = math.floor(100 / 8 * (A+1))
x_maxB = 10 * (B+1)
if x_minA > x_maxB or x_minB > x_maxA:
  print(-1)
else:
  x = max(x_minA, x_minB)
  while (x * 8 / 100 - A >= 1) or (x / 10 - B >= 1):
    print(x, x * 8 / 100, x / 10)
    x += 1
  print(x)

import math
 
A, B = list(map(int, input().split()))
x_minA = math.ceil(100 / 8 * A)
x_minB =  10 * B
x_maxA = math.floor(100 / 8 * (A+1))
x_maxB = 10 * (B+1)
if x_minA > x_maxB or x_minB > x_maxA:
  print(-1)
else:
  for x in range(max(x_minA, x_minB), min(x_maxA, x_maxB)+1):
    if int(x * 8 / 100) == A and int(x / 10)==B:
      print(x)
      break
  else:
    print(-1)

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

flg = 0
for i in range(1, math.ceil(max(a,b)//0.08)):
    aa = math.floor(i * 0.08)
    bb = math.floor(i * 0.1)
    if a == aa and b == bb:
        print(i)
        flg = 1
        exit()

if flg == 0:
    print(-1)


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

flg = 0
for i in range(1, math.ceil(max(a, b)/0.08)+1):
    aa = math.floor(i * 0.08)
    bb = math.floor(i * 0.1)
    if a == aa and b == bb:
        print(i)
        flg = 1
        exit()

if flg == 0:
    print(-1)


Verdicts: Wrong Answer

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

Submission attempts (in order):
a,b = map(int,input().split())
magic = 0
ans = -1

while a > magic * 0.08 and b > magic * 0.1:
    if magic * 0.08 == a and  magic * 0.1 == b:
        ans = magic * 0.08
        break
    magic +=  1
print(ans)


a,b = map(int,input().split)
magic = 0
ans = -1

while a > magic * 0.08 and b > magic * 0.1:
    if magic * 0.08 == a and  magic * 0.1 == b:
        ans = magic * 0.08
        break
    magic +=  1
print(ans)

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

while a >= (magic * 0.08) // 1 and b >= ( magic * 0.1) // 1:
    if a == (magic * 0.08) // 1 and b == ( magic * 0.1) // 1:
        ans = magic
        break
    magic += 1
print(ans)


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

a_min=math.ceil(A/0.08)
b_min=math.ceil(B/0.1)
a_list=[]
b_list=[]

for i in range(a_min,a_min+12):
  a_list.append(i)
for j in range(b_min,b_min+10):
  b_list.append(j)

print(a_list)
print(b_list)
  
ans=-1
for item in a_list:
  if item in b_list:
    ans=item
    break
  
print(ans)

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

a_min=math.ceil(A/0.08)
b_min=math.ceil(B/0.1)
a_list=[]
b_list=[]

for i in range(a_min,a_min+12):
  a_list.append(i)
for j in range(b_min,b_min+10):
  b_list.append(j)
  
ans=-1
for item in a_list:
  if item in b_list:
    ans=item
    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):
def tax(a, b):
    mina, maxa = a/0.08, (a+1)/0.08
    minb, maxb = b/0.1, (b+1)/0.1
    print(mina, maxa, minb, maxb)
    if(mina >= maxb or minb >= maxa): return -1

    return max(int(mina), int(minb))

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

import math

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

lA = math.ceil(A / 0.08)
uA = (A + 1) / 0.08
if uA.is_integer():
    uA = int(uA) - 1
else:
    uA = int(uA)

lB = math.ceil(B / 0.1)
uB = (B + 1) / 0.1
if uB.is_integer():
    uB = int(uB) - 1
else:
    uB = int(uB)

if uA < lB or uB < lA:
    print(-1)
else:
    print(max(lA, lB))


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
readline = sys.stdin.readline
s = readline().strip()
n = int(readline())
rev = False
for i in range(n):
    q = readline()
    if q.startswith("1"):
        rev = not rev
    if q.startswith("2 1"):
        if not rev:
            s = q[-2] + s
        else:
            s = s + q[-2]
    if q.startswith("2 2"):
        if not rev:
            s = s + q[-2]
        else:
            s = q[-2] + s
if rev:
    print(s[::-1])
else:
    print(s)


import sys
import math
readline = sys.stdin.readline
a, b = [int(x) for x in readline().strip().split(" ")]
ans = -1
for i in range(13, 1001):
    if a == math.floor(i * 0.08) and b == math.floor(i * 0.1):
        ans = i
        break
print(ans)


Verdicts: Runtime Error

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

Submission attempts (in order):
import math

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

for n in range(0, 12):
  for m in range(0, 10):
    x = math.floor((A + n/10) / 0.08)
    y = math.floor((B + m/10) / 0.1)
    print(x, y)
    if x == y:
      if math.floor(x * 0.08) == A and math.floor(y * 0.1):
        print(x)
        exit()
print("-1")

import math

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

for n in range(0, 10):
  for m in range(0, 10):
    x = math.floor((A + n/10) / 0.08 + 0.5)
    y = math.floor((B + m/10) / 0.1 + 0.5)
    if x == y:
      if math.floor(x * 0.08) == A and math.floor(y * 0.1):
        print(x)
        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

def main():

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

    lo = max(1000 * a, 800 * b)
    hi = min(1000 * (a + 1), 800 + (b + 1))

    if lo < hi:
        print(math.ceil(lo / 80))
    else:
        print(-1)


main()


import math

def main():

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

    lo = max(1000 * a, 800 * b)
    hi = min(1000 * (a + 1), 800 * (b + 1))

    if lo < hi:
        print(math.ceil(lo / 80))
    else:
        print(-1)


main()


Verdicts: Wrong Answer

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

Submission attempts (in order):
A, B = map(int, input().split())
ans = -1
for i in range(1251):
  if int(i / 0.08) == A and int(i / 0.1) == B:
    ans = i
    break

print(ans)

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

for i in range(1251):
  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):
A,B = (int(x) for x in input().split())
a = range(math.ceil(A/0.08), math.floor(((A+1)/0.08)+1))
b = range(math.ceil(B/0.1), math.floor(((B+1)/0.1)+1))
c = set(a) & set(b)
if len(c) == 0:
          print(-1)
else:
          print(min(c))

import math
A,B = (int(x) for x in input().split())
A1 = math.ceil(A/0.08)
Ab = (A+1)/0.08
if float(Ab).is_integer() == True:
    A2 = math.floor(Ab)
else:
    A2 = math.floor(Ab) + 1
B1 = math.ceil(B/0.1)
Bb = (B+1)/0.1
if float(Bb).is_integer() == True:
    B2 = math.floor(Bb)
else:
    B2 = math.floor(Bb) + 1
a = range(A1, A2)
b = range(B1, B2)
c = set(a) & set(b)
if len(c) == 0:
          print(-1)
else:
          print(min(c))

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):
from collections import Counter

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

# a =< x < a + 1:
min_a = int(a/0.08)

max_a = (a+1)/0.08

min_b = int(b/0.10)

max_b = (b+1)/0.10

ans_list = []

flag = True

while(min_a < max_a):
    ans_list.append(min_a)
    min_a += 1
print(ans_list)
while(min_b < max_b):
    ans_list.append(min_b)
    min_b += 1
ans_list.sort()
ans = Counter(ans_list)
print(ans)
for i in ans:
    if ans[i] > 1:
        print(i)
        flag = False
        break
if flag:
    print(-1)


from collections import Counter

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

# a =< x < a + 1:
min_a = int(a/0.08)

max_a = int((a+1)/0.08)

min_b = int(b/0.10)

max_b = int((b+1)/0.10)

ans_list = []

while(min_a < max_a):
    ans_list.append(min_a)
    min_a += 1
while(min_b < max_b):
    ans_list.append(min_b)
    min_b += 1
ans_list.sort()
ans = Counter(ans_list)
for i in ans:
    if ans[i] > 1:
        print(i)
        break
print(-1)

from collections import Counter
import math

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

# a =< x < a + 1:
min_a = math.ceil(a/0.08)

max_a = (a+1)/0.08

min_b = math.ceil(b/0.10)

max_b = (b+1)/0.10

ans_list = []

flag = True

while(min_a =< max_a):
    ans_list.append(min_a)
    min_a += 1
while(min_b =< max_b):
    ans_list.append(min_b)
    min_b += 1
ans_list.sort()
ans = Counter(ans_list)
for i in ans:
    if ans[i] > 1:
        print(i)
        flag = False
        break
if flag:
    print(-1)

import math

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

ans =  -1

for i in range(2000):
    if math.floor(i * 0.08) == a and math.floor(i * 0.10) == b:
        ans = i
        break

print(ans)

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

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

Submission attempts (in order):
import math

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

motob = b/0.1
a += 0.999
xmotoa = a/0.08

print(xmotoa,xmotob)
if xmotoa >= motob:
    print(math.ceil(motoa))
else:
    print('-1')

import math

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

motoa = a/0.08

motob = b/0.1
a += 1
b += 1
xmotoa = a/0.08
xmotob = b/0.1

if motoa < motob <xmotoa:
    print(math.ceil(motob))
elif motoa < xmotob <xmotoa:
    print(math.ceil(motoa))
else:
    print('-1')

Verdicts: Runtime Error

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

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

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

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

for i in range(1,10000):
    aa = ( i * 8 ) // 100
    bb = ( i * 10 ) // 100
    if aa == a and bb == 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.10)

print(x,y)
if y>x:
    print(-1)
else:
    if abs(y-x)>=10:
        print(-1)
    else:
        while((int(y*0.10)==B)and y<x):
            y+=1
        print(y)

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

C = 1009
Min = 1010

while(C > 0):
    a = int(C*0.08)
    b = int(C*0.10)
    t_bool = (a==A and b==B)
    c_bool = (C<Min)
    if t_bool and c_bool :
        Min = C
    C-=1
if Min==1010:
    print(-1)
else:
    print(Min)

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(1300):
    if (int(i * 0.08) == A) and (int(i * 0.10) == B) :
        print(i)
        break
print(-1)

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

for i in range(1251):
    if (int(i * 0.08) == A) and (int(i * 0.10) == B) :
        print(i)
        break
    if i == 1250:
        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())
go = [0 for i in range(20)]
ad = [0 for i in range(101)]
bd = [0 for i in range(101)]
o = 10
for i in range(100):
  for k in range(o,1010):    
    if(k//12.5 == i+1):      
      ad[i+1] = k
      o = k
      break

o = 10
for i in range(101):
  for k in range(o,1010):    
    if(k//10 == i+1):      
      bd[i+1] = k
      o = k
      break
cnt = 0
if(ad[a]>bd[b+1]):
  print(-1)
  exit()
elif(ad[a+1]<bd[b]):
  print(-1)
  exit()
elif(ad[a]>=bd[b]):
  print(bd[b])
  exit()
elif(ad[a]<=bd[b]):
  print(ad[a])
  exit()

a,b = map(int,input().split())
go = [0 for i in range(20)]
ad = [0 for i in range(101)]
bd = [0 for i in range(101)]
o = 10
for i in range(100):
  for k in range(o,1001):    
    if(k//12.5 == i+1):      
      ad[i+1] = k
      o = k
      break

o = 10
for i in range(101):
  for k in range(o,1001):    
    if(k//10 == i+1):      
      bd[i+1] = k
      o = k
      break

cnt = 0
for i in range(ad[a],ad[a+1]):
  cnt += 1
  go[cnt] = i
for i in go:
  for k in range(bd[b],bd[b+1]):
    if(i == k):
      print(i)
      exit()
    elif(i == 0):
      print(-1)
      exit()
print(-1)

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

for i in range(1,1024):
  if i//12.5 == a and i//10 == b:
    print(i)
    exit()
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):
# coding: utf-8

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


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

# coding: utf-8

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

n = int(A / 0.08)
m = int(B / 0.1)
n1 = int((A + 1) / 0.08)
m1 = int((B + 1) // 0.1)
m2 = {i for i in range(n, n1)}
m3 = {j for j in range(m, m1)}

s = set(m2 & m3)
if s:
    print(min(s))
else:
    print(-1)

# coding: utf-8
import math
A, B = map(int, input().split())


for i in range(1, 1010):
    if math.floor(i * 0.08) == A and math.floor(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):
P8, P10 = (8, 10)

import math
price1_min = math.floor(P8/0.08)

price1_max = math.floor((P8+1)/0.08)-1

price2_min = math.floor(P10/0.10)

price2_max = math.floor((P10+1)/0.10)-1



if (price1_max > price2_min) and (price2_max > price1_min):
    print(max(price2_min, price1_min))
else: 
    print(-1)

P8, P10 = (8, 10)

import math
price1_min = math.floor(P8/0.08)
print(price1_min)

price1_max = math.floor((P8+1)/0.08)-1
print(price1_max)

price2_min = math.floor(P10/0.10)
print(price2_min)

price2_max = math.floor((P10+1)/0.10)-1
print(price2_max)



if (price1_max > price2_min) and (price2_max > price1_min):
    print(max(price2_min, price1_min))
else: 
    print(-1)

P8, P10 = (8, 10)

import math
price1_min = math.floor(P8/0.08)

price1_max = math.floor((P8+1)/0.08)-1

price2_min = math.floor(P10/0.10)

price2_max = math.floor((P10+1)/0.10)-1



if (price1_max >= price2_min) and (price2_max >= price1_min):
    print(max(price2_min, price1_min))
else: 
    print(-1)

import math


P8, P10 = map(int, input().split())

price1_min = math.floor(P8/0.08)
print(price1_min)

price1_max = math.floor((P8+1)/0.08)
print(price1_max)

price2_min = math.floor(P10/0.10)
print(price2_min)

price2_max = math.floor((P10+1)/0.10)
print(price2_max)



if (price1_max > price2_min) and (price2_max > price1_min):
    print(max(price2_min, price1_min))
else: 
    print(-1)

P8, P10 = (8, 10)

import math
price1_min = math.floor(P8/0.08)

price1_max = math.floor((P8+1)/0.08)

price2_min = math.floor(P10/0.10)

price2_max = math.floor((P10+1)/0.10)



if (price1_max >= price2_min) and (price2_max >= price1_min):
    print(max(price2_min, price1_min))
else: 
    print(-1)

P8, P10 = map(int, input().split())


import math
price1_min = math.ceil(P8/0.08)

price1_max = math.floor((P8+1)//0.08)

price2_min = math.ceil(P10/0.10)

price2_max = math.floor((P10+1)//0.10)



if (price1_max >= price2_min) and (price2_max >= price1_min):
    print(max(price2_min, price1_min))
else: 
    print(-1)

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

a, b = [int(i) for i in input().split()]
for i in range(0, 1011):
    print(i, floor(i * 0.08), floor(i * 0.1))
    if floor(i * 0.08) == a and floor(i * 0.1) == b:
        print(i)
        break
else:
    print(-1)


from math import floor

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


Verdicts: Wrong Answer

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

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

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


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

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
l1=input().split(" ")
t80=int(l1[0])
t100=int(l1[1])
t80_min=math.ceil(t80/0.08)
t80_max=math.ceil((t80+1)/0.08)
t100_min=math.ceil(t100/0.1)
t100_max=math.ceil((t100+1)/0.1)
f=0
for i  in range(min(t80_min,t100_min),max(t100_max,t100_max)):
    if int(i*0.08)==a and int(i*0.1)==b:
        print(i)
        sys.exit()
print(-1)

import math
l1=input().split(" ")
t80=int(l1[0])
t100=int(l1[1])
t80_min=(t80//0.08)
t80_max=((t80+1)//0.08)
t100_min=(t100//0.1)
t100_max=((t100+1)//0.1)
f=0
for i  in range(min(t80_min,t100_min),max(t100_max,t100_max)):
    if int(i*0.08)==a and int(i*0.1)==b:
        print(i)
        sys.exit()
print(-1)

import math
l1=input().split(" ")
t80=int(l1[0])
t100=int(l1[1])
t80_min=math.ceil(t80/0.08)
t80_max=math.ceil((t80+1)/0.08)
t100_min=math.ceil(t100/0.1)
t100_max=math.ceil((t100+1)/0.1)
f=0
for i  in range(min(t80_min,t100_min),max(t80_max,t100_max)):
    if int(i*0.08)==a and int(i*0.1)==b:
        print(i)
        sys.exit()
print(-1)

l1=input().split(" ")
t80=int(l1[0])
t100=int(l1[1])
t80_min=(t80/0.08)
t80_max=((t80+1)/0.08)
t100_min=(t100/0.1)
t100_max=((t100+1)/0.1)
if t80_max<t100_min:
    print("-1")
else:
    if t80_min<=t100_min:
        print(t100_min)
    else:
        print(t80_min)

l1=input().split(" ")
t80=int(l1[0])
t100=int(l1[1])
t80_min=(t80/0.08)
t80_max=((t80+1)/0.08)
t100_min=(t100/0.1)
t100_max=((t100+1)/0.1)
if t80_max<t100_min:
    print("-1")
else:
    if t80_min<=t100_min:
        print(math.ceil(t100_min))
    else:
        print(math.ceil(t80_min))


import sys
 
a,b = map(int,input().split())
low = int(min(a//0.08,b//0.1))
high = int(max((a+1)//0.08,(b+1)//0.1))
for i in range(low,high+1):
  if int(i*0.08)==a and int(i*0.1)==b:
    print(i)
    sys.exit()
print(-1)

Verdicts: Runtime Error

Runtime Error

Runtime Error

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

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

if a%2==0:
  lower1=int(a*100/8)
else:
  lower1=a*(100/8)
  upper1=int((a+1)*100/8)
  if (upper1)-int(lower1)<1:
    print(-1)
    sys.exit()
  else:
    lower1=int(lower1)+1
    if lower1=upper1:
      print(-1)
      sys.exit()
    else:
      pass
  
lower2=(b)*10
upper2=(b+1)*10

lower=max(lower1,lower2)
if lower=uppwer1:
  print(-1)
else:
  print(lower)

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

if a%2==0:
  lower1=int(a*100/8)
  upper1=(a+1)*100/8
  upper1=max(lower,int(upper1)-1)  
else:
  lower1=a*(100/8)
  upper1=int((a+1)*100/8)
  if (upper1)-int(lower1)<=1:
    print(-1)
    sys.exit()
  else:
    lower1=int(lower1)+1
    if lower1==upper1:
      print(-1)
      sys.exit()
    else:
      pass
  
lower2=(b)*10
upper2=(b+1)*10

lower=max(lower1,lower2)
upper=min(upper1,upper2)
if upper-lower<0:
  print(-1)
else:
  print(lower)



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

if a%2==0:
  lower1=int(a*100/8)
  upper1=(a+1)*100/8
  upper1=max(lower1,int(upper1)-1)  
else:
  lower1=a*(100/8)
  upper1=int((a+1)*100/8)
  if (upper1)-int(lower1)<=1:
    print(-1)
    sys.exit()
  else:
    lower1=int(lower1)+1
    if lower1==upper1:
      print(-1)
      sys.exit()
    else:
      pass
  
lower2=(b)*10
upper2=(b+1)*10

lower=max(lower1,lower2)
upper=min(upper1,upper2)
if upper-lower<1:
  print(-1)
else:
  print(lower)

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(1,1251):
    if int(i*0.08)==a and int(i*0.1)==b:
        print(i); break
print('-1')

a,b = map(int,input().split())
low = int(min(a//0.08,b//0.1))
high = int(max((a+1)//0.08,(b+1)//0.1))
for i in range(low,high+1):
    if int(i*0.08)==a and int(i*0.1)==b:
        print(i);  break
print(-1)

a,b = map(int,input().split())
low = int(min(a//0.08,b//0.1))
high = int(max((a+1)//0.08,(b+1)//0.1))
for i in range(low,high+1):
    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())
ans = -1
for i in range(1,b):
  if int(i*1.08) == a and int(i*1.10)==b:
    ans = i
    break
    
print(ans)

a,b = map(int,input().split())
ans = -1
for i in range(1,10000):
  if int(i*0.08) == a and int(i*0.10)==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 math
a,b=map(int,input().split())
n=math.ceil((a*100)/8)
m=int((a*100)/10)
result=[]
for i in range(m-100,n+100):
    print(i)
    if math.floor(i*0.08)==a and math.floor(i*0.1)==b:
        result.append(i)
if result==[]:
    print(-1)
    exit()
print(min(result))


import math
a,b=map(int,input().split())
n=math.ceil((a*100)/8)
m=int((a*100)/10)
result=[]
for i in range(m-100,n+100):
    if math.floor(i*0.08)==a and math.floor(i*0.1)==b:
        result.append(i)
if result==[]:
    print(-1)
    exit()
print(min(result))


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 = A/0.08
x_1 =(A+1)/0.08
y = B/0.1
y_1 = (B+1)/0.1

x_2 = {i for i in range(int(x),int(x_1) if i<=100)}
y_2 = {i for i in range(int(y),int(y_1) if i<=100)}
moto_nedan = x_2 & y_2
if len(moto_nedan) == 0:
    print("-1")
else:
    print(min(moto_nedan))

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

x = A/0.08
x_1 =(A+1)/0.08
y = B/0.1
y_1 = (B+1)/0.1

x_2 = {i for i in range(int(x),int(x_1) +1) }
y_2 = {i for i in range(int(y),int(y_1) +1) }
moto_nedan = x_2 & y_2
if len(moto_nedan) == 0:
    print("-1")
else:
    print(min(moto_nedan))
print(x_2)
print(y_2)
print(38*0.08)


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

import math
x = math.ceil(A/0.08)
x_1 = math.ceil((A+1)/0.08 )
y = math.ceil(B/0.1)
y_1 = math.ceil( (B+1)/0.1 )

x_2 = {i for i in range(int(x),int(x_1) ) }
y_2 = {i for i in range(int(y),int(y_1) ) }
moto_nedan = x_2 & y_2
if len(moto_nedan) == 0:
    print("-1")
else:
    print(min(moto_nedan))

Verdicts: Runtime Error

Wrong Answer

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

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

mid_a = 12.5 * a
mid_b = 10 * b

a_range = [
    i for i in range(
        math.ceil(mid_a),
        math.floor(
            mid_a +
            12 +
            1)) if i > 0]
b_range = [
    i for i in range(
        math.ceil(mid_b),
        math.floor(
            mid_b +
            9 +
            1)) if i > 0]

seki = list(set(a_range) & set(b_range)).sort()

if seki:
    print(seki[0])
else:
    print(-1)

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

mid_a = 12.5 * a
mid_b = 10 * b

a_range = [
    i for i in range(
        math.ceil(mid_a),
        math.floor(
            mid_a +
            12 +
            1)) if i > 0]
b_range = [
    i for i in range(
        math.ceil(mid_b),
        math.floor(
            mid_b +
            9 +
            1)) if i > 0]

seki = sorted(list(set(a_range) & set(b_range)))

if seki:
    print(seki[0])
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 (i * 0.1) == B:
        print(i)
        exit()
        print("-1")

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


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

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

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




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

#maxA = A+0.99
#maxB = B+0.99

maxA = A+1
maxB = B+1

gAmin = A/8 * 100
gAmax = maxA/8 * 100

gBmin = B*10
gBmax = maxB * 10

#print(gAmin)
#print(gAmax)
#print(gBmin)
#print(gBmax)

if gAmax <= gBmin or gBmax <= gAmin:
    ans = -1
elif gAmin <= gBmin:
    ans = gBmin
else:
    ans = gAmin

if ans - int(ans) > 0:
    ans = int(ans) + 1

print(ans)




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

ans = -1
for i in range(1010):
    
    
    if i*8//100 == A and i//10 == 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 math
a,b=map(int,input().split())
b*=10
ans=0

for i in range(8):
    j=b
    j+=i 
   if math.floor(j*0.08)==a:
       ans=j
       break
if ans!=0:
    print(ans)
else :
    print(-1)


import math
a,b=map(int,input().split())
b*=10
ans=0

for i in range(8):
    j=b
    j+=i 
   if math.floor(j*0.08)==a:
       ans=j
       break
if ans!=0:
    print(ans)
else :
    print(-1)


import math
a,b=map(int,input().split())
b*=10
ans=0

for i in range(9):
    j=b
    j+=i 
    if int(j*0.08)==a:
        ans=j
        break
if ans!=0:
    print(ans)
else :
    print(-1)


Verdicts: Runtime Error

Runtime Error

Accepted