qyliang/CodeNanoFix huggingface dataset:
Buggy code:
import math

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

b = B * 10
ans = -1
for i in range(1, 1001):
    y = math.floor(i * 0.08)
    if y == A:
        ans = i
        break
print(ans)


Fixed code:
import math

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

ans = -1
for i in range(1, 1001):
    x = math.floor(i * 0.10)
    y = math.floor(i * 0.08)
    if x == B and y == A:
        ans = i
        break
print(ans)
Buggy 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)


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

x = -1

xa = 0
xb = 0

a_arr = []
b_arr = []

for temp_a in range(10001):
    xa = temp_a * 0.08
    if xa // 1 == a:
        a_arr.append(temp_a)

for temp_b in range(10001):
    xb = temp_b * 0.1
    if xb // 1 == b:
        b_arr.append(temp_b)



print(a_arr)
print(b_arr)

for aa in a_arr:
    if aa in b_arr:
        print(aa)
        exit(0)

print('-1')

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

x = -1

xa = 0
xb = 0

a_arr = []
b_arr = []

for temp_a in range(10001):
    xa = temp_a * 0.08
    if xa // 1 == a:
        a_arr.append(temp_a)

for temp_b in range(10001):
    xb = temp_b * 0.1
    if xb // 1 == b:
        b_arr.append(temp_b)




for aa in a_arr:
    if aa in b_arr:
        print(aa)
        exit(0)

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

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

n = 1
for i in range(20000):
    if int(n * 0.08) == a:
        if int(n * 0.10) == b:
            print(n)
            exit()

print(-1)


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

for n in range(1,20000):
    if int(n * 0.08) == a:
        if int(n * 0.10) == b:
            print(n)
            exit()

print(-1)
Buggy code:
A,B = [int(i) for i in input().rstrip().split()]
Aa = A/0.08
Ba = B/0.1
round=lambda x:int((x*2+1)//2)
N = round(max(Aa,Ba))

def ch(n):
    global A,B
    print(int(n * 0.08), A, int(n * 0.1), B)
    if int(n * 0.08) == A and int(n * 0.1) == B:
        return True
    else:
        return False

if ch(N-1):
    print(N-1)
elif ch(N):
    print(N)
else:
    print(-1)

Fixed code:
A,B = [int(i) for i in input().rstrip().split()]
Aa = A/0.08
Ba = B/0.1
round=lambda x:int((x*2+1)//2)
N = round(max(Aa,Ba))

def ch(n):
    global A,B
    #print(int(n * 0.08), A, int(n * 0.1), B)
    if int(n * 0.08) == A and int(n * 0.1) == B:
        return True
    else:
        return False

if ch(N-1):
    print(N-1)
elif ch(N):
    print(N)
else:
    print(-1)
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)
else:
  print('-1')

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)
    break
else:
  print('-1')
Buggy 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))


Fixed 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))
Buggy 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))

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

for i in range(1,1010):
	ia=int(i*0.1)
	ib=int(i*0.08)
	if ia==a and ib==b:
		print (i)
		exit()
else:
	print (-1)

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

for i in range(1,1010):
#	print (i)
	ia=int(i*0.08)
	ib=int(i*0.1)
#	print (ia,ib)
	if ia==a and ib==b:
		print (i)
		exit()
else:
	print (-1)
Buggy code:
import math
a,b = map(int,input().split())
a1 = math.round(a/0.08)
b1 = math.round(b/0.1)
c = min(a1,b1)
while True:
	if math.floor(c*0.08) == a and math.floor(c*0.1) == b:
		print(c)
		break
	elif math.floor(c*0.08) != a and math.floor(c*0.1) != b:
		print(-1)
		break
	else:
		c+=1


Fixed code:
import math
a,b = map(int,input().split())
a1 = round(a/0.08)
b1 = round(b/0.1)
c = min(a1,b1)
while True:
	if math.floor(c*0.08) == a and math.floor(c*0.1) == b:
		print(c)
		break
	elif math.floor(c*0.08) > a and math.floor(c*0.1) > b:
		print(-1)
		break
	else:
		c+=1
Buggy code:
A, B = map(int, input().split())

N = 1000
p1 = 0.08
p2 = 0.1

