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:
s1 = input()
s2 = input()
s1_basic = math.floor(s1 / 0.08)
s2_basic = math.floor(s2 / 0.1)
if s1_basic != s2_basic:
  print(-1)
else:
  print(s1_basic)

Submission status: Runtime Error

Solution code:
s = input()
s1 = s.split(" ")[0]
s2 = s.split(" ")[1]
s1_basic = math.floor(s1 / 0.08)
s2_basic = math.floor(s2 / 0.1)

if s1_basic != s2_basic:
  print(-1)
else:
  print(s1_basic)

Submission status: Runtime Error

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

x_max=int((100/8)*(A+1))
x_min=int((100/8)*A)

if x_min==x_max:
    x=x_min
for i in range(x_min,x_max+1):
    if int(i*(1/10))==B:
        x=i
        break

if x<0 or 100<x:
    print("-1")
else:
    print(x)

Submission status: Runtime Error

Solution code:
a,b =map(int,input().split())
 
for x in range(101):
 if (x*1.08)//1==a+x and (x*1.10)//1==b+x and x//1=int(x):
  print(int(x))
  exit()
  
print(-1)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

for i in range(1300):
    if i == a*12.5 and b*10:
        print(i)
        exit()
print(-1)

Submission status: Runtime Error

Solution code:
import sys

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

val_1 = A / 0.08
val_2 = B / 0.10

i = 1

if int(val_1) == int(val_2):
    print(int(val_1))
    sys.exit()
else:
    if val_1 > val_2:
        while val_1 != val_2:
            val_2 = (B + 0.1*i)/0.1
            i += 1
            if val_1 < val_2:
				print(-1)
				sys.exit()
		print(int(val_1))
	elif val_1 < val_2:
        while val_1 != val_2:
            val_1 = (A + 0.1*i)/0.1
            i += 1
            if val_1 > val_2:
                print(-1)
                sys.exit()
        print(int(val_1))

Submission status: Runtime Error

Solution code:
import sys

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

val_1 = A / 0.08
val_2 = B / 0.10

i = 1

if int(val_1) == int(val_2):
    print(int(val_1))
    sys.exit()

else:
    while val_1 != val_2:
	val_2 = (B + 0.1*i)/0.1
	i += 1
	if val_1 < val_2:
            print(-1)
            sys.exit()

print(int(val_1))

Submission status: Runtime Error

Solution code:
for i in range(1010):
    tax8 = int(i * 0.08)
    tax10 = int(i * 0.1)

    if a == tax8 and b == tax10:
        print(i)
        exit()

print(-1)

Submission status: Runtime Error

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

down_a = A / 0.08
up_a = (A+1) / 0.08
down_b = B / 0.1
up_b = (B+1) / 0.1

a = [i for i in range(down_a, up_a)]
b = [j for j in range(down_b, up_b)]

ans = -1
for num in a:
  if num in b:
    ans = num
    break;
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

A_min=12*A+math.floor(0.5*A)
A_max=12*(A+1)+math.ceil(0.5*(A+1))
B_min=10*B
B_max=10*(B+1)

if A_max < B_min:
    print(-1)
elif B_max < A_min:
    print(-1)
else:
    print(max(A_,B_))

Submission status: Runtime Error

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

A_min=12*A+math.floor(0.5*A)
A_max=12*(A+1)+math.ceil(0.5*(A+1))
B_min=10*B
B_max=10*(B+1)

print(A_min,A_max,B_min,B_max)
if A_max < B_min:
    print(-1)
elif B_max < A_min:
    print(-1)
else:
    print(max(A_,B_))

Submission status: Runtime Error

Solution code:
import math
A,B = list(map(int,input_[0].split()))

A_min=12*A+math.floor(0.5*A)
A_max=12*(A+1)+math.ceil(0.5*(A+1))
B_min=10*B
B_max=10*(B+1)

