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

Submission attempts (in order):
a,b=map(int,input().split())
i=0
while i <= 1000:

    if a==int(i*0.08) and b==int(i*0.1):
        print(i)
print(-1)

a,b=map(int,input().split())
i=0
while i <= 10000:

    if a==int(i*0.08) and b==int(i*0.1):
        print(i)
print(-1)

a,b=map(int,input().split())
i=0
while i <= 10000:

    if a==int(i*0.08) and b==int(i*0.1):
        print(i)
    i+=1
print(-1)

a,b=map(int,input().split())
i=0
while i<=10000:
    if i*8/100==a or i+10/100==b:
        print(i)
        break
    i+=1
print(-1)

import sys
a,b=map(int,input().split())
i=0
while i <= 10000:
    c=int(i*0.08)
    d=int(i*0.1)
    if c==a and d==b:

        print(i)
        sys.exit()
    i+=1

print(-1)

Verdicts: Time Limit Exceeded

Time Limit Exceeded

Wrong Answer

Wrong Answer

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

Submission attempts (in order):
a,b=map(int,input().split())
for i in range(1,101):
    if i*108//100==a and i*11//10==b:
        print(i)
        exit()
print(-1)

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

for x in range(10000):
    if (int(x*0.08)==a and int(x*0.1)==b):
        print"x"
    else:
        print"-1"

(A,B)=map(int, input().split())
 
for x in range(10000):
    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(10000):
    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(10000):
    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(10000):
    if (int(x*0.08)==A and int(x*0.1)==B):
        print(x)
        break
else:
    print("-1")

Verdicts: Runtime Error

Runtime Error

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())
x=100*a/8
y=100/8*(a+1)
z=10*b
w=10*(b+1)
import math
if max(math.ceil(z),math.ceil(x))<min(y,w)1 3 :
    print(math.ceil(max(z,x)))
else:
    print(-1)    

a,b=map(int,input().split())
x=100*a/8
y=100/8*(a+1)
z=10*b
w=10*(b+1)
import math
if max(math.ceil(z),math.ceil(x))<min(y,w) :
    print(math.ceil(max(z,x)))
else:
    print(-1)    

Verdicts: Runtime Error

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

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

a = [math.ceil(a * 12.5),(a + 1) * 12.5]
b = [math.ceil(b * 10),math.floor((b + 1) * 10)]
print(a)
print(b)
if max(a[0], b[0]) < min(a[1], b[1]):
    print(max(a[0], b[0]))
else:
    print(-1)

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

a = [math.ceil(a * 12.5),(a + 1) * 12.5]
b = [math.ceil(b * 10),math.floor((b + 1) * 10)]
# print(a)
# print(b)
if max(a[0], b[0]) < min(a[1], b[1]):
    print(max(a[0], b[0]))
else:
    print(-1)

Verdicts: Wrong Answer

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

Submission attempts (in order):
a,b = map(int,input().split())
ans =-1
for i in range(10000,-1,-1):
  money0 = int(i*0.08)
  money1= int(i*0.1)
  if money0==a and money1==b:
    
print(ans)

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


a,b = map(int,input().split())
ans =-1
for i in range(1001,-1,-1):
  money0 = int(i*0.08)
  money1= int(i*0.1)
  if money0==a and money1==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):
import math

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

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

import math

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

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

print(-1)

import math

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

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

for i in range(1000):
    if math.floor(i * 0.08) == a and math.floor(i * 0.1) == b:
        ans = i
        flag = 1
if flag == 1:
    print(ans)
else:
    print(-1)

import math

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

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

print(-1)

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

for i in range(13 , 1001):
    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

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())
import math
c = math.ceil(a/0.08)
d = round(b/ (0.1))
e = math.floor((a+1)/0.08)
f = round((b+1)/0.1)-1
i = c
j = -1
for i in range(c,e+1):
    if d <= i <= f:
        j = i
        break
    else:
        i = i+1