for i in range(1, N + 1):
    if int(i * p1) == A and int(i * p2):
        print(i)
        exit()

print("-1")

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

N = 1000
p1 = 0.08
p2 = 0.1

for i in range(1, N + 1):
    if int(i * p1) == A and int(i * p2) == B:
        print(i)
        exit()

print("-1")
Buggy 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))

Fixed 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)
if ans==[]:
    print(-1)
else:
    print(min(ans))
Buggy code:
def main():
    args = input().rstrip().split(' ')
    A, B = int(args[0]), int(args[1])
    p_A = [int(A * 12.5)+1, int((A+1.) * 12.5)]
    p_B = [int(B * 10.)+1, int((B+1.) * 10.)]
    
    if(p_A[1] <= p_B[0] or p_B[1] <= p_A[0]):
        print('-1')
    else:
        print(int(max(p_A[0], p_B[0])))
    
if __name__ == "__main__":
    main()

Fixed code:

def main():
    args = input().rstrip().split(' ')
    A, B = int(args[0]), int(args[1])
    p_A = [A * 12.5, (A+1.) * 12.5]
    p_B = [B * 10., (B+1.) * 10.]
    if(p_A[0].is_integer() == False):
        p_A[0] = int(p_A[0])+1
    else:
        p_A[0] = int(p_A[0])
    if(p_B[0].is_integer() == False):
        p_B[0] = int(p_B[0])+1
    else:
        p_B[0] = int(p_B[0])
    if(p_A[1].is_integer == False):
        p_A[1] = int(p_A[1])
    else:
        p_A[1] = int(p_A[1]) -1
    if(p_B[1].is_integer() == False):
        p_B[1] = int(p_B[0])
    else:
        p_B[1] = int(p_B[1]) -1
        
        
    if(p_A[1] <= p_B[0] or p_B[1] <= p_A[0]):
        print('-1')
    else:
        print(int(max(p_A[0], p_B[0])))
    
if __name__ == "__main__":
    main()
Buggy code:
import math
N = list(map(int, input().split()))
X = [i for i in range(int(N[0]*(1/0.08)), math.ceil((N[0])*(1/0.08)))]
Y = [i for i in range(int(N[1]*(1/0.10)), math.ceil((N[1])*(1/0.10)))]
#print(X, Y)
cand = set(X) & set(Y)
if len(cand) == 0:
  print(-1)
else:
  print(min(cand))


Fixed code:
import math
N = list(map(int, input().split()))
X = [i for i in range(math.ceil((N[0])*(1/0.08)), math.ceil((N[0]+1)*(1/0.08)))]
Y = [i for i in range(math.ceil((N[1])*(1/0.10)), math.ceil((N[1]+1)*(1/0.10)))]
#print(X, Y)
#for i in X:
#  print(math.floor(i*0.08))

cand = set(X) & set(Y)
if len(cand) == 0:
  print(-1)
else:
  print(min(cand))
Buggy code:
import math
a, b = (int(i) for i in input().split())
x = math.ceil(a / 0.08)
flag = False
if (math.floor(x * 0.1) == b):
    flag = True
else:
    while math.floor(x * 0.08) == a:
        x = x + i
        if (math.floor(x * 0.1) == b):
            flag = True
            break
if flag:
    print(int(x))
else:
    print(-1)

Fixed code:
import math
a, b = (int(i) for i in input().split())
x = math.ceil(a / 0.08)
flag = False
while math.floor(x * 0.08) == a:
    if (math.floor(x * 0.1) == b):
        flag = True
        break
    x = x + 1
if flag:
    print(int(x))
else:
    print(-1)
Buggy code:
import math
import sys
(A, B) = list(map(int, input().split()))

price_A = 0
price_B = 0

price_A = math.ceil(A / 0.08)
price_B = math.ceil(B / 0.1)
print(price_A,price_B)

min_price = min(price_A, price_B)
max_price = max(price_A, price_B)

for i in range(min_price, max_price+1, 1):
    tax_A = int(i * 0.08)
    tax_B = int(i * 0.1)
#    print(" ", i, tax_A,tax_B)
    if tax_A == A and tax_B == B:
        print(i)
        sys.exit()

