qyliang/CodeNanoFix huggingface dataset:
Buggy code:
a,b=list(map(float,input().split()))
import sys
for i in range(100000):
  if int(i*8/100)==a and int(i*8/100):
    print(i)
    sys.exit()
print(-1)

  

Fixed code:
a,b=list(map(float,input().split()))
import sys
for i in range(100000):
  if int(i*8/100)==a and int(i*10/100)==b:
    print(i)
    sys.exit()
print(-1)
Buggy 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(i)
    break


Fixed code:
a,b = map(int,input().split())
ans = -1
for i in range(1300):
  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())
target = -1
for i in range(1300):
  if int(i*0.08) == int(i*0.1):
    target = i
print(target)

Fixed code:
A, B = map(int, input().split())
target = -1
for i in range(1300):
  if int(i*0.08) == A and int(i*0.1) == B:
    target = i
    break
print(target)
Buggy code:
A,B = map(int,input().split())
import math
a,b = math.ceil(A/0.08),int((A+1)//0.08)
c,d = math.ceil(A/0.1),int((A+1)//0.1)
if (a>=c)and(a<d):
  print(int(a))
elif (c>=a)and(c<b):
  print(int(c))
else:
  print(-1)

Fixed code:
A,B = map(int,input().split())
import math
a,b = math.ceil(A/0.08),int((A+1)//0.08)
c,d = math.ceil(B/0.1),int((B+1)//0.1)
if (a>=c)and(a<d):
  print(int(a))
elif (c>=a)and(c<b):
  print(int(c))
else:
  print(-1)
Buggy code:
import math
a, b = map(int, input().split())

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

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

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

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

Fixed code:
a,b=map(int, input().split())
n=0
for i in range(a * 10 + 80000):
  if int(i * 0.08) == a and int(i * 0.1) == b:
    print(i)
    n+=1
    break
if n == 0:
  print(-1)
Buggy code:
A,B = map(int,input().split())

a = A//0.08
b = B//0.1
a2 = (A+1)//0.08
b2 = (B+1)//0.1
ans = max(a,b)
if a > b:
    if a > b2:
        ans = -1
else:
    if b > a2:
        ans = -1
print(int(ans))

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

a = math.ceil(A/0.08)
b = math.ceil(B/0.1)
a2 = math.ceil((A+1)/0.08)
b2 = math.ceil((B+1)/0.1)
ans = max(a,b)
if a > b:
    if a >= b2:
        ans = -1
else:
    if b >= a2:
        ans = -1
print(int(ans))
Buggy 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)

Fixed code:
from math import floor
from sys import exit
A, B = map(int, input().split())
for i in range(2000):
  if floor(i * 0.08) == A and floor(i * 0.1) == B:
    print(i)
    exit()
print(-1)
Buggy code:
a, b = map(int, input().split())
r = "-1"
for price in range(1010):
    tax_8 = int(price * 0.08)
    tax_10 = int(price * 0.1)
    if tax_8 == a and tax_10 == b :
        r = price
        braek
print(r)

Fixed code:
a, b = map(int, input().split())
r = -1
for price in range(1010):
    tax_8 = int(price * 0.08)
    tax_10 = int(price * 0.1)
    if tax_8 == a and tax_10 == b:
        r = price
        break
print(r)
Buggy code:
a, b = [int(i) for i in input().split()]
A = a/0.08
B = b*10
print(A, B)
if B-10 < A < B+10:
    print(int(max(A, B)+0.5))
else:
    print(-1)


Fixed code:
a, b = [int(i) for i in input().split()]
A = a/0.08
B = b*10
if B-10 <= A < B+10:
    print(int(max(A, B)+0.5))
else:
    print(-1)
Buggy code:
A,B = map(int,input().split())
for i in range(1,1251):
    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(1,1251):
    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())

pricemax_A = math.floor((A+1)/0.08)
pricemin_A = math.floor(A/0.08)

pricemax_B = math.floor((B+1)/0.1)
pricemin_B = math.floor(B/0.1)

if pricemin_A > pricemin_B and pricemin_A < pricemax_B:
    print(pricemin_A)
else:
    print(-1)


Fixed code:
import math

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

pricemax_A = math.floor((A+1)/0.08)
pricemin_A = math.ceil(A/0.08)

pricemax_B = math.floor((B+1)/0.1)
pricemin_B = math.ceil(B/0.1)

if pricemin_A >= pricemin_B and pricemin_A < pricemax_B:
    print(pricemin_A)
elif pricemin_A <= pricemin_B and pricemax_A > pricemin_B:
    print(pricemin_B)
else:
    print(-1)
Buggy code:
# coding: utf-8

A, B = map(int, input().split())
# print("A:", A, "B:", B)

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

Fixed code:
# coding: utf-8
import math
A, B = map(int, input().split())
# print("A:", A, "B:", B)

for i in range(1, 1010):
    if math.floor(i * 0.08) == A and math.floor(i * 0.1) == B:
        print(i)
        exit()
print(-1)
Buggy code:
a,b =map(int,input().split())
 
for x in range(101):
 if (x*0.08)//1==a and (x*1.10)//1==b and x//1==int(x):
  print(int(x))
  exit()
  
print(-1)

Fixed code:
a,b =map(int,input().split())
 
for x in range(1009):
 if (x*0.08)//1==a and (x*0.10)//1==b and x//1==int(x):
  print(int(x))
  exit()
  
print(-1)
Buggy code:
a,b = map(int,input().split())
for i in range(10**5):
  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(10**5):
  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())
Ax = A * 25 / 2
Ay = (A + 1) * 25 / 2
Bx = B * 10
By = (B + 1) * 10

if Ay <= Bx or By <= Ax:
    print(-1)
else:
    ans = max(Bx, Ax)
    if ans % 1:
        ans = int(ans)
        ans += 1
    print(ans)

Fixed code:
A, B = map(int, input().split())
Ax = A * 25
if Ax & 1:
    Ax += 1
Ay = (A + 1) * 25
if Ay & 1:
    Ay += 1
Ax //= 2
Ay //= 2
Bx = B * 10
By = (B + 1) * 10

if Ay <= Bx or By <= Ax:
    print(-1)
else:
    ans = max(Bx, Ax)
    print(ans)
Buggy code:
import math
a, b = [int(i) for i in input().split()]

a_min = math.ceil(a * 12.5)
a_max = int((a+1) * 12.5)

b_min = math.ceil(b * 10 )
b_max = int((b+1)*10)

if a_max < b_min:
  print(-1)
  exit()

if b_min < a_max:
  print(-1)
  exit()
  
if a_min < b_min:
  print(b_min)
else:
  print(a_min)


Fixed code:
import math
a, b = [int(i) for i in input().split()]
 
a_min = math.ceil(a * 12.5)
a_max = int((a+1) * 12.5 - 10e-10)
 
b_min = math.ceil(b * 10 )
b_max = int((b+1)*10 - 10e-10)

  
if a_max < b_min:
  print(-1)
  exit()
  
if b_max < a_min:
  print(-1)
  exit()
  
if a_min <= b_min:
  print(b_min)
  exit()
print(a_min)
Buggy 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))

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

