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

Solution code:
import sys

flag =Fale
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: Runtime Error

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

Solution code:
# AtCoder Beginner Contest 158 - C - Tax Increase
# お送り頂いたコードをもとにした解法（該当する元の金額を二重の for 文で検査する）

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

#【註】手を加えたのは、コメントを付した 2 箇所のみとなります。
# 8% の消費税の場合、この計算では「消費税計算において小数点以下が切り捨てになる」ことを反映できず、
# 計算結果が誤差を生じてしまいます。たとえば 8% 時の消費税額が 1 円の場合は、本来であれば価格が 13 円～24 円のレンジに
# 収まらなければなりませんが、当初の計算では 12 円から 25 円のレンジになってしまいます。

#for x in range(int(25*A/2),int(25*(A+1)/2)):
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)):    
if z==(int((25*(A+1)-1)/2)-int(((25*A)+1)/2))*(int(10*(B+1))-int(10*B)):    
    print(-1)


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

Submission status: Runtime Error

Solution code:
import math

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

if math.floor(a*12.5) == math.floor(b*10):
  print(math.floor(b*10)
else:
  print("-1")

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3
import math

a, b = map(int, input().split())
x = math.floor((a-1)/0.08)
y = math.floor((a+1)/0.08)
z = math.floor((b-1)/0.1)
w = math.floor((b+1)/0.1)

if y<z:
    print(-1)
    exit(0)

ans = []
for i in range(min(x,z), min(y,w)):
    if math.floor(i*0.08) == a and math.floor(i*0.1) == b:
        ans.append(i)

if len(ans) == 0:
    print(-1):
else:
    print(min(ans))

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3
import math

a, b = map(int, input().split())
x = math.floor((a-1)/0.08)
y = math.floor((a+1)/0.08)
z = math.floor((b-1)/0.1)
w = math.floor((b+1)/0.1)

if y<z:
    print(-1)
    exit(0)

ans = []
for i in range(min(x,z), min(y,w)):
    if math.floor(i*0.08) == a and math.floor(i*0.1) == b:
        ans.append(i)

print(min(ans))

Submission status: Runtime Error

Solution code:
from sys import stdin

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

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

res = float(-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 = float(x)
        break
#print(min_eight_ex_tax, max_eight_ex_tax, min_ten_ex_tax, max_ten_ex_tax)
print(int(res))

Submission status: Runtime Error

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 price_8 == price_10:
    print(price_8)
elif tax_price_b == int(price_8 * 0.1):
    print(price_8)
elif tax_price_a == int(price_10 * 0.u):
    print(price_10)
else:
    print(-1)

Submission status: Runtime Error

Solution code:
A,B = list(map(int,input().split()))
x=0
y=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

    break
if not(x==y):
    print(-1)

Submission status: Runtime Error

Solution code:
from collections import deque

S = input()
Q = int(input())
head = 1
d = deque([S])

for _ in range(Q):
    q = input().split()
    if q[0]=='1':
        head = head*-1
    else:
        if q[1]=='1':
            h = head*1
        else:
            h = head*-1
        
        if h==1:
            d.appendleft(q[2])
        else:
            d.append(q[2])
if head == -1:
    d.reverse()

print("".join(list(d)))

Submission status: Runtime Error

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

Amin = A/0.08
Amax = (A+1)/0.08
Bmin = B/0.1
Bmax = (B+1)/0.1


if Amax <= Bmin or Amin > Bmax:
    kai = -1
if Bmin <= Amin and Bmax > Amin:
    kai = Amin
if Amin <= Bmin and Bmax < Amin:
    kai = Bmin

print(kai)

Submission status: Runtime Error

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

one = A/0.08
two = (A+1)/0.08
three = B/0.1
four = (B+1)/0.1


if two <= three or one > four:
    kai = -1
if three <= one and four > one:
    kai = one
if one <= three and four < two:
    kai = three

print(kai)

Submission status: Runtime Error

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

one = A/0.08
two = (A+1)/0.08
three = B/0.1
four = (B+1)/0.1


if two <= three or one >= four:
    kai = -1
if three <= one and four > one:
    kai = one
if one <= three and four <= two:
    kai = three

print(kai)

Submission status: Runtime Error

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

one = A/0.08
two = (A+1)/0.08
three = B/0.1
four = (B+1)/0.1

print(one, two, three, four)


if two < three or one > four:
    kai = -1
if three <= one and four >= one:
    kai = one
if one < three and four <= two:
    kai = three

print(kai)

Submission status: Runtime Error

Solution code:
a,b = map(int,input().split())
a_interval = list(map(int,[a/0.08,(a+1)/0.08]))
b_interval = list(map(int,[b/0.1,(b+1)/0.1]))
a_interval = [x for x in range(a_interval[0],a_interval[1]+1)]
b_interval = [x for x in range(b_inaterval[0],b_interval[1]+1)]
tmp = set(a_interval) & set(b_interval)
if tmp == set():
    print(-1)
else:
    print(min(tmp))

Submission status: Runtime Error

Solution code:
A,B = int(input())
ans = -1
for i in range(1010):
    if int(i*0.08) == A and int(i*0.1) == B:
        ans = i
        exit()

print(ans)

Submission status: Runtime Error

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

print(ans)

Submission status: Runtime Error

Solution code:
import sympy

A,B = map(int,input().split())
sympy.var("x")
sol1 = sympy.solve(x*0.08-A,x)
sol2 = sympy.solve(x*0.10-B,x)
ans = lambda x1,x2 : x1 if x1 == x2 else -1
print(int(ans(sol1[0],sol2[0])))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
(A,B)=map(int, input().split())
 
for x in range(10000):
    if (int(x*0.08)==A) and (int(x*0.1)==B):
        print"x"
        break
    else:
        print"-1"

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
A,B = (int(x) for x in input().split())

L = [(int((i+1)*0.08),int((i+1)*0.1)) for i in range(1000)]

check = 1

for i in range(1000):
    if L[i] == (A,B):
        print(i+1)
        check = 0
        break
A,B = (int(x) for x in input().split())

L = [(int((i+1)*0.08),int((i+1)*0.1)) for i in range(1010)]

check = 1

for i in range(1010):
    if L[i] == (A,B):
        print(i+1)
        check = 0
        break

if check == 1:
    print(-1)

if check == 1:
    print(-1)

Submission status: Runtime Error

Solution code:
mport math

eight, ten = map(int, input().split())

eight_price = eight / 0.08
ten_price = ten / 0.1

if eight_price >= ten_price:
    bigger = eight_price
    if (bigger // 10) != ten:
        print("-1")
    else:
        print(math.ceil(bigger))
else:
    bigger = ten_price
    if (bigger * 8 // 100) != eight:
        print("-1")
    else:
        print(math.ceil(bigger))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split())
for i in range(1, 10**5):
    if (i*8) // 100 == a and i // 10 == b:
        print(n)
        exit()
print(-1)

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split());f=lambda t,x:set([i for i in range(1500)if int(i*t)==x]);print(min(f(.08,a)&f(.1,b)))

Submission status: Runtime Error

Solution code:
A,B=map(int,input().split())
j=A*12.5
k=(A+1)*12.5
l=B*12.5
m=(B+1)*12.5
N=[]
O=[]
for i in range(j,k+1):
  N.append(i)
for h in range(l,m+1):
  O.append(h)
N_set=set(N)
O_set=set(O)
matched_list=list(N_set&O_set)
print(min(matched_list))

Submission status: Runtime Error

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

x = a/0.08

y = b/0.1


judge = 0

for i in range(10):
    for j in range(10):
        x = (a+i/10)/0.08
        y = (b+j/10)/0.10
        if x == y:
            judge = 1
            print(int(x))
            exit(1)


if judge == 0:
    print(-1)

Submission status: Runtime Error

Solution code:
a = list(map(int,input().split()))
x = [a[0]]
y = [a[1]]
a = []
b = []
c = 0
d = 0
while x[len(x)-1] < x[0] + 1:
    x.append(round(x[d] + 0.01,2))
    y.append(round(y[d] + 0.01,2))
    d += 1
for i in x:
    a.append(i/0.08)
for i in y:
    b.append(i/0.1)
a.extend(b)
c = round(min([z for z in set(a) if a.count(z) > 1]))
if c > 0:
    print(c)
else:
    print(-1)

Submission status: Runtime Error

Solution code:
#include <iostream>

using namespace std;

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

Submission status: Runtime Error

Solution code:
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <iterator>
#include <algorithm>
#include <map>
#include <string>
#include <vector>

using namespace std;

int n,m,a[10];

int main(){
  ios::sync_with_stdio(0);
  cin.tie(0);

  int a, b; cin >> a >> b;
  for(int i = 1; i <= 1e4; i++){
    int c = i * 0.08;
    int d = i * 0.1;
    if(c == a && d == b){
      cout << i;
      return 0;
    }
  }
  cout << -1;
}

Submission status: Runtime Error

Solution code:
import math
A, B = map(int,input().split())
for i in range(1000):
    if math.floor(i * 0.08) == A:
        result = i
        break
if math.floor(result * 0.1) == B:
    print(result)
else:
    print('-1')

Submission status: Runtime Error

Solution code:
import math
A, B = map(int,input().split())
for i in range(1000):
    if math.floor(i * 0.08) == A:
        result = i
        break
if math.floor(result * 0.1) == B:
    print(result)
else:
    print(-1)

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split())
price = (a // 0.09)+1
while (price * 0.08) => a:
    if (price * 0.1) //1== b:
        print(int(price))
        exit()
    price += 1
print('-1')

Submission status: Runtime Error

Solution code:
A, B = map(int, input().split())
 
A_price = A / 8 * 100
 
B_price = B / 10 * 100
 
if int(A_price) == int(B_price):
	print(int(A_price))
else:
	X = int(A_price) / 100 * 10
    Y = int(B_price) / 100 * 8
    if B == int(X):
    	print(int(A_price))
    elif A == int(Y):
    	print(int(B_price))
    else:
    	print(-1)

Submission status: Runtime Error

Solution code:
import decimal
decimal.getcontext().prec = 4
A, B = map(int, input().split())
 
A_price = (A / 8) * 100
 
B_price = (B / 10) * 100
 
if int(A_price) == int(B_price):
	print(int(A_price))
else:
	X = (int(A_price) / 100) * 10
    Y = (int(B_price) / 100) * 8
    if B == int(X):
    	print(int(A_price))
    elif A == int(Y):
    	print(int(B_price))
    else:
    	print(-1)

Submission status: Runtime Error

Solution code:
import decimal
decimal.getcontext().prec = 4
A, B = map(int, input().slit())
 
A_price = (A / 8) * 100
 
B_price = (B / 10) * 100
 
if int(A_price) == int(B_price):
	print(int(A_price))
else:
	X = (int(A_price) / 100) * 10
    Y = (int(B_price) / 100) * 8
    if B == int(X):
    	print(int(A_price))
    elif A == int(Y):
    	print(int(B_price))
    else:
    	print(-1)

Submission status: Runtime Error

Solution code:
A, B = map(int, input().slit())
 
A_price = (A / 8) * 100
 
B_price = (B / 10) * 100
 
if int(A_price) == int(B_price):
	print(int(A_price))
else:
	X = (int(A_price) / 100) * 10
    Y = (int(B_price) / 100) * 8
    if B == int(X):
    	print(int(A_price))
    elif A == int(Y):
    	print(int(B_price))
    else:
    	print(-1)

Submission status: Runtime Error

Solution code:
A, B = map(int, input().slit())
 
A_price = A / 8 * 100
 
B_price = B / 10 * 100
 
if int(A_price) == int(B_price):
	print(int(A_price))
else:
	X = int(A_price) / 100 * 10
    if B == int(X):
    	print(A_price)
    else:
    	print(-1)

Submission status: Runtime Error

Solution code:
A, B = map(int, input().slit())
 
A_price = A / 8 * 100
 
B_price = B / 10 * 100

if int(A_price) == int(B_price):
	print(int(A_price))
else:
	X = int(A_price) / 100 * 10
    if B == X:
    	print(A_price)
    else:
    	print(-1)

Submission status: Runtime Error

Solution code:
A, B = map(int, input().slit())
 
A_price = A / 8 * 100
 
B_price = B / 10 * 100


if int(A_price) == int(B_price):
  print(int(A_price))
else:
  print(-1)

Submission status: Runtime Error

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

A_price = A // 8 * 100

B_price = B // 10 * 100

if A_price == B_price:
  print(A_price)
else:
  print(-1)

Submission status: Runtime Error

Solution code:
A, B = [int(i) for i in input().split()]
if B >= A and 4*(B-A) == A and 5*(B-A) == B:
  print(50(B-A))
else:
  print(-1)

Submission status: Runtime Error

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

b_l = list(range(int(b/0.1), int((b+0.99)//0.1+1)))
for b_ in b_l:
  s = int(b_*0.08//1)
  if s==a:
    print(str(b_))
    exit(0)
prin('-1')

Submission status: Runtime Error

Solution code:
tax1,tax2 = map(int,input().split())
tax_max1 = tax1+1 
if tax_max1%0.08 != 0:
    subtraction1 = int((tax_max1/0.08)) - math.ceil(tax1/0.08)
    store1 = []
    beggining1 = math.ceil(tax1/0.08)
    for num in range(subtraction1+1):
        price = beggining1 + num
        store1.append(price)
else:
    subtraction1 = int((tax_max1/0.08)-1) - math.ceil(tax1/0.08)
    store1 = []
    beggining1 = math.ceil(tax1/0.08)
    for num in range(subtraction1+1):
        price = beggining1 + num
        store1.append(price)
tax_max2 = tax2+1
subtraction2 = int((tax_max2/0.10)-1) - math.ceil(tax2/0.10)
store2 = []
beggining2 = math.ceil(tax2/0.10)
for num in range(subtraction2+1):
    price = beggining2 + num
    store2.append(price)
common = list(set(store1)&set(store2))
if len(common)>0:
    print(common[0])
else:
    print(-1)

Submission status: Runtime Error

Solution code:
import math
a=int(input())
b=int(input())
x=math.ceil(a*100/8)
y=math.floor((a+1)*100/8)
p=math.ceil(b*100/8)
q=math.floor((b+1)*100/8)
s=list(range(x,y+1))
t=list(range(p,q+1))
n=set(s) & set(t)
if len(n)==0:
  print(-1)
else:
  print(min(n))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
from collections import Counter
import math

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

# a =< x < a + 1:
min_a = math.ceil(a/0.08)

max_a = (a+1)/0.08

min_b = math.ceil(b/0.10)

max_b = (b+1)/0.10

ans_list = []

flag = True

while(min_a =< max_a):
    ans_list.append(min_a)
    min_a += 1
while(min_b =< max_b):
    ans_list.append(min_b)
    min_b += 1
ans_list.sort()
ans = Counter(ans_list)
for i in ans:
    if ans[i] > 1:
        print(i)
        flag = False
        break
if flag:
    print(-1)

Submission status: Runtime Error

Solution code:
from collections import Counter

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

# a =< x < a + 1:
min_a = int(a/0.08)

max_a = int((a+1)/0.08)

min_b = int(b/0.10)

max_b = int((b+1)/0.10)

ans_list = []

while(min_a < max_a):
    ans_list.append(min_a)
    min_a += 1
while(min_b < max_b):
    ans_list.append(min_b)
    min_b += 1
ans_list.sort()
ans = Counter(ans_list)
for i in ans:
    if ans[i] > 1:
        print(i)
        flag = False
        break
if flag:
    print(-1)

Submission status: Runtime Error

Solution code:
import math

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

pricemax_A = math.floor((A+1)/0.08)
pricemin_A = math.floor(A/0.08)

pricemax_B = math.floor((B+1)/0.1)
pricemin_B = math.floor(B/0.1)

if pricemin_A >= pricemax_B or pricemax_A =< pricemin_B:
    print(-1)
elif pricemin_A >= pricemin_B:
    print(pricemin_A)
elif pricemin_A < pricemin_B:
    print(pricemin_B)

Submission status: Runtime Error

Solution code:
import math

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

pricemax_A = math.floor((A+1)/0.08)
pricemin_A = math.floor(A/0.08)

pricemax_B = math.floor((B+1)/0.1)
pricemin_B = math.floor(B/0.1)

if A > B or A < 0 or B < 0 or A > 100 or B > 100:
    return (-1)

if pricemin_A >= pricemin_B and pricemin_A < pricemax_B:
    print(pricemin_A)
elif pricemin_A <= pricemin_B and pricemax_A > pricemin_B:
    print(pricemin_B)
else:
    print(-1)

Submission status: Runtime Error

Solution code:
A,B=[int(s) for s in input().split(" ")]
N1list=[]
N2list=[]

for i in range(0,10,1):
    N1list.append((A+(i/10))/0.08)   
    N2list.append((B+(i/10))/0.1)

N3=-2
N1list.sort(reverse=True)
N2list.sort(reverse=True)

for i in range(len(N1list)+1):
    N=N1list[i]
    if N==int(N):
        for j in range(len(N2list)+1):
            if N==N2list[j]:
                N3=N
                break
    else:
        N4=-1

print(int(N3) if N4<N3 else N4)

Submission status: Runtime Error

Solution code:
#!/usr/local/bin python
# -*- coding: utf-8 -*-
#
# /home/remina/PycharmProjects/atcoder/C-TaxIncrease.py
#
import sys
import math


def calc_notaxincluded_min_from_tax8(tax8: int) -> int:
    notaxincluded_min = int(tax8 / 0.08)
    return notaxincluded_min


def calc_notaxincluded_max_from_tax8(tax8: int) -> int:
    notaxincluded_max = math.ceil((tax8 + 1) / 0.08)
    return notaxincluded_max


def calc_notaxincluded_min_from_tax10(tax10: int) -> int:
    notaxincluded_min = int(tax10 / 0.1)
    return notaxincluded_min


def calc_notaxincluded_max_from_tax10(tax10: int) -> int:
    notaxincluded_max = math.ceil((tax10 + 1) / 0.1)
    return notaxincluded_max


tax_8, tax_10 = map(int, sys.stdin.readline().split())
notax_min_from8 = calc_notaxincluded_min_from_tax8(tax_8)
notax_min_from10 = calc_notaxincluded_min_from_tax10(tax_10)
notax_max_from8 = calc_notaxincluded_max_from_tax8(tax_8)
notax_max_from10 = calc_notaxincluded_max_from_tax10(tax_10)

print(notax_min_from8)
print(notax_min_from10)
print(notax_max_fromA8)
print(notax_max_from10)


if (notax_min_from10 > notax_max_from8) or (notax_min_from8 > notax_min_from10):
    print(-1)
elif notax_min_from8 <= notax_min_from10:
    print(notax_min_from8)
else:
    print(notax_min_from10)

Submission status: Runtime Error

Solution code:
a,b = map(int, input().split())
flag = 0
for i in range(10*b, 11*b):
	if int(i * 0.08) == a:
		if flag==0:
			ans　=　i
			flag = 1
if flag == 1:
	print(ans)
else:
	print(-1)

Submission status: Runtime Error

Solution code:
a,b = map(int, input().split())
flag = 0
for i in range(10*b, 11*b):
	if int(i * 0.08) == a:
		if flag==0:
			ans=i
			flag = 1
if flag == 1:
	print(ans)
else:
	print(”-1”)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Amin = A/0.08
if Amin != int(Amin):
  Amin = int(Amin)+1
else Amin = int(Amin)

Bmin = B/0.1
if Bmin != int(Bmin):
  Bmin = int(Bmin)+1
else Bmin = int(Bmin)

rangea = set(range(Amin,int((A+1)/0.08),1))
rangeb = set(range(Bmin,int((B+1)/0.10),1))

intersection = rangea & rangeb

if len(intersection)==0:
  print(-1)
else:
  print(min(intersection))

Submission status: Runtime Error

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

Amin = A/0.08
if Amin != int(Amin):
  Amin = int(Amin)+1

Bmin = B/0.1
if Bmin != int(Bmin):
  Bmin = int(Bmin)+1

rangea = set(range(Amin,int((A+1)/0.08),1))
rangeb = set(range(Bmin,int((B+1)/0.10),1))

intersection = rangea & rangeb

if len(intersection)==0:
  print(-1)
else:
  print(min(intersection))

Submission status: Runtime Error

Solution code:
A, B = map(int, input().split())
def calc(A, B):
  Amin = A/0.08
  
  if (Amin - int(Amin)) != 0.:
    Amin = int(Amin)+1
  
  Amax = int((A+1)/0.08)
  Arange = set(range(Amin, Amax))
  Bmin = B/0.1
  if (Bmin - int(Bmin)) != 0.:
    Bmin = int(Bmin)+1
  Bmax = int((B+1)/0.1)
  Brange = set(range(Bmin, Bmax))
  intersection = Arange & Brange
  if len(intersection) == 0:
    print(-1) 
  else:
    print(min(intersection))
calc(A, B)

Submission status: Runtime Error

Solution code:
A, B = input().split()
def calc(A, B):
  Amin = int(A/0.08)
  Amax = int((A+1)/0.08+0.001)
  Arange = set(range(Amin, Amax))
  Bmin = int(B/0.1)
  Bmax = int((B+1)/0.1+0.001)
  Brange = set(range(Bmin, Bmax))
  intersection = Arange & Brange
  if len(intersection) == 0:
    print(-1) 
  else:
    print(min(intersection))
calc(A,B)

Submission status: Runtime Error

Solution code:
A, B = map(int, input().split())
Amin = A/0.08
Amax = int((A+1)/0.08)+1
Arange = set(range(Amin, Amax))
Bmin = B/0.1
Bmax = int((B+1)/0.1)+1
Brange = set(range(Bmin, Bmax))
intersection = Arange & Brange
if len(intersection) > 0:
  print(min(intersection))
else:
  print("-1")

Submission status: Runtime Error

Solution code:
A, B = map(int, input().split())
Amin = A//0.08
Amax = A+1//0.08
Arange = set(range(Amin, Amax+1))
Bmin = B//0.1
Bmax = B+1//0.1
Brange = set(range(Bmin, Bmax+1))
intersection = Arange & Brange
print(min(intersection))

Submission status: Runtime Error

Solution code:
A, B = map(int, input().split())
Amin = A//0.08
Amax = A//0.1
Arange = set(range(Amin, Amax))
Bmin = B//0.08
Bmax = B//0.1
Brange = set(range(Bmin, Bmax))
intersection = Arange & Brange
print(min(intersection))

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
A,B =map(int,input().split())
 
# 元の価格ｘ,8%  y、１０％
x = A/0.08
x_1 =(A+1)/0.08
y = B/0.1
y_1 = (B+1)/0.1

x_2 = {i for i in range(int(x),int(x_1) if i<=100)}
y_2 = {i for i in range(int(y),int(y_1) if i<=100)}
moto_nedan = x_2 & y_2
if len(moto_nedan) == 0:
    print("-1")
else:
    print(min(moto_nedan))

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-

import sys

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

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

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

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split())
i=1
while True:
  if (int(i*0.08)==a and i(i*0.1)==b):
    print(i)
    exit()
  if i>200:
    print(-1)
    exit()
  i=i+1

Submission status: Runtime Error

Solution code:
import math
def marumeru(int a):
  print(math.floor(a))

a, b = input().split(' ')
a = int(a)
b = int(b)
result = -1
for i in range(1000):
  if marumeru(i * 0.08) == a and marumeru(i * 0.1) == b:
    result = i
    break
print(result)

Submission status: Runtime Error

Solution code:
a, b = input()
a = int(a)
b = int(b)
result - -1
for i in range(1000):
  if int(i * 0.08) == a and int(i * 0.1) == b:
    result = i
    break
print(result)

Submission status: Runtime Error

Solution code:
    import math
    a,b=map(int,input().split())
    answer=False
    for i in range(1,1009):
        if int(i*0.08)==a and int(i*0.10)==b:
            print(i)
            answer=True
            break
    if not answer:
        print(-1)

Submission status: Runtime Error

Solution code:
data = input().split

a = int(data[0])
b = int(data[1])

pricea = a // 0.08
priceb = b // 0.1

if a == b:
  ans = a
elif a + 1 == b:
  ans = b
elif a == b + 1:
  ans = a
else:
  ans = -1
  
print(ans)

Submission status: Runtime Error

Solution code:
A,B = (int(x) for x in input().split())
a = range(math.ceil(A/0.08), math.floor(((A+1)/0.08)+1))
b = range(math.ceil(B/0.1), math.floor(((B+1)/0.1)+1))
c = set(a) & set(b)
if len(c) == 0:
          print(-1)
else:
          print(min(c))

Submission status: Runtime Error

Solution code:
import math

A, B = map(int, input().split())
listA = []
listB = []
for i in range(1, 1251):
    listA.append(math.floor(i*0.08))
    listB.append(math.floor(i*0.1))

AnswerA=[i+1 for i, x in enumerate(listA) if x == A]
AnswerB=[i+1 for i, x in enumerate(listB) if x == B]

if len(AnswerA)==0 or len(AnswerB)==0:
    print(-1)
else:
    Answer=set(AnswerA)&set(AnswerB)
    Answer=list(Answer)
    print(Answer[0])

Submission status: Runtime Error

Solution code:
import math

A, B = map(int, input().split())
listA = []
listB = []
for i in range(1, 101):
    listA.append(math.floor(i*0.08))
    listB.append(math.floor(i*0.1))

AnswerA=[i+1 for i, x in enumerate(listA) if x == A]
AnswerB=[i+1 for i, x in enumerate(listB) if x == B]

if len(AnswerA)==0 or len(AnswerB)==0:
    print(-1)
else:
    Answer=set(AnswerA)&set(AnswerB)
    Answer=list(Answer)
    print(Answer[0])

Submission status: Runtime Error

Solution code:
from math import ceil,floor
out = []

numA,numB = map(int,input().split())
for i in range(101):
  testA = floor(i * 0.08)
  testB = floor(i * 0.10)
  if testA == numA and testB == numB:
    out.append(i)

print(min(out))

Submission status: Runtime Error

Solution code:
import math
A,B = map(int,input().split())
if (A+1)/0.08 > B/0.1 and (B+1)/0.1 > A/0.08:
    print(max(math.ceil(A/0.08),math.ceil(B/0.1))
else:
    print(-1)

Submission status: Runtime Error

Solution code:
A,B = map(int,input().split())
x = 100
flag = -1
for i in renge(x):
  if int(i * 1.08) == A:
    if int(i * 1.1) == B:
      print(i)
      flag = 0
if flag == -1:
	print("-1")

Submission status: Runtime Error

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

flag = -1
for i in renge(x):
  if int(x * 1.08) == A:
    if int(x * 1.1) == B:
      print(x)
      flag = 0
if flag == -1
	print("-1")

Submission status: Runtime Error

Solution code:
def C158():
    A, B = [int(_) for _ in input().split()]
    X1 = int(A / 0.08)
    # パターンを探す
    X = []
    for i in range(X1, 10000):
        if int(i * 0.08) == A:
            X.append(i)
        else:
            break

    for i in X:
        if int(i * 0.1) == B:
            print(i)
            exit(1)
    else:
        print("-1")

if __name__ == "__main__":
    C158()

Submission status: Runtime Error

Solution code:
import math
a,b=map(int,input().split())
ax=set(range(math.ceil(25*a/2),math.floor(25*(a+0.99999)/2)+1))
bx=set(range(math.ceil(10*b),math.floor(10*(b+0.99999)))+1)
x=list(ax&bx)
if x:
  print(x[0])
else:
  print(-1)

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split())
C = []
D = []
for i in range(100):
  if math.floor(i*0.08) == a:
    C.append(i)
  if math.floor(i*0.1) == b:
    D.append(i)
if list(set(C) & set(D)):
  print('-1')
else:
  print(list(set(C) & set(D)))

Submission status: Runtime Error

Solution code:
import math

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

a = []
b = []

for i in range(1,1001):
  if math.floor(i*0.08) == A:
    a.append(i)
    
  else:
    pass

for i in range(1,1001):
  if math.floor(i*0.1) == B:
    b.append(i)
    
  else:
    pass
   
a_and_b = set(a) & set(b)

print(min(a_and_b))