print(A_min,A_max,B_min,B_max)
if A_max < B_min:
    print(-1)
elif B_max < A_min:
    print(-1)
else:
    print(max(A_,B_))

Submission status: Runtime Error

Solution code:
class Fraction_Error(Exception):
    pass

import math
class Fraction():
    ##入力定義
    def __init__(self,Numerator=0,Denominator=1):
        self.a=Numerator
        self.b=Denominator

    #表示定義
    def __str__(self):
        if self.b==1:
            return str(self.a)
        else:
            return str(self.a)+"/"+str(self.b)

    #四則演算定義
    def __add__(self,other):
        c=Fraction()
        if not(isinstance(other,Fraction)):
            other=Fraction.Int_to_Fraction(other)
            
        c.a=self.a*other.b+self.b*other.a
        c.b=self.b*other.b
        return Fraction.__reduce(c)

    def __radd__(self,other):
        c=Fraction()
        if not(isinstance(other,Fraction)):
            other=Fraction.Int_to_Fraction(other)
            
        c.a=self.a*other.b+self.b*other.a
        c.b=self.b*other.b
        
        return Fraction.__reduce(c)
    
    def __sub__(self,other):
        return self+(-other)

    def __rsub__(self,other):
        return -self+other

    def __mul__(self,other):
        if not(isinstance(other,Fraction)):
            other=Fraction.Int_to_Fraction(other)
            
        return Fraction.__reduce(Fraction(self.a*other.a,self.b*other.b))

    def __rmul__(self,other):
        if not(isinstance(other,Fraction)):
            other=Fraction.Int_to_Fraction(other)
            
        return Fraction.__reduce(Fraction(self.a*other.a,self.b*other.b))

    def __floordiv__(self,other):
        if other==Fraction():
            raise Fraction_Error("0除算です.")
        
        H=self/other
        return H.a//H.b

    def __rfloordiv__(self,other):
        if self==Fraction():
            raise Fraction_Error("0除算です.")

        H=other/self
        return H.a//H.b
    
    def __truediv__(self,other):
        if other==Fraction():
            raise Fraction_Error("0除算です.")
        
        if not(isinstance(other,Fraction)):
            other=Fraction.Int_to_Fraction(other)
            
        return self*Fraction.__inverse(other)

    def __rtruediv__(self,other):
        if self==Fraction():
            raise Fraction_Error("0除算です.")
        
        if not(isinstance(self,Fraction)):
            self=Fraction.Int_to_Fraction(other)
            
        return Fraction.__inverse(self)*other

    def __pow__(self,other):
        if other==0:
            return 1
        n=abs(other)

        g=1
        k=self
        for i in range(int(math.log(n,2))+1):
            if n%2==1:
                g*=k

            k*=k
            n=n>>1

        if other>0:
            return g
        else:
            return 1/g
        
    #比較演算子
    def __eq__(self,other):
        t=self-other
        if isinstance(t,Fraction):
            return t.a==0
        else:
            return t==0
    
    def __nq(self,other):
        return not(self==other)

    def __lt__(self,other):
        t=self-other
        if isinstance(t,Fraction):
            return t.a<0
        else:
            return t<0

    def __le__(self,other):
        return (self<other) or (self==other)

    def __gt__(self,other):
        return -self<-other

    def __ge__(self,other):
        return (other<self) or (self==other)
    
    #その他
    def ToNumber(self):
        return self.a/self.b

    def sign(self):
        s=self.a*self.b
        if s>0:return 1
        elif s==0:return 0
        else:return -1

    def __reduce(self):
        g=math.gcd(self.a,self.b)
        self.a//=g
        self.b//=g

        if self.b<0:
            self.a*=-1
            self.b*=-1
        return Fraction(self.a,self.b)

    def Int_to_Fraction(self):
        if not(isinstance(self,Fraction)):
            return Fraction(self,1)
        else:return self
        
    def __inverse(self):
        if self==Fraction():
            raise Fraction_Error("0の逆数は存在しまんせん.")
        
        return Fraction.__reduce(Fraction(self.b,self.a))
    
    def __pos__(self):
        return self

    def __neg__(self):
        return Fraction(-self.a,self.b)

    def __abs__(self):
        return max(self,-self)
