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

for p in range(13, 1250):
	if int(p * 0.08) == A and int(p * 0.1) == B:
		print(p)
		exit()

print(-1)


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

ans = -1

for p in range(13, 1350):
    if p * 0.08 == A and p * 0.1 == B:
        ans = p
        break

print(ans)


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

for p in range(13, A):
	if int(p * 0.08) == A and int(p * 0.1) == B:
		print(p)
		exit()

print(-1)


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

ans = -1

for p in range(13, 1350):
    if int(p * 0.08) == A and int(p * 0.1) == B:
        ans = p
        break

print(ans)


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

    resultA = A * 8 / 100
    resultB = B * 1 / 100

    #print(resultA)
    
    answer = -1

    if(round(resultA * 0.08) == A and round(resultA * 0.1) == B):
        answer = resultA
    if(round(resultB * 0.08 == A and round(resultB * 0.1) == B)):
        answer = resultB

    print(int(answer))

    #print(int(answer))

if __name__ == "__main__":
    main()


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

    resultA = A // 0.08
    resultB = B // 0.1

    #print(resultA)
    
    answer = -1

    if(round(resultA * 0.08) == A and round(resultA * 0.1) == B):
        answer = resultA
    if(round(resultB * 0.08 == A and round(resultB * 0.1) == B)):
        answer = resultB

    print(int(answer))

    #print(int(answer))

if __name__ == "__main__":
    main()

import math

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

    ans = -1
    flag = True

    for i in range(1,1010):
        if(math.floor(i*0.08) == A and math.floor(i*0.1) == B):
            ans = i
            flag = False
            break
    print(ans)

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):
a,b=map(int,input().split())
cand_b=[b*11 + i for i in range(b)]
def ans(cand):
  for price in cand:
    if int(price*0.08)==a:
      print(price)
      return
  print(-1)

ans(cand_b)

a,b=map(int,input().split())
cand_b=[b*10 + i for i in range(b)]
def ans(cand):
  for price in cand:
    if int(price*0.08)==a:
      print(price)
      return
  print(-1)

ans(cand_b)

a,b=map(int,input().split())
cand_b=[b*10 + i for i in range(10*b)]
def ans(cand):
  for price in cand:
    if int(price*0.08)==a and int(price*0.1)==b:
      print(price)
      return
  print(-1)

ans(cand_b)

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())
Amin = A//0.08
Amax = A+1//0.08
Arange = set(range(Amin, Amax+1))
Bmin = B//0.1
Bmax = B+1//0.1
Brange = set(range(Bmin, Bmax+1))
intersection = Arange & Brange
print(min(intersection))

A, B = map(int, input().split())
Amin = A//0.08
Amax = A//0.1
Arange = set(range(Amin, Amax))
Bmin = B//0.08
Bmax = B//0.1
Brange = set(range(Bmin, Bmax))
intersection = Arange & Brange
print(min(intersection))

A, B = input().split()
def calc(A, B):
  Amin = int(A/0.08)
  Amax = int((A+1)/0.08+0.001)
  Arange = set(range(Amin, Amax))
  Bmin = int(B/0.1)
  Bmax = int((B+1)/0.1+0.001)
  Brange = set(range(Bmin, Bmax))
  intersection = Arange & Brange
  if len(intersection) == 0:
    print(-1) 
  else:
    print(min(intersection))
calc(A,B)

A, B = map(int, input().split())
Amin = int(A/0.08)
Amax = int(A+1/0.08)
Arange = set(range(Amin, Amax+1))
Bmin = int(B/0.1)
Bmax = int(B+1/0.1)
Brange = set(range(Bmin, Bmax+1))
intersection = Arange & Brange
if len(intersection) > 0:
  print(min(intersection))
else:
  print("-1")

A, B = map(int, input().split())
Amin = int(A/0.08)
Amax = int(A+1/0.08+1e-06)
Arange = set(range(Amin, Amax+1))
Bmin = int(B/0.1)
Bmax = int(B+1/0.1+1e-06)
Brange = set(range(Bmin, Bmax+1))
intersection = Arange & Brange
if len(intersection) > 0:
  print(min(intersection))