nums = list(map(int, input().split()))
a = nums[0]
b = nums[1]

for i in range(1200):
  if math.floor(i * 0.08) == a and math.floor(i*0.1) == b:
      print(i)
      break

print(-1)



Fixed code:
import math
import sys
 
nums = list(map(int, input().split()))
a = nums[0]
b = nums[1]
 
for i in range(1200):
  if math.floor(i * 0.08) == a and math.floor(i*0.1) == b:
      print(i)
      sys.exit()
 
print(-1)
Buggy code:
A, B = map(int, input().split())
for i in range(1, 10000):
  if int(0.08 * i) == A and int(0.01 * i) == B:
    print(i)
    quit()
print('-1')

Fixed code:
A, B = map(int, input().split())
for i in range(1, 10000):
  if int(0.08 * i) == A and int(0.1 * i) == B:
    print(i)
    quit()
print('-1')
Buggy code:
import math

A, B = map(int, input().split())
a = math.ceil(A / 0.08)
b = math.ceil(B / 0.1)
ans = max(a, b)

if ans ** 0.08 == A and ans ** 0.1 == B:
    print(ans)
else:
    print(-1)

Fixed code:
import math

A, B = map(int, input().split())
a = math.ceil(A / 0.08)
b = math.ceil(B / 0.1)
ans = max(a, b)

if math.floor(ans * 0.08) == A and math.floor(ans * 0.1) == B:
    print(ans)
else:
    print(-1)
Buggy 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))


Fixed 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))
Buggy code:
A,B=map(int,input().split())
for i in range(10000):
    if i*0.08//1==A and i*0.1//1==B:
        print(i)
        exit(0)

Fixed code:
A,B=map(int,input().split())
for i in range(10000):
    if i*0.08//1==A and i*0.1//1==B:
        print(i)
        exit(0)
print("-1")
Buggy code:
import math

