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(float,input().split())
A_min=int(A/8*100)+1
A_max=int((A+1)/8*100)
ans=0
flag=False
if (A+1)*100%8==0:
    A_max=int((A+1)*100/8)-1
for i in range(A_min,A_max):
    if int(i*0.1)==B:
        ans=i
        flag=True
        break
if flag:
    print(ans)
else:
    print(-1)

A,B=map(float,input().split())
A_min=int(A/8*100)+1
A_max=int((A+1)/8*100)+1
ans=0
flag=False
if (A+1)*100%8==0:
    A_max=int((A+1)*100/8)
for i in range(A_min,A_max):
    if int(i*0.1)==B:
        ans=i
        flag=True
        break
if flag:
    print(ans)
else:
    print(-1)

A,B=map(float,input().split())
A_min=int(A/8*100)+1
A_max=int((A+1)/8*100)+1
ans=0
flag=False
if (A+1)*100%8==0:
    A_max=int((A+1)*100/8)
for i in range(A_min,A_max):
    if int(i*0.1)==B:
        ans=i
        flag=True
        break
if int(ans*0.08)!=A:
    ans+=1
if flag:
    print(ans)
else:
    print(-1)

A,B=map(float,input().split())
A_min=int(A/8*100)
A_max=int((A+1)/8*100)
ans=0
flag=False
if (A*100/8)%8!=0:
    A_min=A_min+1
if (A+1)*100%8==0:
    A_max=int((A+1)*100/8)-1
for i in range(A_min,A_max):
    if int(i*0.1)==B:
        ans=i
        flag=True
        break
if int(ans*0.08)!=A:
    ans+=1
if flag:
    print(ans)
else:
    print(-1)

A,B=map(float,input().split())
A_min=int(A/8*100)+1
A_max=int((A+1)/8*100)+1
ans=0
flag=False
if (A+1)*100%8==0:
    A_max=int((A+1)*100/8)
for i in range(A_min,A_max):
    if int(i*0.1)==B:
        ans=i
        flag=True
        break
if flag:
    print(ans)
else:
    print(-1)

A,B=map(float,input().split())
A_min=int(A/8*100)
A_max=int((A+1)/8*100)
ans=0
flag=False
if (A*100/8)%8!=0:
    A_min=A_min+1
if (A+1)*100%8==0:
    A_max=int((A+1)*100/8)-1
for i in range(A_min,A_max):
    if int(i*0.1)==B:
        ans=i
        flag=True
        break
if flag:
    print(ans)
else:
    print(-1)

A,B=map(float,input().split())
A_min=int(A/8*100)
A_max=int((A+1)/8*100)+1
ans=0
flag=False
if (A+1)*100%8==0:
    A_max=int((A+1)*100/8)
for i in range(A_min,A_max):
    if int(i*0.1)==B:
        ans=i
        flag=True
        break
if int(ans*0.08)!=A:
    ans+=1
if flag:
    print(ans)
else:
    print(-1)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

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

Submission attempts (in order):
import math
N,M = map(int,input().split())
n = math.ceil(N/0.08)
m = int(M/0.1)
print(n,m)
ans = 2000
if int(n*0.1) ==M:
  ans = min(n,ans)
if int(m*0.08) ==N:
  ans =min(m,ans)
  
if int(n*0.1)!=M and int(m*0.08)!=N:
  ans = -1
  
print(ans)

import math
N,M = map(int,input().split())
n = math.ceil(N/0.08)
m = int(M/0.1)
ans = 2000
if int(n*0.1) ==M:
  ans = min(n,ans)
if int(m*0.08) ==N:
  ans =min(m,ans)
  
if int(n*0.1)!=M and int(m*0.08)!=N:
  ans = -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())

eightper = 0.08
tenper = 0.1
ans = -1
for i in range(1,100*(1+tenper)+1):
    if int(i*eightper)==a:
        if int(i*tenper)==b:
            ans=i
            break
print(ans)

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

eightper = 0.08
tenper = 0.1
ans = -1
for i in range(1,1000+1):
    if int(i*eightper)==a:
        if int(i*tenper)==b:
            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):
from math import floor
a,b=map(int,input().split())
la=[]
lb=[]
for i in range(100):
  s=(a+i/100)
  la.append(s)
  