print(-1)

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

price_A = 0
price_B = 0

price_A = math.ceil(A / 0.08)
price_B = math.ceil(B / 0.1)

min_price = min(price_A, price_B)
max_price = max(price_A, price_B)

for i in range(min_price, max_price+1, 1):
    tax_A = int(i * 0.08)
    tax_B = int(i * 0.1)
#    print(" ", i, tax_A,tax_B)
    if tax_A == A and tax_B == B:
        print(i)
        sys.exit()

print(-1)
Buggy code:
from math import floor

inp = input()
A, B = [int(x) for x in inp.split(" ")]

min1 = floor(A / 0.08)
max1 = floor((A+1) / 0.08 - 0.0001)
min2 = floor(B / 0.1)
max2 = floor((B+1) / 0.1 - 0.0001)

print(min1, max1)
print(min2, max2)
if min1 >= min2 and min1 <= max2:
    print(min1)
    print(min1 * 0.08, min1 * 0.1)
elif min2 >= min1 and min2 <= max1:
    print(min2)
    print(min2 * 0.08, min2 * 0.1)
else:
    print(-1)

Fixed code:
from math import floor, ceil

inp = input()
A, B = [int(x) for x in inp.split(" ")]

min1 = ceil(A / 0.08)
max1 = floor((A+0.999) / 0.08)
min2 = ceil(B / 0.1)
max2 = floor((B+0.999) / 0.1)

if min1 >= min2 and min1 <= max2:
    print(min1)
elif min2 >= min1 and min2 <= max1:
    print(min2)
else:
    print(-1)
Buggy code:
import sys
input = lambda: sys.stdin.readline().rstrip()
input_nums = lambda: list(map(int, input().split()))

a, b = input_nums()

a_rate = 0.08
b_rate = 0.1

al = a / a_rate
ar = (a+1) / a_rate
bl = b / b_rate
br = (b+1) / b_rate

ans = 0
if bl <= al and al < br:
    ans = int(al)
elif bl <= ar and ar < br:
    ans = int(bl)
elif al <= bl and br <= ar:
    ans = int(bl)
else:
    ans = -1

if int(ans*0.08) < a:
    ans += 1
print(ans)

Fixed code:
import sys
input = lambda: sys.stdin.readline().rstrip()
input_nums = lambda: list(map(int, input().split()))

a, b = input_nums()

a_rate = 0.08
b_rate = 0.1

al = int(a / a_rate)
ar = int((a+1) / a_rate)
bl = int(b / b_rate)
br = int((b+1) / b_rate)

ans = 0
if bl <= al and al < br:
    ans = al
elif al <= bl and bl < ar:
    ans = bl
else:
    ans = -1

if not ans == -1 and int(ans*0.08) < a:
    ans += 1
    if int(ans*0.1) > b:
        ans = -1
print(ans)
Buggy code:
import math
a,b=map(int,input().split())
a1=math.ceil(a/0.08)
a2=math.floor((a+1)/0.08)
A=set([i for i in range(a1,a2)])
b1=math.ceil(b/0.1)
b2=math.floor((b+1)/0.1)
B=set([i for  i in range(b1,b2)])
print(A)
print(B)
if A&B==set(): 
    print(-1)
    exit()

print(min(A & B))

Fixed code:
import math
a,b=map(int,input().split())
a1=math.ceil(a/0.08)
a2=math.floor((a+1)/0.08)
A=set([i for i in range(a1,a2)])
b1=math.ceil(b/0.1)
b2=math.floor((b+1)/0.1)
B=set([i for  i in range(b1,b2)])

if A&B==set(): 
    print(-1)
    exit()

print(min(A & B))
Buggy code:
import math 
A,B = map(int,input().split()) 
# print(A/0.08,B/0.1)
price = []
x = int(A/0.08)
# print(x,y)
y = int(B/0.1)
for i in range(min(x,y),10001):
	if math.floor(i*0.08) == math.floor(i*0.1):
		price.append(i)	
		break
		# print(i, math.floor(i*0.08),math.floor(i*0.1))
if len(price) == 0:
	print(-1)
else:
	print(min(price))


