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

a8 = 100/8
b10 = 10/100
A1 = int((a8*a)*0.08)
A = int(a8*a)
B = int(A*b10)
if a == A1 and b == B:
    print(A)
else:
    print(-1)

Submission status: Wrong Answer

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

a8 = 100/8
b10 = 100/10
A = int(a8*a)
B = int(b*b10)
if A == B or B//10 == a:
    print(A)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().rstrip().split())
if 12.5 * (a+1) <= 10 * b or 10 * (b+1) <= 12.5*a:
  print(-1)
else:
  print(-int(-max(12.5 * a, 10 * b)))

Submission status: Wrong Answer

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

amax = math.floor((A + 1) / 8 * 100)
amin = math.ceil(A / 8 * 100)
bmax = math.floor((B + 1) * 10)
bmin = math.ceil(B * 10)

if amin > bmax or bmin > amax:
    print(-1)
else:
    print(int(max(amin, bmin)))

Submission status: Wrong Answer

Solution code:
import sys
import math

str = input() # input()で入力を受け取り、それを変数strに代入
#print(str)
#print(str.split(' '))

ary = str.split(' ')
A = int(ary[0])
B = int(ary[1])

#print(A)
#print(B)

X1 = math.floor(A / 0.08)
X2 = math.floor(B / 0.1)

X11 = math.floor(X1 / 10)
X22 = math.floor(X2 / 10)
AX = math.floor(X1 * 0.1)


#print(X1)
#print(X2)
#print(AX)
#print(X11)
#print(X22)

#print(X1 if X1 < X2 else X2)

if X1 >= X2 and X11 == AX:
  print(X1)
else:
  print('-1')

Submission status: Wrong Answer

Solution code:
import sys
import math

str = input() # input()で入力を受け取り、それを変数strに代入
#print(str)
#print(str.split(' '))

ary = str.split(' ')
A = int(ary[0])
B = int(ary[1])

#print(A)
#print(B)

X1 = math.floor(A / 0.08)
X2 = math.floor(B / 0.1)

X11 = math.floor(X1 / 10)
X22 = math.floor(X2 / 10)
AX = math.floor(X1 * 0.1)


#print(X1)
#print(X2)
#print(AX)

#print(X11)
#print(X22)

#print(X1 if X1 < X2 else X2)

if X11 == X22 == AX:
  print(X1)
else:
  print('-1')

Submission status: Wrong Answer

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

amax = math.ceil((A + 1) / 8 * 100) - 1
amin = math.ceil(A / 8 * 100)
bmax = math.ceil((B + 1) / 10 * 100) - 1
bmin = math.ceil(B / 10 * 100)

if amin > bmax or bmin > amax:
    print(-1)
else:
    print(int(max(amin, bmin)))

Submission status: Wrong Answer

Solution code:
import sys
import math

str = input() # input()で入力を受け取り、それを変数strに代入
#print(str)
#print(str.split(' '))

ary = str.split(' ')
A = int(ary[0])
B = int(ary[1])

#print(A)
#print(B)

X1 = math.floor(A / 0.08)
X2 = math.floor(B / 0.1)

X11 = math.floor(X1 / 10)
X22 = math.floor(X2 / 10)


#print(X1)
#print(X2)

#print(X1 if X1 < X2 else X2)

if X11 != X22:
  print('-1')
else:
  print(X1)

Submission status: Wrong Answer

Solution code:
import sys
import math

str = input() # input()で入力を受け取り、それを変数strに代入
#print(str)
#print(str.split(' '))

ary = str.split(' ')
A = int(ary[0])
B = int(ary[1])

#print(A)
#print(B)

X1 = math.ceil(A / 0.08)
X2 = math.ceil(B / 0.1)

#print(X1)
#print(X2)

#print(X1 if X1 < X2 else X2)

if X1 != X2:
  print('-1')
else:
  print(X1 if X1 < X2 else X2)

Submission status: Wrong Answer

Solution code:
import sys
import math

str = input() # input()で入力を受け取り、それを変数strに代入
#print(str)
#print(str.split(' '))

ary = str.split(' ')
A = int(ary[0])
B = int(ary[1])

#print(A)
#print(B)

X1 = math.ceil(A / 0.08)
X2 = math.ceil(A / 0.1)

#print(X1)
#print(X2)

if X1 > 100 or X2 > 100:
  print('-1')
else:
  print(X1 if X1 > X2 else X2)

Submission status: Wrong Answer

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