for i in range(10):
  s=(b+i/10)
  lb.append(s)
  
#print(la)
#print(lb)
lm=[0]
for i in la:
  m=int(floor(100/8*i))
  for j in lb:
    n=int(floor(10*j))
    if m==n:
      lm.append(m)
      
ans=min(lm)
if ans==0:
  print('-1')
  
else:
  print(ans)
      


a,b=map(int,input().split())
import math
for i in range(2000):
  if math.floor(i*0.08)==a and math.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):
import math
import sys
a,b=map(int,input().spliit())
a2=math.ceil(a/0.08)
a3=math.floor((a+1)/0.08)
if a2>a3:
    print("-1")
    sys.exit()
b2=math.ceil(b/0.1)
b3=math.floor((b+1)/0.1)
if b2>b3:
    print("-1")
    sys.exit()
if b2<a2:
    if a2<(b+1)/0.1:
        print(a2)
    else:
        print("-1")
if a2<b2:
    if b2<(a+1)/0.08:
        print(b2)
    else:
        print("-1")
if a2==b2:
    print(a2)


import math
import sys
a,b=map(int,input().split())
a2=math.ceil(a/0.08)
a3=math.floor((a+1)/0.08)
if a2>a3:
    print("-1")
    sys.exit()
b2=math.ceil(b/0.1)
b3=math.floor((b+1)/0.1)
if b2>b3:
    print("-1")
    sys.exit()
if b2<a2:
    if a2<(b+1)/0.1:
        print(a2)
    else:
        print("-1")
if a2<b2:
    if b2<(a+1)/0.08:
        print(b2)
    else:
        print("-1")
if a2==b2:
    print(a2)


Verdicts: Runtime Error

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

Submission attempts (in order):
a,b=(int(x) for x in input().split())
 
import math 
 
i=0
while i<10001:
  i++
  if math.float(i)==a and math.float(i)==b:
    print(i)
    break
else:
  print(-1)

a,b=(int(x) for x in input().split())
i=0
while i<10000:
  i+=1
  if i//100*8==a and i//100*10==b:
    print(i)
    break
else:
  print(-1)
 


a,b=(int(x) for x in input().split())
 
import math 
 
i=0
while i<10001:
  i++
  if math.float(i)==a and math.float(i)==b:
    print(i)
else:
  print(-1)

a,b=(int(x) for x in input().split())
i=0
while i<10000:
  i+=1
  if i//100*8==a and i//100*10==b:
    print(i)
  break
else:
  print(-1)
 


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

for _ in range(10000):
  if i//100*8==a and i//100*10==b:
    print(i)
  else:
    print(-1)

a,b=(int(x) for x in input().split())
if 100*a//8+100*a%8 == 100*b//10+100*b%10:
  print(100*a//8+100*a%8)
else:
  print(-1)

a,b=(int(x) for x in input().split())
i=0
while i<10000:
  i+=1
  if i//100*8==a and i//100*10==b:
    print(i)
else:
  print(-1)
 


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

import math 

i=0
while i<10001:
  i++
  if math.float(i)==a and math.float(i)==b:
    print(i)
else:
  print(-1)
  

a,b=(int(x) for x in input().split())
 
import math 
 
i=0
while i<10001:
  i+=1
  if math.floor(i*0.08)==a and math.floor(i*0.1)==b:
    print(i)
    break
else:
  print(-1)

Verdicts: Runtime Error

Wrong Answer

Runtime Error

Wrong Answer

Runtime Error

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

ans = -1

for i in range(1,100):
  a = int(i * 1.08)
  b = int(i * 1.1)
  if a == A and b == B:
    ans = i
    break
print(ans)

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

ans = -1

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


Verdicts: Wrong Answer

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

Submission attempts (in order):
#At coder 2020/3/8 C
import math

I = list(map(int, input().split())) 
A=I[0]
B=I[1]

a1=A/0.08
b1=B/0.1

a2=(A+1)/0.08
b2=(B+1)/0.1

af=math.ceil(a1)
ac=math.ceil(a2)
bf=math.ceil(b1)
bc=math.ceil(b2)

if ac<bf or bc<af:
    ans=-1
else:
    ans=min(af,bf)

print(ans)

#At coder 2020/3/8 C
import math

I = list(map(int, input().split())) 
A=I[0]
B=I[1]

a1=A/0.08
b1=B/0.1

a2=(A+1)/0.08
b2=(B+1)/0.1

af=math.ceil(a1)
ac=math.ceil(a2)
bf=math.ceil(b1)
bc=math.ceil(b2)
if ac<=bf or bc<=af:
    ans=-1
else:
    ans=min(af,bf)

print(ans)

#At coder 2020/3/8 C
import math

I = list(map(int, input().split())) 
A=I[0]
B=I[1]

a1=A/0.08
b1=B/0.1

a2=(A+1)/0.08
b2=(B+1)/0.1

af=math.ceil(a1)
ac=math.ceil(a2)
bf=math.ceil(b1)
bc=math.ceil(b2)

if ac<=bf or bc<=af:
    ans=-1
else:
    ans=max(af,bf)
#print(af,ac,bf,bc)
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())