else:
  print("-1")

A, B = map(int, input().split())
def calc(A, B):
  Amin = A/0.08
  
  if (Amin - int(Amin)) != 0.:
    Amin = int(Amin)+1
  
  Amax = int((A+1)/0.08)
  Arange = set(range(Amin, Amax))
  Bmin = B/0.1
  if (Bmin - int(Bmin)) != 0.:
    Bmin = int(Bmin)+1
  Bmax = int((B+1)/0.1)
  Brange = set(range(Bmin, Bmax))
  intersection = Arange & Brange
  if len(intersection) == 0:
    print(-1) 
  else:
    print(min(intersection))
calc(A, B)

A, B = map(int, input().split())
Amin = A/0.08
Amax = int((A+1)/0.08)+1
Arange = set(range(Amin, Amax))
Bmin = B/0.1
Bmax = int((B+1)/0.1)+1
Brange = set(range(Bmin, Bmax))
intersection = Arange & Brange
if len(intersection) > 0:
  print(min(intersection))
else:
  print("-1")

A, B = map(int, input().split())
def calc(A, B):
  Amin = A/0.08
  if (Amin - int(Amin)) != 0.:
    Amin = int(Amin)+1
  else:
    Amin = int(Amin)
  Amax = int((A+1)/0.08)
  Arange = set(range(Amin, Amax))
  Bmin = B/0.1
  if (Bmin - int(Bmin)) != 0.:
    Bmin = int(Bmin)+1
  else:
    Bmin = int(Bmin)
  Bmax = int((B+1)/0.1)
  Brange = set(range(Bmin, Bmax))
  intersection = Arange & Brange
  print(-1) if len(intersection) == 0 else print(min(intersection))
calc(A, B)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

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

Submission attempts (in order):
from math import ceil
from math import floor
a,b = map(int,input().split())
l1 = ceil((a-0.50001)/0.08)
r1 = floor((a+0.5)/0.08)
l2 = ceil((a-0.50001)/0.1)
r2 = floor((a+0.5)/0.1)
l3 = max(l1,l2)
r3 = min(r2,r1)
if(l3<=r3):
    print(l3)
else:
    print(-1)




from math import ceil
from math import floor
a,b = map(int,input().split())
l1 = ceil((a-0.50001)/0.08)
r1 = floor((a+0.5)/0.08)
l2 = ceil((b-0.50001)/0.1)
r2 = floor((b+0.5)/0.1)
l3 = max(l1,l2)
r3 = min(r2,r1)
if(l3<=r3):
    print(l3)
else:
    print(-1)




from math import ceil
from math import floor
a,b = map(int,input().split())
l1 = ceil((a)/0.08)
r1 = floor((a+0.999999999999)/0.08)
l2 = ceil((b)/0.1)
r2 = floor((b+0.99999999999)/0.1)
l3 = max(l1,l2)
r3 = min(r2,r1)
if(l3<=r3):
    print(l3)
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())
j=A*12.5
k=(A+1)*12.5
l=B*12.5
m=(B+1)*12.5
N=[]
O=[]
for i in range(j,k+1):
  N.append(i)
for h in range(l,m+1):
  O.append(h)
N_set=set(N)
O_set=set(O)
matched_list=list(N_set&O_set)
print(min(matched_list))

import math
A,B=map(int,input().split())
C=[]
for i in range(1,1010):
  if math.floor(i*0.08)==A and math.floor(i*0.1)==B:
    C.append(i)
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):
a, b = list(map(int,input().split()))

for p in range(1000):
  if int((p + 1) * 0.08) == a and int((p + 1) * 0.1) == b:
    print(p)
    break
  if p == 999:
    print('-1')

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

for p in range(1000):
  if int((p + 1) * 0.08) == a and int((p + 1) * 0.1) == b:
    print(p + 1)
    break
  if p == 999:
    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())

list1=[]
list2=[]
a=A*100/8
b=(A+1)*100/8
c=B*10
d=(B+1)*10