print(j

a,b = map(int,input().split())
import math
c = math.ceil(a/0.08)
d = round(b/ (0.1))
e = math.ceil((a+1)/0.08)-1
f = round((b+1)/0.1)-1
i = c
j = -1
for i in range(c,e+1):
    if d <= i <= f:
        j = i
        break
    else:
        i = i+1
print(j)

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())
f = False
n = A * 100 // 9
m = A * 100 // 7

for i in range(n, m + 1):
  if n * 100 // 8 == A and n // 10 == B:
    f = True
    break
  n += 1
print(n if f else -1)


A, B = map(int, input().split())
f = False
ans = 0
n = A * 100 // 9
print(n)
m = A * 100 // 7
print(m)
for i in range(n, m + 1):
  print("i", i)
  print(i * 8 // 100)
  print(i * 10 // 100)
  if i * 8 // 100 == A and i // 10 == B:
    f = True
    ans = i
    break
print(ans if f else -1)


A, B = map(int, input().split
f = False
n = int(A / 8 * 100)
while n * 0.08 //1 == A:
  if n * 0.1 // 1 == B:
    f = True
    break
  n += 1
print(n if f else -1)

A, B = map(int, input().split())
f = False
ans = 0
n = A * 100 // 8
m = (A + 1) * 100 // 8
for i in range(n, m + 1):
  if i * 8 // 100 == A and i // 10 == B:
    f = True
    ans = i
    break
print(ans if f else -1)


Verdicts: Wrong Answer

Wrong Answer

Runtime Error

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

Submission attempts (in order):
import math

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

c = math.ceil
min8, max8 = c(a*12.5), c((a+1)*12.5)
min10, max10 = c(b*10), c((b+1)*10)

l8, l10 = list(range(min8, max8)), list(range(min10, max10))
s8, s10 = set(l8), set(l10)

ss = s8 & s10
print(min8, max8, min10, max10)
print(min(ss) if len(ss) >0 else -1)
print(238*0.08)

import math

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

c = math.ceil
min8, max8 = c(a*12.5), c((a+1)*12.5)
min10, max10 = c(b*10), c((b+1)*10)

l8, l10 = list(range(min8, max8)), list(range(min10, max10))
s8, s10 = set(l8), set(l10)

ss = s8 & s10

print(min(ss) if len(ss) >0 else -1)
#print(238*0.08)

Verdicts: Wrong Answer

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

Submission attempts (in order):
def main():

    A, B = map(int, input().split())
    v_A = int(A / 0.08)
    v_B = int(B / 0.1)
    v_A2 = int((A+1) / 0.08)
    v_B2 = int((B+1) / 0.1)

    A_cand = [i for i in range(v_A+1, v_A2)]
    B_cand = [i for i in range(v_B+1, v_B2)]

    # print(A_cand)
    # print(B_cand)
    ab_cand = set(A_cand) & set(B_cand)
    if len(ab_cand) == 0:
        print(-1)
    else:
        print(min(ab_cand))
    # print(ab_cand)


if __name__ == '__main__':
    main()


def main():

    A, B = map(int, input().split())
    v_A = int(A / 0.08)
    if (100*A) % (100*0.08) != 0:
        v_A += 1
    v_B = int(B / 0.1)
    if (100*B) % (100*0.1) != 0:
        v_B += 1
    v_A2 = int((A+1) / 0.08)
    v_B2 = int((B+1) / 0.1)

    A_cand = [i for i in range(v_A, v_A2)]
    B_cand = [i for i in range(v_B, v_B2)]

    # print(A_cand)
    # print(B_cand)
    ab_cand = set(A_cand) & set(B_cand)
    if len(ab_cand) == 0:
        print(-1)
    else:
        print(min(ab_cand))
    # print(ab_cand)


if __name__ == '__main__':
    main()


Verdicts: Wrong Answer

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

Submission attempts (in order):
A, B = map(int, input().split())
target = -1
for i in range(1300):
  if int(i*0.08) == int(i*0.1):
    target = i
print(target)

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


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


Verdicts: Wrong Answer

Wrong Answer

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

Submission attempts (in order):
a,b = map(int, input().split())
for i in range(1, 1001):
    if int(i**0.08)==a and int(i*0.1)==b:
        print(i)
        exit()
print(-1)

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

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
a,b=input().split()
a=int(a)
b=int(b)
x=10
y=int(x*8/100)
z=int(x*10/100)
for i in range(10000):
  if y==a and z==b:
    print(x)
  else:
    x=x+1

a,b=input().split()
a=int(a)
b=int(b)
x=10
y=int(x*8/100)
z=int(x*10/100)
i=0
while x<10000:
  if int(x*8/100)==a and int(x*10/100)==b:
    print(x)
    break
  else:
    x=x+1
if x==10000:
  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())
num=B*10
if num*0.08==A:
  ans=num
else:
  com=A*12.5 if A%2==0 else int(A*12.5)+1
  if int(com*0.10)==B:
    ans=com
  else:
    ans=-1
print(ans)

A,B=map(int,input().split())
ans=-1
for i in range(4950):
  a=int(i*0.08)
  b=int(i*0.10)
  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):
s = list(map(int, input().split()))
n = s[0]
a = s[1]
flag = 0
if n/0.08 > a/0.1:
    ans = int(a/0.1)
    while ans <= n/0.08:
        if ans*0.08 == n and ans*0.1==a:
            flag = 1
            break
        ans += 1
else:
    ans = int(n/0.08)
    while ans <= a/0.1:
        if ans*0.1 == a and ans*0.08==n:
            flag = 1
            break
        ans += 1
if flag == 1:
    print(ans)
else:
    print(-1)

s = list(map(int, input().split()))
n = s[0]
a = s[1]
flag=0
ans=0
for i in range(1009):
    za=int(i*0.08)
    zb=int(i*0.1)
    if za==n and zb==a:
        flag=1
        ans=i
        break
if flag:
    print(ans)
else:
    print(-1)

Verdicts: Wrong Answer

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

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

if 10*B == 25*A/2 :
    print(10*B)
else :
    print(-1)


A,B=map(int,input().split())
N<10000
N*8/100==A
N*10/100==B
print(N)

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

if 10*B == 25*A/2 :
    print(10*B)
else :
    print(-1)


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

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


Verdicts: Wrong Answer

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):
a,b=map(int,input().split())
c=[]
d=[]
if a % 2 == 0:
    s = int(100*a/8)
    t = int(100*(a+1)/8) + 1
