Problem:


Score : 300 points

Problem Statement

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.

Constraints

1 \leq A \leq B \leq 100

A and B are integers.

Input

Input is given from Standard Input in the following format:

A B

Output

If there is a price that satisfies the condition, print an integer representing the lowest such price; otherwise, print -1.

Sample Input 1

2 2

Sample Output 1

25

If the price of a product before tax is 25 yen, the amount of consumption tax levied on it is:

When the consumption tax rate is 8 percent: \lfloor 25 \times 0.08 \rfloor = \lfloor 2 \rfloor = 2 yen.

When the consumption tax rate is 10 percent: \lfloor 25 \times 0.1 \rfloor = \lfloor 2.5 \rfloor = 2 yen.

Thus, the price of 25 yen satisfies the condition. There are other possible prices, such as 26 yen, but print the minimum such price, 25.

Sample Input 2

8 10

Sample Output 2

100

If the price of a product before tax is 100 yen, the amount of consumption tax levied on it is:

When the consumption tax rate is 8 percent: \lfloor 100 \times 0.08 \rfloor = 8 yen.

When the consumption tax rate is 10 percent: \lfloor 100 \times 0.1 \rfloor = 10 yen.

Sample Input 3

19 99

Sample Output 3

-1

There is no price before tax satisfying this condition, so print -1.



Sample input:
2 2


Sample output:
25

Submission status: Wrong Answer

Solution code:
A,B = list(map(int, input().split()))
Z1_l = A * 25 / 2
if (Z1_l % 2) == 1:
    Z1_1 = int(Z1_l) + 1
Z1_u = (A + 1) * 25 / 2

Z2_l = B * 10
Z2_u = (B + 1) * 10
if Z2_u >= Z1_l or Z1_u >= Z2_l:
    ans = int(max(Z1_l,Z2_l))
else:
    ans = -1

print(ans)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
x_min = max(int(100/8 * a), int(100/10 * b))
x_max = min(int(100/8 * (a+1)), int(100/10 * (b+1)))
if int(100/8 * a) < int(100/10 * (b+1)) and int(100/10 * b) < int(100/8 * (a+1)) and x_min > 0:
    print(x_min)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
A,B = list(map(int, input().split()))
Z1_l = A * 25 / 2
if (Z1_l % 2) == 1:
    Z1_1 = int(Z1_l) + 1
Z1_u = (A + 1) * 25 / 2

Z2_l = B * 10
Z2_u = (B + 1) * 10
if Z2_u >= Z1_l and Z1_u >= Z2_l:
    ans = int(max(Z1_l,Z2_l))
else:
    ans = -1

print(ans)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
x_min = max(int(100/8 * a), int(100/10 * b))
x_max = min(int(100/8 * (a+1)), int(100/10 * (b+1)))
if int(100/8 * a) < int(100/10 * (b+1)) and int(100/10 * b) < int(100/8 * (a+1)):
    print(x_min)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
x_min = max(int(100/8 * a), int(100/10 * b))
x_max = min(int(100/8 * (a+1)), int(100/10 * (b+1)))
if x_min <= x_max:
    print(x_min)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
a, b = input().split();
a = int(a);
b = int(b);

for x in range(1,101):
  tax_8 = int(x * 0.08);
  tax_10= int(x * 0.1);
  if tax_8 == a and tax_10 == b:
    ans = x;
    break;
  elif x == 100:
    ans = -1;
  else:
    pass;
  
print(ans);

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())

for i in range(B*10+1):
    if int(i * 0.08) == A and int(i * 0.1) == B:
        print(i)
        break
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())

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

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())

x1 = int(A / 0.08)
x2 = int(B / 0.1)

while x1 >= x2:
    if x1 == x2:
        print(x1)
        break

    x2 += 1
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
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()

Submission status: Wrong Answer

Solution code:
def cul_even(x):
  return x // 2 * 25
def cul_odd(x):
  return x // 2 * 25 + 13