s=math.floor(a)
t=c
while s<b:
    list1.append(s)
    s=s+1

while t<d:
    list2.append(t)
    t=t+1

x=0
for i in list2:
    x=x+list1.count(i)
    if x==1:
        y=i
        print(str(y))
        break
    else:
        print('-1')


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

list1=list(range(1,1001,1))

s=0
for i in list1:
    x=i//12.5
    y=i//10
    if x==A and y==B:
        print(str(i))
        s=s+1
        sys.exit()

print('-1')


Verdicts: Wrong Answer

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

Submission attempts (in order):
A,B=map(int,input().split())
p=0;q=0
p=A/0.08
q=p//10
if q==B:
  print(p)
else:
  print(-1)

A,B=map(int,input().split())
p=0;q=0;x=0;f=0
p=A/0.08
q=(A+0.99)/0.08
x=p
#print(p,q,x*0.1//1)
while x<q:
  if (x*0.1)//1==B:
    print(x)
    f=1
    break
  else:
    x=x+0.01
if f==0:
  print(-1)

A,B=map(int,input().split())
p=0;q=0;x=0;f=0
for i in range(13,1251):
  if int(i*0.08)==A and int(i*0.1)==B:
    print(i)
    f=1
    break
if f==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())
ans = -1

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

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

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

list = []
A,B = map(int ,input().split())
for i in range(13,10001):
    if int(i*0.08) == A and int(i*0.10) == 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):
import math
a,b = map(int,input().split())
p1 = a // 0.08
p2 = b // 0.1
ans = math.inf

if math.floor(p1 * 0.1) == b:
    ans = p1
if math.floor(p2 * 0.08) == a:
    ans = min(ans,p2)
if ans == math.inf:
    ans = -1
print(int(ans))

import math
a,b = map(int,input().split())
p,ans = int(b / 0.1),-1

for i in range(p,int(p+10)):
    if math.floor(i * 0.08) == a:
        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())
print(a)
print(b)

am=int(100/8*a)
al=int(100/8*(a+1))
if (a%4)==0:
       al=al-1

bm=int(10*b)
bl=int(10*(b+1))-1

print (am,al)
print (bm,bl)
for ia in range(am,al+1):
       for ib in range(bm,bl+1):
       		if ia==ib:
       			print (ia)
       			exit()
      
print -1

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

am=int(100/8*a)
al=int(100/8*(a+1))
if (a%4)==0:
       al=al-1

bm=int(10*b)
bl=int(10*(b+1))-1

#print (am,al)
#print (bm,bl)
for ia in range(am,al+1):
       for ib in range(bm,bl+1):
       		if ia==ib:
       			print (ia)
       			exit()
      
print -1

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

for i in range(1,1010):
#	print (i)
	ia=int(i*0.08)
	ib=int(i*0.1)
#	print (ia,ib)
	if ia==a and ib==b:
		print (i)
		exit()
else:
	print (-1)

Verdicts: Runtime Error

Runtime Error

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

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

a = A / 0.08
b = B / 0.1
print(a, b)

if a / 10 == b / 10 or abs(a / 10 - b/10) <= 1:
    print(int(max(a, b)))
else:
    print('-1')


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

is_true = False
for x in range(1, 10000):
    if A == math.floor(x * 0.08) and B == math.floor(x * 0.1):
        is_true = True
        break

