Problem:


Score : 300 points

Problem Statement

Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.)

Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded down to the nearest integer.

If multiple prices satisfy the condition, print the lowest such price; if no price satisfies the condition, print -1.

Constraints

1 \leq A \leq B \leq 100

A and B are integers.

Input

Input is given from Standard Input in the following format:

A B

Output

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

Sample Input 1

2 2

Sample Output 1

25

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

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

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

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

Sample Input 2

8 10

Sample Output 2

100

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

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

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

Sample Input 3

19 99

Sample Output 3

-1

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



Sample input:
2 2


Sample output:
25

Submission status: Wrong Answer

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

inf = (-1)*math.floor((-1)*a/0.08)
sup = math.floor((a+1)/0.08)
for i in range(inf,sup+1):
  if math.floor(i*0.1) == b:
    print(i)
    exit()
    
print(-1)

Submission status: Wrong Answer

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

ans = []
for i in range(1,101):
    if math.floor(i*0.08) == A and math.floor(i*0.1) == B:
        ans.append(i)

if not ans:
    print(-1)
else:
    print(min(ans))

Submission status: Wrong Answer

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

origin_A = (A / 8) * 100
origin_B = (B / 10) * 100

if 0 <= origin_A - origin_B <= 9:
    print(int(origin_A))
else:
    print(-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b=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: Wrong Answer

Solution code:
a,b = map(int, input().split())
A = round(a/8*100)
B = b*10
ans = float("INF")
for i in range(min(A,B), max(A,B)+1):
  if int(i*0.08) == a and int(i*0.1) == b:
    if ans > i: ans = i
print(ans if ans != float("INF") else -1)

Submission status: Wrong Answer

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

for i in range(1,2000):
  if a // 1.08 == i and b // 1.1 == i:
    print(i)
    exit()
print(-1)

Submission status: Wrong Answer

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

  return

if __name__ == "__main__":
  resolve()

Submission status: Wrong Answer

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

ans = []
for i in range(1,101):
    if math.floor(i*0.08) == A and math.floor(i*0.1) == B:
        ans.append(i)

if not ans:
    print('-1')
else:
    print(min(ans))

Submission status: Wrong Answer

Solution code:
import math
# math.floor()

A, B = map(int ,input().split())
ba = (A / 8) * 100
ba_floor = ((A+0.9999999999) /8 ) * 100
bb = (B / 10) * 100
bb_floor = ((B+0.999999999) / 10) * 100

for i in range(int(ba), int(ba_floor)):
    if int(bb) <= i < int(bb_floor):
        print(i)
        exit()

print(-1)

Submission status: Wrong Answer

Solution code:
import math
# math.floor()

A, B = map(int ,input().split())
ba = (A / 8) * 100
ba_floor = ((A+1) /8 ) * 100
bb = (B / 10) * 100
bb_floor = ((B+1) / 10) * 100

for i in range(int(ba), int(ba_floor)):
    if int(bb) <= i < int(bb_floor):
        print(i)
        exit()

print(-1)

Submission status: Wrong Answer

Solution code:
import math
# math.floor()

A, B = map(int ,input().split())
ba = (A / 8) * 100
ba_floor = ((A+1) /8 ) * 100
bb = (B / 10) * 100
bb_floor = ((B+1) / 10) * 100

for i in range(int(ba), int(ba_floor)):
    print(i)
    if int(bb) <= i < int(bb_floor):
        print(i)
        exit()

print(-1)

Submission status: Wrong Answer

Solution code:
import math
# math.floor()

A, B = map(int ,input().split())
ba = (A / 8) * 100
ba_floor = ((A+1) /8 ) * 100
bb = (B / 10) * 100
bb_floor = ((B+1) / 10) * 100

for i in range(int(ba), int(ba_floor)):
    if bb <= i < bb_floor:
        print(i)
        exit()

print(-1)

Submission status: Wrong Answer

Solution code:
import math
# math.floor()

A, B = map(int ,input().split())
ba = (A / 8) * 100
ba_floor = ((A+1) /8 ) * 100
bb = (B / 10) * 100
bb_floor = ((B+1) / 10) * 100

for i in range(int(ba), int(ba_floor)+1):
    if bb <= i <= bb_floor:
        print(i)
        exit()

print(-1)

Submission status: Wrong Answer

Solution code:
import math
def main():
    A,B = map(int, input().split())
    # 税率rate%でtaxがA円となる税抜き価格xは、ceil(a*100/rate)<=x<ceil((a+1)*100/rate)を満たす
    min1 = math.ceil(A*100/8)
    max1 = math.ceil((A+1)*100/8)-1
    min2 = math.ceil(B*100/10)
    max2 = math.ceil((B+1)*100/10)-1
    ans = max(min1,min2) if not max1<min2 or max2<min1 else -1
    print(ans)


main()

Submission status: Wrong Answer

Solution code:
import math
def main():
    A,B = map(int, input().split())
    # 税率rate%でtaxがA円となる税抜き価格xは、ceil(a*100/rate)<=x<ceil((a+1)*100/rate)を満たす
    min1 = math.ceil(A*100/8)
    max1 = math.ceil((A+1)*100/8)
    min2 = math.ceil(B*100/10)
    max2 = math.ceil((B+1)*100/10)
    ans = max(min1,min2) if not max1<min2 or max2<min1 else -1
    print(ans)


main()

Submission status: Wrong Answer

Solution code:
from math import floor
from sys import exit
A, B = map(int, input().split())
for i in range(100):
  if floor(i * 1.08) == A and floor(i * 1.1) == B:
    print(i)
    exit()
print(-1)

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
ami,ama = A/0.08,(A+1)/0.08
bmi,bma = B/0.1,(B+1)/0.1
#print(ami,ama,bmi,bma)
ans = 0
flag = False
for x in range(1,1000):
    if ami<=x<ama and bmi<=x<bma:
        ans = x
        flag = True
        break
if flag:
    print(ans)
else:
    print("-1")

Submission status: Wrong Answer

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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = 0
a = A / 0.08
if int(a * 0.1) == B:
    ans = int(a)
else:
    ans = "-1"
print(ans)

Submission status: Wrong Answer

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

A_n = int(A/0.08)
B_n = int(B/0.10)

if A_n == B_n:
  print(A_n)
elif A_n < B_n:
  if int(B_n*0.8) == A:
    print(B_n)
  else:
    print(-1)
elif B_n < A_n:
  if int(A_n*0.1) == B:
    print(A_n)
  else:
    print(-1)
else:
  print(-1)

Submission status: Wrong Answer

Solution code:
def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getList():
    return list(map(int, input().split()))
def getArray(intn):
    return [int(input()) for i in range(intn)]
def input():
    return sys.stdin.readline().rstrip()

from collections import defaultdict, deque, Counter
from sys import exit
import heapq
import math
import copy
from operator import mul
from functools import reduce
from bisect import bisect_left, bisect_right

import sys
sys.setrecursionlimit(1000000000)
mod = 10 ** 9 + 7

A, B = getNM()
ans = -1
for i in range(1, 200):
    optA = math.floor(i * 0.08)
    optB = math.floor(i * 0.1)
    if optA == A and optB == B:
        ans = i
        break
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from math import floor
a,b=map(int,input().split())
INF=10**4
la=[]
lb=[]
for i in range(100):
  s=(a+i/100)
  la.append(s)
  
for i in range(10):
  s=(b+i/10)
  lb.append(s)
  
#print(la)
#print(lb)
lm=[INF]
for i in la:
  m=int(floor(100/8*i))
  for j in lb:
    n=int(floor(10*j))
    if m==n:
      lm.append(m)
      
ans=min(lm)
if ans==INF:
  print('-1')
  
else:
  print(ans)

Submission status: Wrong Answer

Solution code:
from math import floor
a,b=map(int,input().split())
la=[]
lb=[]
for i in range(100):
  s=(a+i/100)
  la.append(s)
  
for i in range(10):
  s=(b+i/10)
  lb.append(s)
  
#print(la)
#print(lb)
lm=[0]
for i in la:
  m=int(floor(100/8*i))
  for j in lb:
    n=int(floor(10*j))
    if m==n:
      lm.append(m)
      
ans=min(lm)
if ans==0:
  print('-1')
  
else:
  print(ans)

Submission status: Wrong Answer

Solution code:
import math

List = list(map(int, input().split()))

min8 = math.ceil(List[0]/0.08)
max8 = math.floor((List[0]+1)/0.08)

min10 = math.ceil(List[1]/0.1)
max10 = math.floor((List[1]+1)/0.1)

if max8 < min10 or max10 < min8:
    print('-1')
elif min8 <= min10:
    print(min10)
elif min10 <= min8:
    print(min8)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

nl = ceil((A+1)/0.08)
nh = floor(A/0.08)

res = -1
for x in range(nh-1-A, nl+A):
    if  floor(x*0.1) == B:
        res = x
        break

print(res)

Submission status: Wrong Answer

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

nl = ceil((A+1)/0.08)
nh = floor(A/0.08)

res = -1
for x in range(nh-10, nl+1):
    if  floor(x*0.1) == B:
        res = x
        break

print(res)

Submission status: Wrong Answer

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

nl = ceil((A+1)/0.08)
nh = floor(A/0.08)

res = -1
for x in range(nh, nl+1):
    if  floor(x*0.1) == B:
        res = x
        break

print(res)

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
a=range(A,A+1)
b=range(B,B+1)
blank=set()
for c in a:
    if c in b==blank:
        print('-1')
    else:
        s=int((100*A)/8)
        print(s)

Submission status: Wrong Answer

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

x = int(a / 0.08)

ans = -1
for i in range(14):
    if (int((x+ i) * 0.1)) == b:
        if int((x + i) * 0.08) == a:
            ans = int(x + i)
        break

print(ans)

Submission status: Wrong Answer

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

x = int(a / 0.08)

ans = -1
for i in range(13):
    if (int((x+ i) * 0.1)) == b:
        if int((x + i) * 0.08) == a:
            ans = int(x + i)
        break

print(ans)

Submission status: Wrong Answer

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

x = a // 0.08

ans = -1
for i in range(13):
    if (int((x+ i) * 0.1)) == b:
        ans = int(x + i)
        break

print(ans)

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
if A % 2 == 1:
    a1,a2 = int(A*12.5)+1, A*12.5+12.5
else:
    a1,a2 = int(A*12.5),int(A*12.5+12.5)
b1,b2 = B*10,B*10+10

if (b2 < a1) or (a2 < b1):
    print(-1)
else:
    print(max(a1,b1))

Submission status: Wrong Answer

Solution code:
import math

A,B = map(int,input().split())
anser = 0
for i in range(0, 101):
    if i * 0.08 == A:
        if math.floor(i * 0.1) == B:
            anser = i
    else:
        anser = -1

print(anser)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
import math
al=(a/0.08)
bl=(b/0.10)
ah=(a+1)/0.08
bh=(b+1)/0.10
#print(al,ah)
#print(bl,bh)
if ah<bl or bh<al:
  print(-1)
  exit()
print(math.ceil(max(al,bl)))

Submission status: Wrong Answer

Solution code:
from sys import stdin, setrecursionlimit
from math import ceil


def main():
    input = stdin.buffer.readline
    a, b = map(int, input().split())

    set_a = set(range(ceil(a / 0.08), ceil((a + 1) / 0.08)))
    set_b = set(range(ceil(b / 0.1), ceil((b + 1) / 0.1)))

    ans = list(set_a & set_b)
    if len(ans) == 0:
        print(-1)
    else:
        print(ans[0])


if __name__ == "__main__":
    setrecursionlimit(10000)
    main()

Submission status: Wrong Answer

Solution code:
from sys import stdin, setrecursionlimit


def main():
    input = stdin.buffer.readline
    a, b = map(int, input().split())

    set_a = set(range(int(a / 0.08), int((a + 1) / 0.08) + 1))
    set_b = set(range(int(b / 0.1), int((b + 1) / 0.1) + 1))

    ans = list(set_a & set_b)
    if len(ans) == 0:
        print(-1)
    else:
        print(ans[0])


if __name__ == "__main__":
    setrecursionlimit(10000)
    main()

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
if A % 2 == 1:
    a1,a2 = int(A*12.5)+1, A*12.5+12.5
else:
    a1,a2 = int(A*12.5),int(A*12.5+12.5)
b1,b2 = B*10,B*10+10

if (b2 < a1) or (a2 < b1):
    print(-1)
else:
    print(min(a1,b1))

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
a1,a2 = int(A*12.5),int(A*12.5+12.5)
b1,b2 = int(B*10),int(B*10+10)

if (b2 < a1) or (a2 < b1):
    print(-1)
else:
    print(min(a1,b1))

Submission status: Wrong Answer

Solution code:
import numpy as np
def f(a, b):
    x = np.arange(1, 1001)
    xa = np.floor(x*0.08)
    xb = np.floor(x*0.10)
    for i, value in enumerate(x):
        if xa[i] == a and xb[i] == b:
            print(value)
            break
    else:
        print(-1)

Submission status: Wrong Answer

Solution code:
import math

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

Submission status: Wrong Answer

Solution code:
import math

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if int(a//0.08) <= int(b//0.1):
    if int(b//0.1) < int((a+1)//0.08):
        print(int(b//0.1))
    else:
        print(-1)
if int(a//0.08) > int(b//0.1):
    if int(a//0.08) < int((b+1)//0.1):
        print(int(a//0.08))
    else:
        print(-1)

Submission status: Wrong Answer

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

if int(a/0.08) <= int(b/0.1):
    if int(b/0.1) < int((a+1)/0.08):
        print(int(b/0.1))
    else:
        print(-1)
if int(a/0.08) > int(b/0.1):
    if int(a/0.08) < int((b+1)/0.1):
        print(int(a/0.08))
    else:
        print(-1)

Submission status: Wrong Answer

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

if int(a/0.08) <= int(b/0.1):
    if int(b/0.1) < int((a+1)/0.08):
        print(int(b/0.1))
    else:
        print(-1)
else:
    if int(a/0.08) > int((b+1)/0.1):
        print(int(a/0.08))
    else:
        print(-1)

Submission status: Wrong Answer

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

if int(a/0.08) <= int(b/0.1):
    if int(b/0.1) < int((a+1)/0.08):
        print(int(b/0.1))
    else:
        print(-1)
else:
    if int(a/0.08) < int((b+1)/0.1):
        print(int(a/0.08))
    else:
        print(-1)

Submission status: Wrong Answer

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

if int(a*100/8) <= int(b*100/10):
    if int(b*100/10) < int((a+1)*100/8):
        print(int(b*100/10))
    else:
        print(-1)
else:
    if int(a*100/8) < int((b+1)*100/10):
        print(int(a*100/8))
    else:
        print(-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if abs(floor(A/0.08) - floor(B/0.1)) > 10:
    print(-1)
else:
    print(max(ceil(A/0.08),ceil(B/0.1)))

Submission status: Wrong Answer

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

if abs(floor(A/0.08) - floor(B/0.1)) >= 10:
    print(-1)
else:
    print(max(ceil(A/0.08),ceil(B/0.1)))

Submission status: Wrong Answer

Solution code:
import math

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

if math.floor(a*100/8) <= math.floor(b*100/10):
    if math.floor(b*100/10) < math.floor((a+1)*100/8):
        print(math.floor(b*100/10))
    else:
        print(-1)
else:
    if math.floor(a*100/8) < math.floor((b+1)*100/10):
        print(math.floor(a*100/8))
    else:
        print(-1)

Submission status: Wrong Answer

Solution code:
import math

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

for i in range(math.floor(a*100/8), math.floor((a+1)*100/8)):
    for j in range(math.floor(b*100/10), math.floor((b+1)*100/10)):
        if i == j:
            l.append(i)

if not l:
    print(-1)
else:
    print(min(l))

Submission status: Wrong Answer

Solution code:
import math
a,b=map(int,input().split())
tempa1=math.ceil(a/0.08)-1
tempa2=int((a+1)/0.08)
tempb1=math.ceil(b/0.1)
tempb2=int((b+1)/0.1)-1
if tempa1>tempb2 or tempa2<tempb1:
  print(-1)
else:
  print(max(tempa1,tempb1))

Submission status: Wrong Answer

Solution code:
import math
a,b=map(int,input().split())
tempa1=math.ceil(a/0.08)
tempa2=int((a+1)/0.08)
tempb1=math.ceil(b/0.1)
tempb2=int((b+1)/0.1)-1
if tempa1>tempb2 or tempa2<tempb1:
  print(-1)
else:
  print(max(tempa1,tempb1))

Submission status: Wrong Answer

Solution code:
import math
a,b=map(int,input().split())
tempa1=math.ceil(a/0.08)
tempa2=int((a+1)/0.08)
tempb1=math.ceil(b/0.1)
tempb2=int((b+1)/0.1)+1
if tempa1>tempb2 or tempa2<tempb1:
  print(-1)
else:
  print(max(tempa1,tempb1))

Submission status: Wrong Answer

Solution code:
import math
a,b=map(int,input().split())
tempa1=math.ceil(a/0.08)
tempa2=int((a+1)/0.08)
tempb1=math.ceil(b/0.1)
tempb2=int((b+1)/0.1+1)
if tempa1>tempb2 or tempa2<tempb1:
  print(-1)
else:
  print(max(tempa1,tempb1))

Submission status: Wrong Answer

Solution code:
import math
a,b=map(int,input().split())
tempa1=math.ceil(a/0.08)
tempa2=int((a+1)/0.08)
print(tempa2)
tempb1=math.ceil(b/0.1)
tempb2=int((b+1)/0.1)+1
if tempa1>tempb2 or tempa2<tempb1:
  print(-1)
else:
  print(max(tempa1,tempb1))

Submission status: Wrong Answer

Solution code:
import math
a,b=map(int,input().split())
tempa1=math.ceil(a/0.08)
tempa2=int((a+1)/0.08)
tempb1=math.ceil(b/0.1)
tempb2=int((b+1)/0.1)
if tempa1>tempb2 or tempa2<tempb1:
  print(-1)
else:
  print(max(tempa1,tempb1))

Submission status: Wrong Answer

Solution code:
import math
a,b=map(int,input().split())
tempa1=math.ceil(a/0.08)
tempa2=math.ceil((a+1)/0.08)
tempb1=int(b/0.1)
tempb2=int((b+1)/0.1)
if tempa1>tempb2 or tempa2<tempb1:
  print(-1)
else:
  print(max(tempa1,tempb1))

Submission status: Wrong Answer

Solution code:
import math
a,b=map(int,input().split())
tempa1=math.ceil(a/0.08)
tempa2=int((a+1)/0.08)
tempb1=int(b/0.1)
tempb2=int((b+1)/0.1)
if tempa1>tempb2 or tempa2<tempb1:
  print(-1)
else:
  print(max(tempa1,tempb1))

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
tempa1=int(a/0.08)
tempa2=int((a+1)/0.08)
tempb1=int(b/0.1)
tempb2=int((b+1)/0.1)
if tempa1>tempb2 or tempa2<tempb1:
  print(-1)
else:
  print(max(tempa1,tempb1))

Submission status: Wrong Answer

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

for i in range(1,101):
    A = int(i*0.08)
    B = int(i*0.10)
    if A == a and B == b:
        print(i)
        exit()

print(-1)

Submission status: Wrong Answer

Solution code:
import sys
from io import StringIO
import unittest


def resolve():
    A, B = [int(i) for i in input().split()]
    mina = int(min(A / 0.08, B / 0.1))
    while int(mina * 0.08) == A or int(mina * 0.1) == B:
        if int(mina * 0.08) == A and int(mina * 0.1) == B:
            print(mina)
            return
        mina += 1
    else:
        print(-1)


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """2 2"""
        output = """25"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """8 10"""
        output = """100"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """19 99"""
        output = """-1"""
        self.assertIO(input, output)


if __name__ == "__main__":
    # unittest.main()
    resolve()

Submission status: Wrong Answer

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

import math 

x=a//0.08 

arr=[x-4,x-3,x-2,x-1,x,x+1,x+2,x+3,x+4]
f=0

for i in range(9):
    x=arr[i]

    if arr[i]>0 and a==math.floor(x*0.08) and b==math.floor(x*0.1) :
        print(int(arr[i]))
        f=1
        break
if f==0:
    print(-1)

Submission status: Wrong Answer

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

import math 

x=a//0.08 

arr=[x-4,x-3,x-2,x-1,x,x+1,x+2,x+3,x+4]
f=0

for i in range(9):
    x=arr[i]

    if arr[i]>=0 and a==math.floor(x*0.08) and b==math.floor(x*0.1) :
        print(int(arr[i]))
        f=1
        break
if f==0:
    print(-1)

Submission status: Wrong Answer

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

import math 

x=a//0.08 

arr=[x-2,x-1,x,x+1,x+2]
f=0

for i in range(5):
    x=arr[i]

    if arr[i]>=0 and a==math.floor(x*0.08) and b==math.floor(x*0.1) :
        print(int(arr[i]))
        f=1
        break
if f==0:
    print(-1)

Submission status: Wrong Answer

Solution code:
a,b = map(int, input().split())
price = int(max(a/0.08, b/0.1))
ans = -1
while int(price*0.08) == a and int(price*0.1) == b:
  ans = price
  price -= 1

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
f = False
ans = 0
n = A * 100 // 9
print(n)
m = A * 100 // 7
print(m)
for i in range(n, m + 1):
  print("i", i)
  print(i * 8 // 100)
  print(i * 10 // 100)
  if i * 8 // 100 == A and i // 10 == B:
    f = True
    ans = i
    break
print(ans if f else -1)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
f = False
ans = 0
n = A * 100 // 9
m = A * 100 // 8
for i in range(n, m + 1):
  if i * 8 // 100 == A and i // 10 == B:
    f = True
    ans = i
    break
print(ans if f else -1)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
f = False
n = A * 100 // 9
m = A * 100 // 7

for i in range(n, m + 1):
  if n * 100 // 8 == A and n // 10 == B:
    f = True
    break
  n += 1
print(n if f else -1)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
f = False
n = A * 100 // 9
m = A * 100 // 8

for i in range(n, m + 1):
  if n * 8 // 100 == A and n *10 // 100 == B:
    f = True
    break
  n += 1
print(n if f else -1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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: Wrong Answer

Solution code:
a, b = list(map(int, input().split()))
c = [int(a * 12.5), int((a + 1) * 12.5)]
d = [int(b * 10), int((b + 1) * 10)]
if c[1] <= d[0] or d[1] <= c[0]:
    print(-1)
else:
    print(max(c[0], d[0]))

Submission status: Wrong Answer

Solution code:
a, b = list(map(int, input().split()))
c = [int(a / 0.08), int((a + 1) / 0.08)]
d = [int(b / 0.1), int((b + 1) / 0.1)]
if c[1] < d[0] or d[1] < c[0]:
    print(-1)
else:
    print(max(c[0], d[0]))

Submission status: Wrong Answer

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

import math
a_min=math.ceil(a/0.08)
a_max=math.floor((a+1)/0.08)
b_min=math.ceil(b/0.1)
b_max=math.floor((b+1)/0.1)

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

Submission status: Wrong Answer

Solution code:

class abc_158:
    
    def __init__(self):
        pass
    
    def A(self):
        S=input()
        if "BA" in S or "AB" in S:print("Yes")
        else:print("No")
    
    def B(self):
        NAB=list(map(int,input().split()))
        tail = NAB[0]%(NAB[1]+NAB[2]) if NAB[0]%(NAB[1]+NAB[2])<NAB[1] else NAB[1]
        ans=((NAB[0]/(NAB[1]+NAB[2]))*NAB[1])+tail
        print(int(ans))
            
    def C(self):
        AB=list(map(int,input().split()))
        ans=-1
        
        #A<B<100
        for i in range(1,101):
            if AB[0]==int(i*0.08) and AB[1]==int(i*0.1):
                ans=i
                break
            else:continue
        print(ans)
            
    def D(self):
        pass
        
    def E(self):
        pass
    
    def F(self):
        pass
    
    
if __name__=='__main__':
    obj=abc_158()
    obj.C()

Submission status: Wrong Answer

Solution code:
import math

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

c = math.ceil(A/0.08)
d = math.floor((A+1)/0.08)
e = math.ceil(B/0.10)
f = math.floor((B+1)/0.10)

for i in range(c, d+1):
    if i >= e and i <= f:
        print(i)
        break
    elif i == d:
        print("-1")

Submission status: Wrong Answer

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

Xa = A/0.08
Xb = B/0.1


if int(Xa) == int(Xb):
    print(int(Xa))


if Xa > Xb:
    for x in range(int(Xb-1), int(Xa+1)):
        if int(x*0.08) == A and int(x*0.1) == B:
            print(x)
            exit()

if Xb > Xa:
    for x in range(int(Xa-1), int(Xb+1)):
        if int(x*0.08) == A and int(x*0.1) == B:
            print(x)
            exit()

print(-1)

Submission status: Wrong Answer

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

Xa = A/0.08
Xb = B/0.1


if Xa == Xb:
    print(int(Xa))


if Xa > Xb:
    for x in range(int(Xb-1), int(Xa+1)):
        if int(x*0.08) == A and int(x*0.1) == B:
            print(x)
            exit()

if Xb > Xa:
    for x in range(int(Xa-1), int(Xb+1)):
        if int(x*0.08) == A and int(x*0.1) == B:
            print(x)
            exit()

print(-1)

Submission status: Wrong Answer

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

Xa = A/0.08
Xb = B/0.1


if Xa == Xb:
    print(int(Xa))


if Xa > Xb:
    for x in range(int(Xb), int(Xa+1)):
        if int(x*0.08) == A and int(x*0.1) == B:
            print(x)
            exit()

if Xb > Xa:
    for x in range(int(Xa), int(Xb+1)):
        if int(x*0.08) == A and int(x*0.1) == B:
            print(x)
            exit()

print(-1)

Submission status: Wrong Answer

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

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

    if i == 999:
        print(-1)

Submission status: Wrong Answer

Solution code:
from math import floor

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

ans = -1

for i in range(1000):
    if (i*8//100) == A and (i*10//100) == B:
        print(i)
        exit()

print(-1)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
from decimal import Decimal, ROUND_HALF_UP

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

a1 = a*12.5
a2 = (a+1)*12.5
b1 = b*10
b2 = (b+1)*10
ans = 0

if a1 <= b1 <= a2:
    ans = int(b1)
    print(ans)
elif (b1 <= a1) and (a1 <= b2 <= a2):
    ans = Decimal(str(a1)).quantize(Decimal('0'),rounding=ROUND_HALF_UP)
    print(ans)
else:
    print(-1)

Submission status: Wrong Answer

Solution code:
from math import floor

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

start = int(min(A/0.08, B/0.1))
end = int(max(A/0.08, B/0.1))

if floor(end*0.08) == A and floor(end*0.10) == B:
    ans = end
else :
    ans = -1

print(ans)

Submission status: Wrong Answer

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

a1 = int(a*12.5)
a2 = int((a+1)*12.5)
b1 = int(b*10)
b2 = int((b+1)*10)
ans = 0

if a1 <= b1 <= a2:
    ans = b1
    print(ans)
elif (b1 <= a1) and (a1 <= b2 <= a2):
    ans = a1
    print(ans)
else:
    print(-1)

Submission status: Wrong Answer

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

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