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: Runtime Error

Solution code:
# coding:utf-8


from math import ceil, floor

import numpy as np


def genAns(A, B):
    ret = 0
    while True:
        taxA, taxB = int(ret*0.08), int(ret * 0.1)
        if taxA == A and taxB == B:
            return ret
        if taxA > 100 and taxB > 100:
            return -1
        ret += 1


strInput = input()z
A, B = np.array(strInput.split(' ')).astype(int)
print(genAns(A, B))

Submission status: Runtime Error

Solution code:
import sys
A, B = map(int,input().split())
amin, amax = A / 0.08, (A + 1) / 0.08
bmin, bmax = B / 0.10, (B + 1) / 0.10

if amax <= bmin or bmax <= amin:#解なし：区間重なりなし
    print(-1)
    sys.exit()

ans = np.ceil(max(amin, bmin)).astype(int)

if ans >= amax or ans >= bmax:
    print(-1)
else:
    print(ans)

Submission status: Runtime Error

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

o = 0.08
t = 0.1

aa = {i for i in range(int(a / o),int((a + 1) / o))+1}
bb = {i for i in range(int(a / o),int((a + 1) / o))+1}

if min(aa&bb):
	print(min(aa&bb))
else:
	print(-1)

Submission status: Runtime Error

Solution code:
A,B=map(int,input().split())
ans=-1
for i in range(1000):
  if int(i/100*8)==a and int(i/10)==b:
    ans==i
    break
print(ans)

Submission status: Runtime Error