if is_true:
    print(x)
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 = [int(i) for i in input().rstrip().split()]
Aa = A/0.08
Ba = B/0.1
round=lambda x:int((x*2+1)//2)
N = round(max(Aa,Ba))

def ch(n):
    global A,B
    print(int(n * 0.08), A, int(n * 0.1), B)
    if int(n * 0.08) == A and int(n * 0.1) == B:
        return True
    else:
        return False

if ch(N-1):
    print(N-1)
elif ch(N):
    print(N)
else:
    print(-1)

A,B = [int(i) for i in input().rstrip().split()]
Aa = A/0.08
Ba = B/0.1
round=lambda x:int((x*2+1)//2)
N = round(max(Aa,Ba))

def ch(n):
    global A,B
    
    if int(n * 0.08) == A and int(n * 0.1) == B:
        return True
    else:
        return False

if ch(N-1):
    print(N-1)
elif ch(N):
    print(N)
else:
    print(-1)

Verdicts: Wrong Answer

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

Submission attempts (in order):
# -*- coding: utf-8 -*-
from math import floor, ceil
a, b = map(int, input().split())
low = floor(a / 0.08)
high = ceil(a / 0.09)
for i in range(low, high + 1):
    if b == floor(i * 0.10):
        print(i)
        break
else:
    print(-1)
    

# -*- coding: utf-8 -*-
from math import floor, ceil
a, b = map(int, input().split())
for i in range(2000):
    if b == floor(i * 0.10) and a == floor(i * 0.08):
        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):
import math
a, b = map(int,input().split())
e = 10**-7
mi = max(math.ceil(a*12.5),b*10)
ma = min(int((a-1)+*12.5),b*10-1)
if mi > ma:
    print(-1)
else:
    print(mi)


a, b = map(int,input().split())
e = 10**-4
mi = max(int((a+e)/0.08),int((b+e)/0.1))
ma = min(int((a+1+e)/0.08),int((b+e+1)/0.1))
print(ma,mi)
if mi > ma:
    print(-1)
else:
    print(mi)


import math
a, b = map(int,input().split())
e = 10**-7
mi = max(math.ceil(a*12.5),b*10)
ma = min(int(math.ceil((a+1)*12.5)-1),(b+1)*10-1)
if mi > ma:
    print(-1)
else:
    print(mi)


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())
A=math.ceil((a+1)/0.08)-1
B=math.ceil((b+1)/0.1)-1
A_=math.ceil(a/0.08)
B_=math.ceil(b/0.1)
C=(B//0.1)-(B//0.08)
if b>80 or A<B_ or b-a>C:
    print(-1)
else:
    print(A_)


import math
a,b=map(int,input().split())
A=math.ceil((a+1)/0.08)-1
B=math.ceil((b+1)/0.1)-1
A_=math.ceil(a/0.08)
B_=math.ceil(b/0.1)
C=math.floor(B*0.1)-mah.floor(B*0.08)
if b>80 or A<B_ or b-a>C:
    print(-1)
else:
    print(A_)


import math
a,b=map(int,input().split())
A=math.ceil((a+1)/0.08)-1
B=math.ceil((b+1)/0.1)-1
A_=math.ceil(a/0.08)
B_=math.ceil(b/0.1)
C=(A_//0.1)-(A_//0.08)
if b>80 or A<B_ or b-a>C:
    print(-1)
else:
    print(A_)


import math
a,b=map(int,input().split())
f=0
for i in range(1,1001):
    if math.floor(i*0.08)==a and math.floor(i*0.1)==b:
        f=i
        break;
if f==0:
    print(-1)
else:
    print(f)


Verdicts: Wrong Answer

Runtime Error

Wrong Answer

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

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

reply = -1
i = 0
while math.floor(i * 0.08) <= text[0] and math.floor(i * 0.1) <= text[1]:
    print([i, math.floor(i * 0.08), math.floor(i * 0.1)])
    if math.floor(i * 0.08) == text[0] and math.floor(i * 0.1) == text[1]:
        reply = i
        break
    i += 1
print(reply)

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

reply = -1
i = 0
while math.floor(i * 0.08) <= text[0] and math.floor(i * 0.1) <= text[1]:
    if math.floor(i * 0.08) == text[0] and math.floor(i * 0.1) == text[1]:
        reply = i
        break
    i += 1
print(reply)

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())
 
S=max(12.5*A,10*B)
 
if S%1!=0:
    S=int(S)+1
 
if S<12.5*A+12.5 and S<10*B+10:
    print(S)
else:
    print("-1")

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

S=max(12.5*A,10*B)

if S%1!=0:
    S=int(S)+1

if S<12.5*A+12.5 and S<10*B+10:
    print(int(S))
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):
from math import ceil
A, B = map(int, input().split(' '))
x0 = ceil(A / 0.08)
x1 = ceil((A+1) / 0.08)
y0 = ceil(B / 0.1)
y1 = ceil((B+1) / 0.1)
print(x0, x1, y0, y1)
if x1 < y0:
  print(-1)
