qyliang/CodeNanoFix huggingface dataset:
Buggy code:
a,b=map(int,input().split())
list1 = []
list2 = []
if (a/0.08).is_integer():
    c1 = int(a/0.08)
else:
    c1=int(a/0.08)+1
if ((a+1)/0.08).is_integer():
    c2 = int((a+1)/0.08)
else:
    c2=int((a+1)/0.08)+1

for i in range(c1,c2):
    list1.append(i)

if (b/0.10).is_integer():
    c3 = int(b/0.10)
else:
    c3=int(b/0.10)+1
if ((b+1)/0.10).is_integer():
    c4 = int((b+1)/0.10)
else:
    c4=int((b+1)/0.10)+1
for i in range(c3,c4):
    list2.append(i)
print(c1)
print(c2)
print(c3)
print(c4)
print(list1)
print(list2)
l3 = set(list1) & set(list2)
l3 = list(l3)
if len(l3) > 0:
    print(min(l3))
else:
    print(-1)

Fixed code:
a,b=map(int,input().split())
list1 = []
list2 = []
if (a/0.08).is_integer():
    c1 = int(a/0.08)
else:
    c1=int(a/0.08)+1
if ((a+1)/0.08).is_integer():
    c2 = int((a+1)/0.08)
else:
    c2=int((a+1)/0.08)+1

for i in range(c1,c2):
    list1.append(i)

if (b/0.10).is_integer():
    c3 = int(b/0.10)
else:
    c3=int(b/0.10)+1
if ((b+1)/0.10).is_integer():
    c4 = int((b+1)/0.10)
else:
    c4=int((b+1)/0.10)+1
for i in range(c3,c4):
    list2.append(i)

l3 = set(list1) & set(list2)
l3 = list(l3)
if len(l3) > 0:
    print(min(l3))
else:
    print(-1)
Buggy code:
import math
a, b = map(int,input().split())

a = [math.ceil(a * 12.5),(a + 1) * 12.5]
b = [math.ceil(b * 10),math.floor((b + 1) * 10)]
print(a)
print(b)
if max(a[0], b[0]) < min(a[1], b[1]):
    print(max(a[0], b[0]))
else:
    print(-1)

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

a = [math.ceil(a * 12.5),(a + 1) * 12.5]
b = [math.ceil(b * 10),math.floor((b + 1) * 10)]
# print(a)
# print(b)
if max(a[0], b[0]) < min(a[1], b[1]):
    print(max(a[0], b[0]))
else:
    print(-1)
Buggy code:
import math
a, b = map(int, input().split())