Solution code:
A, B = map(int, input(). split())
answer = None
flag = False
for i in range(1009):
  
  if (A == (i*0.08)//1) and (B == (i*0.1)//1):
    answer = i
    print(answer)
    flag = True
   
    if flag:
        break
if (answer = None):
  print(-1)

Submission status: Runtime Error

Solution code:
A, B = map(int, input(). split())
answer = None
flag = False
for i in range(1009):
  
  if (A == i*0.08//1) and (B == i*0.1//1):
    Answer = i
    print(Answer)
    flag = True
   
    if flag:
        break
if (answer = None):
  print(-1)

Submission status: Runtime Error

Solution code:
A, B = map(int, input(). split())
answer = None
flag = False
for i in range(1009):
  
  if (i*0.08//1 = A) and (i*0.1//1 = B):
    print(i)
    flag = True
   
    if flag:
        break
if (answer = None):
  print(-1)

Submission status: Runtime Error

Solution code:
A, B = map(int, input(). split())
answer = None
flag = False
for i in range(1001):
  
  if (i*0.08//1 = A) and (i*0.1//1 = B):
    print(i)
    flag = True
    break
if (answer = None):
  print(-1)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b = map(int, input().split())
ans = 0
ans = a // 0.08 and b // 0.1 || -1
print(ans)

Submission status: Runtime Error

Solution code:
range(math.floor(a*100/8),math.floor((a+1)*100/8)+1):

Submission status: Runtime Error

Solution code:
a=input()
if((a/0.008==a[1])and(a/0.01==a[2])):
  print(a/0.01)
else:
  print(-1)

Submission status: Runtime Error

Solution code:
a=input()
if((a/0.008==a[0])&&(a/0.01==a[2])):
  print(a/0.01)
else:
  print(-1)

Submission status: Runtime Error

Solution code:
a=input()
if((a/0.008==a[1])&&(a/0.01==a[2])):
  print(a/0.01)
else:
  print(-1)

Submission status: Runtime Error

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

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

print(-1)

Submission status: Runtime Error

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

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

print(-1)

Submission status: Runtime Error

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

list = []
if 100*a%8:
  x=int(a/0.08)+1
else:
  x=int(a/0.08)

for i in range(x, int((a+1)/0.08)+1):
    if b/0.1 <= i <(b+1)/0.1:
        list.append(i)

        
list = sorted(list)
if list[0]:
    print(list[0])
else:
    print('-1')

Submission status: Runtime Error

Solution code:
def tax_increase(a,b):

    al = [a+(i / 10) for i in range(0,10,1)]
    bl = [b+(i / 10) for i in range(0,10,1)]
    #print(al)
    #print(bl)

    atx8 = list(map(lambda x: x/t8 ,al))
    btx10 = list(map(lambda x: x/t10 ,bl))
    #print(atx8)
    #print(btx10)

    for i in atx8:
        if i in btx10:
            return i
        else:
            pass
    return -1

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

Submission status: Runtime Error

Solution code:
a , b = map(int, input().split())
for i in range(1 , 10100) :
  a1 = int(i*0.08)
  b1 = int(i*0.10)
  if a1 = a and b1 = b :
    print(i)
  else :
    print(-1)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

a = A/0.08
b = B/0.1
answer = '-1'
if a == b:
    c = max(a, b)
     if round(c * 0.08) == round(c* 0.1):
          answer = c
print(str(c))

Submission status: Runtime Error

Solution code:
import sys
readline = sys.stdin.readline
s = readline().strip()
n = int(readline())
rev = False
for i in range(n):
    q = readline()
    if q.startswith("1"):
        rev = not rev
    if q.startswith("2 1"):
        if not rev:
            s = q[-2] + s
        else:
            s = s + q[-2]
    if q.startswith("2 2"):
        if not rev:
            s = s + q[-2]
        else:
            s = q[-2] + s
if rev:
    print(s[::-1])
else:
    print(s)

Submission status: Runtime Error

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

a = set(range(12.5*A, 12.5*(A+1)))
b = set(range(10*B, 10*(B+1)))

c = a & b
if len(c) == 0 :
  print(-1)
else:
  print(min(c))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include <stdio.h>

int main() {
  int a, b, x=-1;
  scanf("%d %d", &a, &b);
  for(int i=b*10; i<(b+1)*10; ++i) {
    if ((int)(i*0.08) == a) {
      x = i;
      break;
    }
  }
  printf("%d", x);
  return 0;
}

Submission status: Runtime Error

Solution code:
import math

tmp = input().split()
A = int(tmp[0])
B = int(tmp[1])
eight_list = []
ten_list = []
eight_min = math.ceil(A/0.08)
ten_min = math.ceil(B/0.10)
eight_list.append(eight_min)
ten_list.append(ten_min)

eight_min += 1
while(math.floor(eight_min*0.08)==A):
    eight_list.append(eight_min)
    eight_min += 1

ten_min += 1
while(math.floor(ten_min*0.10)==B):
    ten_list.append(ten_min)
    ten_min += 1

#print(eight_list)
#print(ten_list)

print(min(set(eight_list)&set(ten_list)))

Submission status: Runtime Error

Solution code:
import math

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

a_l = A / 0.08
a_m = (A+1) /0.08

l = max(a_l, b_l)
m = min(a_m, b_m)

c = math.ceil(l)

if c < m:
  print(int(c))
else:
  print(-1)

Submission status: Runtime Error

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

 

 
for i in range(1,100001):
    if A == int(i * 0.08) and B == int(i * 0.1):
        print(i)
        sys.exit()
 
print(-1)

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
import math
ans = 0
while True:
    if math.floor(ans * 0.08) == a and math.floor(ans * 0.1) == b:
        break
    elif math.floor(ans * 0.08) > a or math.floor(ans * 0.1) > b:
        ans = '-1'
        break
    ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
import numpy as np

# get input
eight, ten = map(lambda x: int(x), input().split(' '))

def oriPrice(a, b):
  """
  <int> a = round(0.08 * ori)
  <int> b = round(0.10 * ori)
  """
  # ori = b*10 ~ (b+1)*10 - 1
  for i in range(10, 0, -1):
    possibleOri = (b+1)/0.10-i
    if np.int(np.floor(possibleOri*0.08)) == a:
      return possibleOri[i]
    
  return -1

print(oriPrice(eight, ten))

Submission status: Runtime Error

Solution code:
S = Input().split(' ')
A = int(S[0])
B = int(S[1])
A_t = A/0.08
B_t = B/0.1
if A_t == B_t:
    print(A_t)
else:
    print(-1)

Submission status: Runtime Error

Solution code:
a=int(input())

A = a * 0.08;
B = a * 0.1;

print("A");
print("B");

Submission status: Runtime Error

Solution code:
ans = -1

for n in range(1001):##最大値を間違えていた
        if math.floor(n*0.08) == A and math.floor(n*0.1) == B:
            ans = n
            break

print(ans)

Submission status: Runtime Error

Solution code:
A,B = map(int, input().split())
 
if math.floor(A*12.5) == math.floor(B*10.0):
  print(math.floor(A*12.5))
  else:
    print(-1)

Submission status: Runtime Error

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

if math.floor(A*12.5) = math.floor(B*10.0):
  print(math.floor(A*12.5))
  else:
    print(-1)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math

a,b = input().split()

B_low = math.ceil(b * 10)
A_high = math.floor((a+1) * 12.5)

if A_high < B_low:
    print('-1')
else:
    print(B_low)

Submission status: Runtime Error

Solution code:
2 2

Submission status: Runtime Error

Solution code:
b = input()
a = list(map(float,b.split()))
 
for i in range(0, 1251):
  if i >= a[0]/0.08 and i < (a[0]+1)/0.08 and i >= a[1]/0.1 and i < (a[1]+1)/0.1:
    print(i)
    return

print(-1)

Submission status: Runtime Error

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

for i in range(0, 1251):
  if i >= a[0]/0.08 and i < (a[0]+1)/0.08 and i >= a[1]/0.1 and i < (a[1]+1)/0.1:
    print(i)
    return

print(-1)

Submission status: Runtime Error

Solution code:
a = list(map(float,input().split()))
 
for i in range(0, 1251):
  if a[0]/0.08 >= i and (a[0]-1.0)/0.08 < i and a[1]/0.1 >= i and (a[1]-1.0)/0.1 < i:
    print(i)
    return
print(-1)

Submission status: Runtime Error

Solution code:
a = list(map(int,input().split()))
 
for i in range(0, 1251):
  if a[0]/0.08 >= i and (a[0]-1)/0.08 < i and a[1]/0.1 >= i and (a[1]-1)/0.1 < i:
    print(i)
    return
print(-1)

Submission status: Runtime Error

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

for i in range(0, 1251):
  if a[0]/0.08 >= i and (a[0]-1)/0.08 < i and a[1]/0.1 >= i and (a[1]-1)/0.1:
    print(i)
    return
print(-1)

Submission status: Runtime Error

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

min8 = (A * 25 + 1) // 2 
max8 = ((A+1) * 25 - 1) // 2
min10 = A * 10
max10 = (A+1) * 10 - 1

if min10 > max8 or min8 > mix10:
	print(-1)
else:
	print(min[min8, min10])

Submission status: Runtime Error

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

price = [for i in range(1,1010,1)]
print(price)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

import math 

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A ,B = list(map(int,input().split()))
def problem_koganemaru(A,B):  
  # x =  A / (0.08) 
  # y =  B / (0.10) 
  # 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))

Submission status: Runtime Error

Solution code:
import math

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

A_min = int(math.ceil(A/0.08))
A_max = int(math.floor((A+1)/0.08)

B_min = int(math.ceil(B/0.1))
B_max = int(math.floor((B+1)/0.1)


A_list = list(range(A_min,A_max+1))
B_list = list(range(B_min,B_max+1))

ans_list = list(set(A_list) & set(B_list))

if len(ans_list) > 1:
  print(min(ans_list))
elif len(ans_list) == 0:
  print(-1)
else:
  print(min(ans_list))

Submission status: Runtime Error

Solution code:
tax = [int(n) for n in input().split()]

max_8tax = (tax[0]+1) / .08
min_8tax = (tax[0]) / .08)
max_10tax = int((tax[1]+1) / .1) - 1
min_10tax = int((tax[1]) / .1)

r = -1

for i in range(min_10tax, max_10tax):
    if min_8tax <= i and i < max_8tax:
        r = i
        break

print(r)

Submission status: Runtime Error

Solution code:
import math
a,b = map(int, input().split())
for i in range(1 , 1e5):
    a2 = math.floor(i*0.08)
    b2 = math.floor(i*0.1)
    if a2 == a and b2 == b:
        exit(print(i))
    print(-1)

Submission status: Runtime Error

Solution code:
A, B = input().split()
for v in range(1, 1009):
    a = v * 0.08
    if A == a:
        pri_1 = v
        break
for v in range(1, 1009):
    b = v * 0.10
    if B == b:
        pri_2 = v
        break
if pri_1 == pri_2:
    print(pri_2)
else:
    print(-1)

Submission status: Runtime Error

Solution code:
A, B = map(input().split())
for v in range(1, 1009):
    a = v * 0.08
    if A == a:
        pri_1 = v
        break
for v in range(1, 1009):
    b = v * 0.10
    if B == b:
        pri_2 = v
        break
if pri_1 == pri_2:
    print(pri_2)
else:
    print(-1)

Submission status: Runtime Error

Solution code:
A, B = map(input().split())
for v in range(1, 1009):
    a = v * 1.08
    if A = a:
        pri_1 = v
        break
for v in range(1, 1009):
    b = v * 1.10
    if B = b:
        pri_2 = v
        break
if pri_1 == pri_2:
    print(pri_2)
else:
    print(-1)

Submission status: Runtime Error

Solution code:
A, B = map(input().split())
for v in range(1, 1009):
    a = v * 1.08
    A = a
    break
for v in range(1, 1009):
    b = v * 1.10
    B = b
    break
if A == B:
    print(A)
else:
    print(-1)

Submission status: Runtime Error

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

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

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

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

Submission status: Runtime Error

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

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

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

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

Submission status: Runtime Error

Solution code:
a,b = map(int,input().split())
go = [0 for i in range(20)]
ad = [0 for i in range(101)]
bd = [0 for i in range(101)]
o = 10
for i in range(100):
  for k in range(o,1010):    
    if(k//12.5 == i+1):      
      ad[i+1] = k
      o = k
      break

o = 10
for i in range(101):
  for k in range(o,1010):    
    if(k//10 == i+1):      
      bd[i+1] = k
      o = k
      break
cnt = 0
if(ad[a]>bd[b+1]):
  print(-1)
  exit()
elif(ad[a+1]<bd[b]):
  print(-1)
  exit()
elif(ad[a]>=bd[b]):
  print(bd[b])
  exit()
elif(ad[a]<=bd[b]):
  print(ad[a])
  exit()

Submission status: Runtime Error

Solution code:
a,b = map(int,input().split())
go = [0 for i in range(20)]
ad = [0 for i in range(101)]
bd = [0 for i in range(101)]
o = 10
for i in range(100):
  for k in range(o,1010):    
    if(k//12.5 == i+1):      
      ad[i+1] = k
      o = k
      break

o = 10
for i in range(101):
  for k in range(o,1010):    
    if(k//10 == i+1):      
      bd[i+1] = k
      o = k
      break

cnt = 0
for i in range(ad[a],ad[a+1]):
  cnt += 1
  go[cnt] = i
for i in go:
  for k in range(bd[b],bd[b+1]):
    if(i == 0 and k == 0):
      print(-1)
      exit()
    elif(i == k):
      print(i)
      exit()
print(-1)

Submission status: Runtime Error

Solution code:
a,b = map(int,input().split())
go = [0 for i in range(20)]
ad = [0 for i in range(101)]
bd = [0 for i in range(101)]
o = 10
for i in range(100):
  for k in range(o,1001):    
    if(k//12.5 == i+1):      
      ad[i+1] = k
      o = k
      break

o = 10
for i in range(101):
  for k in range(o,1001):    
    if(k//10 == i+1):      
      bd[i+1] = k
      o = k
      break

cnt = 0
for i in range(ad[a],ad[a+1]):
  cnt += 1
  go[cnt] = i
for i in go:
  for k in range(bd[b],bd[b+1]):
    if(i == 0 and k == 0):
      print(-1)
      exit()
    elif(i == k):
      print(i)
      exit()
print(-1)

Submission status: Runtime Error

Solution code:
a,b = map(int,input().split())
go = [0 for i in range(20)]
ad = [0 for i in range(101)]
bd = [0 for i in range(101)]
o = 10
for i in range(100):
  for k in range(o,1001):    
    if(k//12.5 == i+1):      
      ad[i+1] = k
      o = k
      break

o = 10
for i in range(101):
  for k in range(o,1001):    
    if(k//10 == i+1):      
      bd[i+1] = k
      o = k
      break

cnt = 0
for i in range(ad[a],ad[a+1]):
  cnt += 1
  go[cnt] = i
for i in go:
  for k in range(bd[b],bd[b+1]):
    if(i == k):
      print(i)
      exit()
    elif(i == 0):
      print(-1)
      exit()
print(-1)

Submission status: Runtime Error

Solution code:
a,b = map(int,input().split())
go = [0 for i in range(20)]
ad = [0 for i in range(101)]
bd = [0 for i in range(101)]
o = 10
for i in range(100):
  for k in range(o,1001):    
    if(k//12.5 == i+1):      
      ad[i+1] = k
      o = k
      break

o = 10
for i in range(101):
  for k in range(o,1001):    
    if(k//10 == i+1):      
      bd[i+1] = k
      o = k
      break

cnt = 0
for i in range(ad[a],ad[a+1]):
  cnt += 1
  go[cnt] = i
for i in go:
  for k in range(bd[b],bd[b+1]):
    if(i == k):
      print(i)
      exit()
print(-1)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
package main

import (
	"fmt"
	"math"
)

func main()  {
	var a, b int
	fmt.Scan(&a, &b)

	ta := int(math.Ceil(float64(a)/8.0 * 100.0))
	tb := int(math.Ceil(float64(b)/10.0 * 100.0))

	tta := int(float32(a+1)/8.0 * 100.0)
	ttb := int(float32(b+1)/10.0 * 100.0)

	al := []int{}
	bl := []int{}

	for i:=ta; i<tta; i++ {
		al = append(al, i)
	}
	for i:=tb; i<ttb; i++ {
		bl = append(bl, i)
	}

	ans := -1
	for _, i := range al {
		for _, j := range bl {
			if i == j {
				ans = i
				break
			}
		}
		if ans != -1 {
			break
		}
	}
	fmt.Println(ans)
}

Submission status: Runtime Error

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: Runtime Error

Solution code:
x,y=map(int, input().split())
import math
x1=math.ceil(x*12.5)
x2=math.ceil((x+1)*12.5)-1
y1=math.ceil(y*10)
y2=math.ceil((y+1)*10)-1
if x1>y2 or y1>x2:
	print -1
else:
	print (int(max(x1,y1)))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

begin = int(min(A // 0.08, B // 0.10))
end = int(max((A + 1) // 0.08, (B + 1) // 0.10))

for n in range(begin, end+1):
  if int(n * 0.08) == A and int(n * 0.1) == B:
    print(n)
    break
    else:
      print(-1)

Submission status: Runtime Error

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

for i in range(y, y + 10):
  if (i * 10) // 100 = b and (i * 8) // 100 == a:
    print(i)
    exit()
print(-1)

Submission status: Runtime Error

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

import math 
a = [x for x in range(math.ceil(A*12.5),math.ceil((A+1)*12.5))]
b = [x for x in range(math.ceil(B*10),math.ceil((B+1)*10))]

c = set(a) & set(b)

if c != {}:
  print(min(c))
else:
  print(-1)

Submission status: Runtime Error

Solution code:
x,y=input(),input()
import math
x1=math.ceil(x*12.5)
x2=math.ceil((x+1)*12.5)-1
y1=math.ceil(y*10)
y2=math.ceil((y+1)*10)-1
if x1>y2 or y1>x2:
	print -1
else:
	print  int(max(x1,y1))

Submission status: Runtime Error

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

input = sys.stdin

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

    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 - 1

    if pct8high < pct10low or pct10high < pct8low:
        return -1
    else:
        return max(pct8low, pct10low)

def test():
    for i in range(1, 100+1):
        for j in range(1, 100+1):
            price = tax(i, j)
            if price > 0:
                if int(price *.08) != i or int(price * .1) != j:
                    print(f"Wrong! tax({i},{j}) -> {price} but price*0.8={int(price*0.08)} and price*0.1={int(price*0.1)}")

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

Submission status: Runtime Error

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(0,np.array([x1,x2]).max().astype(int)):
        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: Runtime Error

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),np.array([x1,x2]).max().astype(int)+1):
        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: Runtime Error

Solution code:


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

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

Submission status: Runtime Error

Solution code:
from math import floor
a, b = map(int, input().split())
ans = -1
for i in range(10101):
  if floor(i*0.08) = a and floor(i*0.1) = b:
    ans = i
    break
print(ans)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
A,B=map(int,input().split())
min_a=12.5*A
max_a=(100*A+1)/8
min_b=10*B
max_b=min_B+1
if(max_b<min_a or max_a<min_b):
  print(-1)
else:
  print(int(round(max(12.5*A,10*B)+0.4999999,0)))

Submission status: Runtime Error

Solution code:
A,B=map(int,input().split())
min_a=12.5*A;max_a=(100*a+1)/8
min_b=10*b;max_b=min_b+1
if(max_b<min_a or max_a<min_b):
  print(-1)
else:
  print(int(round(max(12.5*A,10*B)+0.4999999,0)))

Submission status: Runtime Error

Solution code:
A,B=map(int,input().split())
min_a=12.5*A;max_a=(100a+1)/8
min_b=10*B;max_b=min_b+1
if(max_b<min_a or max_a<min_b):
  print(-1)
else:
  print(int(round(max(12.5*A,10*B)+0.4999999,0)))

Submission status: Runtime Error

Solution code:
A,B=map(int,input().split())
min_a=12.5*A;max_a=(100a+1)/8
min_b=10*b;max_b=min_b+1
if(max_b<min_a or max_a<min_b):
  print(-1)
else:
  print(int(round(max(12.5*A,10*B)+0.4999999,0)))

Submission status: Runtime Error

Solution code:
import math

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

motob = b/0.1
a += 0.999
xmotoa = a/0.08

print(xmotoa,xmotob)
if xmotoa >= motob:
    print(math.ceil(motoa))
else:
    print('-1')

Submission status: Runtime Error

Solution code:
import math
l1=input().split(" ")
t80=int(l1[0])
t100=int(l1[1])
t80_min=(t80//0.08)
t80_max=((t80+1)//0.08)
t100_min=(t100//0.1)
t100_max=((t100+1)//0.1)
f=0
for i  in range(min(t80_min,t100_min),max(t100_max,t100_max)):
    if int(i*0.08)==a and int(i*0.1)==b:
        print(i)
        sys.exit()
print(-1)

Submission status: Runtime Error

Solution code:
import math
l1=input().split(" ")
t80=int(l1[0])
t100=int(l1[1])
t80_min=math.ceil(t80/0.08)
t80_max=math.ceil((t80+1)/0.08)
t100_min=math.ceil(t100/0.1)
t100_max=math.ceil((t100+1)/0.1)
f=0
for i  in range(min(t80_min,t100_min),max(t100_max,t100_max)):
    if int(i*0.08)==a and int(i*0.1)==b:
        print(i)
        sys.exit()
print(-1)

Submission status: Runtime Error

Solution code:
import math
l1=input().split(" ")
t80=int(l1[0])
t100=int(l1[1])
t80_min=math.ceil(t80/0.08)
t80_max=math.ceil((t80+1)/0.08)
t100_min=math.ceil(t100/0.1)
t100_max=math.ceil((t100+1)/0.1)
f=0
for i  in range(min(t80_min,t100_min),max(t80_max,t100_max)):
    if int(i*0.08)==a and int(i*0.1)==b:
        print(i)
        sys.exit()
print(-1)

Submission status: Runtime Error

Solution code:
l1=input().split(" ")
t80=int(l1[0])
t100=int(l1[1])
t80_min=(t80/0.08)
t80_max=((t80+1)/0.08)
t100_min=(t100/0.1)
t100_max=((t100+1)/0.1)
if t80_max<t100_min:
    print("-1")
else:
    if t80_min<=t100_min:
        print(math.ceil(t100_min))
    else:
        print(math.ceil(t80_min))

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split())
if b * 10 <= ((a  * 25 + 24) // 2 and -(-a * 25 // 2) < (b + 1) * 10:
    print(max(-(-a*25//2), b * 10))
else:
    print(-1)

Submission status: Runtime Error

Solution code:
a = input()
b = int(input())
c = 0
for i in range(b):
	d = input().split(" ")
	if d[0] == "1":
		c += 1
	else:
		if c % 2 == 0:
			if d[1] == "1":
				a = d[2] + a
			else:
				a = a + d[2]
		else:
			if d[1] == "2":
				a = d[2] + a
			else:
				a = a + d[2]
if c % 2 == 1:
	a = a[::-1]
print(a)

Submission status: Runtime Error

Solution code:
a = input()
q = int(input())
b = 0
for i in range(q):
    qi=input()
    if qi==str(1):
        b = b+1
    else:
        qi = qi.split()
        if (int(qi[1])+b)%2==1:
            a = qi[2] + a
        else:
            a = a + qi[2]
if b%2==1:
    a = a[::-1]
    print(a)
else:
    print(a)

Submission status: Runtime Error

Solution code:
l=list(input().split())
A=int(l[0])
B=int(l[1])
c=0
for i in range(1,1009):
	if int(i*0.08)==A and int(i**0.1)==B:
  		print(i)
        c=1
        break
if c==1:
	print(-1)

Submission status: Runtime Error

Solution code:
l=list(input().split())
A=int(l[0])
B=int(l[1])
c=0
for i in range(1,100001):
	if int(i*0.08)==A and int(i**0.1)==B:
  		print(i)
        c=1
        break
if c==1:
	print(-1)

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split());print([i for i in range(10**6)if a==i//12.5and b==i//10]+[-1][0])

Submission status: Runtime Error

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

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

print( -1 )