else:
  print(min(max(x0, y0), min(x1, y1)))

from math import ceil
A, B = map(int, input().split(' '))
x0 = ceil(A / 0.08)
x1 = ceil((A+1) / 0.08)
y0 = ceil(B / 0.1)
y1 = ceil((B+1) / 0.1)
if x1 <= y0 or y1 <= x0:
  print(-1)
else:
  print(min(max(x0, y0), min(x1, y1)))

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 i == a*12.5 and b*10:
        print(i)
        exit()
print(-1)

a,b = map(int,input().split())
ax = a*12.5
bx = b*10
if ax==bx :
    print(bx)
else:
    print(-1)

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

for i in range(1300):
    if i == a*12.5 and i ==b*10:
        print(i)
        exit()
print(-1)

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

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

Verdicts: Runtime Error

Wrong Answer

Wrong Answer

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

Submission attempts (in order):
cmin = lambda a,b : a if a<b else b
cmax = lambda a,b : a if a>b else b
iin = lambda : int(input())
lin = lambda : list(map(int,input().split()))
rin = lambda n : [int(input()) for _ in range(n)]

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

ia = a//(0.08)
la = int(ia*0.08)
while la==a:
    ia += 1
    la = int(ia*0.08)
ia -= 1
lla =int(ia)

ia = a//0.08)
la = int(ia*0.08)
while la==a:
    ia -= 1
    la = int(ia*0.08)
ia = int(ia)+1

ib = b//(0.1)
lb = int(ib*0.1)
while lb==b:
    ib += 1
    lb = int(ib*0.1)
ib -= 1
llb = int(ib)

ib = b//(0.1)
lb = int(ib*0.1)
while lb==b:
    ib -= 1
    lb = int(ib*0.1)
ib = int(ib)+1

sa = set(range(ia,lla+1))
sb = set(range(ib,llb+1))
ans = sa & sb
print(min(ans) if ans else -1)

cmin = lambda a,b : a if a<b else b
cmax = lambda a,b : a if a>b else b
iin = lambda : int(input())
lin = lambda : list(map(int,input().split()))
rin = lambda n : [int(input()) for _ in range(n)]

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

at = []
for i in range(1,1500):
    if int(i*0.08)==a: at += [i]

bt = []
for i in range(1,1500):
    if int(i*0.1)==b: bt += [i]

ans = set(at) & set(bt)

print(min(ans) if ans else -1)

Verdicts: Runtime Error

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

Submission attempts (in order):
import math

s = input()

ss = s.split(" ")

TAX_A = 0.08
TAX_B = 0.1

A = int(ss[0])
B = int(ss[1])



ans = 10000
re = False
for i in range(1000,0,-1):
  tax_a = math.floor( i * TAX_A ) 
  tax_b = math.floor( i * TAX_B )
  if tax_a == A and tax_b == B:
    if i < ans :
      print("update ans:" ,i)
      ans = i
      re = True

if re == True:
  print( ans )
else:
  print(-1)



import math

s = input()

ss = s.split(" ")

TAX_A = 0.08
TAX_B = 0.1

A = int(ss[0])
B = int(ss[1])

ans = 10000
re = False
for i in range(10000,0,-1):
  tax_a = math.floor( i * TAX_A ) 
  tax_b = math.floor( i * TAX_B )
  if tax_a == A and tax_b == B:
    if i < ans :
      ans = i
      re = True

if re == True:
  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):
import math
from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN
a = list(map(int, input().split(" ")))
min8 = a[0]/0.08
max8 = (a[0]+1)/0.08
min10 = a[1]/0.1
max10 =(a[1]+1)/0.1
a = max(min8, min10)
if ((min8>=max10) or (max8<=min10)):
    print(-1)