price_A = math.floor(A/0.08)
price_A_max = math.ceil((A+1)/0.08)
cnt = 0
for i in range(price_A, price_A_max):
	if math.floor(i*0.1)==B:
		cnt = 1
		print(i)
		break
if cnt == 0:
	print(-1)

Submission status: Wrong Answer

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

price_A = math.floor(A/0.08)
price_A_max = math.floor((A+1)/0.08)
cnt = 0
for i in range(price_A, price_A_max):
	if math.floor(i*0.1)==B:
		cnt = 1
		print(i)
		break
if cnt == 0:
	print(-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

if set(Alist)&set(Blist):
  print(min(set(Alist)&set(Blist)))
else:
  print("-1")

Submission status: Wrong Answer

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

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

if set(Alist)&set(Blist):
  print(min(set(Alist)&set(Blist)))
else:
  print("-1")

Submission status: Wrong Answer

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

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

if set(Alist)&set(Blist):
  print(min(set(Alist)&set(Blist)))
else:
  print("-1")

Submission status: Wrong Answer

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

flg  = False
for i in range(1,101):
    a_s = int(i * 0.08)
    b_s = int(i * 0.1)
    
    if a_s == a and b_s == b:
        ans = i
        flg = True
        break
        
print(ans if flg else '-1')

Submission status: Wrong Answer

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

price_A = math.floor(A/0.08)


if math.floor(price_A*0.1)==B:
	print(int(price_A))
else:
	print(-1)

Submission status: Wrong Answer

Solution code:
A , B = list(map(int,input().split()))
max_probA = int((A + 1) / 0.08) 
min_probA = int(-((-1 * A) // 0.08))
max_probB = int((B + 1) / 0.1) 
min_probB = int(-((-1 * B) // 0.1))
if max_probA < min_probB or  max_probB < min_probA:
    print("-1")
elif max_probA >= min_probB and  min_probA <= min_probB:
    print(min_probB)
elif max_probB >= min_probA and  min_probB<= min_probA:
    print(min_probA)

Submission status: Wrong Answer

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

A=A//0.08

B=B//0.10

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

Submission status: Wrong Answer

Solution code:
import math
A, B = map(int, input().split())
max = 1000 # これ以上の値は絶対に条件Bを満たさない。
for i in range(1, max):
    if int(i * 0.08) == A and int(i * 0.1) == B:
        print(i)
        exit()
print(-1)

Submission status: Wrong Answer

Solution code:
import math
a,b = map(int,input().split())
aa = math.floor((a*100)/8)
if math.floor(aa/10) == b:
    print(aa)
else:
    print(-1)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
r = "-1"
for price in range(1010):
    tax_8 = int(price * 0.8)
    tax_10 = int(price * 0.1)
    if tax_8 == a and tax_10 == b :
        r = price
        braek
print(r)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
r = -1
for price in range(1010):
    tax_8 = int(price * 0.8)
    tax_10 = int(price * 0.1)
    if tax_8 == a and tax_10 == b :
        r = price
        braek
print(r)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
 
min_8 = A * 100 // 8
max_8 = ((A + 1) * 100 // 8) -1
min_10 = B * 100 // 10
max_10 = ((B  + 1) * 100 // 10)  -1
 
if (max_10 < min_8 or max_8 < min_10):
    print(-1)
else:
    print(max(min_8,min_10))

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
 
min_8 = A * 100 // 8
max_8 = ((A + 1) * 100 // 8)
min_10 = B * 100 // 10
max_10 = (B  + 1) * 100 // 10
 
if (max_10 < min_8 or max_8 < min_10):
    print(-1)
else:
    print(max(min_8,min_10))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for x in range(200):
    a = x * 8 // 100
    b = x * 10 // 100

    if a == A and b == B:
        print(x)
        quit()

print(-1)

Submission status: Wrong Answer

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

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

if (max_10 < min_8 or max_8 < min_10):
    print(-1)
else:
	print(max(min_8,min_10))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
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 (A > B):
    print(-1)
    exit()

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

print(max(min_8,min_10))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

amax = math.ceil((A + 1) * 12.5) - 1
amin = math.ceil(A * 12.5)
bmax = math.ceil((B + 1) / 10 * 100) - 1
bmin = math.ceil(B / 10 * 100)

if amin > bmax or bmin > amax:
    print(-1)
else:
    print(int(max(amin, bmin)))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

amax = math.floor((A + 1) / 8 * 100)
amin = math.ceil(A / 8 * 100)
bmax = math.floor((B + 1) / 10 * 100)
bmin = math.ceil(B / 10 * 100)

if amin > bmax or bmin > amax:
    print(-1)
else:
    print(int(max(amin, bmin)))

Submission status: Wrong Answer

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

amax = math.floor((A + 1) / 8 * 100)
amin = math.ceil(A / 8 * 100)
bmax = math.floor((B + 1) / 10 * 100)
bmin = math.ceil(B / 10 * 100)

if amin > bmax or bmin > amax:
    print(-1)
print(int(max(amin, bmin)))

Submission status: Wrong Answer

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

amax = math.ceil((A + 1) / 8 * 100) - 1
amin = math.ceil(A / 8 * 100)
bmax = math.ceil((B + 1) / 10 * 100) - 1
bmin = math.ceil(B / 10 * 100)

if amin >= bmin:
    answer = amin if amin < bmax else - 1
else:
    answer = bmin if bmin < amax else -1

print(answer)

Submission status: Wrong Answer

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

amax = math.floor((A + 1) / 8 * 100)
amin = math.ceil(A / 8 * 100)
bmax = math.floor((B + 1) / 10 * 100)
bmin = math.ceil(B / 10 * 100)

if amin >= bmin:
    answer = amin if amin < bmax else - 1
else:
    answer = bmin if bmin < amax else -1

print(answer)

Submission status: Wrong Answer

Solution code:
def main(A, B):
    flag = '-1'

    for N in range(1, 10000):
        if int(N * 0.08) == A and int(N * 0.1) == B:
            flag = N
            print(flag)
            break
    print(flag)



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

main(A, B)

Submission status: Wrong Answer

Solution code:
import fractions

def main(A, B):
    if fractions.gcd(A, B) == 1:
        print('-1')

    for N in range(10000):
        if N * 8 // 100 == A and N * 10 // 100 == B:
            print(N)
            return



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

main(A, B)

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
if A == 1 and B == 1:
    print(13)
elif A == 1 and B == 2:
    print(20)
elif A == 2 and B == 2:
    print(25)
elif A == 2 and B == 3:
    print(30)
elif A == 3 and B == 3:
    print(38)
elif A == 3 and B == 4:
    print(40)
elif A == 4 and B == 5:
    print(50)
elif A == 4 and B == 6:
    print(60)
elif A == 5 and B == 6:
    print(63)
elif A == 5 and B == 7:
    print(70)
elif A == 6 and B == 7:
    print(75)
elif A == 6 and B == 8:
    print(80)
elif A == 7 and B == 8:
    print(88)
elif A == 7 and B == 9:
    print(90)
elif A == 8 and B == 10:
    print(100)
else:
    print(-1)

Submission status: Wrong Answer

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

max = math.floor(100*1.08)

for i in range(1,max+1):

    if math.floor(i*0.08) == a and math.floor(i*0.1) == b:
        print(i)
        exit()
print(-1)

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
if int(A * 1.25) < B:
    print(-1)
elif A == B:
    print(A * 13 - 1)
else:
    print((B-A) * 50)

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
if int(A * 1.25 ) < B:
    print(-1)
elif A == B:
    print(int(A * 25 / 2))
else:
    print(int((B-A) * 50))

Submission status: Wrong Answer

Solution code:
# Code for C - Tax Increase
# Use input() to fetch data from STDIN
import math
def solve():
    [a, b] = map(int, input().split())
    
    for i in range(1, 1000):
        if math.floor(i * 0.08) == a and math.floor(i * 0.10) == b:
            print(i)
            return

    print("-1")

solve()

Submission status: Wrong Answer

Solution code:
import math
a, b = map(float,input().split())
aa = math.ceil(a / 0.08)
bb = math.ceil(b / 0.1)

if aa == bb:
    print(int(aa))
elif int(aa*0.1) == int(aa*0.08):
	print(int(aa))
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
if int(A * 1.25 ) < B:
    print(-1)
elif A == B:
    print(A * 25 / 2)
else:
    print((B-A) * 50)

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
if int(A * 1.25 - 0.5) < B:
    print(-1)
elif A == B:
    print(A * 25 / 2)
else:
    print((B-A) * 50)

Submission status: Wrong Answer

Solution code:
import math

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

i = 1
while i <= 10001:
    if math.floor(i * 0.08) == A and math.floor(i*0.1):
        print(i)
        exit()
    else:
        i += 1

print("-1")

Submission status: Wrong Answer

Solution code:
a,b=map(int, input().split())
x=int(a*100/8)
x2=int(b*100/10)

if x != x2:
	print(-1)
	
else:
	print(x)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
def ceil(x):
  if x%1==0:
    return x//1
  else:
    return x//1+1
a1=int(ceil(a*100/8))
a2=int(ceil((a+1)*100/8)-1)
b1=int(ceil(b*100/10))
b2=int(ceil((b+1)*100/10)-1)
count=0
for i in range(a1,a2+1):
  if b1<=i<=b2:
    print(i)
    break
  else:
    count+=1
if count!=0:
  print(-1)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
A_ = A / 0.08
B_ = B / 0.1
ret = -1
if A > 0 and B > 0:
  for i in range(13):
    for j in range(10):
      if int(A_ + i ) == int (B_ + j):
        ret = int(A_ + i)      
        break
    if ret > 0:
      break
elif A == 0 and B == 1:
  ret = 10
elif A == 0 and B == 0:
  ret = 1
print (ret)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
A_ = A / 0.08
B_ = B / 0.1
ret = -1
if A > 0 and B > 0:
  for i in range(13):
    for j in range(10):
      if int(A_ + i ) == int (B_ + j):
        ret = int(A_ + i)      
        break
    if ret > 0:
      break
print (ret)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
A_ = A / 0.08
B_ = B / 0.1
ret = -1
for i in range(13):
  for j in range(10):
    if int(A_ + i ) == int (B_ + j):
      ret = int(A_ + i)
      
      break
  if ret > 0:
    break
print (ret)

Submission status: Wrong Answer

Solution code:
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)
else:
  print('-1')

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
for i in range(1,1001):
  if int(i * 0.8) == a and int(i * 0.1) == b:
    print(i)
else:
  print('-1')

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
x = int(a / 0.08)
y = int(b / 0.1)
if x == y:
  print(x)
else:
  print('-1')

Submission status: Wrong Answer

Solution code:
from math import floor

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

Submission status: Wrong Answer

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

a = i[0]
b = i[1]

price_8_min = int(a / 0.08)
price_10_min = int(b / 0.10)

# print("price_8_min", price_8_min)
# print("price_10_min", price_10_min)

price_8_max = int((a+1) / 0.08)
price_10_max = int((b+1) / 0.10)

# print("price_8_max", price_8_max)
# print("price_10_max", price_10_max)

if ((price_10_min <= price_8_min) and (price_8_min < price_10_max)):
    print(price_8_min)
elif ((price_8_min <= price_10_min) and (price_10_min < price_8_max)):
    print(price_10_min)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
from math import ceil
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines

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

    x1 = ceil(A / 0.08)
    x2 = ceil(B / 0.1)
    print(x1, x2)

    if int(x1 * 0.1) == B:
        print(x1)
    elif int(x2 * 0.08) == A:
        print(x2)
    else:
        print(-1)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
from math import floor, ceil

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

minx1 = A/0.08
maxx1 = (A+1)/0.08
minx2 = B/0.1
maxx2 = (B+1)/0.1

rangeMin = ceil(max(minx1, minx2))
rangeMax = floor(min(maxx1, maxx2))
if rangeMax < rangeMin:
    print(-1)
else:
    print(rangeMin)

Submission status: Wrong Answer

Solution code:
from math import floor, ceil

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

minx1 = A/0.08
maxx1 = (A+1)/0.08
minx2 = B/0.1
maxx2 = (B+1)/0.1

rangeMin = max(minx1, minx2)
rangeMax = min(maxx1, maxx2)
if rangeMax < rangeMin:
    print(-1)
else:
    print(floor(rangeMin+0.999999999))

Submission status: Wrong Answer

Solution code:
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines

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

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

    if int(x1 * 0.1) == B:
        print(x1)
    elif int(x2 * 0.08) == A:
        print(x2)
    else:
        print(-1)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines

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

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


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

amax = (A + 1) / 8 * 100
amin = math.ceil(A / 8 * 100)
bmax = (B + 1) / 10 * 100
bmin = math.ceil(B / 10 * 100)

if amin > bmin:
    answer = amin if bmax > amin else -1
else:
    answer = bmin if amax > bmin else -1

print(int(answer))

Submission status: Wrong Answer

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

amax = math.ceil((A + 1) / 8 * 100)
amin = math.ceil(A / 8 * 100)
bmax = math.ceil((B + 1) / 10 * 100)
bmin = math.ceil(B / 10 * 100)

if amin > bmin:
    answer = amin if bmax > amin else -1
else:
    answer = bmin if amax > bmin else -1

print(int(answer))

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split());l=max(a*25+1>>1,b*10);print(l*(a/.08>=l<=b*10)or-1)

Submission status: Wrong Answer

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

amax = math.floor((A + 1) / 8 * 100)
amin = math.ceil(A / 8 * 100)
bmax = math.floor((B + 1) / 10 * 100)
bmin = math.ceil(B / 10 * 100)

if amin > bmin:
    answer = amin if bmax > amin else -1
else:
    answer = bmin if amax > bmin else -1

print(int(answer))

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split());l=b*10;print(l*(~a/.08<-l>~b*10)or-1)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split());l=a*25+1>>1;print(l*(~a/.08<-l>~b*10)or-1)

Submission status: Wrong Answer

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

amax = (A + 1) / 8 * 100
amin = A / 8 * 100
bmax = (B + 1) / 10 * 100
bmin = B / 10 * 100

if amin > bmin:
    answer = amin if bmax > amin else -1
else:
    answer = bmin if amax > bmin else -1

print(int(answer))

Submission status: Wrong Answer

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

amax = (A + 1) / 8 * 100
amin = A / 8 * 100
bmax = (B + 1) / 10 * 100
bmin = B / 10 * 100

if amin > bmin:
    answer = amin if bmax > amin else - 1
else:
    answer = bmin if amax > bmin else -1

print(int(answer))

Submission status: Wrong Answer

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

amax = (A + 1) / 8 * 100
amin = A / 8 * 100
bmax = (B + 1) / 10 * 100
bmin = B / 10 * 100

if amin > bmin:
    answer = amin if bmax >= amin else - 1
else:
    answer = bmin if amax >= bmin else -1

print(int(answer))

Submission status: Wrong Answer

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

amax = (A + 1) / 8 * 100
amin = A / 8 * 100
bmax = (B + 1) / 10 * 100
bmin = B / 10 * 100

answer = amin if amin <= bmax and amin >= bmin else - 1

print(int(answer))

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split());l=max(a*25+1>>1,b*10);print(-(~a*25//2>~l<~b*10)or l)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split());l=max(-a*25//-2,b*10);print(l*(~a*25//2<-l>~b*10)or-1)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
result = True
for a in range(1, 1001):
    if int(a * 0.08) == A and int(a * 0.1) == B:
        print(a)
        break
        result = False
        exit()
        
if result:
    print("-1")

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
X=B/0.1
Y=A/0.08
if X<=Y<X+9:
    Y=int(Y)
    X=int(X)
    print(max(X,Y))
else:
    print("-1")

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
result = True
for a in range(1, 1001):
    if int(a * 0.08) == A and int(a * 0.1) == B:
        print(a)
        break
        result = False
        exit()
        
if result:
    print(-1)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
result = True
for a in range(1, 101):
    if int(a * 0.08) == A and int(a * 0.1) == B:
        print(a)
        result = False
        break
        exit()
        
if result:
    print(-1)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
def main():
    A,B = map(int,input().split())
    for i in range(1,1010):
        if (0.08*i)==A and (0.1*i)==B:
            print(i)
            return
    print('-1')

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import numpy as np

s = np.array(input().split()).astype(int)
# =============================================================================
# if s.find("A") >= 0 and s.find("B") >= 0:
#     print("Yes")
# else:
#     print("No")
# =============================================================================

# =============================================================================
# N,A,B = s
# 
# print(N//(A+B)*A + np.array([N%(A+B),A]).min())
# =============================================================================

A,B = s

eight =  100/8
ten = 100/10
x1 = A*eight
x2 = A*ten
ans = []

for i in np.arange(0,np.array([x1,x2]).max().astype(int) + 100):
    if int(i * 1/eight) == A and int(i * 1/ten) == B:
        ans.append(i)
if (int)(A * 10/8) != B:
    print(-1)
else:
    print(np.array(ans).min().astype(int))

Submission status: Wrong Answer

Solution code:
import math

A, B = map(int, input().split())
a = math.ceil(A / 0.08)
b = math.ceil(B / 0.1)
ans = max(a, b)

if ans ** 0.08 == A and ans ** 0.1 == B:
    print(ans)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
import numpy as np

s = np.array(input().split()).astype(int)
# =============================================================================
# if s.find("A") >= 0 and s.find("B") >= 0:
#     print("Yes")
# else:
#     print("No")
# =============================================================================

# =============================================================================
# N,A,B = s
# 
# print(N//(A+B)*A + np.array([N%(A+B),A]).min())
# =============================================================================

A,B = s

eight =  100/8
ten = 100/10
x1 = A*eight
x2 = A*ten
ans = []
ans2 = []
if x1 == x2:
    ans.append(x1)
else:
    for i in range(np.array([x1,x2]).min().astype(int)-100,np.array([x1,x2]).max().astype(int)+100):
        if int(i * 1/eight) == A and int(i * 1/ten) == B:
            ans.append(i)
        ans2.append(i)
if (int)(A * 10/8) != B:
    print(-1)
else:
    print(np.array(ans).min().astype(int))

Submission status: Wrong Answer

Solution code:
import numpy as np

s = np.array(input().split()).astype(int)
# =============================================================================
# if s.find("A") >= 0 and s.find("B") >= 0:
#     print("Yes")
# else:
#     print("No")
# =============================================================================

# =============================================================================
# N,A,B = s
# 
# print(N//(A+B)*A + np.array([N%(A+B),A]).min())
# =============================================================================

A,B = s

eight =  100/8
ten = 100/10
x1 = A*eight
x2 = A*ten
ans = []
ans2 = []
if x1 == x2:
    ans.append(x1)
else:
    for i in range(np.array([x1,x2]).min().astype(int)-10,np.array([x1,x2]).max().astype(int)+10):
        if int(i * 1/eight) == A and int(i * 1/ten) == B:
            ans.append(i)
        ans2.append(i)
if (int)(A * 10/8) != B:
    print(-1)
else:
    print(np.array(ans).min().astype(int))

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python
import sys

input = sys.stdin

def tax(pct8, pct10):
    pct8low = int(pct8 / 0.08)
    pct8high_x10 = (pct8 + 1) * 125
    if pct8high_x10 % 10 == 0:
        pct8high = pct8high_x10 // 10 - 1
    else:
        pct8high = pct8high_x10 // 10

    pct10low = pct10 * 10
    pct10high = (pct10 + 1) * 10

    #  8 H---------------L
    # 10     H-----------*----L
    #    <or>
    #  8     H------------*--L
    # 10 H----------------L
    #    <or>
    #  8     H---------------L
    # 10 H-------------------*-----L
    #    <or>
    #  8 H-------------------*-----L
    # 10     H---------------L
    if pct8high < pct10low or pct10high < pct8low:
        return -1
    else:
        return max(pct8low, pct10low)


pct8, pct10 = map(int, input.readline().split(" "))
print(tax(pct8, pct10))

Submission status: Wrong Answer

Solution code:
import numpy as np

s = np.array(input().split()).astype(int)
# =============================================================================
# if s.find("A") >= 0 and s.find("B") >= 0:
#     print("Yes")
# else:
#     print("No")
# =============================================================================

# =============================================================================
# N,A,B = s
# 
# print(N//(A+B)*A + np.array([N%(A+B),A]).min())
# =============================================================================

A,B = s

eight =  100/8
ten = 100/10
x1 = A*eight
x2 = A*ten


if (int)(A * 10/8) != B:
    print(-1)
else:
    print(np.array([x1,x2]).max().astype(int))

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python
import sys

input = sys.stdin

def tax(pct8, pct10):
    pct8low = pct8 / 0.08
    pct8high_x10 = (pct8 + 1) * 125
    if pct8high_x10 % 10 == 0:
        pct8high = pct8high_x10 / 10 - 1
    else:
        pct8high = pct8high_x10 / 10


    pct10low = pct10 * 10
    pct10high = (pct10 + 1) * 10

    #  8 H---------------L
    # 10     H-----------*----L
    #    <or>
    #  8     H------------*--L
    # 10 H----------------L
    #    <or>
    #  8     H---------------L
    # 10 H-------------------*-----L
    #    <or>
    #  8 H-------------------*-----L
    # 10     H---------------L
    if pct8high < pct10low or pct10high < pct8low:
        return -1
    else:
        return max(pct8low, pct10low)


pct8, pct10 = map(int, input.readline().split(" "))
print(tax(pct8, pct10))

Submission status: Wrong Answer

Solution code:
import numpy as np

s = np.array(input().split()).astype(int)
# =============================================================================
# if s.find("A") >= 0 and s.find("B") >= 0:
#     print("Yes")
# else:
#     print("No")
# =============================================================================

A,B = s

eight =  100/8
ten = 100/10
x1 = A*eight
x2 = A*ten
if (int)(A * 10/8) != B:
    print(-1)
else:
    print(np.array(x1,x2).min().astype(int))