A=A//0.08

B=B//0.10

if A==B:
  print(A)
else:
  print("-1")

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

Alist=[i for i in range(ceil(A/0.08),int((A+1)/0.08))]
Blist=[i for i in range(ceil(B/0.1),int((B+1)/0.1))]

if set(Alist)&set(Blist):
  print(min(set(Alist)&set(Blist)))
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 sys
import math

read = ys.std.readline
S = read()

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

for i in range(1000+1):
    if A == math.ceil(i * 0.08):
        if B == math.ceil(i * 0.1):
            print(i)
            return
print(-1)

import sys
import math

read = sys.stdin.readline
S = read()

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

fin = False
for i in range(1000+1):
    if a == math.floor(i * 0.08):
        if b == math.floor(i * 0.1):
            print(i)
            fin = True
            break
if not fin:
    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())
M1 = int(A * 100 / 8)
M2 = int(B * 10)
if M1 == M2:
    print(M1)
else:
    print('-1')

import sys
A, B = map(int, input().split())
Am = -(-A * 100 // 8)
AM = (A + 1) * 100 // 8
Bm = int(B * 10)
BM = int((B + 1) * 10)
for m in range(Am, AM):
    for mm in range(Bm, BM):
        if m == mm:
            print(m)
            sys.exit()
else:
    print('-1')

Verdicts: Wrong Answer

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

Submission attempts (in order):


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

sum_A = int(A/0.08)
sum_B = int(B/0.10)

for i in range(1010):
    if A == int(i * 0.08) and B == int(i * 0.10):
        print(i)
    else:
        print(-1)

A, B = map(int,input().split())
 
sum_A = int(A/0.08)
sum_B = int(B/0.10)

flag = True
for i in range(1010):
    if A == int(i * 0.08) and B == int(i * 0.10):
        print(i)
        flag = False
        break
    else:
        #print(-1)
        continue
if flag:
    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(10000,-1,-1):
  tax1 = int(i*0.08)
  tax2 = int(i*0.1)
  if tax1 = a and tax2 == b:
    print(i)

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

for i in range(10000,-1,-1):
  tax1 = int(i*0.08)
  tax2 = int(i*0.1)
  if tax1 = a and tax2 == b:
    ans = i
print(ans)

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

Verdicts: Runtime Error

Runtime Error

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

Submission attempts (in order):
from math import ceil, floor

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

x8min = ceil(A / 0.08) 
x8max = floor((A + 1) / 0.08) 
x10min = ceil(B / 0.1) 
x10max = floor((B + 1) / 0.1) 

#print(str(x8min))
#print(str(x8max))
#print(str(x10min))
#print(str(x10max))

if (x8min <= x10max) and (x8max >= x10min) and (x8min >= x10max):
    print(str(x8min))
else:
    print('-1')


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

maxX = 1250
ans = -1
for i in range(maxX):
    if (floor(i * 0.08) == A) and (floor(i * 0.1) == B):
        ans = i
        break

print(str(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 = [i for i in range(int((A-1)*100/8 ), int((A+1)*100/8 ))]
b = [i for i in range(int((B-1)*100/10), int((B+1)*100/10))]

a = [i for i in a if int(i*0.08) == A]
b = [i for i in b if int(i*0.10) == B]

ans = list(set(a) & set(b))
if ans and min(ans) > 0:
    print(min(ans))
else:
    print(-1)


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

a = [i for i in range(int((A-1)*100/8 ), int((A+1)*100/8 ))]
b = [i for i in range(int((B-1)*100/10), int((B+1)*100/10))]

a = [i for i in a if int(i*0.08) == A]
b = [i for i in b if int(i*0.10) == B]

ans = list(set(a) & set(b))
if ans and min(ans) > 0:
    print(min(ans))
else:
    print(-1)


Verdicts: Runtime Error

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

Submission attempts (in order):
A, B = input().split()
A = int(A)
B = int(B)
ans = -1
for x in range(10001):
    if x*0.08 == A and x*0.1 == B:
        ans = x
        break

print(ans)


A, B = map(int, input().split())
ans = -1
for x in range(1010):
    if int(x*0.08) == A and int(x*0.1) == B:
        ans = x
        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 = map(int, input().split())
x=a*100//8
y=b*10
i=1
f=False
while(i<=1250):
  if i*8//100 == x and i//10 == y:
    print(i)
    f=True
    break
  i+=1
if not f:
  print(-1)

a, b = map(int, input().split())
y=b*10
f=False
for i in range(y, y+10):
  if i*8//100 == a:
    print(i)
    f=True
    break
if not f:
  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(1,int(1e6)):
  left = int(i * 0.08) 
  right = int(i * 0.1)
  if left == a and right == b:
    print(i)
    break
print(-1)

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

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
import math

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

l = int(a / 0.08)
r = int((a + 0.999999999999) / 0.08)

ans = r
flag = False
for i in range(l, r + 1):
    if math.floor(i * 0.1) == b:
        ans = min(r, i)
        flag = True

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


import math

a, b = map(int, input().split())
limit = int(100 / 0.08) + 1
ans = limit

for i in range(1, limit):
    x = math.floor(i * 0.08)
    y = math.floor(i * 0.1)
    if x == a and y == b:
        ans = min(ans, i)

print(ans) if not ans == limit 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 = list(map(int,input().split()))
​
cnt = 0
for i in range(1,10000):
    X = math.floor(i * 0.08)
    Y = math.floor(i * 0.1)
    if A == X and B == Y:
        print(i)
        cnt += 1
        break
​
if cnt == 0:
    print(-1)


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

import math
ans = -1
for i in range(10000):
    if math.floor(i*0.08) == A and math.floor(i*0.1) == B:
        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):


using namespace std;

int main() {
  int a, b; cin >> a >> b;
  for (int i = 0; i <= 10000; i++) {
    if ( i*8/100 == a && i*10/100 == b) {
      cout << i << endl;
      return 0;
    }
  }
  cout << -1 << endl;
  return 0;
}

def main():
    a, b = map(int, input().split())
    for x in range(1, 100005):
        aa = x * 8 // 100
        bb = x // 10
        if aa == a and bb == b:
            print(x)
            return

    print(-1)

main()


Verdicts: Runtime Error

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

Submission attempts (in order):
x, y = map(int, input().split())
tmp = range(int(y/0.1), int((y+1)/0.1))
for i in range(int(x/0.08), int((x+1)/0.08)):
    if i in tmp:
        print(i)
        break
print(-1)

x, y = map(int, input().split())
tmp = range(int(y//0.1)+1, int((y+1)/0.1))
ans=-1
for i in range(int(x//0.08)+1, int((x+1)/0.08)):
    if i in tmp:
        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 = map(int,input().split())
ak = []
bk = []
for k in range(-int((-A/0.08)//1),-int(-(A/0.08+12.5)//1)):
  ak.append(k)
for k in range(-int((-B/0.10)//1),-int(-(B/0.10+10.0)//1)):
  bk.append(k)
print(ak)
print(bk)
ans = min(set(ak) & set(bk)) if len(set(ak) & set(bk)) > 0 else -1
print(ans)

A,B = map(int,input().split())
ak = []
bk = []
for k in range(int(-(-A/0.08)),int(A/0.08+12.5)):
  ak.append(k)
for k in range(int(-(-B/0.10)),int(B/0.10+10.0)):
  bk.append(k)
ans = min(set(ak) & set(bk)) if len(set(ak) & set(bk)) > 0 else -1

A,B = map(int,input().split())
for k in range(1,1010):
  if (int(k * 0.08) == A) & (int(k * 0.10) == B):
    print(k)
    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())

min_8 = A * 100 // 8
max_8 = max(((A + 1) * 100 // 8) - 1, min_8)
min_10 = B * 100 // 10
max_10 = max((B  + 1) * 100 // 10 - 1, min_10)

if (max_10 < min_8 or max_8 < min_10):
    print(-1)
    exit()

print(max(max_8,min_10))


import math
A, B = map(int, input().split())
 
min_8 = math.ceil(A  * 12.5)
max_8 = math.ceil((A + 1) * 12.5) -1
min_10 = math.ceil(B * 10)
max_10 = math.ceil((B  + 1) * 10)  -1
 
if (max_10 < min_8 or max_8 < min_10):
    print(-1)
else:
    print(max(min_8,min_10))

Verdicts: Wrong Answer

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

Submission attempts (in order):
a, b = input().split() # a = result * 0.08, b = result * 0.1
a, b = int(a), int(b)
 
result_a = int(a / 0.08)
result_b = int(b / 0.1)
 
if result_a > result_b:
  if int(result_a * 0.08) == a:
    result_a += 1
  c = int(result_a * 0.1)
  if b == c:
    print(result_a)
  else:
    print(-1)
else:
  c = int(result_b * 0.08)
  if a == c:
    print(result_b)
  else:
    print(-1)

a, b = input().split() # a = result * 0.08, b = result * 0.1
a, b = int(a), int(b)
 
result_a = int(a / 0.08)
result_b = int(b / 0.1)
 
if result_a > result_b:
  if int(result_a * 0.08) != a:
    result_a += 1
  c = int(result_a * 0.1)
  if b == c:
    print(result_a)
  else:
    print(-1)
else:
  c = int(result_b * 0.08)
  if a == c:
    print(result_b)
  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 sys

A, B = map(int, sys.stdin.readline().rstrip().split())
c = 1e-1000
d = 1 - c
A_min = int(A * (100 / 8.) + d)
A_max = int((A + d) * (100 / 8.))
B_min = int(B * 10.)
B_max = int((B + d) * 10.)

if min(A_max, B_max) - max(A_min, B_min) >= 0:
    print(max(A_min, B_min))
else:
    print('-1')

import sys

A, B = map(int, sys.stdin.readline().rstrip().split())
c = 1e-1000
d = 1 - c
A_min = int(A * (100 / 8.) + d)
A_max = (A + 1) * (100 / 8.)
B_min = int(B * 10.)
B_max = (B + 1) * 10.

if int(min(A_max, B_max) - max(A_min, B_min)) > 0:
    print(int(max(A_min, B_min)))
else:
    print('-1')


import sys

A, B = map(int, sys.stdin.readline().rstrip().split())
c = 1e-10
d = 1 - c
A_min = int(A * (100 / 8.) + d)
A_max = int((A + d) * (100 / 8.))
B_min = int(B * 10.)
B_max = int((B + d) * 10.)

if min(A_max, B_max) - max(A_min, B_min) >= 0:
    print(max(A_min, B_min))
else:
    print('-1')

Verdicts: Wrong Answer

Wrong Answer

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

Submission attempts (in order):
import math

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

ans=-1
for i in range(1,B*10+1):
    if math.floor(i*0.08)==A and math.floor(i*0.1)==B:
        ans=i
        break

print(ans)

import math

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

ans=-1
for i in range(1,B*10+1)
    if math.floor(i*0.08)==A and math.floor(i*0.1)==B:
        ans=i
        break

print(ans)

import math

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

ans=-1
for i in range(1,1001):
    if math.floor(i*0.08)==A and math.floor(i*0.1)==B:
        ans=i
        break

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):
import sys
a, b = map(int, sys.stdin.readline().split())
i = 0
res = -1
while i <= 1000:
  if int(i*0.08) == int(i*0.1):
    res = i
    break
  i += 1
print(res)

import sys
a, b = map(int, sys.stdin.readline().split())
i = 0
res = -1
while i <= 1000:
  if int(i*0.08) == a and int(i*0.1) == b:
    res = i
    break
  i += 1
print(res)


Verdicts: Wrong Answer

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

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

while True:
  p=i*8//100
  q=i//10
  if p==a and q==b:
    break
  i+=1
  if i>=a*11 or i>b*11:
    print(-1)
    exit()
print(i)

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

while True:
  p=i*8//100
  q=i//10
  if p==a and q==b:
    break
  i+=1
  if i>=(a+1)*13 and i>(b+1)*10:
    print(-1)
    exit()
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):
a,b=map(int,input().split())
x=50*(b-a)
if int(0.08*x)==a and int(0.1*x)==b:
    print(x)
else:
    print(-1)

a,b=map(int,input().split())
for i in range(2000):
    if int(i*0.08)==a and int(i*0.1)==b:
        print(i)
        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):
from math import floor

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

min1 = floor(A / 0.08)
max1 = floor((A+1) / 0.08 - 0.0001)
min2 = floor(B / 0.1)
max2 = floor((B+1) / 0.1 - 0.0001)

print(min1, max1)
print(min2, max2)
if min1 >= min2 and min1 <= max2:
    print(min1)
    print(min1 * 0.08, min1 * 0.1)
elif min2 >= min1 and min2 <= max1:
    print(min2)
    print(min2 * 0.08, min2 * 0.1)
else:
    print(-1)

from math import floor, ceil

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

min1 = ceil(A / 0.08)
max1 = floor((A+0.999) / 0.08)
min2 = ceil(B / 0.1)
max2 = floor((B+0.999) / 0.1)

if min1 >= min2 and min1 <= max2:
    print(min1)
elif min2 >= min1 and min2 <= max1:
    print(min2)
else:
    print(-1)


Verdicts: Wrong Answer

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

Submission attempts (in order):
A, B = map(int, input().split())
A_ = int(A / 0.08)
B_ = int(B / 0.1)
j = False
if A_ == B_:
  print(int(A/0.08))
else:
  for i in range(abs(A_ - B_)):
    if A_ > B_:
      B_ += 1
    elif A_ < B_:
      A_ += 1
    if int(A / 0.08) == int(B / 0.1):
      j = True
      break
  if j == True:
    print(B_)
  else:
    print(-1)

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

b = B * 10
ans = b
for i in range(b, b*2):
    y = math.floor(i * 0.08)
    if y == A:
        ans = min(ans, i)
        break
if ans == b:
    print(-1)
else:
    print(ans)


import math

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

ans = -1
for i in range(1, 1001):
    x = math.floor(i * 0.10)
    y = math.floor(i * 0.08)
    if x == B and y == 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 = map(int, input().split())
for n in range(1, 2000):
    if n * 0.08 == A and n * 0.1 == B:
        print(n)
        break
else:
    print(-1)

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

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

A, B = map(int, input().split())
if A * 12.5 == B * 10:
    print(A * 12.5)
else:
    print(-1)

A, B = map(int, input().split())
if A * 12.5 == B * 10:
    print(A * 12.5)
else:
    print(-1)

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

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

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

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

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

Submission attempts (in order):
A,B=map(int,input().split())
sampleA=A*100/8
sampleB=B*10
sampleA=int(sampleA)
sampleB=int(sampleB)
ans=[]
for i in range(min(sampleA,sampleB),max(sampleA,sampleB)+100000):
    if int(i*8/100)==A and int(i*0.1)==B:
        ans.append(i)
        break
    else:
        ans.append(-1)
print(min(ans))

ans=[]
A,B=map(int,input().split())
for i in range(1,1009):
    if int(i*8/100)==A and int(i*0.1)==B:
        ans.append(i)
        break
    else:
        ans.append(-1)
print(min(ans))

A,B=map(int,input().split())
sampleA=A*100/8
sampleB=B*10
sampleA=int(sampleA)
sampleB=int(sampleB)
ans=[]
for i in range(max(sampleA,sampleB)-5,max(sampleA,sampleB)+100000):
    if int(i*8/100)==A and int(i*0.1)==B:
        ans.append(i)
        break
    else:
        ans.append(-1)
print(min(ans))

ans=[]
anskouho=[]
A,B=map(int,input().split())
for i in range(1,1009):
    if int(i*8/100)==A and int(i*0.1)==B:
        ans.append(i)
        anskouho.append(min(ans))
    else:
        anskouho.append(-1)
print(max(anskouho))

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

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

Submission attempts (in order):
import math

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

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

if x == y:
        print(x)
else:
        print(-1)

import math

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

flg = 0
for i in range(1,1250):
        x = math.floor(i * 0.08)
        y = math.floor(i * 0.1)
        if x == A and y == B:
                print(i)
                flg = 1
                break
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())

import math

ans = -1

for n in range(1,1009):
        if math.floor(n*0.08) == A and math.floor(n*0.1) == B:
            a = n
            break

print(ans)

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

import math

ans = -1

for n in range(1,101):
        if math.floor(n*0.08) == A and math.floor(n*0.1) == B:
            a = n
            break

print(ans)

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

import math

ans = -1

for n in range(1001):
        if math.floor(n*0.08) == A and math.floor(n*0.1) == B:
            a = n
            break

print(ans)

ans = -1

for n in range(1001):
        if math.floor(n*0.08) == A and math.floor(n*0.1) == B:
            ans = n
            break

print(ans)

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

import math

ans = -1

for n in range(1001):
        if math.floor(n*0.08) == A and math.floor(n*0.1) == B:
            ans = int(n)
            break

print(ans)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Runtime Error

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

Submission attempts (in order):
import sys
import math
#import numpy as np
'''a,b= map(int,input().split())'''
#a, b, c = [list(map(int, input().split())) for _ in range(3)]
#li0= [int(x) for x in input().split()]
#n,l= map(int, input().split())
#x = [list(map(int, input().split())) for _ in range(n)] 
a,b= map(int,input().split())
ans=math.floor(a/0.08)
ju=math.floor(b/0.1)
li=[]
li1=[]

i=0
for i in range(101):
  if a==math.floor(i*0.08):
    li.append(i)
  if b==math.floor(i*0.1):
    li1.append(i)

li.sort()
li1.sort()
print(li)
print(li1)
if len(li1)>0:
  ans=min(li1)
if len(li)>0:
  ju=min(li)
for i in range(len(li1)):
  if ju==li1[i]:
    print(ju)
    sys.exit()
for i in range(len(li)):
  if ans==li[i]:
    print(ans)
    sys.exit()
print('-1')

import sys
import math
#import numpy as np
'''a,b= map(int,input().split())'''
#a, b, c = [list(map(int, input().split())) for _ in range(3)]
#li0= [int(x) for x in input().split()]
#n,l= map(int, input().split())
#x = [list(map(int, input().split())) for _ in range(n)] 
a,b= map(int,input().split())
ju=ans=0
li=[]
li1=[]

i=0
for i in range(10001):
  if a==math.floor(i*0.08):
    li.append(i)
  if b==math.floor(i*0.1):
    li1.append(i)

li.sort()
li1.sort()

if len(li1)>0:
  ans=min(li1)
if len(li)>0:
  ju=min(li)
for i in range(len(li1)):
  if ju==li1[i]:
    print(ju)
    sys.exit()
for i in range(len(li)):
  if ans==li[i]:
    print(ans)
    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):
# -*- coding: utf-8 -*-
import math

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

temp_a1 = (100 * a // 8) + 1
temp_a2 = 100 * (a + 1) // 8
temp_b1 = 10 * b
temp_b2 = 10 * (b + 1)

result = -1
for i in range(int(temp_a1), int(temp_a2)):
    if temp_b1 <= i < temp_b2:
        result = i
        break

print(result)


print(-1)

# -*- coding: utf-8 -*-
import math

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

temp_a1 = 100 * a // 8
temp_a2 = 100 * (a + 1) // 8
temp_b1 = 10 * b
temp_b2 = 10 * (b + 1)

result = -1
for i in range(min(int(temp_a1), int(temp_b1)), min(int(temp_a2), int(temp_b2))):
    if math.floor(i * 0.08) == a and math.floor(i * 0.1) == b:
        result = i
        break

print(result)


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):
n, a, b = map(int, input().split())
if n%(a+b) < a:
    print(n//(a+b)*a+n%(a+b))
else:
    print(n//(a+b)*a+a)

import math
a, b = map(int, input().split())
x = []
y = []
for i in range(math.ceil(b/0.1), math.floor((b+1)/0.1)):
    y.append(i)
for i in range(math.ceil(a/0.08), math.floor((a+1)/0.08)):
    x.append(i)
    if y.count(i) == 1:
        print(i)
        exit()
print('-1')


Verdicts: Runtime Error

Accepted