else:
    print(Decimal(b).quantize(Decimal('0'), rounding = ROUND_HALF_UP))

import math
from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN
a = list(map(int, input().split(" ")))
min8 = a[0]/0.08
max8 = (a[0]+1)/0.08
min10 = a[1]/0.1
max10 =(a[1]+1)/0.1
b = max(min8, min10)
if ((min8>=max10) or (max8<=min10)):
    print(-1)
else:
    print(Decimal(b).quantize(Decimal('0'), rounding = ROUND_HALF_UP))

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


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


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


Verdicts: Runtime Error

Runtime Error

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

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

x1 = -(-25*A//2)
x2 = 25*(A+1)//2
x3 = 10*B
x4 = 10*(B+1)
print(x1, x2, x3, x4)

if x1 <= x3 and x3 < x2:
  print(x3)
elif x3 <= x1 and x1 < x4:
  print(x1)
else:
  print(-1)

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

x1 = -(-25*A//2)
x2 = 25*(A+1)//2
x3 = 10*B
x4 = 10*(B+1)
#print(x1, x2, x3, x4)

if x1 <= x3 and x3 < x2:
  print(x3)
elif x3 <= x1 and x1 < x4:
  print(x1)
else:
  print(-1)
  

Verdicts: Wrong Answer

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

Submission attempts (in order):
A, B = map(int, input().split())
 
i=1
while i<=10000:
  if i*0.08==A and i*0.1==B:
    print(i)
    quit()
  i+=1
print(-1)

A, B = map(int, input().split())
 
i=0
while i<10000:
  if A*0.08==i and B*0.1==i:
    print(i)
    quit()
print(-1)

A, B = map(int, input().split())
 
i=1
while i<=10000:
  if A*0.08==i and B*0.1==i:
    print(i)
    quit()
  i+=1
print(-1)

A, B = map(int, input().split())
 
i=1
while i<=10000:
  if i*0.08==A and i*0.1==B:
    print(i)
    exit()
  i+=1
print(-1)

A=int(input())
B=int(input())

i=0
while i<10000:
  if A*0.08==i and B*0.1==i:
    print(i)
    quit()
print(-1)

A, B = map(int, input().split())
 
i=1
while i<=10000:
  if (int(i*0.08==A)) and (int(i*0.1==B)):
    print(i)
    exit()
  i+=1
print(-1)

A,B = map(int,input().split())
i=1
while i<=10000:
  if (int((i*0.08)==A)) and (int((i*0.1)==B)):
    print(i)
    exit()
  i+=1
print(-1)

A,B = map(int,input().split())
while i<=10000:
  if (int((i*0.08)==A)) and (int((i*0.1)==B)):
    print(i)
    exit()
  i+=1
print(-1)

A, B = map(int, input().split())
 
i=0
while i<10000:
  if A*0.08==i and B*0.1==i:
    print(i)
    quit()
  i+=1
print(-1)

A,B = map(int,input().split())
i=1
while i<=10000:
  if (int(i * 0.08) == A) & (int(i * 0.10) == B):
    print(i)
    exit()
  i+=1
print(-1)

Verdicts: Wrong Answer

Time Limit Exceeded

Wrong Answer

Wrong Answer

Runtime Error

Wrong Answer

Wrong Answer

Runtime Error

Wrong Answer

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

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

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

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

Verdicts: Runtime Error

Wrong Answer

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

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

a = int(A*12.5)
b = B*10
ans = -1

if a < b:
    for i in range(a, b+2):
        if (int(i*0.1) == B) and (int(i*0.08) == A):
            ans = i

else:
    for i in range(b, a+2):
        if (int(i*0.1) == B) and (int(i*0.08) == A):
            ans = i

print(ans)


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

a = int(A*12.5)
b = B*10
ans = -1

if a < b:
    for i in range(a, b+2):
        if (int(i*0.1) == B) and (int(i*0.08) == A):
            if ans == -1:
                ans = i

else:
    for i in range(b, a+2):
        if (int(i*0.1) == B) and (int(i*0.08) == A):
            if ans == -1:
                ans = i

print(ans)


Verdicts: Wrong Answer

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

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

price_A = 0
price_B = 0

price_A = math.ceil(A / 0.08)
price_B = math.ceil(B / 0.1)
print(price_A,price_B)

min_price = min(price_A, price_B)
max_price = max(price_A, price_B)

for i in range(min_price, max_price+1, 1):
    tax_A = int(i * 0.08)
    tax_B = int(i * 0.1)

    if tax_A == A and tax_B == B:
        print(i)
        sys.exit()

print(-1)

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

price_A = 0
price_B = 0

price_A = math.ceil(A / 0.08)
price_B = math.ceil(B / 0.1)

min_price = min(price_A, price_B)
max_price = max(price_A, price_B)

for i in range(min_price, max_price+1, 1):
    tax_A = int(i * 0.08)
    tax_B = int(i * 0.1)

    if tax_A == A and tax_B == B:
        print(i)
        sys.exit()

print(-1)

Verdicts: Wrong Answer

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

Submission attempts (in order):
A, B = map(int, input().split())
 
def check(X):
  global A
  global B
  return (int)(X*0.08) == A and (int)(X*0.1) == B
 
for x in range(1, max(A, B)*11):
  if check(x):
    print(x)
    exit(0)
 
print(-1)

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

def check(X):
  global A
  global B
  return (int)(X*0.08) == A and (int)(X*0.1) == B

for x in range(1, max(A, B)*11):
  if check(x):
    print(x)
    exit(0)

print(-1)

A, B = map(int, input().split())
 
def check(X):
  global A
  global B
  return (int)(X*0.08) == A and (int)(X*0.1) == B
 
for x in range(1, max(A, B)*20):
  if check(x):
    print(x)
    exit(0)
 
print(-1)

Verdicts: Wrong Answer

Wrong Answer

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

Submission attempts (in order):
taxs = input().split(" ")
 
a = int(taxs[0])
b = int(taxs[1])
 
product_min = int(a / 0.08)
product_max = int((a+1) / 0.08)

for product in range( product_min, product_max ):
	bpred = int(product * 0.1)
	if( bpred == b ):
  		print( product )
        break

print( -1 )

taxs = input().split(" ")
 
a = int(taxs[0])
b = int(taxs[1])
 
product_min = int(a / 0.08 + 0.5)
product_max = int((a+1) / 0.08)

setflg = 0
for product in range( product_min, product_max ):
  bpred = int(product * 0.1)
  if( bpred == b ):
    print( product )
    setflg=1
    break

if setflg==0:
  print( -1 )

Verdicts: Runtime Error

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

Submission attempts (in order):
import math
a, b = map(int, input().split())
lsta = list(range(math.ceil(a/0.08), int((a+1)/0.08)+1))
lstb = list(range(math.ceil(b/0.1), int((b+1)/0.1)+1))
print(lsta)
print(lstb)
for la in lsta:
  for lb in lstb:
    if la==lb:
      print(la)
      exit()
print(-1)

import math
a, b = map(int, input().split())
lsta = list(range(math.ceil(a/0.08), math.ceil((a+1)/0.8)))
lstb = list(range(math.ceil(b/0.1), math.ceil((b+1)/0.1)))
for la in lsta:
  for lb in lstb:
    if la==lb:
      print(la)
      exit()
print(-1)

import math
a, b = map(int, input().split())
lsta = list(range(math.ceil(a/0.08), int((a+1)/0.8)+1))
lstb = list(range(math.ceil(b/0.1), int((b+1)/0.1)+1))
for la in lsta:
  for lb in lstb:
    if la==lb:
      print(la)
      exit()
print(-1)

a, b = map(int, input().split())
lb = int(b/0.1)
print(lb if lb in list(range(int(a/0.08), int((a+1)/0.08)+1)) else -1)

a, b = map(int, input().split())
lb = int(b/0.1)
print(lb if lb in list(range(int(a / 0.08), int((a+1) / 0.08))) else -1)

import math
a, b = map(int, input().split())
lsta = list(range(math.ceil(a/0.08), math.ceil((a+1)/0.08)))
lstb = list(range(math.ceil(b/0.1), math.ceil((b+1)/0.1)))
for la in lsta:
  for lb in lstb:
    if la==lb:
      print(la)
      exit()
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):
import math

nums = list(map(int, input().split()))
a = nums[0]
b = nums[1]

for i in range(10000):
  if math.floor(i * 0.08) == a and math.floor(i*0.1) == b:
      print(i)
      break

print(-1)

import math

nums = list(map(int, input().split()))
a = nums[0]
b = nums[1]

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

print(-1)



import math
import sys
 
nums = list(map(int, input().split()))
a = nums[0]
b = nums[1]
 
for i in range(1200):
  if math.floor(i * 0.08) == a and math.floor(i*0.1) == b:
      print(i)
      sys.exit()
 
print(-1)

Verdicts: Wrong Answer

Wrong Answer

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

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

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

for i in range(1,2000):
    if int(i*0.08) == A and int(i*0.10) == 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().strip().split())