flg = 0
for i in range(1, math.ceil(max(a,b)//0.08)):
    aa = math.floor(i * 0.08)
    bb = math.floor(i * 0.1)
    if a == aa and b == bb:
        print(i)
        flg = 1
        exit()

if flg == 0:
    print(-1)


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

flg = 0
for i in range(1, math.ceil(max(a, b)/0.08)+1):
    aa = math.floor(i * 0.08)
    bb = math.floor(i * 0.1)
    if a == aa and b == bb:
        print(i)
        flg = 1
        exit()

if flg == 0:
    print(-1)
Buggy code:
A,B = map(int,input().split())
ak = []
bk = []
for k in range(int(-(-A/0.08)),int(A/0.08+12.5)):
  ak.append(k)
for k in range(int(-(-B/0.10)),int(B/0.10+10.0)):
  bk.append(k)
ans = min(set(ak) & set(bk)) if len(set(ak) & set(bk)) > 0 else -1

Fixed code:
A,B = map(int,input().split())
ak = []
bk = []
for k in range(-int((-A/0.08)//1),-int(-(A/0.08+12.5)//1)):
  ak.append(k)
for k in range(-int((-B/0.10)//1),-int(-(B/0.10+10.0)//1)):
  bk.append(k)
ans = min(set(ak) & set(bk)) if len(set(ak) & set(bk)) > 0 else -1
print(ans)
Buggy code:
a,b =map(int,input().split())
for i in range(1009):
  if int (i*0.08)==a and int(i*0.1)==1:
    print(i)
    exit()
print(-1)

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

ans = -1

for i in range(1011):
    _a = i * 0.08
    _b = i * 0.1
    if _a == a and _b == b:
        ans = i
        break
print(ans)

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

ans = -1

for i in range(1011):
    _a = int(i * 0.08)
    _b = int(i * 0.1)
    if _a == a and _b == b:
        ans = i
        break
print(ans)
Buggy code:
import math
A,B = map(int,input().split())
if (A+1)/0.08 > B/0.1 and (B+1)/0.1 > A/0.08:
    print(max(math.ceil(A/0.08),math.ceil(B/0.1))
else:
    print(-1)

Fixed code:
import math
A,B = map(int,input().split())
if (A+1)/0.08 > B/0.1 and (B+1)/0.1 > A/0.08:
    print(max(math.ceil(A/0.08),math.ceil(B/0.1)))
else:
    print(-1)
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
print(ans)

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(" "))
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))

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

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

pq = list(set(p) & set(q))
if pq == []:
  print("-1")
else:
  print(min(pq))
Buggy code:
data = input().split()

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

n = min(int(a / 0.08), int(b / 0.1))

def lookup():    
    for i in range(n, 10000):
        tax_a = int(i * 0.08)
        tax_b = int(i * 0.1)
        if tax_a == tax_b:
            print(tax_a)
            return
    print(-1)

lookup()


Fixed code:
data = input().split()

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

n = min(int(a / 0.08), int(b / 0.1))

def lookup():    
    for i in range(n, 10000):
        tax_a = int(i * 0.08)
        tax_b = int(i * 0.1)
        if tax_a == a and tax_b == b:
            print(i)
            return
    print(-1)

lookup()
Buggy code:
a, b = [ int(v) for v in input().split() ]
ans = -1
for i in range(1, 101):
    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 = [ int(v) for v in input().split() ]
ans = -1
for i in range(1, 10001):
    if math.floor(i * 0.08) == a and math.floor(i * 0.1) == b:
        ans = i
        break
print(ans)
Buggy code:
A, B = [int(y) for y in input().split(' ')]
priceA_min = int((A/8) * 100)
priceA_max = int(((A+1)/8) * 100)
print(priceA_min, priceA_max)
found = False
for x in range(priceA_min,priceA_max+1,1):
  if int(x*0.1) == B:
    print(x)
    found = True
    break
if not found:
  print(-1)

Fixed code:
A, B = [int(y) for y in input().split(' ')]
if int((A/8) * 100) == (A/8) * 100:
  priceA_min = int((A/8) * 100)
else:
  priceA_min = int((A/8) * 100) + 1
if int(((A+1)/8) * 100) == ((A+1)/8) * 100:
  priceA_max = int(((A+1)/8) * 100) - 1
else:
  priceA_max = int(((A+1)/8) * 100)
found = False
for x in range(priceA_min,priceA_max+1,1):
  if int(x*0.1) == B:
    print(x)
    found = True
    break
if not found:
  print(-1)
Buggy code:
A, B = list(map(int, input().split()))
for i in range(1,1010):
  if int(i*8/100)==A and if int(i/10)==B:
    print(i)
    break
else:
  print(-1)

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

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

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



Fixed code:

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

for n in range(2000):
    if int(n * 0.08) == A and int(n * 0.1) == B:
        print(n)
        break
else:
    print(-1)
Buggy code:

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


def floor_inv(x, f):
    res = x // f
    if int(res * f) < x:
        res += 1
    return res


lb1 = floor_inv(A, 0.08)
ub1 = floor_inv(A + 1, 0.08)

lb2 = floor_inv(B, 0.10)
ub2 = floor_inv(B + 1, 0.10)

if ub1 <= lb2 or ub2 <= lb1:
    print(-1)
else:
    print(max(lb1, lb2))


Fixed code:

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


def floor_inv(x, f):
    res = int(x / f)
    if int(res * f) < x:
        res += 1
    return res


lb1 = floor_inv(A, 0.08)
ub1 = floor_inv(A + 1, 0.08)

lb2 = floor_inv(B, 0.10)
ub2 = floor_inv(B + 1, 0.10)

if ub1 <= lb2 or ub2 <= lb1:
    print(-1)
else:
    print(max(lb1, lb2))
Buggy code:
import math
a,b=map(int,input().split())

for i in range (11000):
  if a <= i*0.08 <=a+1:
    if b<= i*0.1 <=b+1:
      print(i)
      exit()

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

for i in range (11000):
  if a <= i*0.08 <a+1:
    if b<= i*0.1 <b+1:
      print(i)
      exit()
print(-1)
Buggy code:
A,B = map(int,input().split())

import math
flag = 0

for i in range(1250):
	if i*0.08 == A and i*0.1 == B:
		print(i)
		flag = 1
		break

if flag == 0:
	print(-1)


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

import math
flag = 0

for i in range(1250):
	if math.floor(i*0.08) == A and math.floor(i*0.1) == B:

		print(i)
		flag = 1
		break

if flag == 0:
	print(-1)
Buggy code:
import math

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

n = math.floor(a / 0.08)
m = math.floor(b / 0.1)
n2 = n + 1
m2 = m + 1

p = math.floor(n * 0.08)
q = math.floor(n * 0.1)
x = math.floor(m * 0.08)
y = math.floor(m * 0.1)
p2 = math.floor(n2 * 0.08)
q2 = math.floor(n2 * 0.1)
x2 = math.floor(m2 * 0.08)
y2 = math.floor(m2 * 0.1)

if p == a and q == b and x == a and y == b:
    print(min(n,m))
elif p == a and q == b:
    print(n)
elif x == a and y == b:
    print(m)
if p2 == a and q2 == b and x2 == a and y2 == b:
    print(min(n2,m2))
elif p2 == a and q2 == b:
    print(n2)
elif x2 == a and y2 == b:
    print(m2)
else:
    print(-1)

Fixed code:
import math

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

n = math.floor(a / 0.08)
m = math.floor(b / 0.1)
n2 = n + 1
m2 = m + 1

p = math.floor(n * 0.08)
q = math.floor(n * 0.1)
x = math.floor(m * 0.08)
y = math.floor(m * 0.1)
p2 = math.floor(n2 * 0.08)
q2 = math.floor(n2 * 0.1)
x2 = math.floor(m2 * 0.08)
y2 = math.floor(m2 * 0.1)

if p == a and q == b and x == a and y == b:
    print(min(n,m))
elif p == a and q == b:
    print(n)
elif x == a and y == b:
    print(m)
elif p2 == a and q2 == b and x2 == a and y2 == b:
    print(min(n2,m2))
elif p2 == a and q2 == b:
    print(n2)
elif x2 == a and y2 == b:
    print(m2)
else:
    print(-1)
Buggy code:
a,b = map(int, input().split())

for i in range(10, 1300):
  if int(i*0.08) == a:
    if int(i*0.1) == b:
      print(i)
      break

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

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

minA = A / 0.08
maxA = (A+1) / 0.08
minB = B / 0.1
maxB = (B+1) / 0.1

print(minA, maxA, minB, maxB)

if minB <= minA and minA < maxB: print(int(minA))
elif minA <= minB and minB < maxA: print(int(minB))
elif minB < maxA and maxA < maxB: print(int(maxA)-1)
elif minA < maxB and maxB < maxA: print(int(maxB)-1)
else: print("-1")

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

minA = A / 0.08
maxA = (A+1) / 0.08
minB = B / 0.1
maxB = (B+1) / 0.1

if minB <= minA and minA < maxB: print(int(minA) + (1 if minA > int(minA) else 0))
elif minA <= minB and minB < maxA: print(int(minB) + (1 if minB > int(minB) else 0))
else: print("-1")
Buggy 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)

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

x = -1
for i in range(10100):
  if (int(i*0.08) == A) and (int(i*0.1) == B):
    x = i
    break
  
print(x)
Buggy code:
A,B=map(int,input().split())
a=A/0.08
b=(A+1)/0.08
c=B/0.1
d=(B+1)/0.1
if b<=c or d<=a:
  print(-1)
else:
  t=max(a,c)
  s=min(b,d)
  if int(t)+1>int(s):
    print(-1)
  else:
    print(int(t)+1)


Fixed code:
A,B=map(int,input().split())
a=A/0.08
b=(A+1)/0.08
c=B/0.1
d=(B+1)/0.1
if b<=c or d<=a:
  print(-1)
else:
  t=max(a,c)
  if t==int(t):
    print(int(t))
  else:
    print(int(t)+1)
Buggy code:
A, B = map(int, input().split())
ans = -1
for i in range(1251):
  if int(i / 0.08) == A and int(i / 0.1) == B:
    ans = i
    break

print(ans)

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

for i in range(1251):
  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())
ans = []
for i in range(2000, 0, -1):
    if int(i * 0.08) == A and int(i * 0.1) == B:
        ans.append(i)
print(ans)
if len(ans) > 0:
    print(min(ans))
else:
    print(-1)

Fixed code:
A, B = map(int, input().split())
ans = []
for i in range(2000, 0, -1):
    if int(i * 0.08) == A and int(i * 0.1) == B:
        ans.append(i)

if len(ans) > 0:
    print(min(ans))
else:
    print(-1)
Buggy code:
import math

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

for n in range(0, 12):
  for m in range(0, 10):
    x = math.floor((A + n/10) / 0.08)
    y = math.floor((B + m/10) / 0.1)
    print(x, y)
    if x == y:
      if math.floor(x * 0.08) == A and math.floor(y * 0.1):
        print(x)
        exit()
print("-1")

Fixed code:
import math

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

for n in range(0, 10):
  for m in range(0, 10):
    x = math.floor((A + n/10) / 0.08 + 0.5)
    y = math.floor((B + m/10) / 0.1 + 0.5)
    if x == y:
      if math.floor(x * 0.08) == A and math.floor(y * 0.1):
        print(x)
        exit()
print("-1")
Buggy code:
A_B = list(map(int, input().split()))
A = A_B[0]
B = A_B[1]

count = 1
while count * 0.08 // 1 != A or count * 0.1 // 1 != B:
    count += 1
    if count // 0.1 > B:
        print(-1)
        exit()

print(count)


Fixed code:
A_B = list(map(int, input().split()))
A = A_B[0]
B = A_B[1]

count = 1
while count * 0.08 // 1 != A or count * 0.1 // 1 != B:
    count += 1
    if count * 0.1 - 10 > B:
        print(-1)
        exit()
print(count)
Buggy code:
A,B=map(float,input().split())
A_min=int(A/8*100)+1
A_max=int((A+1)/8*100)
ans=0
flag=False
if (A+1)*100%8==0:
    A_max=int((A+1)*100/8)-1
for i in range(A_min,A_max):
    if int(i*0.1)==B:
        ans=i
        flag=True
        break
if flag:
    print(ans)
else:
    print(-1)

Fixed code:
A,B=map(float,input().split())
A_min=int(A/8*100)
A_max=int((A+1)/8*100)+1
ans=0
flag=False
if (A+1)*100%8==0:
    A_max=int((A+1)*100/8)
for i in range(A_min,A_max):
    if int(i*0.1)==B:
        ans=i
        flag=True
        break
if int(ans*0.08)!=A:
    ans+=1
if flag:
    print(ans)
else:
    print(-1)
Buggy code:
import math

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

a_1 = math.ceil(a/0.08)
a_2 = math.ceil((a+1)/0.08)
b_1 = b * 10
b_2 = (b+1) * 10

if a_1 >=b_2 or b_1 >= a_2:
    print(-1)
else:
    print(min(a_1,b_1))

Fixed code:
import math

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

a_1 = math.ceil(a/0.08)
a_2 = math.ceil((a+1)/0.08)
b_1 = b * 10
b_2 = (b+1) * 10

if a_1 >=b_2 or b_1 >= a_2:
    print(-1)
else:
    print(max(a_1,b_1))
Buggy code:
import sys
stdin = sys.stdin
sys.setrecursionlimit(10 ** 7)

def LI(): return list(map(int, stdin.readline().split()))
def LS(): return list(stdin.readline())

import math
a,b = LI()
tax8 = [i for i in range(math.ceil(100/8*a), int(100/8*(a+1)))]
tax10 = [i for i in range(math.ceil(100/10*b), int(100/10*(b+1)))]
print(tax8,tax10)
c = max(tax8[0], tax10[0])
if c in tax8 and c in tax10:
    print(c)
else:
    print(-1)

Fixed code:
import sys
stdin = sys.stdin
sys.setrecursionlimit(10 ** 7)

def LI(): return list(map(int, stdin.readline().split()))
def LS(): return list(stdin.readline())

import math
a,b = LI()
tax8 = [i for i in range(math.ceil(100/8*a), int(100/8*(a+1)))]
tax10 = [i for i in range(math.ceil(100/10*b), int(100/10*(b+1)))]
# print(tax8,tax10)
c = max(tax8[0], tax10[0])
if c in tax8 and c in tax10:
    print(c)
else:
    print(-1)
Buggy code:
import math

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

volume_A = A / 0.08
volume_B = B / 0.1

min_A, max_A = volume_A, volume_A
range_A = 1 / 0.08
min_B, max_B = volume_B, volume_B
range_B = 1 / 0.1

for i in range(math.floor(volume_A - range_A), math.ceil(volume_A + range_A)):
    if math.floor(i * 0.08) == A:
        min_A = min(min_A, i)
        max_A = max(max_A, i)

for j in range(math.floor(volume_B - range_B), math.ceil(volume_B + range_B)):
    if math.floor(j * 0.1) == B:
        min_B = min(min_B, j)
        max_B = max(max_B, j)

ans_A = set()
for i in range(min_A, max_A + 1):
    ans_A.add(i)

ans_B = set()
for j in range(min_B, max_B + 1):
    ans_B.add(j)

ans = ans_A & ans_B

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


Fixed code:
import math

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

volume_A = math.floor(A / 0.08)
volume_B = math.floor(B / 0.1)

min_A, max_A = math.inf, -math.inf
range_A = math.floor(1 / 0.08)
min_B, max_B = math.inf, -math.inf
range_B = math.floor(1 / 0.1)
# print(range_A)
# print(range_B)

for i in range(volume_A - range_A, volume_A + range_A):
    if math.floor(i * 0.08) == A:
        min_A = min(min_A, i)
        max_A = max(max_A, i)

for j in range(volume_B - range_B, volume_B + range_B):
    if math.floor(j * 0.1) == B:
        min_B = min(min_B, j)
        max_B = max(max_B, j)

ans_A = set()
for i in range(min_A, max_A + 1):
    ans_A.add(i)
# print(ans_A)

ans_B = set()
for j in range(min_B, max_B + 1):
    ans_B.add(j)
# print(ans_B)

ans = ans_A & ans_B

if len(ans) == 0:
    print(-1)
else:
    print(min(ans))
Buggy code:
A, B = map(int, input().split())
for i in range(B*100):
    if i*8//100 == A and i * 10 // 100 == B:
        print(i)
        exit()
print(-1, -1)


Fixed code:
A,B=map(int,input().split())
for i in range(10000):
    if int((i+1)*8/100) == A and int((i+1)*10/100) == B:
        print(i+1)
        exit()
print(-1)
Buggy code:
tax_8, tax_10 = map(int, input().split())

k = int(tax_8 / 0.08)
kk = int((tax_8+1) / 0.08)
kkk = int(tax_10 / 0.1)
kkkk = int((tax_10+1) / 0.1)
print(k, kk, kkk, kkkk)

for i in range(min(k, kkk), max(kk, kkkk)):
    if int(i * 0.08) is tax_8 and int(i * 0.1) is tax_10:
        print(i)
        exit()
print(-1)

Fixed code:
tax_8, tax_10 = map(int, input().split())

k = int(tax_8 / 0.08)
kk = int((tax_8+1) / 0.08)
kkk = int(tax_10 / 0.1)
kkkk = int((tax_10+1) / 0.1)

for i in range(min(k, kkk), max(kk, kkkk)):
    if int(i * 0.08) is tax_8 and int(i * 0.1) is tax_10:
        print(i)
        exit()
print(-1)
Buggy code:
A,B=map(int,input().split())
import math
a=math.ceil(A*100/8)
b=math.ceil((A+1)*100/8)
while math.floor(a*0.1)!=B and a<b:
  a+=1
  if a==b:
    print(-1)
  else:
    print(a)

Fixed code:
A,B=map(int,input().split())
import math
a=math.ceil(A*100/8)
b=math.ceil((A+1)*100/8)
while math.floor(a*0.1)!=B and a<b:
  a+=1
if a==b:
  print(-1)
else:
  print(a)
Buggy code:
A, B = map(int, input().split())
ans = -1

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


Fixed code:
A, B = map(int, input().split())
ret = -1
 
for i in range(1,1010):
  if int(i * 0.08) == A and int(i * 0.1) == B:
    ret = i
    break
print(ret)
Buggy code:
A, B = map(int,input().split())

import math 
a = [x for x in range(math.ceil(A*12.5),math.ceil((A+1)*12.5))]
b = [x for x in range(math.ceil(B*10),math.ceil((B+1)*10))]

c = set(a) & set(b)

if c != {}:
  print(min(c))
else:
  print(-1)

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

import math 
a = [x for x in range(math.ceil(A*12.5),math.ceil((A+1)*12.5))]
b = [x for x in range(math.ceil(B*10),math.ceil((B+1)*10))]

c = set(a) & set(b)

if c != set():
  print(min(c))
else:
  print(-1)
Buggy code:
A, B = map(int, input().split(' '))
import math
asil1_1 = (100*(A))/8
asil1_2 = (100*(A+1))/8
asil2_1 = 10*(B)
asil2_2 = 10*(B+1)

sonuc_1 = max(asil1_1, asil2_1)
sonuc_2 = min(asil2_2, asil1_2)
print(sonuc_1, sonuc_2)
if sonuc_1>sonuc_2:
    print(-1)
else:
    print(math.ceil(sonuc_1))

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

# 1. YONTEM:
import math
asil1_1 = (100*(A))/8
asil1_2 = (100*(A+1))/8
asil2_1 = 10*(B)
asil2_2 = 10*(B+1)
sonuc_1 = max(asil1_1, asil2_1)
sonuc_2 = min(asil2_2, asil1_2)
if math.ceil(sonuc_1)>=sonuc_2:
    print(-1)
else:
    print(math.ceil(sonuc_1))
Buggy code:
import math
 
A, B = list(map(int, input().split()))
 
rangeA = [A / 0.08, (A + 1) / 0.08]
rangeB = [B / 0.1, (B + 1) / 0.1]
 
if rangeA[0] < rangeB[0]:
  if math.ceil(rangeB[0]) < rangeA[1]:
    print(math.ceil(rangeB[0]))
    exit(0)
elif rangeA[0] > rangeB[0]:
  if math.ceil(rangeA[0]) < rangeB[1]:
    print(math.ceil(rangeA[0]))
    exit(0)
else:  # rangeA[0] == rangeB[0]
  if math.ceil(rangeA[0]) < rangeB[1] and math.ceil(rangeA[0]) < rangeA[1]: 
    print(math.ceil(rangeA[0]))
  	exit(0)
print(-1)

Fixed code:
import math
 
A, B = list(map(int, input().split()))
 
rangeA = [A / 0.08, (A + 1) / 0.08]
rangeB = [B / 0.1, (B + 1) / 0.1]
 
if rangeA[0] < rangeB[0]:
  if math.ceil(rangeB[0]) < rangeA[1]:
    print(math.ceil(rangeB[0]))
    exit(0)
elif rangeA[0] > rangeB[0]:
  if math.ceil(rangeA[0]) < rangeB[1]:
    print(math.ceil(rangeA[0]))
    exit(0)
else:  # rangeA[0] == rangeB[0]
  if math.ceil(rangeA[0]) < rangeB[1] and math.ceil(rangeA[0]) < rangeA[1]: 
    print(math.ceil(rangeA[0]))
    exit(0)
print(-1)
Buggy code:
import math
a,b = map(int, input().split())
i = 1
while True:
  if math.floor(i*0.08) == a and math.floor(i*0.1) == b:
    print(i)
    break
  if math.floor(i*0.08) > a or math.floor(i*0.1) > b:
    print(-1)
    break

Fixed code:
import math
a,b = map(int, input().split())
i = 1
while True:
  if math.floor(i*0.08) == a and math.floor(i*0.1) == b:
    print(i)
    break
  if math.floor(i*0.08) > a or math.floor(i*0.1) > b:
    print(-1)
    break
  i += 1
Buggy code:
a,b = map(int,input().split())
if int(a/(0.08)) == int(b/(0.1)):
    cost = int(a/(0.08))
else:
    inter = abs(int(a/(0.08)) - int(b/(0.1)))
    mn = min(int(a/(0.08)) , int(b/(0.1)))
             
    for i in range(inter*2):
        if int(cost*(0.08))==a:
            if int(cost*(0.1))==b:
                break
        mn += 1
        if i ==inter:
            cost = -1
print(cost)

Fixed code:
a,b = map(int,input().split())
if int(a/(0.08)) == int(b/(0.1)):
    mn = int(a/(0.08))
else:
    inter = abs(int(a/(0.08)) - int(b/(0.1)))
    mn = min(int(a/(0.08)) , int(b/(0.1)))
             
    for i in range(inter*2):
        if int(mn*(0.08))==a:
            if int(mn*(0.1))==b:
                break
        mn += 1
        if i ==inter*2-1:
            mn = -1
print(mn)
Buggy code:
a,b=map(int,input().split())
cand_b=[b*11 + i for i in range(b)]
def ans(cand):
  for price in cand:
    if int(price*0.08)==a:
      print(price)
      return
  print(-1)

ans(cand_b)

Fixed code:
a,b=map(int,input().split())
cand_b=[b*10 + i for i in range(10*b)]
def ans(cand):
  for price in cand:
    if int(price*0.08)==a and int(price*0.1)==b:
      print(price)
      return
  print(-1)

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

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

ans = b * 10
status = ''
for i in range(10):
  8*(ans + i)//100
  if(a == 8*(ans + i)//100):
    ans += i
    status = 'ok'
    break;

if status =='ok':
  print(ans+i)
  
else:
  print(-1)

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

ans = b * 10
status = ''
for i in range(10):
  8*(ans + i)//100
  if(a == 8*(ans + i)//100):
    ans += i
    status = 'ok'
    break;

if status =='ok':
  print(ans)
  
else:
  print(-1)
Buggy code:
a,b=map(int,input().split())
ans=0
flag=False
for i in range(b*10,(b+1)*10+1):
    x=i*8
    if 100*(a+1>x>=100*a:
        flag=True
        ans=i
        break
print(ans if flag else -1)

Fixed code:
a,b=map(int,input().split())
ans=0
flag=False
for i in range(b*10,(b+1)*10):
    x=i*8
    if 100*(a+1)>x>=100*a:
        flag=True
        ans=i
        break
print(ans if flag else -1)
Buggy code:
A, B = map(int, input().split())

def check(X):
  global A
  global B
  return (int)(X*0.08) == A and (int)(X*0.1) == B

for x in range(1, max(A, B)*11):
  if check(x):
    print(x)
    exit(0)

print(-1)

Fixed code:
A, B = map(int, input().split())
 
def check(X):
  global A
  global B
  return (int)(X*0.08) == A and (int)(X*0.1) == B
 
for x in range(1, max(A, B)*20):
  if check(x):
    print(x)
    exit(0)
 
print(-1)
Buggy code:
A, B = map(int, input().split())

a1 = (A+1)/0.08
a2 = A/0.08
b1 = (B+1)/0.1
b2 = B/0.1
print(a1, a2, b1, b2)

if a2 >= b1 or b2 >= a1:
    print(-1)
else:
    print(int(max(a2, b2)))

Fixed code:
import math

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

a1 = (A+1)/0.08
a2 = A/0.08
b1 = (B+1)/0.1
b2 = B/0.1


if a2 >= b1 or b2 >= a1:
    print(-1)
else:
    print(math.ceil((max(a2, b2))))