Fixed code:
import math 
A,B = map(int,input().split()) 
# print(A/0.08,B/0.1)
price = []
x = int(A/0.08)
# print(x,y)
y = int(B/0.1)
for i in range(min(x,y),10001):
	if math.floor(i*0.08) == A and math.floor(i*0.1) == B:
		price.append(i)	
		break
		# print(i, math.floor(i*0.08),math.floor(i*0.1))
if len(price) == 0:
	print(-1)
else:
	print(min(price))
Buggy code:
A,B = map(int,input().split())
import math

a_min=math.ceil(A/0.08)
b_min=math.ceil(B/0.1)
a_list=[]
b_list=[]

for i in range(a_min,a_min+12):
  a_list.append(i)
for j in range(b_min,b_min+10):
  b_list.append(j)

print(a_list)
print(b_list)
  
ans=-1
for item in a_list:
  if item in b_list:
    ans=item
    break
  
print(ans)

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

a_min=math.ceil(A/0.08)
b_min=math.ceil(B/0.1)
a_list=[]
b_list=[]

for i in range(a_min,a_min+12):
  a_list.append(i)
for j in range(b_min,b_min+10):
  b_list.append(j)
  
ans=-1
for item in a_list:
  if item in b_list:
    ans=item
    break
  
print(ans)
Buggy code:
a, b = map(int,input().split())

for i in range(1001):
    if i*0.08==a and i*0.10==b :
        print(i)
        exit()
print(-1)

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

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

i = -1
for i in range(1, 10001):
  if i * 8 // 100 == a:
    if i * 10 // 100 == b:
      break
      
print(i)

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

h = -1
for i in range(1, 10001):
  if i * 8 // 100 == a:
    if i * 10 // 100 == b:
      h = i
      break
      
print(h)
Buggy code:
a,b = map(int,input().split())   
for i in range(10000):
    if int(i*0.08) == a and int(i*0.1) == b :
        c = i
        break
c = -1        
print(c)  

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

a, b = map(int, input().split())
print(ceil(a / 0.08), ceil(b/0.1)+10)
for i in range(ceil(a / 0.08), ceil(b/0.1)+10):
    if floor(i*0.08) == a and floor(i*0.10) == b and i >= 1:
        print(i)
        break
else:
    print('-1')

Fixed code:
from math import floor, ceil

a, b = map(int, input().split())
for i in range(ceil(a / 0.08), ceil(b/0.1)+10):
    if floor(i*0.08) == a and floor(i*0.10) == b and i >= 1:
        print(i)
        break
else:
    print('-1')
Buggy code:
A, B = map(int,input().split())
import math
a = list()
a.append(1000000)
i = A/0.08
j = (A+1)/0.08
while i < j:
    if int(i) == i:
        k = int(i)
        a.append(k)
        i = i+1
    elif int(i) !=i:
        k = int(i+1)
        a.append(k)
        i = i+1

b = list()
b.append(1000000)
p = B/0.10
q = (B+1)/0.10
while p < q:
    if int(p) == p:
        l = int(p)
        b.append(l)
        p = p+1
    elif int(p) !=p:
        l = int(p+1)
        b.append(l)
        p = p+1 
print(a)
print(b)
c= set(a) & set(b)
m = min(c)
if m == 1000000:
    print("-1")
else:
    print(m)


Fixed code:
A, B = map(int,input().split())
import math
a = list()
i = A/0.08
j = (A+1)/0.08
while i < j:
    if int(i) == i:
        k = int(i)
        a.append(k)
        i = i+1
    elif int(i) != i:
        k = int(i+1)
        a.append(k)
        i = i+1
ko = max(a)
if ko == j:
    a.remove(ko)

b = list()
p = B/0.10
q = (B+1)/0.10
while p < q:
    if int(p) == p:
        l = int(p)
        b.append(l)
        p = p+1
    elif int(p) != p:
        l = int(p+1)
        b.append(l)
        p = p+1
mo = max(b)
if mo == q:
    b.remove(mo)

a.append(1000000)
b.append(1000000)
c= set(a) & set(b)
m = min(c)
if m == 1000000:
    print("-1")
else:
    print(m)
Buggy code:
def check(x, A, B):
    if int(x * 0.08) == A and int(x * 0.1) == B:
        return True
    else:
        return False