x = math.floor(a / 0.08)
y = math.ceil((a + 1) / 0.08)
ans = -1

for i in range(1250):
  if math.floor(i * 0.1) == b:
    ans = i
    break

print(ans)

import math

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

for i in range(1300):
  if math.floor(i * 0.08) == a and math.floor(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):
import sys
import math
sys.setrecursionlimit(int(1e6))

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

pa = A / 0.08
pb = B / 0.10

if int(pa) == int(pb):
    print(int(pa))
elif int(pa + 0.08) == int(pb):
    print(min(int(pa + 0.08), int(pb)))
elif int(pa) == int(pb + 0.1):
    print(min(int(pa), int(pb + 0.1)))
elif int(pa+0.08) == int(pb + 0.1):
    print(int(pa+0.08), int(pb + 0.1))
else:
    print(-1)


import sys
import math
sys.setrecursionlimit(int(1e6))

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

pa = A / 0.08
pb = B / 0.10

if int(pa) == int(pb):
    print(int(pa))
elif int(pa + 0.08) == int(pb):
    print(int(pb))
elif int(pa) == int(pb + 0.1):
    print(int(pa))
elif int(pa+0.08) == int(pb + 0.1):
    print(int(pa+0.08))
else:
    print(-1)


import sys
import math
sys.setrecursionlimit(int(1e6))

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