#--------------------
import math

A,B=map(int,input().split())
alpha=Fraction(8,100)
beta=Fraction(10,100)

m=max(A/alpha,B/beta)
m=math.ceil(m.a/m.b)

M=min((A+1)/alpha,(B+1)/beta)
M=math.floor(M.a/M.b)

if m<=M:
    print(m)
else:
    print(-1)

Submission status: Runtime Error

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

for i in range(1000000):
    if int(i*0.08) == a and int(i*0.1) == b:
        num = i
        break

    elif a/0.08 < b/0.1:
        num = -1
        break

print(num)

Submission status: Runtime Error

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

for i in range(1001):
    if int(i*0.08) == a and int(i*0.1) == b:
        num = i
        break

    elif a/0.08 < b/0.1:
        num = -1
        break

print(num)

Submission status: Runtime Error

Solution code:
import math
a,b = map(int, input().split())
A = int(math.floor(a * (100/8)))
B = int(math.floor(b * (100/10)))
X = []
while True:
  if int(math.floor(A*(8/100))) == a:
    X.append(A)
    break
  else:
    A += 1
 
while True:
  if int(math.floor(B*(8/100))) == b:
    X.append(B)
    break
  else:
    B += 1
    
if set(A)&set(B) == set():
  print(-1)
else:
  C = list(set(A)&set(B))
  C.sort()
  print(C[0])

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import numpy as np
A, B = map(int,input().split())
minA = math.floor(A/0.08)
maxA = math.ceil((A+1)/0.08) -1
minB = math.floor(B/0.08)
maxB = math.ceil((B+1)/0.08) -1
if (minA>maxB) or (minB>maxA):
    print(-1)
else:
    print(min(minA,minB))

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < n; i++)
using namespace std;
using ll = long long;

int main() {
  int a, b;
  cin >> a >> b;
  int mina = ceil(a * 12.5);
  int maxa = floor(a * 12.5);
  if (a % 2 == 1) {
    maxa -= 1;
  }
  int minb = b * 10;
  int maxb = b * 10 + 10;
  if (mina > maxb || minb > maxa) {
    cout << -1 << endl;
  } else {
    cout << max(mina, minb) << endl;
  }
  return 0;
}

Submission status: Runtime Error

Solution code:
import math
A_se = set()
B_se = set()

for i in range(math.ceil(A/0.08),math.ceil((A+1)/0.08)):
    A_se.add(i)

for i in range(math.ceil(B/0.1),math.ceil((B+1)/0.1)):
    B_se.add(i)

C = A_se & B_se
if len(C)==0:
    print(-1)
else:
    print(min(C))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