def main():
  a,b = map(int,input().split())
  if(a % 2 == 0):
    if(b == cul_even(a)//10):
      print(cul_even(a))
    elif(b == (cul_even(a)//10 + 1)):
      print((cul_even(a)+12)//10*10)
    else:
      print(-1)
  else:
    if(b == cul_odd(a)//10):
      print(cul_odd(a))
    elif(b == (cul_odd(a)//10 + 1)):
      print((cul_odd(a)+12)//10*10)
    else:
      print(-1)

if __name__ == '__main__':
  main()

Submission status: Wrong Answer

Solution code:
def cul_even(x):
  return x // 2 * 25
def cul_odd(x):
  return x // 2 * 25 + 13
def main():
  a,b = map(int,input().split())
  if(a % 2 == 0):
    if(b == cul_even(a)//10):
      print(cul_even(a))
    elif(b == (cul_even(a) + 1)):
      print(cul_even(a)//10*10)
    else:
      print(-1)
  else:
    if(b == cul_odd(a)//10):
      print(cul_odd(a))
    elif(b == (cul_odd(a) + 1)):
      print(cul_odd(a)//10*10)
    else:
      print(-1)

if __name__ == '__main__':
  main()

Submission status: Wrong Answer

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

l8 = []
l10 = []
for i in range(100):
  p8 = (A+0.01*i)/0.08
  p10 = (B+0.01*i)/0.1
  if p8.is_integer():
    l8.append(int(p8))
  if p10.is_integer():
    l10.append(int(p10))

p = sorted(list(set(l8) & set(l10)))
if p == []:
  print(-1)
else:
  print(p[0])

Submission status: Wrong Answer

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

l8 = []
l10 = []
for i in range(100):
  p8 = (A+0.01*i)/0.08
  p10 = (B+0.01*i)/0.1
  if p8.is_integer():
    l8.append(p8)
  if p10.is_integer():
    l10.append(p10)

p = sorted(list(set(l8) & set(l10)))
if p == []:
  print(-1)
else:
  print(int(p[0]))

Submission status: Wrong Answer

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

l8 = []
l10 = []
for i in range(100):
  p8 = (A+0.01*i)/0.08
  p10 = (B+0.01*i)/0.1
  if p8.is_integer():
    l8.append(p8)
  if p10.is_integer():
    l10.append(p10)

p = sorted(list(set(l8) & set(l10)))
if p == []:
  print(-1)
else:
  print(p[0])

Submission status: Wrong Answer

Solution code:
s = input().split()
A = int(s[0])
B = int(s[1])

A_price_low = A / 0.08
B_price_low = B / 0.1
A_price_high = (A+1) / 0.08
B_price_high = (B+1) / 0.1

if B_price_low <= A_price_low < B_price_high:
    if A % 2 == 0:
        print(int(A_price_low))
    else:
        print(int(A_price_low) + 1)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
s = input().split()
A = int(s[0])
B = int(s[1])

A_price_low = A / 0.08
B_price_low = B / 0.1
A_price_high = (A+1) / 0.08
B_price_high = (B+1) / 0.1

if B_price_low <= A_price_low < B_price_high:
    if A_price_low % 2 == 0:
        print(int(A_price_low))
    else:
        print(int(A_price_low) + 1)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
s = input().split()
A = int(s[0])
B = int(s[1])

A_price_low = A / 0.08
B_price_low = B / 0.1
A_price_high = (A+1) / 0.08
B_price_high = (B+1) / 0.1

if B_price_low <= A_price_low < B_price_high:
    print(int(A_price_low))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
a,b = map(int, input().split(" "))
a1 = a / 0.08
b1 = b / 0.1

if b1 < 10:
    if abs(a-b) <= 1:
        a1 = max(a1, b1)
        b1 = a1
elif b1 >= 10:
    a1 = int(a1 // 10)
    b1 = int(b1 // 10)


if a1 == b1:
  print(int(a1))
else:
  print(-1)

Submission status: Wrong Answer

Solution code:
import sys
A, B = [int(x) for x in input().split()]
for x in range((A+1)*9,(B+1)*10):
  if A == x*8//100 and B == x//10:
    print(x)
    sys.exit()
print(-1)

Submission status: Wrong Answer

Solution code:
import sys
A, B = [int(x) for x in input().split()]
for x in range((A+1)*9,(B+1)*11):
  if A == x*8//100 and B == x//10:
    print(x)
    sys.exit()
print(-1)

Submission status: Wrong Answer

Solution code:
flag =False
A, B = [int(x) for x in input().split()]
for x in range((A+1)*9,(B+1)*10+1):
  if A == x*8//100 and B == x//10:
    print(x)
    flag=True
    break
if not flag:
  print(-1)

Submission status: Wrong Answer

Solution code:
a,b = map(int, input().split(" "))
a1 = a / 0.08
b1 = b / 0.1
if a1 == b1:
  print(int(a1))
else:
  print(-1)

Submission status: Wrong Answer

Solution code:
import sys

A, B = [int(x) for x in input().split()]
for x in range((A+1)*9,(B+1)*10+1):
  if A == x*8//100 and B == x//10:
    print(x)
    sys.exit()
print(-1)

Submission status: Wrong Answer

Solution code:
a,b = map(int, input().split(" "))
a1 = a / 0.08
b1 = b / 0.1
if a1 == b1:
  print(a1)
else:
  print(-1)

Submission status: Wrong Answer

Solution code:
import sys

A, B = [int(x) for x in input().split()]
for x in range((A+1)*10,(B+1)*10+1):
  if A == x*8//100 and B == x//10:
    print(x)
    sys.exit()
print(-1)

Submission status: Wrong Answer

Solution code:
import sys

A, B = [int(x) for x in input().split()]
for x in range((A+1)*10,(B+1)*10):
  if A == x*8//100 and B == x//10:
    print(x)
    sys.exit()
print(-1)

Submission status: Wrong Answer

Solution code:
import math
a,b=map(int, input().split()) 
min8=math.floor(a/0.08)
max8=math.ceil((a+1)/0.08)-1
min10=math.floor(b/0.1)
max10=math.ceil((b+1)/0.1)-1

if max8<min10 or max10<min8:
    print(-1)
else:
    print(max(min8,min10))

Submission status: Wrong Answer

Solution code:
a,b=map(int, input().split()) 
min8=int(a/0.08)
max8=-(int(-(a+1)//0.08))-1
min10=int(b/0.1)
max10=-(int(-(b+1)//0.1))-1

if max8<min10 or max10<min8:
    print(-1)
else:
    print(max(min8,min10))

Submission status: Wrong Answer

Solution code:
a,b=map(int, input().split()) 
min8=int(a/0.08)
max8=-(int(-(a+1)/0.08))-1
min10=int(b/0.1)
max10=-(int(-(b+1)/0.1))-1

if max8<min10 or max10<min8:
    print(-1)
else:
    print(max(min8,min10))

Submission status: Wrong Answer

Solution code:
a,b=map(int, input().split()) 
min8=int(a/0.08)
max8=-(-int((a+1)/0.08))-1
min10=int(b/0.1)
max10=-(-int((b+1)/0.1))-1

if max8<min10 or max10<min8:
    print(-1)
else:
    print(max(min8,min10))

Submission status: Wrong Answer

Solution code:
a,b=map(int, input().split()) 
min8=int(a/0.08)
max8=-(-int((a+1)/0.08))-1
min10=int(b/0.1)
max10=-(-int((b+1)//0.1))-1

if max8<min10 or max10<min8:
    print(-1)
else:
    print(max(min8,min10))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

A = list(range(int((a / 0.08)),int((a+1)/0.08)-1))
B = list(range(int((b / 0.1)),int((b+1)/0.1)-1))
price = set(A) & set(B)
if len(price) == 0:
    ans = -1
else:
    ans = min(price)
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

A = list(range(int((a / 0.08)),int((a+1)/0.08)))
B = list(range(int((b / 0.1)),int((b+1)/0.1)))
price = set(A) & set(B)
if len(price) == 0:
    ans = -1
else:
    ans = min(price)
print(ans)

Submission status: Wrong Answer

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

A = list(range(int((a / 0.08)),int((a+1)/0.08)))
B = list(range(int((b / 0.08)),int((b+1)/0.08)))
price = set(A) & set(B)
if len(price) == 0:
    ans = -1
else:
    ans = min(price)
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
w,x,y,z=A/0.08,(A+1)/0.08,B/0.1,(B+1)/0.1
if x>y:
    for i in range(int(w),int(z)+1):
        if i>=w:
            print(i)
            break
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

from math import floor

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

Submission status: Wrong Answer

Solution code:
from math import floor
# 自分の解答(模範解答と同じ)
def myAnswer(A:int,B:int) -> int:
   price = 1
   while True:
      print(floor(price*0.08),floor(price*0.1))
      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(floor(A/0.08),floor(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()

Submission status: Wrong Answer

Solution code:
a,b = map(int, input().split())
for i in range(1, 101):
    if i * 0.08 //1 == a and i * 0.1 //1 == b:
        print(i)
        break
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
#a min
amin=int(a*100/8)
#a max
if (a+1)*100%8==0:
  amax=int((a+1)*100/8-1)
elif (a+1)*100%8>0:
  amax=int((a+1)*100/8)
#b min
bmin=int(b*100/10)
#b max
if (b+1)*100%10==0:
  bmax=int((b+1)*100/10-1)
elif (b+1)*100%10>0:
  bmax=int((b+1)*100/8)
z=0
ans=[]
for i in range(amin,amax+1):
  for j in range(bmin,bmax+1):
    if i==j:
      ans.append(i)
    else:
      z+=1
if z==(amax+1-amin)*(bmax+1-bmin):
  print(-1)
else:
  print(ans[0])

Submission status: Wrong Answer

Solution code:
from math import floor
A,B = list(map(int, input().split()))

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

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())

ans=-1
for i in range(101):
  tax8=int(i * 0.08)
  tax10=int(i * 0.1)
  if tax8==A and tax10==B:
    ans=i
    break
print(ans)

Submission status: Wrong Answer

Solution code:
# coding: utf-8
def main():
    a, b = map(int, input().split())
    if a*12.5//10 == b*10//10:
        c = b/0.1//10 * 10
        for i in range(10):
            if (c+i)*0.08//1 == a and (c+i)*0.1//1 == b:
                print(int(c+i))
                quit()
    print(-1)
    
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
# coding: utf-8
def main():
    a, b = map(int, input().split())
    if a/0.08//10 == b/0.1//10:
        c = b/0.1//10 * 10
        for i in range(10):
            if (c+i)*0.08//1 == a and (c+i)*0.1//1 == b:
                print(int(c+i))
                quit()
    print(-1)
        
    
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
# coding: utf-8
def main():
    a, b = map(int, input().split())
    if a/0.08//10 == b/0.1//10:
        c = b/0.1//10 * 10
        for i in range(11):
            if (c+i)*0.08//1 == a and (c+i)*0.1//1 == b:
                print(int(c+i))
                break
    else:
        print(-1)
        
    
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
# coding: utf-8
def main():
    a, b = map(int, input().split())
    if a/0.08//10 == b/0.1//10:
        c = a/0.08//10 * 10
        for i in range(10):
            if (c+i)*0.08//1 == a and (c+i)*0.1//1 == b:
                print(int(c+i))
                break
    else:
        print(-1)
        
    
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
# coding: utf-8
def main():
    a, b = map(int, input().split())
    if a/0.08//10 == b/0.1//10:
        print(int(a/0.08))
    else:
        print(-1)
        
    
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import math
A, B = list(map(int,input().split()))
if math.floor(A*12.5)>B*10:
    print(math.floor(A*12.5) if math.floor(A*12.5)<=(B+1)*10 else -1)
else:
    print(B*10 if B*10<=math.ceil((A+1)*12.5) else -1)

Submission status: Wrong Answer

Solution code:
import sys

A, B = tuple(int(n) for n in input().split())

for q in range(0,10):
    p = 10*B + q
    if (p // 100)*8 == A:
        print(p)
        sys.exit(0)

print(-1)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
start=a*100//8
end=a*100//7
for cost in range(start,end):
  if cost//10==b:
    print(cost)
    break
  elif cost == end-1:
    print(-1)

Submission status: Wrong Answer

Solution code:
A,B = map(int, input().split())
for i in range(1,int(100 / 0.08)):
  if int(i * 0.08) == int(i * 0.1):
    print(i)
  else:
    print(-1)

Submission status: Wrong Answer

Solution code:
A,B = map(int, input().split())
for i in range(1,int(100 / 0.08)):
  if (int(i / 0.08) ==A) and (int(i / 0.1) == B):
    print(i)
  else:
    print(-1)

Submission status: Wrong Answer

Solution code:
A,B = map(int, input().split())
for i in range(1,int(100 / 0.08)):
  if int(A / 0.08) == int(B / 0.1):
    print(i)
  else:
    print(-1)

Submission status: Wrong Answer

Solution code:
A,B = map(int, input().split())
for i in range(int(100 / 0.08)):
  if int(A / 0.08) == int(B / 0.1):
    print(i)
  else:
    print(-1)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
import math
a_min=a/0.08
b_min=b/0.1
a_max=(a+1)/0.08
b_max=(b+1)/0.1
if a_min>b_max or a_max<b_min:
    print(-1)
else:
    ans=int(math.ceil(max(a_min,b_min)))
    print(ans)

Submission status: Wrong Answer

Solution code:
a,b = map(int, input().split())
for i in range(100000):
    p1 = int(i*0.08);p2 = int(i*0.10)
    if p1==a and p2==b:
        print(i);break

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())

a_min=a/0.08
b_min=b/0.1
a_max=(a+1)/0.08
b_max=(b+1)/0.1

if a_min>b_max or a_max<b_min:
    print(-1)
else:
    print(int(max(a_min,b_min)))

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
x = int((100*A)/8)
y = int((100*B)/10)
while (int((x-1)*0.08) == A)&(int((x-1)*0.1) == B):
    x -= 1
while (int((y-1)*0.08) == A)&(int((y-1)*0.1) == B):
    y -= 1

if (int(x*0.08) == A)&(int(x*0.1) == B)&(x>0)&(int(y*0.08) == A)&(int(y*0.1) == B)&(y>0):
    print(min(x,y))
elif(int(x*0.08) == A)&(int(x*0.1) == B)&(x>0):
    print(x)
elif(int(y*0.08) == A)&(int(y*0.1) == B)&(y>0):
    print(y)
else:
    print("-1")

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
x = int((100*A)/8)
y = int((100*B)/10)
while (int((x-1)*0.08) == A)&(int((x-1)*0.1) == B):
    x -= 1
while (int((y-1)*0.08) == A)&(int((y-1)*0.1) == B):
    y -= 1

if(int(x*0.08) == A)&(int(x*0.1) == B)&(x>0):
    print(x)
elif(int(y*0.08) == A)&(int(y*0.1) == B)&(y>0):
    print(y)
else:
    print("-1")

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
x = int((100*A)/8)
y = int((100*B)/10)
while (int((x-1)*0.08) == A)&(int((x-1)*0.1) == B):
    x -= 1
while (int((y-1)*0.08) == A)&(int((y-1)*0.1) == B):
    y -= 1

if(int(x*0.08) == A)&(int(x*0.1) == B):
    print(x)
elif(int(y*0.08) == A)&(int(y*0.1) == B):
    print(y)
else:
    print("-1")

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
x = int((100*A)/8)
y = int((100*B)/10)

if (int(x*0.08) == A)&(int(x*0.1) == B):
    print(x)
elif (int(y*0.08) == A)&(int(y*0.1) == B):
    print(y)
else:
    print("-1")

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
x = int((100*A)/8)
y = int((100*B)/10)

if (int(x*0.08) == A)&(int(y*0.1) == B):
    print(x)
elif (int(y*0.08) == A)&(int(y*0.1) == B):
    print(y)
else:
    print("-1")

Submission status: Wrong Answer

Solution code:
import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    a,b=map(int,input().split())
    for x in range(1,102):
        if int(x*0.08)==a and int(x*0.1)==b:
            print(x)
            break
    else:print(-1)

if __name__=='__main__':
    main()

Submission status: Wrong Answer

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

p = math.ceil(a/0.08)

if math.floor(p/10) == b:
    print(p)
else:
    print("-1")

Submission status: Wrong Answer

Solution code:
A, B = map(int,input().split())

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

Submission status: Wrong Answer

Solution code:
A, B = map(int,input().split())

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

Submission status: Wrong Answer

Solution code:
import math
def ma(): return map(int,input().split())

a,b=ma()
a_over=(a + 1)/0.08
a_under=(a)/0.08
b_over=(b + 1)/0.1
b_under= b/0.1

c_over = min(a_over,b_over)
c_under = max(a_under, b_under)

if math.floor(c_over)>=math.ceil(c_under):
    print(math.ceil(c_under))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import numpy as np
import sys
import math
readline = sys.stdin.buffer.readline

A,B = map(int, readline().split())
'''
print(A,B)
print(math.floor(A*100/8))
print(math.floor(B*100/10))
print(math.floor((math.floor(A*100/8))*(10/100)))
print(math.floor((math.floor(B*100/10))*(8/100)))
'''
if int(A*100/8*(10/100))==B:
    print(int(A*100/8))
elif int(B*100/10*(8/100))==A:
    print(int(B*100/10))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import numpy as np
import sys
import math
readline = sys.stdin.buffer.readline

A,B = map(int, readline().split())
'''
print(A,B)
print(math.floor(A*100/8))
print(math.floor(B*100/10))
print(math.floor((math.floor(A*100/8))*(10/100)))
print(math.floor((math.floor(B*100/10))*(8/100)))
'''
if math.floor(A*100/8*(10/100))==B:
    print(math.floor(A*100/8))
elif math.floor(B*100/10*(8/100))==A:
    print(math.floor(B*100/10))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import numpy as np
import sys
import math
readline = sys.stdin.buffer.readline

A,B = map(int, readline().split())
#print(math.floor(A*100/8))
#print(math.floor(B*100/10))

if math.floor((math.floor(A*100/8))*(10/100))==B:
    print(math.floor(A*100/8))
elif math.floor((math.floor(B*100/10))*(8/100))==A:
    print(math.floor(B*100/10))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
a,b =map(int ,input().split())

for i in range(1000):
    ans_a =int(i *0.08)
    ans_b =int(i *0.1)
    if a ==ans_a and b ==ans_b:
        print(i)
        break
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
a,b =map(int ,input().split())

ans_a =str(a /0.08)
ans_b =str(b /0.1)

if ans_a[0] ==ans_b[0]:
    print(int(a/0.08))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
p=input().split(" ")
a=int(p[0])
b=int(p[1])
c=a*10-1
d=int(a/0.07)-1
num=[]
ans=[]
for i in range(c,d+1):
    if int(i*0.08)==a:
        num.append(i)
l=len(num)
print(num)
for i in range(l):
    if int(num[i]*0.1)==b:
        ans.append(num[i])
if ans==[]:
    print("-1")
else:
    print(ans[0])

Submission status: Wrong Answer

Solution code:
#Atcoder 158 class
A,B = list(map(int,input().split()))
z=0
for x in range(int(((25*A)+1)/2),int((25*(A+1)+1)/2)):
    for y in range(int(10*B),int(10*(B+1))):
        if x==y:
            print(x)
            break
        else:
            z += 1
    if x==y:
        break
if z==(int(25*(A+1)/2)-int(25*A/2))*(int(10*(B+1))-int(10*B)):
    
    print(-1)

Submission status: Wrong Answer

Solution code:
#Atcoder 158 class
A,B = list(map(int,input().split()))
z=0
for x in range(int(((25*A)+1)/2),int(25*(A+1)/2)):
    for y in range(int(10*B),int(10*(B+1))):
        if x==y:
            print(x)
            break
        else:
            z += 1
    if x==y:
        break
if z==(int(25*(A+1)/2)-int(25*A/2))*(int(10*(B+1))-int(10*B)):
    
    print(-1)

Submission status: Wrong Answer

Solution code:
#Atcoder 158 class
A,B = list(map(int,input().split()))
z=0
for x in range(int(25*A/2)+1,int(25*(A+1)/2)):
    for y in range(int(10*B),int(10*(B+1))):
        if x==y:
            print(x)
            break
        else:
            z += 1
    if x==y:
        break
if z==(int(25*(A+1)/2)-int(25*A/2))*(int(10*(B+1))-int(10*B)):
    
    print(-1)

Submission status: Wrong Answer

Solution code:
#Atcoder 158 class
A,B = list(map(int,input().split()))
z=1
for x in range(int(25*A/2),int(25*(A+1)/2)):
    for y in range(int(10*B),int(10*(B+1))):
        if x==y:
            print(x)
            break
        else:
            z += 1
    if x==y:
        break
if z==(int(25*(A+1)/2)-int(25*A/2))*(int(10*(B+1))-int(10*B)):
    
    print(-1)

Submission status: Wrong Answer

Solution code:
A,B = list(map(int,input().split()))
found = False
for i in range(1009):
    A_tax = int(i * 0.08)
    B_tax = int(i * 0.10)
    if A == A_tax and B == B_tax:
        print(i)
        found = True
if not found:
    print("-1")

Submission status: Wrong Answer

Solution code:
#Atcoder 158 class
A,B = list(map(int,input().split()))
z=0
for x in range(int(25*A/2),int(25*(A+1)/2)):
    for y in range(int(10*B),int(10*(B+1))):
        if x==y:
            print(x)
            break
        else:
            z += 1
    if x==y:
        break
if z==(int(25*(A+1)/2)-int(25*A/2))*(int(10*(B+1))-int(10*B)):
    
    print(-1)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sun Apr 12 20:20:19 2020

@author: Kanaru Sato
"""

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

if a//0.08 - a/0.08 == 0.0:
    i = int(a/0.08)
else:
    i = int(a/0.08)+1

while 0.08*i < a+1:
    l.append(i)
    i += 1

flag = 0

for candidate in l:
    if 0.1*candidate < b+1 and 0.1*candidate >= b:
        print(candidate)
        flag = 1
        break

if flag != 1:
    print(-1)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sun Apr 12 20:20:19 2020

@author: Kanaru Sato
"""

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

if a//0.08 == a/0.08:
    i = int(a/0.08)
else:
    i = int(a/0.08)+1

while 0.08*i < a+1:
    l.append(i)
    i += 1

flag = 0

for candidate in l:
    if 0.1*candidate < b+1 and 0.1*candidate >= b:
        print(candidate)
        flag = 1
        break

if flag != 1:
    print(-1)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sun Apr 12 20:20:19 2020

@author: Kanaru Sato
"""

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

i = int(a/0.08)
while 0.08*i < a+1:
    l.append(i)
    i += 1

flag = 0

for candidate in l:
    if 0.1*candidate < b+1 and 0.1*candidate >= b:
        print(candidate)
        flag = 1
        break

if flag != 1:
    print(-1)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sun Apr 12 20:20:19 2020

@author: Kanaru Sato
"""

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

e1 = int(a/0.08)
e2 = e1 + 1
l = [e1, e2]

flag = 0

for candidate in l:
    if 0.1*candidate < b+1 and 0.1*candidate >= b:
        print(candidate)
        flag = 1
        break

if flag != 1:
    print(-1)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())

new_a = a / 0.08
new_b = b / 0.10

if new_a > new_b:
  tax = a
  while tax == a:
    new_a -= 1
    tax = new_a * 0.08
    print(int(new_a + 1))
elif new_a <= new_b:
  tax = b
  while tax == b:
    new_b -= 1
    tax = new_b * 0.10
    print(int(new_b + 1))
else:
  print("-1")

Submission status: Wrong Answer

Solution code:
from sys import stdin

A, B = [int(x) for x in stdin.readline().rstrip().split()]

min_eight_ex_tax = int(A / 0.08)
max_eight_ex_tax = int((A + 1) / 0.08)
min_ten_ex_tax = int(B / 0.1)
max_ten_ex_tax = int((B + 1) / 0.1)

# res = [x if min_eight_ex_tax < x < max_eight_ex_tax for x in range(min_ten_ex_tax, max_ten_ex_tax, 1)]
res = -1
for x in range(min_ten_ex_tax, max_ten_ex_tax, 1):
    if min_eight_ex_tax <= x < max_eight_ex_tax:
        res = x
        break

print(res)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())

new_a = a / 0.08
new_b = b / 0.10

if abs(new_a - new_b) < 10:
  if new_a > new_b:
    tax = a
    while tax == a:
      new_a -= 1
      tax = new_a * 0.08
    print(int(new_a + 1))
  else:
    tax = b
    while tax == b:
      new_b -= 1
      tax = new_b * 0.10
    print(int(new_b + 1))
else:
  print("-1")

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())

new_a = a / 0.08
new_b = b / 0.10

if abs(new_a - new_b) < 10:
  if new_a > new_b:
    print(int(new_a))
  else:
    print(int(new_b))
else:
  print("-1")

Submission status: Wrong Answer

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

A, B = MAP()
a = A*12.5
b = B*10
c = max(a, b)//1

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

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
i = -1

for i in range (10100):
  if int(i*0.08) == A and int(i*0.1) == B:
    print(i)
    break

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
c=[]
for i in range(1250):
    if int(i*0.08) == a and int(i*0.1) == b:
        c.append(i)
c.append(-1)

print(c)
print(c[0])

Submission status: Wrong Answer

Solution code:
inputted = list(map(int, input().split()))
tax_price_a = inputted[0]
tax_price_b = inputted[1]

price_8 = int(tax_price_a / 0.08)
price_10 = int(tax_price_b / 0.10)

if tax_price_b == int(price_8 * 0.1):
    print(price_8)
elif tax_price_a == int(price_10 * 0.08):
    print(price_10)
else:
    print('-1')

Submission status: Wrong Answer

Solution code:
inputted = list(map(int, input().split()))
tax_price_a = inputted[0]
tax_price_b = inputted[1]

price_8 = int(tax_price_a / 0.08)
price_10 = int(tax_price_b / 0.10)

if tax_price_b == int(price_8 * 0.1):
    print(price_8)
elif tax_price_a == int(price_10 * 0.8):
    print(price_10)
else:
    print('-1')