pa = A / 0.08
d = 100 / 8

ans = -1
for p in range(int(pa), int(pa + d)+1):
    if (A == int(p * 0.08)) and (B == int(p * 0.10)):
        ans = p
        break

print(ans)


Verdicts: Wrong Answer

Wrong Answer

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

Submission attempts (in order):
A,B=map(int,input().split())
i=0
while i > 0:
    X=int(i*0.08)
    Y=int(i*0.10)
    if A==X and B==Y:
        break
    i=i+1
if i==100:
    i=-1
    print(i)
else:
    print(i)


A,B=map(int,input().split())
i=0
while i<1001:
    X=int(i*0.08)
    Y=int(i*0.10)
    if A==X and B==Y:
        break
    i=i+1
if i==1001:
    i=-1
    print(i)
else:
    print(i)


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

A1 = A * 12.5
A2 = (A + 0.9) * 12.5
B1 = B * 10
B2 = (B + 0.9) * 10

if B1 <= A1 and A1 < (B + 1) * 10:
    print(math.floor(A1 + 1))
elif A1 <= B1 and B1 < (A + 1) *12.5 :
    print(math.floor(B1))
else:
    print(-1)

import math

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

A1 = A * 12.5
A2 = (A + 0.9) * 12.5
B1 = B * 10
B2 = (B + 0.9) * 10

if B1 <= A1 and A1 < (B + 1) * 10:
    print(math.ceil(A1))
elif A1 <= B1 and B1 < (A + 1) *12.5 :
    print(B1)
else:
    print(-1)

Verdicts: Wrong Answer

Accepted