else:
    s = int(100*a/8) + 1
    t = int(100*(a+1)/8) 
u = int(100*b/10) 
v = int(100*(b+1)/10) 
for i in range(s,t):
    c.append(i)
for j in range(u,v):
    d.append(j)
print(c)
print(d)
c_d = set(c) & set(d)
if (len(c_d)>0):
    print(min(c_d))
else:
    print(-1)



a,b=map(int,input().split())
c=[]
d=[]
if a % 2 == 0:
    s = int(100*a/8)
    t = int(100*(a+1)/8) + 1
else:
    s = int(100*a/8) + 1
    t = int(100*(a+1)/8) 
u = int(10*b) 
v = int(10*(b+1)) 
for i in range(s,t):
    c.append(i)
for j in range(u,v):
    d.append(j)
print(c)
print(d)
c_d = set(c) & set(d)
if (len(c_d)>0):
    print(min(c_d))
else:
    print(-1)



a,b=map(int,input().split())
c=[]
d=[]
if a % 2 == 0:
    s = int(100*a/8)
    t = int(100*(a+1)/8) + 1
else:
    s = int(100*a/8) + 1
    t = int(100*(a+1)/8) 
u = int(10*b) 
v = int(10*(b+1)) 
for i in range(s,t):
    c.append(i)
for j in range(u,v):
    d.append(j)
c_d = set(c) & set(d)
if (len(c_d)>0):
    print(min(c_d))
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):
def cul_even(x):
  return x // 2 * 25
def cul_odd(x):
  return x // 2 * 25 + 13