a, b = list(map(int, input().split()))
result = -1
end_flag = False
for i in range(1, 100):
    if not end_flag:
        x = math.floor(i * 0.08)
        if int(x) == a:
            for j in range(1, 100):
                y = math.floor(j * 0.1)
                if int(y) == b:
                    result = i
                    end_flag = True
                    break
print(result)


Fixed code:
import math

a, b = list(map(int, input().split()))
result = -1
end_flag = False
for i in range(1, 1251):
    if not end_flag:
        x = math.floor(i * 0.08)
        if int(x) == a:
            for j in range(1, 1001):
                y = math.floor(j * 0.1)
                if i == j:
                    if int(y) == b:
                        result = i
                        end_flag = True
                        break
print(result)
Buggy code:
from math import floor

a, b = [int(i) for i in input().split()]
for i in range(0, 1011):
    print(i, floor(i * 0.08), floor(i * 0.1))
    if floor(i * 0.08) == a and floor(i * 0.1) == b:
        print(i)
        break
else:
    print(-1)


Fixed code:
from math import floor

a, b = [int(i) for i in input().split()]
for i in range(1, 1011):
    if floor(i * 0.08) == a and floor(i * 0.1) == b:
        print(i)
        exit()
print(-1)
Buggy code:
# coding: utf-8


def main():
    A, B = map(int, input().split())
    for i in range(10001):
        if i * 8 / 100 == A and i / 10 == B:
            print(i)
            break

if __name__ == "__main__":
    main()


Fixed code:
# coding: utf-8


def main():
    A, B = map(int, input().split())
    ans = -1
    for i in range(10001):
        if i * 8 // 100 == A and i // 10 == B:
            ans = i
            break

    print(ans)

if __name__ == "__main__":
    main()
Buggy code:
cuts = []
for i in range(2000):
  cuts+= [[i*0.08, i*0.10]]
  
A, B = map(int,input().split())

for i in range(2000):
  if [A, B] == cuts[i]:
    print(i)
    break

Fixed code:
cuts = []
for i in range(2000):
  cuts+= [[int(i*0.08), int(i*0.10)]]
  
A, B = map(int,input().split())

for i in range(1,2000):
  if [A, B] == cuts[i]:
    print(i)
    break
else:
  print(-1)
Buggy code:
a,b = map(int,input().split())
ans = a*10
for i in range(11):
    if i == 10:
        ans = -1
        break
    ans += 1
    if int(ans*0.08) == b:
        break
print(ans)

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

prca = math.ceil(a / 0.08)
prcb = math.ceil(b / 0.1)
base = max(prca, prcb)

while True:
    if int(base * 0.08) < a or int(base * 0.1) < b:
        ans = base - 1
        break
    base -= 1

if int(ans * 0.08) != a or int(ans * 0.1) != b:
    ans = -1
    
print(ans)

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

prca = math.ceil(a / 0.08)
prcb = math.ceil(b / 0.1)
base = max(prca, prcb)
while True:
    if int(base * 0.08) < a or int(base * 0.1) < b:
        ans = base + 1
        break
    base -= 1

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


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

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

ans = -1

for i in range(1, 100000000):
    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, 1000000):
    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=map(int,input().split())
for i in range(2000):
  if math.floor((i+1)*0.1)==a and math.floor((i+1)*0.08)==b:
    print(i+1)
    break

Fixed code:
import math
a,b=map(int,input().split())
for i in range(2000):
  if math.floor((i+1)*0.08)==a and math.floor((i+1)*0.1)==b:
    print(i+1)
    exit()
print(-1)
Buggy code:
from math import ceil
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines

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

    x1 = ceil(A / 0.08)
    x2 = ceil(B / 0.1)
    print(x1, x2)

    if int(x1 * 0.1) == B:
        print(x1)
    elif int(x2 * 0.08) == A:
        print(x2)
    else:
        print(-1)


if __name__ == "__main__":
    main()


Fixed code:
from math import ceil
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines

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

    x1 = ceil(A / 0.08)
    x2 = ceil(B / 0.1)

    if int(x1 * 0.1) == B:
        print(x1)
    elif int(x2 * 0.08) == A:
        print(x2)
    else:
        print(-1)


if __name__ == "__main__":
    main()
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, 12500):
  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())

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

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

for i in range(10001):
  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())
eight=[]
i=0
ten=[]
for a in range(1,1001):
    if math.floor(a*0.08)==A:
        eight.append(a)
    if math.floor(a*0.1)==B:
        ten.append(a)

for a in eight:
    if a in ten:
        print(a)
        i=1
        break
if i=0:
    print("-1")