def solve(A, B):
    left = 0
    right = 1250
    ans = []
    for i in range(0, 1251):
        if check(i, A, B):
            print(i)
            exit()
	print(-1)


def main():
    A, B = map(int, input().split())

    solve(A, B)

if __name__ == "__main__":
    main()

Fixed code:
def check(x, A, B):
    if int(x * 0.08) == A and int(x * 0.1) == B:
        return True
    else:
        return False

def solve(A, B):
    left = 0
    right = 1250
    ans = []
    for i in range(0, 1251):
        if check(i, A, B):
            print(i)
            exit()
    print(-1)

def main():
    A, B = map(int, input().split())

    solve(A, B)

if __name__ == "__main__":
    main()
Buggy code:
x, y = map(int, input().split())
i1 = x*12.5
i2 = y*10
z = max(i1, i2)
if z//12.5 != x or z//10 != y:
  print(-1)
else:
  print(z)

Fixed code:
x, y = map(int, input().split())
i1 = x * 12.5
i2 = y * 10
i1 += 0.5
i1 //= 1
z = max(i1, i2)
if z // 12.5 != x or z // 10 != y:
    print(-1)
else:
    print(int(z))
Buggy code:
#output <= 1000

nums = [int(e) for e in input().split()]
for i in range(1,1001):
  if ((((i * 8) // 100) == nums[0]) & (((i * 10) // 100) == nums[1])):
    print(i)
  else:
    print(-1)

Fixed code:
#output <= 1000

nums = [int(e) for e in input().split()]
flag = 0
for i in range(1,1001):
  if ((((i * 8) // 100) == nums[0]) & (((i * 10) // 100) == nums[1])):
    flag = 1
    print(i)
    break

if flag == 0:
    print(-1)
Buggy code:
A, B = map(int,input().split())

for i in range(10000):
  if i * 0.08 == A and i ** 0.1 == B:
    print(i)
    exit()
    
print(-1)

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

for i in range(10000):
  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())
b*=10
ans=0

for i in range(8):
    j=b
    j+=i 
   if math.floor(j*0.08)==a:
       ans=j
       break
if ans!=0:
    print(ans)
else :
    print(-1)


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

for i in range(9):
    j=b
    j+=i 
    if int(j*0.08)==a:
        ans=j
        break
if ans!=0:
    print(ans)
else :
    print(-1)
Buggy 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)

Fixed code:
import math

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

priceA1 = math.ceil(A / 0.08)
priceA2 = (A+1) / 0.08
priceB1 = math.ceil(B / 0.10)
priceB2 = (B+1) / 0.10

if math.floor(priceA2) < priceA2:
    priceA2 = math.floor(priceA2)
else:
    priceA2 = math.floor(priceA2) - 1


if math.floor(priceB2) < priceB2:
    priceB2 = math.floor(priceB2)
else:
    priceB2 = math.floor(priceB2) - 1

if priceA1 <= priceB1 <= priceA2:
    print(math.ceil(priceB1))
elif math.ceil(priceB1) < math.ceil(priceA1) < priceB2:
    print(math.ceil(priceA1))
elif math.ceil(priceA1) == math.ceil(priceB1):
    print(math.ceil(priceA1))
else:
    print(-1)
Buggy code:
import math
[a, b] = [int(i) for i in input().split()]

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



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

for i in range(3000):
    if math.floor(i*0.08)==a and math.floor(i*0.1)==b:
        print(i)
        break
else:
    print(-1)
Buggy code:
import math
A, B = map(int, input().split())
tmpa = math.floor(A / 0.08)
tmpb = math.floor(B / 0.1)
alst = []
blst = []

indexa = 0
while True:
    tmp = math.floor((tmpa + indexa) * 0.08)
    if tmp == A:
        alst.append(tmpa + indexa)
        indexa += 1
    elif tmp > A:
        break
    else:
        indexa += 1

indexb = 1
while True:
    tmp = math.floor((tmpb + indexb) * 0.1)
    if tmp == B:
        blst.append(tmpb + indexb)
        indexb += 1
    elif tmp > B:
        break
    else:
        indexb += 1
ans = -1
alst.sort()
blst.sort()
for i in alst:
    if blst.count(i) >= 1:
        ans = i
        break

print(ans)

Fixed code:
import math
A, B = map(int, input().split())
tmpa = math.floor(A / 0.08)
tmpb = math.floor(B / 0.1)
alst = []
blst = []

indexa = 0
while True:
    tmp = math.floor((tmpa + indexa) * 0.08)
    if tmp == A:
        alst.append(tmpa + indexa)
        indexa += 1
    elif tmp > A:
        break
    else:
        indexa += 1

indexb = 0
while True:
    tmp = math.floor((tmpb + indexb) * 0.1)
    if tmp == B:
        blst.append(tmpb + indexb)
        indexb += 1
    elif tmp > B:
        break
    else:
        indexb += 1
ans = -1
alst.sort()
blst.sort()
for i in alst:
    if blst.count(i) >= 1:
        ans = i
        break

print(ans)
Buggy code:
import sys
input = sys.stdin.readline
A, B = map(int, input().split())

xmin = 1
while :
    if int(0.08*xmin) == A and int(0.1*xmin) == B :
        print(int(xmin))
        exit()
    elif int(0.08*xmin) < A or int(0.1*xmin) < B :
        xmin += 1
    else :
        print(-1)
        exit()


Fixed code:
import sys
input = sys.stdin.readline
A, B = map(int, input().split())

xmin = 1
while xmin :
    if int(0.08*xmin) == A and int(0.1*xmin) == B :
        print(int(xmin))
        exit()
    elif int(0.08*xmin) < A or int(0.1*xmin) < B :
        xmin += 1
    else :
        print(-1)
        exit()
Buggy code:
s = input().split()
A = int(s[0])
B = int(s[1])

A_price_low = A / 0.08
B_price_low = B / 0.1
A_price_high = (A+1) / 0.08
B_price_high = (B+1) / 0.1

if B_price_low <= A_price_low < B_price_high:
    if A_price_low % 2 == 0:
        print(int(A_price_low))
    else:
        print(int(A_price_low) + 1)
else:
    print(-1)


Fixed code:
s = input().split()
A = int(s[0])
B = int(s[1])

A_price_low = A / 0.08
B_price_low = B / 0.1
A_price_high = (A+1) / 0.08
B_price_high = (B+1) / 0.1

if B_price_low <= A_price_low < B_price_high:
    if A % 2 == 0:
        print(int(A_price_low))
    else:
        print(int(A_price_low) + 1)
elif A_price_low <= B_price_low < A_price_high:
    print(int(B_price_low))
else:
    print(-1)
Buggy code:
a,b=map(int,input().split())
if b * 10 <= ((a  * 25 + 24) // 2 and -(-a * 25 // 2) < (b + 1) * 10:
    print(max(-(-a*25//2), b * 10))
else:
    print(-1)

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

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

for i in range(2000):
    if int(i*0.08) == A and int(i * 0.1) == B:
        ret = i
        break

print(i)

Fixed code:
ret = "-1"

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

for i in range(1,2000):
    if int(i*0.08) == A and int(i * 0.1) == B:
        ret = str(i)
        break

print(ret)
Buggy 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)

Fixed code:
A,B = map(int,input().split())
import math
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)
Buggy code:
from math import ceil
A, B = map(int, input().split(' '))
x0 = ceil(A / 0.08)
x1 = ceil((A+1) / 0.08)
y0 = ceil(B / 0.1)
y1 = ceil((B+1) / 0.1)
print(x0, x1, y0, y1)
if x1 < y0:
  print(-1)
else:
  print(min(max(x0, y0), min(x1, y1)))

Fixed code:
from math import ceil
A, B = map(int, input().split(' '))
x0 = ceil(A / 0.08)
x1 = ceil((A+1) / 0.08)
y0 = ceil(B / 0.1)
y1 = ceil((B+1) / 0.1)
if x1 <= y0 or y1 <= x0:
  print(-1)
else:
  print(min(max(x0, y0), min(x1, y1)))
Buggy code:
a,b = map(int,input().split())
ans = -1
for i in range(1,b):
  if int(i*1.08) == a and int(i*1.10)==b:
    ans = i
    break
    
print(ans)

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