def test(a, b, func):
  if(b == func(a)//10):
      print(func(a))
    elif(b == (func(a)//10 + 1)):
      print((func(a)+12)//10*10)
    else:
      print(-1)

def main():
  a,b = map(int,input().split())
  if(a % 2 == 0):
    test(a, b, cul_even)
  else:
    test(a, b, cul_odd)

if __name__ == '__main__':
  main()  


def cul_even(x):
  return x // 2 * 25

def cul_odd(x):
  return x // 2 * 25 + 13

def test(a, b, x, func):
  if(b == func(a)//10):
      print(func(a))
  elif(b == (func(a)//10 + 1)):
      print((func(a)+x)//10*10)
  else:
      print(-1)

def main():
  a,b = map(int,input().split())
  if(a % 2 == 0):
    test(a, b, 12, cul_even)
  else:
    test(a, b, 11, cul_odd)

if __name__ == '__main__':
  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):
import math
a,b=map(int, input().split())
a_min = math.ceil(a/0.08)
a_max = math.ceil((a+1)/0.08)-1
b_min = math.ceil(b/0.1)
b_max = math.ceil((b+1)/0.1)-1

if max([a_min,b_min]) >= min([a_max,b_max]):
  print(-1)
else:
  print(min([a_min,b_min]))

import math
a,b=map(int, input().split())
a_min = math.ceil(a/0.08)
a_max = math.ceil((a+1)/0.08)-1
b_min = math.ceil(b/0.1)
b_max = math.ceil((b+1)/0.1)-1

if max([a_min,b_min]) >= min([a_max,b_max]):
  print(-1)
else:
  print(max([a_min,b_min]))


Verdicts: Wrong Answer

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

Submission attempts (in order):
import math
tax_eight, tax_ten = map(int, input().split())
min_eight_price = math.ceil(tax_eight / 0.08)
max_eight_price = math.floor((tax_eight + 1) / 0.08 - 1)
min_ten_price = tax_ten / 0.1 
max_ten_price = (tax_ten + 1) / 0.1 - 1
print(min_eight_price, max_eight_price)
print(min_ten_price, max_ten_price)
min_price = max(min_eight_price, min_ten_price)
max_price = min(max_eight_price, max_ten_price)
if max_price < min_price:
    print(-1)
else:
    print(int(min_price))


tax_eight, tax_ten = map(int, input().split())
min_eight_price = tax_eight / 0.08
max_eight_price = (tax_eight + 1) / 0.08
min_ten_price = tax_ten * 10
max_ten_price = (tax_ten + 1) * 10
min_price = max(min_eight_price, min_ten_price)
max_price = min(max_eight_price, max_ten_price)
if max_price <= min_price:
    print("-1")
else:
    print(min_price)

import math
tax_eight, tax_ten = map(int, input().split())
min_eight_price = math.ceil(tax_eight / 0.08)
max_eight_price = math.floor((tax_eight + 1) / 0.08 - 1)
min_ten_price = tax_ten / 0.1 
max_ten_price = (tax_ten + 1) / 0.1 - 1
min_price = max(min_eight_price, min_ten_price)
max_price = min(max_eight_price, max_ten_price)
if max_price < min_price:
    print(-1)
else:
    print(int(min_price))

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):
#output <= 1000

nums = [int(e) for e in input().split()]
for i in range(1001):
  if ((((i * 8) // 100) == nums[0]) & (((i * 10) // 100) == nums[1])):
    print(i)
  else:
    print(-1)

#output <= 1000

nums = [int(e) for e in input().split()]
for i in range(1,1001):
  if ((((i * 8) // 100) == nums[0]) & (((i * 10) // 100) == nums[1])):
    print(i)
  else:
    print(-1)

#output <= 1000

nums = [int(e) for e in input().split()]
for i in range(1,1001):
  if ((((i * 8) // 100) == nums[0]) & (((i * 10) // 100) == nums[1])):
    print(i)
    break
  else:
    print(-1)

#output <= 1000

nums = [int(e) for e in input().split()]
flag = 0
for i in range(1,1001):
  if ((((i * 8) // 100) == nums[0]) & (((i * 10) // 100) == nums[1])):
    flag = 1
    print(i)
    break

if flag = 0:
    print(-1)

#output <= 1000

nums = [int(e) for e in input().split()]
for i in range(1001):
  if (((i * 8) // 100 == nums[0]) & (((i * 10) // 100) == nums[1])):
    print(i)
  else:
    print(-1)

#output <= 1000

nums = [int(e) for e in input().split()]
flag = 0
for i in range(1,1001):
  if ((((i * 8) // 100) == nums[0]) & (((i * 10) // 100) == nums[1])):
    flag = 1
    print(i)
    break

if flag == 0:
    print(-1)

Verdicts: Wrong Answer

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

def problem_koganemaru(A,B):  
  for price in range(10000):
    if math.ceil(price*0.08) == A and math.ceil(price*0.1) == B:
      return price
  return -1

print(problem_koganemru(A,B))

A ,B = list(map(int,input().split()))
def problem_koganemaru(A,B):  
  # x =  A / (0.08) 
  
  # print(x,y)
  # if x == y:
  #   return x
  # else:
  #   return -1
  for price in range(10000):
    if math.ceil(price*0.08) == A and math.ceil(price*0.1) == B:
      return price
  return -1
print(problem_koganemaru(A,B))

import math
A ,B = list(map(int,input().split()))
 
def problem_koganemaru(A,B):  
  for price in range(10000):
    if math.ceil(price*0.08) == A and math.ceil(price*0.1) == B:
      return price
  return -1
 
print(problem_koganemaru(A,B))

import math
A,B = list(map(int,input().split()))
def problem_gksn(A, B):
  x_min = math.ceil(A / (0.08))
  x_max = math.floor((A+1)/0.08)
  y_min = math.ceil(B / (0.10))
  y_max = math.floor((B+1) / (0.10))
  # print(x_min,x_max,y_min,y_max)
  if max(x_min, y_min) < min(x_max, y_max):
    return max(x_min, y_min)
  else:
    return -1
print(problem_gksn(A,B))
# {[ } ]

Verdicts: Runtime Error

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(10000000):
  if(i//12.5==a and i//10==b):
    print(i)
  else:
    print("-1")

a,b=map(int,input().split())
for i in range(10**6):
  if(i//12.5==a and i//10==b):print(i);exit()
  else:
    print("-1")


a,b=map(int,input().split())
for i in range(100):
  if(i//12.5==a and i//10==b):
    print(i)
  else:
    print("-1")


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


Verdicts: Time Limit Exceeded

Wrong Answer

Wrong Answer

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

Submission attempts (in order):
a, b = map(int, input().split())
for i in range(1,1009):
    if int(i*0.08) == a and int(i*0.1) == b:
        print(int(i))
print("-1")

a, b = map(int, input().split())
for i in range(909,1009):
    if int(i*0.08) == a and int(i*0.1) == b:
        print(int(i))
print("-1")

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

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

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):
a,b=map(int,input().split())
price=10*b
c=[]  
while(price<=10*b+10):
  if int(price*0.08)==a:
    c.append(a)
  else:
    price=price+1
print(min(c))

a,b=map(int,input().split())
price=10*b
c=[]  
while(price<=10*b+10):
  if int(price*0.08)==a:
    c.append(a)
  else:
    price=price+1
if c=[]:
  print(-1)
else:
  print(min(c))

a,b=map(int,input().split())
price=10*b
c=[]  
while(price<=10*b+10):
  if int(price*0.08)==a:
    c.append(a)
    price=price+1
  else:
    price=price+1
if c=[]:
  print(-1)
else:
  print(min(c))

a,b=map(int,input().split())
price=10*b
c=[]  
while(price<10*b+10):
  if int(price*0.08)==a:
    c.append(price)
    price=price+1
  else:
    price=price+1
if c==[]:
  print(-1)
else:
  print(min(c))

Verdicts: Runtime Error

Runtime Error

Runtime Error

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

Submission attempts (in order):
A,B = map(int, input().split())
ans = -1
n = 0
while True:
  if n > B: break
  if A == (10 * B + n) * 8 // 100:
    ans = 10 * B + n
  n += 1

print(ans)

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

for p in range(1,1251):
  if math.floor(p * 0.08) == A and math.floor(p * 0.1) == B:
    ans = p
    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):
# -*- coding: utf-8 -*-

import sys

def check(a, b, x):
    if int(x * 0.08) != a or int(x * 0.1) != b:
        return -1
    return x

def prob_c(a, b):
    yasu = a * 100 / 8
    yasutaka = (a+0.99) * 100 / 8
    taka = b * 100 / 10
    takataka = (b+0.99) * 100 / 10
    ans = check(a, b, max(yasu, taka))
    print(f'{ans}')

if __name__ == '__main__':
    a, b = map(int, input().split())
    prob_c(a,b)
    


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

from math import ceil

def check(a, b, x):
    if int(x * 0.08) != a or int(x * 0.1) != b:
        return -1
    return x

def prob_c(a, b):
    yasu = ceil(a * 100 / 8)
    taka = ceil(b * 100 / 10)
    ans = int(check(a, b, max(yasu, taka)))
    print(ans)

if __name__ == '__main__':
    a, b = map(int, input().split())
    prob_c(a,b)


Verdicts: Runtime Error

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

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



# if int(kimeuchi * 0.08) == A and int(kimeuchi * 0.1) == B:
#
#     print(kimeuchi)
# else:
#     print(-1)

ans = -1
for n in range(100 * 0.1, -1 , -1):
    if int(n * 0.08) == A and int(n * 0.1) == B:
        ans = n

print(ans)

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


kimeuchi = max([int(A / 0.08), int(B / 0.1)])
if kimeuchi * 0.08 == A and kimeuchi * 0.1 == B:
    print(kimeuchi)
else:
    print(-1)

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


ans = -1
for n in range(100 / 0.1, -1, -1):
    if int(n * 0.08) == A and int(n * 0.1) == B:
        ans = n

print(ans)

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


ans = -1
for n in range(1000, -1, -1):
    if int(n * 0.08) == A and int(n * 0.1) == B:
        ans = n

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

for x in range(1251):
    
    if (int(x * 0.08) == A) and (int(x * 0.1) == B):
        print(i)
    else:
        print("-1")


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

for x in range(1251):
    
    if (int(x * 0.08) == A) and (int(x * 0.1) == B):
        print(x)
        exit()

print("-1")

Verdicts: Runtime Error

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

Submission attempts (in order):
a, b = map(int, input().split())
for i in range(10000):
  if int(i * 0.08) == a and int(i * 0.1) == b:
    print(i)
    exit()
print(=1)

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

x = a // 0.08

ans = -1
for i in range(13):
    if (int((x+ i) * 0.1)) == b:
        ans = int(x + i)
        break

print(ans)

from math import floor
a, b = map(int, input().split())
ans = -1

for i in range(1010):
    a_test = floor(i * 0.08)
    b_test = floor(i * 0.1)
    if a_test == a and b_test == 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):
ret = -1

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

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

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

Verdicts: Runtime Error

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

Submission attempts (in order):
import math
A,B=(int(x) for x in input().split())

a=int(A/0.08 + 0.5)
b=int(B/0.1 + 0.5)
out =0
print(a,b)
if a>=b:
    if math.floor(a*0.1) != B:
        out = -1
    else:
        out = int(a)
elif a<b:
    if math.floor(b*0.08) != A:
        out = -1
    else:
        out = int(b)
print(out)

import math
A,B=(int(x) for x in input().split())

a=int(A/0.08 + 0.5)
b=int(B/0.1 + 0.5)
out =0
"print(a,b)"
if a>=b:
    if math.floor(a*0.1) != B:
        out = -1
    else:
        out = int(a)
elif a<b:
    if math.floor(b*0.08) != A:
        out = -1
    else:
        out = int(b)
print(out)

Verdicts: Wrong Answer

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

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

ans = 0
for i in range(1250) :
    if int(i * 0.08) == A and int(i * 0.1) == B :
        ans = i
        break

if ans == 0 :
    ans = -1

print(ans)
print(A)


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

ans = 0
for i in range(1250) :
    if int(i * 0.08) == A and int(i * 0.1) == B :
        ans = i
        break

if ans == 0 :
    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())
 
for i in range(1,10**10):
  if (int(i*0.08)/int(i*0.1)) == a/b:
    print(i)
    exit()
    

a,b = map(int,input().split())
 
for i in range(10,10**10):
  if (int(i*0.08)/int(i*0.1)) == a/b:
    print(i)
    exit()
    
    

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

for i in range(10**10):
  if (int(i*0.08)/int(i*0.1) == a/b):
    print(i)
    exit()

a,b = map(int,input().split())
 
for i in range(10**10):
  if (int(i*0.08)/int(i*0.1)) == a/b:
    print(i)
    exit()

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

import math
a,b = map(int,input().split())
 
for i in range(10,10**7):
  if (math.floor(i*0.08)/math.floor(i*0.1)) == a/b:
    print(i)
    exit()
print(-1)

import math
a,b = map(int,input().split())
sup = math.floor((a+1)/0.08)

for i in range(1,sup):
  if math.floor(i*0.08)== a and math.floor(i*0.1) == b:
    print(i)
    exit()
    
print(-1)
    

Verdicts: Runtime Error

Wrong Answer

Runtime Error

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):
a,b=map(int,input().split())
x=0
for i in range(1300):
  if int(i*0.08) == a and int(i*0.10) == b:
    print(i)
    x=1
  if x == 0 and i == 1299:
    print("-1")


a,b=map(int,input().split())
na=int(a*12.5)
nb=b*10
x=0
for i in range(8):
  nai=na+i
  for j in range(10):
    nbj=nb+j
    if nai == nbj:
      x=1
      y=nai
      break
  if x==1:
    print(y)
    break:
  if x==0 and i==7:
    print("-1")

a,b=map(int,input().split())
x=0
for i in range(1251):
  if x == 0 and int(i*0.08) == a and int(i*0.10) == b:
    print(i)
    x=1
  if x == 0 and i == 1250:
    print("-1")


Verdicts: Wrong Answer

Runtime Error

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

Submission attempts (in order):
# coding: utf-8


def main():
    A, B = map(int, input().split())
    for i in range(10001):
        if i * 8 // 100 == A and i / 10 == B:
            print(i)
            break

if __name__ == "__main__":
    main()


# coding: utf-8


def main():
    A, B = map(int, input().split())
    ans = -1
    for i in range(10001):
        if i * 8 // 100 == A and i / 10 == B:
            ans = i
            break

    print(ans)

if __name__ == "__main__":
    main()


# coding: utf-8


def main():
    A, B = map(int, input().split())
    for i in range(10001):
        if i * 8 / 100 == A and i / 10 == B:
            print(i)
            break

if __name__ == "__main__":
    main()


# coding: utf-8


def main():
    A, B = map(int, input().split())
    ans = -1
    for i in range(10001):
        if i * 8 // 100 == A and i // 10 == B:
            ans = i
            break

    print(ans)

if __name__ == "__main__":
    main()


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

if (fractions.gcd(A,B)==1):
    print(-1)
    sys.exit()
for i in range(10**5):
    ans=int(i*0.08)+int(i*0.1)
    if((A+B)==ans):
        print(i)
        break

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

if (fractions.gcd(A,B)==1):
    print(-1)
    sys.exit()
for i in range(10**100):
    if(int(i*0.08) == A and int(i*0.1)==B):
        print(i)
        break

from math import floor,ceil

def myAnswer(A:int,B:int) -> int:
   price = 1
   while True:
      if(floor(price*0.08)==A and floor(price*0.1)==B):
         return price
      elif(floor(price*0.08)>A or floor(price*0.1)>B):
         return -1
      else:
         price+=1
   

def modelAnswer(A:int,B:int) -> int:
   ans = max(ceil(A/0.08),ceil(B/0.1))
   return ans if(floor(ans*0.08)==A and floor(ans*0.1)==B) else -1

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

if __name__ == '__main__':
   main()

Verdicts: Wrong Answer

Wrong Answer

Accepted