Fixed code:
import math
A,B=map(int,input().split())
eight=[]
i=0
ten=[]
for a in range(1,1001):
    if math.floor(a*0.08)==A:
        eight.append(a)
    if math.floor(a*0.1)==B:
        ten.append(a)

for a in eight:
    if a in ten:
        print(a)
        i=1
        break
if i==0:
    print("-1")
Buggy 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)


Fixed code:
A, B = map(int, input().split())
f = False
ans = 0
n = A * 100 // 8
m = (A + 1) * 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)
Buggy code:
import math
a,b = map(int,input().split())
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_min < a_max:
  print(-1)
else:
  result = b_min if a_min < b_min else a_min
  print(result)

Fixed code:
import math
a,b = map(int,input().split())
a_min = math.ceil(a / 0.08)
a_max = math.floor((a + 1) / 0.08) - 1
b_min = math.ceil(b / 0.1)
b_max = math.floor((b + 1) / 0.1) - 1
 
if a_max < b_min or b_max < a_min:
  print('-1')
else:
  result = b_min if a_min <= b_min else a_min
  print(result)
Buggy code:
a,b = input().split()
a,b = [int(a), int(b)]
min_a = (a * 100) / 8
if min_a != ((a * 100) // 8):
  min_a += 0.5
  
max_a = ((a + 1) * 100) / 8
min_b = b * 10
max_b = (b + 1) * 10

if min_a >= min_b and min_a < max_b:
  print(min_a)
elif min_b >= min_a and min_b < max_a:
  print(min_b)
else:
  print('-1')

Fixed code:
a,b = input().split()
a,b = [int(a), int(b)]
min_a = (a * 100) / 8
if min_a != ((a * 100) // 8):
  min_a += 0.5
  
max_a = ((a + 1) * 100) / 8
min_b = b * 10
max_b = (b + 1) * 10

if min_a >= min_b and min_a < max_b:
  print(int(min_a))
elif min_b >= min_a and min_b < max_a:
  print(min_b)
else:
  print('-1')
Buggy code:
A, B = list(map(int, input().split()))

l8 = []
l10 = []
for i in range(100):
  p8 = (A+0.01*i)/0.08
  p10 = (B+0.01*i)/0.1
  if p8.is_integer():
    l8.append(p8)
  if p10.is_integer():
    l10.append(p10)

p = sorted(list(set(l8) & set(l10)))
if p == []:
  print(-1)
else:
  print(p[0])

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

l8 = []
l10 = []
for i in range(100):
  p8 = round((A+0.01*i)/0.08, 10)
  p10 = round((B+0.01*i)/0.1, 10)
  if p8.is_integer():
    l8.append(p8)
  if p10.is_integer():
    l10.append(p10)

p = sorted(list(set(l8) & set(l10)))
if p == []:
  print(-1)
else:
  print(int(p[0]))
Buggy code:
import math
A, B = map(int, input().split())

ans = 1
for b in range(10*B, 10*B+10):
    if int(b*0.08) == A:
        print(b)
        ans = 0

if ans:
    print(-1)

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

#int(ans*0.08) = A
#int(ans*0.10) = B

ans = 1
for b in range(10*B, 10*B+10):
    if int(b*0.08) == A:
        print(b)
        ans = 0
        break

if ans:
    print(-1)
Buggy code:
import sys

A, B = [int(x) for x in input().split()]
for x in range((A+1)*10,(B+1)*10):
  if A == x*8//100 and B == x//10:
    print(x)
    sys.exit()
print(-1)

Fixed code:
import sys
A, B = [int(x) for x in input().split()]
for x in range(1010):
  if A == x*8//100 and B == x//10:
    print(x)
    sys.exit()
print(-1)
Buggy code:
a,b = map(int,input().split())

list = []
if 100*a%8:
  x=int(a/0.08)+1
else:
  x=int(a/0.08)

for i in range(x, int((a+1)/0.08)+1):
    if b/0.1 <= i <(b+1)/0.1:
        list.append(i)

        
list = sorted(list)
if list[0]:
    print(list[0])
else:
    print('-1')



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

list = []
if 100*a%8:
  x=int(a/0.08)+1
else:
  x=int(a/0.08)

if 100*(a+1)%8:
    y=int((a+1)/0.08)
else:
    y=int((a+1)/0.08)-1

    
for i in range(x, y+1):
    if b/0.1 <= i <(b+1)/0.1:
        list.append(i)

        
list = sorted(list)
if list:
    print(list[0])
else:
    print('-1')
Buggy code:
import math

def main():

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

    a_l = A / 0.08
    a_m = (A + 1) / 0.08

    b_l = B / 0.08
    b_m = (B + 1) / 0.08

    l = max(a_l, b_l)
    m = min(a_m, b_m)

    c = math.ceil(l)

    if c < m:
        print(int(c))
    else:
        print(-1)


if __name__ == '__main__':
    main()


Fixed code:
import math

def main():

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

    a_l = A / 0.08
    a_m = (A + 1) / 0.08

    b_l = B / 0.1
    b_m = (B + 1) / 0.1

    l = max(a_l, b_l)
    m = min(a_m, b_m)

    c = math.ceil(l)

    if c < m:
        print(int(c))
    else:
        print(-1)


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

A, B = map(int, sys.stdin.readline().rstrip().split())
c = 1e-1000
d = 1 - c
A_min = int(A * (100 / 8.) + d)
A_max = (A + 1) * (100 / 8.)
B_min = int(B * 10.)
B_max = (B + 1) * 10.

if int(min(A_max, B_max) - max(A_min, B_min)) > 0:
    print(int(max(A_min, B_min)))
else:
    print('-1')


Fixed code:
import sys

A, B = map(int, sys.stdin.readline().rstrip().split())
c = 1e-10
d = 1 - c
A_min = int(A * (100 / 8.) + d)
A_max = int((A + d) * (100 / 8.))
B_min = int(B * 10.)
B_max = int((B + d) * 10.)

if min(A_max, B_max) - max(A_min, B_min) >= 0:
    print(max(A_min, B_min))
else:
    print('-1')
Buggy code:
A, B = input().split()
def calc(A, B):
  Amin = int(A/0.08)
  Amax = int((A+1)/0.08+0.001)
  Arange = set(range(Amin, Amax))
  Bmin = int(B/0.1)
  Bmax = int((B+1)/0.1+0.001)
  Brange = set(range(Bmin, Bmax))
  intersection = Arange & Brange
  if len(intersection) == 0:
    print(-1) 
  else:
    print(min(intersection))
calc(A,B)

Fixed code:
A, B = map(int, input().split())
def calc(A, B):
  Amin = A/0.08
  if (Amin - int(Amin)) != 0.:
    Amin = int(Amin)+1
  else:
    Amin = int(Amin)
  Amax = int((A+1)/0.08)
  Arange = set(range(Amin, Amax))
  Bmin = B/0.1
  if (Bmin - int(Bmin)) != 0.:
    Bmin = int(Bmin)+1
  else:
    Bmin = int(Bmin)
  Bmax = int((B+1)/0.1)
  Brange = set(range(Bmin, Bmax))
  intersection = Arange & Brange
  print(-1) if len(intersection) == 0 else print(min(intersection))
calc(A, B)
Buggy code:
#AtCoder
import math
A, B = map(int, input().split())

eight = int(math.ceil(A / 0.08))
ten = int(math.ceil(B / 0.1))

ans = 10000000000

for i in range(min(ten, eight), max(ten, eight)+1):
    if int(i*0.08)==A and int(i*0.1)==B:
        ans = min(ans,i)


if ans == 100:
    ans = -1
print(ans)

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

eight = int(math.ceil(A / 0.08))
ten = int(math.ceil(B / 0.1))

ans = 10000000000

for i in range(min(ten, eight), max(ten, eight)+1):
    if int(i*0.08)==A and int(i*0.1)==B:
        ans = min(ans,i)


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

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

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

print(-1)

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

for i in range(10000):
  A=int(i*0.08)
  B=int(i*0.1)
  if A==a and B==b:
    print(i)
    exit()

print(-1)
Buggy code:
import math
A, B = list(map(int, input().split()))

A_min = math.ceil(A * 25 / 2)
A_max = math.ceil((A + 1) * 25 / 2)
B_min = B * 10
B_max = math.floor((B + 1) * 10)
# print(B_min, B_max)
A_list = list(range(A_min, A_max))
B_list = list(range(B_min, B_max))
print(A_list)
print(B_list)

min_ans = -1
for num in A_list:
    if num in B_list:
        min_ans = num
        break
    else:
        continue

print(min_ans)


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

A_min = math.ceil(A * 25 / 2)
A_max = ((A + 1) * 25 / 2)
if A_max > math.floor(A_max):
    A_max = math.floor(A_max) + 1
else:
    A_max = A_max
A_max = int(A_max)
B_min = B * 10
B_max = (B + 1) * 10
# print(B_min, B_max)
A_list = list(range(A_min, A_max))
B_list = list(range(B_min, B_max))
# print(A_list)
# print(B_list)

min_ans = -1
for num in A_list:
    if num in B_list:
        min_ans = num
        break
    else:
        continue

print(min_ans)