p1 = int(a // 0.08 + 1)
p2 = int(b // 0.1 + 1)

p1_list = [i for i in range(p1,p1+13)]
p2_list = [i for i in range(p2,p2+10)]

p_list = set(p1_list) & set(p2_list)

p_list = list(p_list)
p_list = sorted(p_list)

print(p_list[0])

Submission status: Runtime Error

Solution code:
A,B=map(int,input().split())
cal,cal2=0,0
ans=[]

for i in range(1200):
    cal=math.floor(i*0.08)
    cal2=math.floor(i*0.1)

    if cal==A and cal2==B:
        ans.append(i)


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

Submission status: Runtime Error

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

for i in range(0,100):
    if int(i*1.08) == a and int(i*1.1) == b:
        print(i)
        exit()
        
print(-1)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input().split())
for i in range(100):
  if int(i*1.08)==a and int(i*1.1)==b:
    print(i)
    exit(0)
print(-1)

Submission status: Runtime Error

Solution code:
A, B = map(int, input().split())
C = -(-A//0.08)
D = -(-(A+1)//0.08)
for i in range(C,D):
    if i//10 == B:
      print(i)
      break
else:
    print(-1)

Submission status: Runtime Error

Solution code:
A, B = map(int, input().split())
C = -(-A//0.08)
D = -(-(A+1)//0.08)
for i in range(C,D):
    if i//10 == B:
        break
        print(i)
else:
    print(-1)

Submission status: Runtime Error

Solution code:
19 99

Submission status: Runtime Error

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
A, B = map(int,read().split())

def test(n):
    x = n * 8 // 100
    y = n * 10 // 100
    return (x == A) and (y == B)

answer = -1
for n in range(20000):
    if test(n):
        ans = n
        break
print(ans)

Submission status: Runtime Error

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

def test(n):
    x = n * 8 // 100
    y = n * 10 // 100
    return (x == A) and (y == B)

answer = -1
for n in range(20000):
    if test(n):
        ans = n
        break
print(ans)

Submission status: Runtime Error

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
a, b = map(int,read().split())

def test(n):
    x = n * 8 // 100
    y = n * 10 // 100
    return (x==a) and (y==b)

answer = -1
for n in range(20000):
    if test(n):
        ans = n
        break
print(ans)

Submission status: Runtime Error

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

def test(n):
    x = n * 8 // 100
    y = n * 10 // 100
    return (x==a) and (y==b)

answer = -1
for n in range(20000):
    if test(n):
        ans = n
        break
print(ans)

Submission status: Runtime Error

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
a, b = map(int,read().split())

def test(n):
    x = n * 8 // 100
    y = n * 10 // 100
    return (x==a) and (y==b)

answer = -1
for n in range(int(20000)):
    if test(n):
        ans = n
        break
print(ans)

Submission status: Runtime Error

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
a, b = map(int,read().split())

def test(n):
    x = n * 8 // 100
    y = n * 10 // 100
    return (x==a) and (y==b)

answer = -1
for n in range(int(2e+4)):
    if test(n):
        ans = n
        break
print(ans)

Submission status: Runtime Error

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

def test(n):
    x = n * 8 // 100
    y = n * 10 // 100
    return (x==a) and (y==b)

answer = -1
for n in range(int(2e+4)):
    if test(n):
        ans = n
        break
print(ans)

Submission status: Runtime Error

Solution code:
def test(n):
    x = n * 8 // 100
    y = n * 10 // 100
    return (x==a) & (y==b)

if __name__ == "__main__":
    answer = -1
    a, b = map(int, input().split())
    for n in range(int(2e+4)):
        if test(n):
            ans = n
            break
    print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b = map(int, input().split(" "))
p = []
q = []

for i in range(((a/8)*100)//1, (((a+1)/8)*100)//1+1):
  if i >= (a/8)*100 and i < ((a+1)/8)*100:
    p.append(i)
    
for i in range((a*10), (a+1)*10):
    q.append(i)

pq = list(set(p) & set(q))
if pq == []:
  print("-1")
else:
  print(min(pq))

Submission status: Runtime Error

Solution code:
import sys

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

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

Submission status: Runtime Error

Solution code:
import sys

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

x_a = int(A/0.08)
x_b = int(B/0.1)

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

Submission status: Runtime Error

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

from fractions import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations, combinations_with_replacement

A, B = [int(_) for _ in input().split()]

for i in range(100+1):

    if int(i * 0.08) == A and int(i * 0.1) == B:
        print(i)
        exit()
print(-1)

Submission status: Runtime Error

Solution code:
A,B=list(map(int,input().split()))
ans=[]
for i in range(1,1010):
    if int(i*0.08)==A and int(i*0.1)==B:
        ans.append(i)
print(min(ans))

Submission status: Runtime Error

Solution code:
import math
a,b=map(int,input().split())
 
s=math.ceil(a/1.08) 
t=(a+1)//1.08
 
u=math.ceil(b/1.1)
v=(b+1)//1.1
 
la=list(range(s,t+1))
 
lb=list(range(u,v+1))
 
lc=[]          
for lla in la:
  for llb in lb:
      if lla==llb:
          lc.append(lla)
if len(lc)==0:
  print(-1)
else:
  print(min(lc))

Submission status: Runtime Error

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

s=math.ceil(a/1.08) 
t=(a+1)//1.08

u=math.ceil(b/1.1)
v=(b+1)//1.1

la=[]
la.append(range(s,t+1))

lb=[]
lb.append(range(u,v+1)

lc=[]          
for lla in la:
  for llb in lb:
      if lla==llb:
          lc.append(lla)
if len(lc)==0:
  print(-1)
else:
  print(min(lc))

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split())
k=[]
o=[]
p=[]
for i in range(1,101):
    if i==A//1.08:
        k.append(i)
for j in range(1,101):
    if j==b//1.1:
        o.append(j)
for t in range(len(k)):
    for u in range(len(o)):
        if k[t]==o[u]:
            p.append(k[t])
if p==[]:
    print(-1)
else:
    print(min(p))

Submission status: Runtime Error

Solution code:
import sys

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

a = int(A // 0.08) + 1
b = int(B // 0.1) + 1

ab = []
ab.append(min(a, b))
ab.append(max(a, b))

for i in ab:
    if int(i * 0.08) == A and int(i * 0.1) == B:
        print(f'{i}')
        sys.exit(0)

print('-1')

Submission status: Runtime Error

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

a = int(A // 0.08) + 1
b = int(B // 0.1) + 1

ab = []
ab.append(min(a, b))
ab.append(max(a, b))

for i in ab:
    if int(i * 0.08) == A and int(i * 0.1) == B:
        print(f'{i}')
        exit(0)
        
print('-1')

Submission status: Runtime Error

Solution code:
import math
a, b = map(int, input().split())
A = math.floor(a/0.08)
B = math.floor((a/0.8)/0.1)


c = math.gcd(A, B)
if c == 1 or c >= 100:
    print(-1)
else:
    print(c)

Submission status: Runtime Error

Solution code:
import math
a, b = map(int, input().split())
A = math.floor(a/0.08)
B = math.floor((a/0.8)/0.1)


c = math.gcd(A, B)
if c == 1:
    print(-1)
else:
    print(c)

Submission status: Runtime Error

Solution code:
import sys
import math
input = sys.stdin.readline


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


if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
A,B = map(int,input().split())
while i<=10000:
  if (int((i*0.08)==A)) and (int((i*0.1)==B)):
    print(i)
    exit()
  i+=1
print(-1)

Submission status: Runtime Error

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

i=0
while i<10000:
  if A*0.08==i and B*0.1==i:
    print(i)
    quit()
print(-1)

Submission status: Runtime Error

Solution code:
import math
A,B=map(int,input().split())
a=math.floor(A/0.08)
b=math.floor(b/0.10)
if a==b:
  print(a)
print(-1)

Submission status: Runtime Error

Solution code:
def tax8(n):
    return list(range(int((n-1)*(25/2))),int((n+1)*(25/2))))
    
def tax10(n):
    return list(range(int((n-1)*(10/1))),int((n+1)*(10/1))))

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

ans = -1

x = []
for i in range(1,a+1):
    if tax8(i) == a:
        x.extend(i)
        
y = []
for i in range(1,b+1):
    if tax10(i) == b:
        y.extend(i)
        
for i in x:
    if i in y:
        if int(i*(2/25)) == int(i*(1/10)):
            ans = i
            break
    
print(ans)

Submission status: Runtime Error

Solution code:
A,B=map(int,input().split())
Aset=set([int(i) for i in range(1,1010) if int(i*0.08)==A])
Bset=set([int(i) for i in range(1,1010) if int(i*0.1)==B])
if Aset&Bset!={}:
    print(min(Aset&Bset))
else:
    print(-1)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A,B=map(int,input().split())
Aset=set([int(i) for i in range(1,1263) if int(i*0.08)==A])
Bset=set([int(i) for i in range(1,1010) if int(i*0.1)==B])
print(min(Aset&Bset))

Submission status: Runtime Error

Solution code:
A, B = map(int, input().split())
x = int
a = int(A // 0.08)
b = int((A + 1) // 0.08)
c = int(B // 0.1)
d = int((B + 1) // 0.1)

a < x <= b and c < x <= d

print(a,b,c,d)

Submission status: Runtime Error

Solution code:
from math import *
A,B=list(map(input().split()))
x=ceil(max(A/0.08,B/0.1))
y=min((A+1)/0.08,(B+1)/0.1)
if x<y:
  print(x)
else:
  print(-1)

Submission status: Runtime Error

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

a1 =a//0.08
a2 =(a+1)//0.08
b1 = b//0.1
b2= (b+1)//0.1

A=range(a1,a2+1)
B=range(b1,b2+1)

if set(A)&set(B)==set():
  print(-1)
else:
  C = set(A)&set(B)
  print(min(C))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

print(ans)

Submission status: Runtime Error

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

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

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

print(ans)

Submission status: Runtime Error

Solution code:
A,B=map(int,input().split())
A*=100
B*=100
for i in range(2000):
  t*=100
  if A==t*8 and B==t*10:
    print(i)
    break
else:
    print(-1)

Submission status: Runtime Error

Solution code:
A,B=map(int,input().split())
A*=100
B+=100
for i in range(2000):
  t*=100
  if A==t*8//100 and B==t//10:
    print(i)
    exit()
print(-1)

Submission status: Runtime Error

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

for i in range(10000,-1,-1):
  tax1 = int(i*0.08)
  tax2 = int(i*0.1)
  if tax1 = a and tax2 == b:
    ans = i
print(ans)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

from math import ceil

a1 = ceil(a / 0.08)
a2 = ceil((a+1) / 0.08)
b1 = ceil(b / 0.1)
b2 = ceil((b+1) / 0.1)

m = min([a1,b1])

if m == a1:
    if b1 in range(a1,a2):
        ans = b1
    else:
        print('-1')

if m == b1:
    if a1 in range(b1,b2):
        ans = a1
    else:
        print('-1')

print(ans)

Submission status: Runtime Error

Solution code:
A,B = map(int,input().split())
q = 0
for i in range(math.ceil(12.5*A),int(12.5*(A+1))):
    if 10*B <= i < 10*(B+1):
        q = i
        break
if q != 0:
    print(i)
else:
    print(-1)

Submission status: Runtime Error

Solution code:
import math
a, b = map(int,input().split())
e = 10**-7
mi = max(math.ceil(a*12.5),b*10)
ma = min(int((a-1)+*12.5),b*10-1)
if mi > ma:
    print(-1)
else:
    print(mi)

Submission status: Runtime Error

Solution code:


A = input()
B = input()
result = False
Amin = int(round(A * 12.5)) 
Amax = int(round((A+1) * 12.5)-1)
Bmin = B * 10
Bmax = (B+1) * 10


for i in range(Amin,Amax+1):
    for j in range(Bmin,Bmax+1):
        
        if(i == j):
            print(i)
            result = True
            break

    if(result):

        break



if(result==False):
    print(-1)

Submission status: Runtime Error

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

result = 0
result += N // (A + B) * A
result += min(N % (A + B), A)
print(result)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

x = -1
for i in range(100):
  if (int(i*1.08) == A) and (int(i*1.1) == B):
    x = i
    break
  
print(x)

Submission status: Runtime Error

Solution code:
n, a, b = map(int, input().split())
if n%(a+b) < a:
    print(n//(a+b)*a+n%(a+b))
else:
    print(n//(a+b)*a+a)

Submission status: Runtime Error

Solution code:
l = [int(x) for x in input().split()]
A,B = l[0], l[1]

eight = list(range(int(25*A//2), int(25*(A+1)//2)+1))
#print(eight)
ten = list(range(int(10*B), int(10*(B+1))+1))
#print(ten)

o = []
for x in eight:
    if x in ten:
        print(x)
        o,append(x)
        break

if len(o) == 0:
    print(-1)

Submission status: Runtime Error

Solution code:
import math
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 Bmax<Amin:
    print(-1)
else:
    p=(Amin,Bmin)
    print(math.ceil(p))

Submission status: Runtime Error

Solution code:
import math
A,B=map(int,input().split())
Amin=A/0.08
Amax=(A+1)/0.08
Bmin=B/0.1
Bmax=(B+1)/0.1
print(Amin,Amax,Bmin,Bmax)
a=[]
b=[]
c=[]
"""
if int(Amin)==Amin:
    p=Amin
else:
    p=int(Amin)+1

if int(Bmin)==Bmin:
    q=Bmin
else:
    q=int(Bmin)+1
"""
p=int(Amin+1)
q=int(Bmin+1)
while p<=Amax:
    a.append(p)
    p+=1
while q<=Bmax:
    b.append(q)
    q+=1
for i in range(len(a)):
    if a[i] in b:
        c.append(a[i])
for i in range(len(b)):
    if b[i] in a:
        c.append(b[i])
print(min(c))

Submission status: Runtime Error

Solution code:
import math
A,B=map(int,input().split())
Amin=A/0.08
Amax=(A+1)/0.08
Bmin=B/0.1
Bmax=(B+1)/0.1
print(Amin,Amax,Bmin,Bmax)
a=[]
b=[]
c=[]
if int(Amin)==Amin:
    p=Amin
else:
    p=int(Amin)+1

if int(Bmin)==Bmin:
    q=Bmin
else:
    q=int(Bmin)+1
while int(Amin)<=p<=Amax:
    a.append(p)
    p+=1
while int(Bmin)<=q<=Bmax:
    b.append(q)
    q+=1
for i in range(len(a)):
    if a[i] in b:
        c.append(a[i])
for i in range(len(b)):
    if b[i] in a:
        c.append(b[i])
print(min(c))

Submission status: Runtime Error

Solution code:
import math

A, B = map(int, input().split())
 
priceA1 = A / 0.08
priceA2 = (A+1) / 0.08
priceB1 = B / 0.10
priceB2 = (B+1) / 0.10

if priceA1 <= math.ceil(priceB1) <= math.floor(priceA2):
    print(math.ceil(priceB1,0))
elif priceB1 <= math.ceil(priceA1) <= math.floor(priceB2):
    print(math.ceil(priceA1))
else:
    print(-1)

Submission status: Runtime Error

Solution code:
import math

A, B = map(int, input().split())
 
priceA1 = A / 0.08
priceA2 = (A+1) / 0.08
priceB1 = B / 0.10
priceB2 = (B+1) / 0.10

if priceA1 < math.ceil(priceB1) <= math.floor(priceA2):
    print(math.floor(priceB1,0))
elif priceB1 <= math.ceil(priceA1) <= math.floor(priceB2):
    print(int(priceA1))
else:
    print(-1)

Submission status: Runtime Error

Solution code:
A, B = map(int, input().split())
 
priceA1 = A / 0.08
priceA2 = (A+1) / 0.08
priceB1 = B / 0.10
priceB2 = (B+1) / 0.10

if priceA1 <= priceB1 < priceA2:
    print(int(priceB))
elif priceB1 <= priceA1 < priceB2:
    print(int(priceA))
else:
    print(-1)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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