qyliang/CodeNanoFix huggingface dataset:
Buggy code:
A, B = input().split()
A = int(A)
B = int(B)
ans = -1
for x in range(10001):
    if x*0.08 == A and x*0.1 == B:
        ans = x
        break

print(ans)


Fixed code:
A, B = map(int, input().split())
ans = -1
for x in range(10001):
    if int(x*0.08) == A and int(x*0.1) == B:
        ans = x
        break

print(ans)
Buggy code:
import math


P8, P10 = map(int, input().split())

price1_min = math.floor(P8/0.08)
print(price1_min)

price1_max = math.floor((P8+1)/0.08)
print(price1_max)

price2_min = math.floor(P10/0.10)
print(price2_min)

price2_max = math.floor((P10+1)/0.10)
print(price2_max)



if (price1_max > price2_min) and (price2_max > price1_min):
    print(max(price2_min, price1_min))
else: 
    print(-1)

Fixed code:
P8, P10 = map(int, input().split())


import math
price1_min = math.ceil(P8/0.08)

price1_max = math.floor((P8+1)//0.08)

price2_min = math.ceil(P10/0.10)

price2_max = math.floor((P10+1)//0.10)



if (price1_max >= price2_min) and (price2_max >= price1_min):
    print(max(price2_min, price1_min))
else: 
    print(-1)
Buggy code:
A, B = map(int, input().split())
flag = 0
for i in range(1, 1001):
    iP = i * 0.08
    for j in range(1, 1001):
        jP = j * 0.1
        if int(iP) == A and int(jP) == B:
            print(i)
            flag = 1
            break
    if flag == 1:
        break
else:
    print(-1)

Fixed code:
A, B = map(int, input().split())
flag = 0
for i in range(1, 1001):
    iP = i * 0.08
    for j in range(1, 1001):
        jP = j * 0.1
        if int(iP) == A and int(jP) == B:
            if i == j:
                print(i)
                flag = 1
                break
    if flag == 1:
        break
else:
    print(-1)
Buggy code:
def check(x):
    if (x*10)//100>=b and (x*8)//100>=a: return True
    else: return False

a,b=map(int,input().split())
l=0 
r=10**9
while(l<r):
    mid=(l+r)//2
    if check(mid):r=mid
    else: l=mid+1
print(l if (l*10)//100 == (l*8)//100 else -1)


Fixed code:
def check(x):
    if (x*10)//100>=b and (x*8)//100>=a: return True
    else: return False

a,b=map(int,input().split())
l=0 
r=10**9
while(l<r):
    mid=(l+r)//2
    if check(mid):r=mid
    else: l=mid+1
print(l if (l*10)//100==b and (l*8)//100==a else -1)
Buggy code:
import math

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

ans=-1
for i in range(1,B*10+1)
    if math.floor(i*0.08)==A and math.floor(i*0.1)==B:
        ans=i
        break

print(ans)

Fixed code:
import math

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

ans=-1
for i in range(1,1001):
    if math.floor(i*0.08)==A and math.floor(i*0.1)==B:
        ans=i
        break

print(ans)
Buggy code:
import math
​
A, B = list(map(int,input().split()))
​
cnt = 0
for i in range(1,10000):
    X = math.floor(i * 0.08)
    Y = math.floor(i * 0.1)
    if A == X and B == Y:
        print(i)
        cnt += 1
        break
​
if cnt == 0:
    print(-1)


Fixed code:
import math

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

cnt = 0
for i in range(1,100000):
    X = math.floor(i * 0.08)
    Y = math.floor(i * 0.1)
    if A == X and B == Y:
        print(i)
        cnt += 1
        break
        
if cnt == 0:
    print(-1)
Buggy code:
a, b = map(int, input().split())
c=[]
for i in range(1250):
    if int(i*0.08) == a and int(i*0.1) == b:
        c.append(i)
c.append(-1)

print(c)
print(c[0])

Fixed code:
a, b = map(int, input().split())
c=[]
for i in range(1250):
    if int(i*0.08) == a and int(i*0.1) == b:
        c.append(i)
c.append(-1)

print(c[0])
Buggy code:
A, B = map(int, input().split())
a = int(A // 0.08)
ans_lst = []
for i in range(20):
    print(a, int(a * 0.08) == A)
    if int(a * 0.08) == A:
        ans_lst.append(a)
    a += 1
for i in ans_lst:
    if int(i * 0.1) == B:
        print(i)
        break
else:
    print(-1)

Fixed code:
A, B = map(int, input().split())
a = int(A // 0.08)
ans_lst = []
for i in range(20):
    # print(a, int(a * 0.08) == A)
    if int(a * 0.08) == A:
        ans_lst.append(a)
    a += 1
for i in ans_lst:
    if int(i * 0.1) == B:
        print(i)
        break
else:
    print(-1)
Buggy code:
import math
A,B=map(int,input().split())
sup=min((A+1)/1.08,(B+1)/1.1)
inf=max(A/1.08,B/1.1)
inf2=math.ceil(inf)
if inf2<sup:
  print(inf2)
else:
  print(-1)

Fixed code:
import math
A,B=map(int,input().split())
sup=min((A+1)/0.08,(B+1)/0.1)
inf=max(A/0.08,B/0.1)
inf2=math.ceil(inf)
if inf2<sup:
  print(inf2)
else:
  print(-1)
Buggy code:
A,B = [int(i) for i in input().split()] 

Flag = False

price1 = int(A // 0.08) + 1
price2 = int(B // 0.1) + 1

for i in range(price1,price2+1):
  if int(i * 0.08) == A and int(i *0.1) == B:
    Flag = True
    price = i
    break

if Flag == True:
  print(price)
else:
  print(-1)


Fixed code:
A,B = [int(i) for i in input().split()] 

Flag = False

price1 = int(A // 0.08) + 1
price2 = int(B // 0.1) + 1

if price1 < price2:
  start = price1
  end = price2
else:
  start = price2
  end = price1

for i in range(start,end+1):
  if int(i * 0.08) == A and int(i *0.1) == B:
    Flag = True
    price = i
    break

if Flag == True:
  print(price)
else:
  print(-1)
Buggy 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)

Fixed 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 = []

x.extend(tax8(a))
        
y = []

y.extend(tax10(b))

for i in x:
    if i in y:
        if int(i*(27/25))-i == a and int(i*(11/10))-i == b:
            ans = i
            break
    
print(ans)
Buggy code:
A, B = map(int, input().split())
_MAX_PRICE = 1001
for n in range(1, _MAX_PRICE):
  if int(n * 0.08) == A and int(n * 0.1) == B:
    print(n)
    exit()
print(-1)c

Fixed code:
A, B = map(int, input().split())
_MAX_PRICE = 1001
for n in range(1, _MAX_PRICE):
  if int(n * 0.08) == A and int(n * 0.1) == B:
    print(n)
    exit()
print(-1)
Buggy code:
import math
a,b=map(float,input().split())
for i in range(1,1001):
    if math.floor(i*(1.08))-i==a and math.floor(i*(1.08))-i==b:
        print(i)
        break
    elif i==1000:
        c=-1
        print(c)

Fixed code:
import math
a,b=map(float,input().split())
for i in range(1,1001):
    if math.floor(i*(1.08))-i==a and math.floor(i*(1.10))-i==b:
        print(i)
        break
    elif i==1000:
        c=-1
        print(c)
Buggy code:
a, b = map(int, input().split())
b = b * 10 - 9
r = -1
for i in range(b, b+20):
    print(i * 0.08)
    if int(i * 0.08) == a:
        r = i
        break
print(r)

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

Fixed code:
a, b = map(int, input().split())
for i in range(int(a/0.08+0.5), int((a+1)/0.08+0.5)):
    if int(i * 0.1) == b:
        print(i)
        break
else: print(-1)
Buggy code:
a,b = map(int,input().split())
a_list = [int(a/0.08) + i for i in range(13)]
b_list = [int(b/0.1) + j for j in range(10)]
com = set(a_list) & set(b_list)
print(a_list)
print(b_list)
print(com)

if len(com) == 0:
    print(-1)
elif len(com) != 0:
    if int(min(com)*0.08) != a or int(min(com)*0.1) != b:
        print(-1)
    else:
        print(min(com))

Fixed code:
a,b = map(int,input().split())
if a%2 == 0:
  	a_list = [int(a/0.08) + i for i in range(13)]
else:
  	a_list = [int(a/0.08) + i for i in range(1,13)]
b_list = [int(b/0.1) + j for j in range(10)]
com = set(a_list) & set(b_list)
if len(com) == 0:
    print(-1)
elif len(com) != 0:
    if int(min(com)*0.08) != a or int(min(com)*0.1) != b:
        print(-1)
    else:
        print(min(com))
Buggy code:
x, y = map(int, input().split())
tmp = range(int(y/0.1), int((y+1)/0.1))
for i in range(int(x/0.08), int((x+1)/0.08)):
    if i in tmp:
        print(i)
        break
print(-1)

Fixed code:
x, y = map(int, input().split())
tmp = range(int(y//0.1)+1, int((y+1)/0.1))
ans=-1
for i in range(int(x//0.08)+1, int((x+1)/0.08)):
    if i in tmp:
        ans=i
        break
print(ans)
Buggy code:
a, b = map(int, input().split())
# x = (a * 100) // 8
y = (b * 100) // 10

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

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

for i in range(y, y + 10):
  if (i * 10) // 100 == b and (i * 8) // 100 == a:
    print(i)
    exit()
print(-1)
Buggy 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))<w:
    print(math.ceil(max(z,x)))
else:
    print(-1)    

Fixed 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) :
    print(math.ceil(max(z,x)))
else:
    print(-1)
Buggy code:
a, b = map(int, input().split())

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

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

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

money = 1
while money < 1010:
  if money ==int(0.08*a) and money == int(0.10*b):
    print(money)
  money+=1
  if money ==1010:
    print(-1)

Fixed code:
a, b = map(int, input().split())
 
money = 1
while money < 1010:
  if a ==int(0.08*money) and b == int(0.10*money):
    print(money)
    break
  money+=1
  if money ==1010:
    print(-1)
Buggy code:
import math
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))


Fixed code:
import math
A, B = map(int,input().split())
minA = math.ceil(A/0.08)
maxA = math.ceil((A+1)/0.08) -1
minB = math.ceil(B/0.1)
maxB = math.ceil((B+1)/0.1) -1

if (minA>maxB) or (minB>maxA):
    print(-1)
else:
    print(max(minA,minB))
Buggy code:
a, b = map(int, input().split())

for p in range(10*4):
    tax8 = p*0.08
    tax10 = p*0.1

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

print(-1)

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

for p in range(10**4):
    tax8 = p*0.08
    tax10 = p*0.1

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

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

Fixed code:
a,b=map(int,input().split())
for i in  range(1,1200):
  if int(i*0.08)==a and int(i*0.1)==b:
    print(i)
    exit()
print(-1)
Buggy code:
import bisect, copy, heapq, math, sys
from collections import *
from functools import lru_cache
from itertools import accumulate, combinations, permutations, product
def input():
    return sys.stdin.readline()[:-1]
def ruiseki(lst):
    return [0]+list(accumulate(lst))
def celi(a,b):
    return -(-a//b)
sys.setrecursionlimit(5000000)
mod=pow(10,9)+7
al=[chr(ord('a') + i) for i in range(26)]
direction=[[1,0],[0,1],[-1,0],[0,-1]]

a,b=map(int,input().split())
ans=1
while ans*8//100!=a or ans//10!=b:
    ans+=1
print(ans)

Fixed code:
import bisect, copy, heapq, math, sys
from collections import *
from functools import lru_cache
from itertools import accumulate, combinations, permutations, product
def input():
    return sys.stdin.readline()[:-1]
def ruiseki(lst):
    return [0]+list(accumulate(lst))
def celi(a,b):
    return -(-a//b)
sys.setrecursionlimit(5000000)
mod=pow(10,9)+7
al=[chr(ord('a') + i) for i in range(26)]
direction=[[1,0],[0,1],[-1,0],[0,-1]]

a,b=map(int,input().split())
ans=1
while ans*8//100!=a or ans//10!=b:
    ans+=1
    if ans>2*10**5:
        print(-1)
        exit()
print(ans)
Buggy code:
A, B= map(int, input().split())
money = B*10
ans=-1
while money//10==B:
	print(money, money//10, int(money*0.08))
	if int(money*0.08)==A:
		ans=money
		break
	money+=1
print(ans)


Fixed code:
A, B= map(int, input().split())
money = B*10
ans=-1
while money//10==B:
	if int(money*0.08)==A:
		ans=money
		break
	money+=1
print(ans)
Buggy code:
import math
A,B=(int(x) for x in input().split())

a=int(A/0.08 + 0.5)
b=int(B/0.1 + 0.5)
out =0
print(a,b)
if a>=b:
    if math.floor(a*0.1) != B:
        out = -1
    else:
        out = int(a)
elif a<b:
    if math.floor(b*0.08) != A:
        out = -1
    else:
        out = int(b)
print(out)

Fixed code:
import math
A,B=(int(x) for x in input().split())

a=int(A/0.08 + 0.5)
b=int(B/0.1 + 0.5)
out =0
"print(a,b)"
if a>=b:
    if math.floor(a*0.1) != B:
        out = -1
    else:
        out = int(a)
elif a<b:
    if math.floor(b*0.08) != A:
        out = -1
    else:
        out = int(b)
print(out)
Buggy 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

Fixed code:
a,b = map(int,input().split())
import math
c = math.ceil(a/0.08)
d = round(b/ (0.1))
e = math.ceil((a+1)/0.08)-1
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)
Buggy 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))

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

for i in range(1,1001):
    if int(i*0.08)==a and int(i*0.1)==b:
        print(i)
        exit()

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

for i in range(1,1001):
    if int(i*0.08)==a and int(i*0.1)==b:
        print(i)
        exit()
print(-1)
Buggy code:
import math
a,b=map(int, input().split())
a_min = math.ceil(a/0.08)
a_max = math.ceil((a+1)/0.08)-1
b_min = math.ceil(b/0.1)
b_max = math.ceil((b+1)/0.1)-1

if max([a_min,b_min]) >= min([a_max,b_max]):
  print(-1)
else:
  print(min([a_min,b_min]))

Fixed code:
import math
a,b=map(int, input().split())
a_min = math.ceil(a/0.08)
a_max = math.ceil((a+1)/0.08)-1
b_min = math.ceil(b/0.1)
b_max = math.ceil((b+1)/0.1)-1

if max([a_min,b_min]) >= min([a_max,b_max]):
  print(-1)
else:
  print(max([a_min,b_min]))
Buggy code:
A,B = list(map(int, input().split()))
Z1_l = A * 25 / 2
if (Z1_l % 2) == 1:
    Z1_1 = int(Z1_l) + 1
Z1_u = (A + 1) * 25 / 2

Z2_l = B * 10
Z2_u = (B + 1) * 10
if Z2_u >= Z1_l or Z1_u >= Z2_l:
    ans = int(max(Z1_l,Z2_l))
else:
    ans = -1

print(ans)

Fixed code:
A,B = list(map(int, input().split()))
Z1_l = A * 25 / 2
if (A % 2) == 1:
    Z1_l = int(Z1_l) + 1
else:
    Z1_l = int(Z1_l)
Z1_u = (A + 1) * 25 / 2
if ((A+1) % 2) == 1:
    Z1_u = int(Z1_u) + 1
else:
    Z1_u = int(Z1_u)
Z2_l = B * 10
Z2_u = (B + 1) * 10
if Z2_u <= Z1_l or Z1_u <= Z2_l:
    ans = -1
else:
    ans = int(max(Z1_l,Z2_l))

print(ans)
Buggy code:
import math
a, b = map(int, input().split())

mid_a = 12.5 * a
mid_b = 10 * b

a_range = [
    i for i in range(
        math.ceil(mid_a),
        math.floor(
            mid_a +
            12 +
            1)) if i > 0]
b_range = [
    i for i in range(
        math.ceil(mid_b),
        math.floor(
            mid_b +
            9 +
            1)) if i > 0]

seki = list(set(a_range) & set(b_range)).sort()

if seki:
    print(seki[0])
else:
    print(-1)

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

mid_a = 12.5 * a
mid_b = 10 * b

a_range = [
    i for i in range(
        math.ceil(mid_a),
        math.floor(
            mid_a +
            12 +
            1)) if i > 0]
b_range = [
    i for i in range(
        math.ceil(mid_b),
        math.floor(
            mid_b +
            9 +
            1)) if i > 0]

seki = sorted(list(set(a_range) & set(b_range)))

if seki:
    print(seki[0])
else:
    print(-1)
Buggy code:
A,B=map(int,input().split())

a=True
for i in range(100):
    if int(0.08*i)==A and int(0.10*i)==B:
        print(i)
        a=False
        break
if a==True:
    print(-1)

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

a=True
for i in range(10000):
    if int(0.08*i)==A and int(0.10*i)==B:
        print(i)
        a=False
        break
if a==True:
    print(-1)
Buggy 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()  


Fixed code:
def cul_even(x):
  return x // 2 * 25
def cul_odd(x):
  return x // 2 * 25 + 13
def main():
  a,b = map(int,input().split())
  if(a % 2 == 0):
    if(b == cul_even(a)//10):
      print(cul_even(a))
    elif(b == (cul_even(a)//10 + 1)):
      print((cul_even(a)+12)//10*10)
    else:
      print(-1)
  else:
    if(b == cul_odd(a)//10):
      print(cul_odd(a))
    elif(b == (cul_odd(a)//10 + 1)):
      print((cul_odd(a)+11)//10*10)
    else:
      print(-1)

if __name__ == '__main__':
  main()
Buggy code:
import math

def per8_and_per10(n, a, b):
  per8  = n * 0.08 
  per10 = n * 0.1
  if f01_rounding(per8) >= a and f01_rounding(per10) >= b:
    return True
  else:
    return False

def f01_rounding(number):
  number_str = list(str(number))
  number_str_slice = "".join(number_str[:(number_str.index("."))])
  number_int = int(number_str_slice)
  return number_int

a, b = map(int, input().split())
for i in range(1,1010):

  if per8_and_per10(i, a, b):
    print(i)
    exit()
print(-1)

Fixed code:
import math

def per8_and_per10(n, a, b):
  per8  = n * 0.08 
  per10 = n * 0.1
  if a <= f01_rounding(per8) < a+1 and b <= f01_rounding(per10) < b+1:
    return True
  else:
    return False

def f01_rounding(number):
  number_str = list(str(number))
  number_str_slice = "".join(number_str[:(number_str.index("."))])
  number_int = int(number_str_slice)
  return number_int

a, b = map(int, input().split())
for i in range(1,1010):

  if per8_and_per10(i, a, b):
    print(i)
    exit()
print(-1)
Buggy code:
ans=[]
A,B=map(int,input().split())
for i in range(1,1009):
    if int(i*8/100)==A and int(i*0.1)==B:
        ans.append(i)
        break
    else:
        ans.append(-1)
print(min(ans))

Fixed code:
ans=[]
anskouho=[]
A,B=map(int,input().split())
for i in range(1,1009):
    if int(i*8/100)==A and int(i*0.1)==B:
        ans.append(i)
        anskouho.append(min(ans))
    else:
        anskouho.append(-1)
print(max(anskouho))
Buggy code:
A, B = map(int,input().split()) 

def func():
    b = B*10
    for i in range(b,2*b):
        if math.floor(i*0.08) == A and math.floor(i*0.1) == B:
            return i
    return -1
    
print(func())

Fixed code:
import math

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

def func():
    b = B*10
    for i in range(b,2*b):
        if math.floor(i*0.08) == A and math.floor(i*0.1) == B:
            return i
    return -1
    
print(func())
Buggy code:
#Atcoder 158 class
A,B = list(map(int,input().split()))
z=1
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
        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)):
    
    print(-1)

Fixed code:
#Atcoder 158 class
A,B = list(map(int,input().split()))
z=0
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)+1)/2)-int(((25*A)+1)/2))*(int(10*(B+1))-int(10*B)):
    
    print(-1)
Buggy code:
A,B = list(map(int,input().split()))
found = False
for i in range(1009):
    A_tax = int(i * 0.08)
    B_tax = int(i * 0.10)
    if A == A_tax and B == B_tax:
        print(i)
        found = True
if not found:
    print("-1")

Fixed code:
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")
Buggy code:
a,b = map(int,input().split())

for i in range(a//2,a):
    aa = ( i * 8 ) // 100
    bb = ( i * 10 ) // 100
    if aa == a and bb == b:
        print(i)
        exit()
print("-1")

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

for i in range(1,10000):
    aa = ( i * 8 ) // 100
    bb = ( i * 10 ) // 100
    if aa == a and bb == b:
        print(i)
        exit()
print("-1")
Buggy code:
a,b = input().split()
a = int(a)
b = int(b)
c = 0
for i in range(10000):
    d = c*0.08
    e = c*0.1
    d = int(d)
    e = int(e)
    if d == a and e == b:
        print(c)
        break
    elif c == 10000:
        print('-1')
    else:
        c += 1

Fixed code:
a,b = input().split()
a = int(a)
b = int(b)
c = 0
for i in range(1001):
    d = c*0.08
    e = c*0.1
    d = int(d)
    e = int(e)
    if d == a and e == b:
        print(c)
        break
    elif c == 1000:
        print('-1')
        break
    else:
        c += 1
Buggy code:
a,b = input().split()
a = int(a)
b = int(b)
c = 0
for i in range(10000):
    d = c*0.08
    e = c*0.1
    d = int(d)
    e = int(e)
    if d == a and e == b:
        print(c)
        break
    elif c == 100:
        print('-1')
    else:
        c += 1

Fixed code:
a,b = input().split()
a = int(a)
b = int(b)
c = 0
for i in range(10000):
    d = c*0.08
    e = c*0.1
    d = int(d)
    e = int(e)
    if d == a and e == b:
        print(c)
        break
    elif c == 9999:
        print('-1')
        break
    else:
        c += 1
Buggy code:
# ABC158 C - Tax Increase
a,b = map(int,input().split())
import math
c=10000
for i in range(100):
    if math.floor(i*0.08)==a and math.floor(i*0.10)==b:
        c = min(c,i)
if c==10000:
    print(-1)
    exit()
print(c)   

Fixed code:
# ABC158 C - Tax Increase
a,b = map(int,input().split())
import math
c=10000
for i in range(1200):
    if math.floor(i*0.08)==a and math.floor(i*0.10)==b:
        c = min(c,i)
if c==10000:
    print(-1)
    exit()
print(c)
Buggy code:
a, b = input().split() # a = result * 0.08, b = result * 0.1
a, b = int(a), int(b)
 
result_a = int(a / 0.08)
result_b = int(b / 0.1)
 
if result_a > result_b:
  if int(result_a * 0.08) == a:
    result_a += 1
  c = int(result_a * 0.1)
  if b == c:
    print(result_a)
  else:
    print(-1)
else:
  c = int(result_b * 0.08)
  if a == c:
    print(result_b)
  else:
    print(-1)

Fixed code:
a, b = input().split() # a = result * 0.08, b = result * 0.1
a, b = int(a), int(b)
 
result_a = int(a / 0.08)
result_b = int(b / 0.1)
 
if result_a > result_b:
  if int(result_a * 0.08) != a:
    result_a += 1
  c = int(result_a * 0.1)
  if b == c:
    print(result_a)
  else:
    print(-1)
else:
  c = int(result_b * 0.08)
  if a == c:
    print(result_b)
  else:
    print(-1)
Buggy code:
a, b =map(int, input().split())

for x in range(0,100):
    ax = (8*x)//100
    bx = (10*x)//100
    if ax == a and bx == b:
        print(x)
        break
else:
    print(-1)

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

for x in range(0,10**6):
    # print('---')
    # print(x)
    ax = (8*x)//100
    bx = (10*x)//100
    # print(ax,bx)
    if ax == a and bx == b:
        print(x)
        break
else:
    print(-1)