qyliang/CodeNanoFix huggingface dataset:
Buggy code:
n,a,b=map(int,input().split());m=n//(a+b)*a;print(m,n-m)

Fixed code:
n,a,b=map(int,input().split());m=n//(a+b);print(m*a+min(a,n-m*(a+b)))
Buggy code:
N,A,B = map(int, input().split())

if A == 0:
    print(0)
    exit()

if B == 0:
    if N <= A:
        print(N)
        exit()

if N >= A:
    print(A)
    exit()

set_count = N // (A+B)
extra = N % (A+B)

if extra <= A:
    print(set_count*A + extra)
    exit()
else:
    print(set_count*A + A)
    exit()


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

if A == 0:
    print(0)
    exit()

if N <= A:
    print(N)
    exit()

set_count = N // (A+B)
extra = N % (A+B)

if extra <= A:
    print(set_count*A + extra)
    exit()
else:
    print(set_count*A + A)
    exit()
Buggy code:
import sys
readline = sys.stdin.buffer.readline

n,a,b = map(int,readline().split())
if a == 0:
    print(0)
ans = n//(a+b)*a
res = n%(a+b)

res = min(a,res)

ans += res
print(ans)

Fixed code:
import sys
readline = sys.stdin.buffer.readline

n,a,b = map(int,readline().split())
if a == 0:
    print(0)
    exit()
ans = n//(a+b)
ans *= a
res = n%(a+b)

res = min(a,res)

ans += res

print(ans)
Buggy code:
A,B = map(int,input().split())
A_se = set()
B_se = set()

for i in range(int(A/0.08)+1,int((A+1)/0.08)+1):
    A_se.add(i)

for i in range(int(B/0.1)+1,int((B+1)/0.1)+1):
    B_se.add(i)

C = A_se & B_se
if len(C)==0:
    print(-1)
else:
    print(min(C))

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

for i in range(math.ceil(A/0.08),math.ceil((A+1)/0.08)):
    A_se.add(i)

for i in range(math.ceil(B/0.1),math.ceil((B+1)/0.1)):
    B_se.add(i)

C = A_se & B_se
if len(C)==0:
    print(-1)
else:
    print(min(C))
Buggy code:
a,b = list(map(int,input().split()))

A = list(range(int((a / 0.08)),int((a+1)/0.08)))
B = list(range(int((b / 0.08)),int((b+1)/0.08)))
price = set(A) & set(B)
if len(price) == 0:
    ans = -1
else:
    ans = min(price)
print(ans)

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

A = list(range(math.ceil((a / 0.08)),int((a+1)/0.08)))
B = list(range(int((b / 0.1)),int((b+1)/0.1)-1))
price = set(A) & set(B)
if len(price) == 0:
    ans = -1
else:
    ans = min(price)
print(ans)
Buggy code:
import sys; sys.setrecursionlimit(2147483647); input = sys.stdin.readline
from math import floor, ceil, sqrt, factorial, log
from collections import Counter, defaultdict
from operator import itemgetter
INF = float('inf'); MOD = 10**9+7
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(MI())
def LIR(n): return [LI() for i in range(n)]
def S(): return input().rstrip()

def main():
    A, B = MI()
    A = int(A/0.08)
    B = int(B/0.1)
    if A==B:
        print(A)
    else:
        print(-1)
if __name__ == '__main__':
    main()

Fixed code:
import sys; sys.setrecursionlimit(2147483647); input = sys.stdin.readline
from math import floor, ceil, sqrt, factorial, log
from collections import Counter, defaultdict
from operator import itemgetter
INF = float('inf'); MOD = 10**9+7
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(MI())
def LIR(n): return [LI() for i in range(n)]
def S(): return input().rstrip()

def main():
    A, B = MI()
    for i in range(1009):
        if int(i*0.08) == A and int(i*0.1) == B: print(i); sys.exit()
    print(-1)
if __name__ == '__main__':
    main()
Buggy code:
def main():
    A,B = map(int,input().split())
    for i in range(10001):
        e = i * 0.08
        t = i * 0.1
        if e == A and t == B:
            return i
    return -1
print(main())

Fixed code:
def main():
    A,B = map(int,input().split())
    for i in range(10001):
        e = int(i * 0.08)
        t = int(i * 0.1)
        if e == A and t == B:
            return i
    return -1
print(main())
Buggy code:
a,b = map(int,input().split())

for i in range(10000,-1,-1):
  tax1 = int(i*0.08)
  tax2 = int(i*0.1)
  if tax1 = a and tax2 == b:
    print(i)

Fixed code:
a,b = map(int,input().split())
ans = -1 
  
for i in range(10000,-1,-1):
  tax1 = int(i*0.08)
  tax2 = int(i*0.1)
  if tax1 == a and tax2 == b:
    ans = i
print(ans)
Buggy code:
def c_tax_increase():
    A, B = [int(i) for i in input().split()]
    lower = max((25 * A + 2 - 1) / 2, 10 * B)
    upper = min(25 * (A + 1) // 2, 10 * (B + 1))
    return lower if lower < upper else -1

print(c_tax_increase())

Fixed code:
def c_tax_increase():
    A, B = [int(i) for i in input().split()]
    lower = max((25 * A + 2 - 1) // 2, 10 * B)
    upper = min(25 * (A + 1) // 2, 10 * (B + 1))
    return lower if lower < upper else -1

print(c_tax_increase())
Buggy code:
A,B = (int(x) for x in input().split())
for i in range(10,1001):
    Ahan = int(i * 0.08)
    Bhan = int(i * 0.10)
    if (Ahan == A and Bhan == B):
        print(i)
        break
print(-1)

Fixed code:
A,B = (int(x) for x in input().split())
for i in range(1,1001):
    Ahan = int(i * 0.08)
    Bhan = int(i * 0.10)
    if (Ahan == A and Bhan == B):
        print(i)
        exit()
print(-1)
Buggy code:
import math
a, b = map(int, input().split())
lsta = list(range(math.ceil(a/0.08), math.ceil((a+1)/0.8)))
lstb = list(range(math.ceil(b/0.1), math.ceil((b+1)/0.1)))
for la in lsta:
  for lb in lstb:
    if la==lb:
      print(la)
      exit()
print(-1)

Fixed code:
import math
a, b = map(int, input().split())
lsta = list(range(math.ceil(a/0.08), math.ceil((a+1)/0.08)))
lstb = list(range(math.ceil(b/0.1), math.ceil((b+1)/0.1)))
for la in lsta:
  for lb in lstb:
    if la==lb:
      print(la)
      exit()
print(-1)
Buggy code:
# -*- coding: utf-8 -*-
def main():
    A,B = map(int,input().split())
    for i in range(1,1010):
        if (0.08*i)==A and (0.1*i)==B:
            print(i)
            return
    print('-1')

if __name__ == '__main__':
    main()

Fixed code:
# -*- coding: utf-8 -*-
def main():
    A,B = map(int,input().split())
    for i in range(1,1010):
        if int(0.08*i)==A and int(0.1*i)==B:
            print(i)
            return
    print('-1')

if __name__ == '__main__':
    main()
Buggy code:
A, B = map(int, input().split())

x = max(A*8//100, B*10//100)
y = min((A+1)*8//100, (B+1)*10//100)

if x <= y:
    ans = x
else:
    ans = -1

print(ans)

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

x = max((A*100+7)//8, B*100//10)
y = min((A+1)*100/8, (B+1)*100/10)

if x < y:
    ans = x
else:
    ans = -1

print(ans)
Buggy code:
a,b = map(int,input().split)
magic = 0
ans = -1

while a > magic * 0.08 and b > magic * 0.1:
    if magic * 0.08 == a and  magic * 0.1 == b:
        ans = magic * 0.08
        break
    magic +=  1
print(ans)

Fixed code:
a,b = map(int,input().split())
magic = 1
ans = -1

while a >= (magic * 0.08) // 1 and b >= ( magic * 0.1) // 1:
    if a == (magic * 0.08) // 1 and b == ( magic * 0.1) // 1:
        ans = magic
        break
    magic += 1
print(ans)
Buggy code:
import math

def main():

    a, b = [int(i) for i in input().split()]

    lo = max(1000 * a, 800 * b)
    hi = min(1000 * (a + 1), 800 + (b + 1))

    if lo < hi:
        print(math.ceil(lo / 80))
    else:
        print(-1)


main()


Fixed code:
import math

def main():

    a, b = [int(i) for i in input().split()]

    lo = max(1000 * a, 800 * b)
    hi = min(1000 * (a + 1), 800 * (b + 1))

    if lo < hi:
        print(math.ceil(lo / 80))
    else:
        print(-1)


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

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

a,b = map(int, input().split())
t = 1
x = False
y = False
z = False

while t <= 10000:
    c = math.floor(t * 0.08)
    
    if c == a:
        x = True
    else:
        x = False
        
    if c == b:
        y = True
    else:
        y = False
        
    if x and y:
        print(t)
        z = True
        break
        
    t = t + 1

if z == False:
    print('-1')

Fixed code:
import math

a,b = map(int, input().split())
t = 1
x = False
y = False
z = False

while t <= 10000:
    c = math.floor(t * 0.08)
    d = math.floor(t * 0.1)
    
    if c == a:
        x = True
    else:
        x = False
        
    if d == b:
        y = True
    else:
        y = False
        
    if x and y:
        print(t)
        z = True
        break
        
    t = t + 1

if z == False:
    print('-1')
Buggy code:
tax = [int(n) for n in input().split()]

max_8tax = (tax[0]+1) / .08
min_8tax = (tax[0]) / .08)
max_10tax = int((tax[1]+1) / .1) - 1
min_10tax = int((tax[1]) / .1)

r = -1

for i in range(min_10tax, max_10tax):
    if min_8tax <= i and i < max_8tax:
        r = i
        break

print(r)

Fixed code:
tax = [int(n) for n in input().split()]

max_8tax = (tax[0]+1) / .08
min_8tax = tax[0] / .08
max_10tax = int((tax[1]+1) / .1) - 1
min_10tax = int(tax[1] / .1)

r = -1

for i in range(min_10tax, max_10tax):
    if min_8tax <= i and i < max_8tax:
        r = i
        break

print(r)
Buggy code:
import math

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

emin=math.ceil(a/0.08)
emax=math.ceil((a+1)/0.08)-1
tmin=math.ceil(b/0.1)
tmax=math.ceil((b+1)/0.1)-1

print(emin)
print(emax)
print(tmin)
print(tmax)

if tmin<=emin<=tmax:
    print(emin)
elif emin<=tmin<=emax:
    print(tmin)
else:
    print(-1)

Fixed code:
import math

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

emin=math.ceil(a/0.08)
emax=math.ceil((a+1)/0.08)-1
tmin=math.ceil(b/0.1)
tmax=math.ceil((b+1)/0.1)-1

if tmin<=emin<=tmax:
    print(emin)
elif emin<=tmin<=emax:
    print(tmin)
else:
    print(-1)
Buggy code:
A,B = map(int,input().split())
PA = 1

while PA <= 1000:
    if PA*0.1 >= B:
        break
    else:
        PA += 1

if A+1 > PA*0.08 >= A:
    print(PA)

else:
    print(-1)

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

while PA <= 1250:
    if PA*0.08 >= A:
        break
    else:
        PA += 1

if int(PA*0.1) == B:
    print(PA)

elif PA*0.1 >= B+1:
    print(-1)

else:
    while PA <= 1000:
        if PA*0.1 >= B:
            break
        else:
            PA +=1
    if int(PA*0.08) == A:
        print(PA)
    else:
        print(-1)
Buggy code:
a,b = map(int, input().split())
ans = -1
for i in range(100):
  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(1010):
  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());l=max(a*25+1>>1,b*10);print(-(~a*25//2>~l<~b*10)or l)

Fixed code:
a,b=map(int,input().split());l=max(0--a*25//2,b*10);print(l*(-~a*25//2>l<-~b*10)or-1)
Buggy code:
a,b=map(int,input().split());print([i for i in range(10**6)if a==i//12.5and b==i//10]+[-1][0])

Fixed code:
a,b=map(int,input().split());print(([i for i in range(10**6)if a==i//12.5and b==i//10]+[-1])[0])
Buggy code:
import math
from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN
a = list(map(int, input().split(" ")))
min8 = a[0]/0.08
max8 = (a[0]+1)/0.08
min10 = a[1]/0.1
max10 =(a[1]+1)/0.1
a = max(min8, min10)
if ((min8>=max10) or (max8<=min10)):
    print(-1)
else:
    print(Decimal(b).quantize(Decimal('0'), rounding = ROUND_HALF_UP))

Fixed code:
import math
from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN
a = list(map(int, input().split(" ")))
min8 = a[0]/0.08
max8 = (a[0]+1)/0.08
min10 = a[1]/0.1
max10 =(a[1]+1)/0.1
b = max(min8, min10)
if ((min8>=max10) or (max8<=min10)):
    print(-1)
else:
    print(Decimal(b).quantize(Decimal('0'), rounding = ROUND_HALF_UP))
Buggy code:
a,b=map(int,input().split())
c=[]
d=[]
if a % 2 == 0:
    s = int(100*a/8)
    t = int(100*(a+1)/8) + 1
else:
    s = int(100*a/8) + 1
    t = int(100*(a+1)/8) 
u = int(100*b/10) 
v = int(100*(b+1)/10) + 1
for i in range(s,t):
    c.append(i)
for j in range(u,v):
    d.append(j)
c_d = set(c) & set(d)
if (len(c_d)>=0):
    print(min(c_d))
else:
    print(-1)



Fixed code:
a,b=map(int,input().split())
c=[]
d=[]
if a % 2 == 0:
    s = int(100*a/8)
    t = int(100*(a+1)/8) + 1
else:
    s = int(100*a/8) + 1
    t = int(100*(a+1)/8) 
u = int(10*b) 
v = int(10*(b+1)) 
for i in range(s,t):
    c.append(i)
for j in range(u,v):
    d.append(j)
c_d = set(c) & set(d)
if (len(c_d)>0):
    print(min(c_d))
else:
    print(-1)
Buggy code:
import math

A,B=map(int, input().split())
Amin=int(math.ceil(A/0.08))
if A%2==0:
    Amax=int(math.floor((A+1)/0.08))
else:
    Amax=int(math.floor((A+1)/0.08)-1)
Bmin=int(math.ceil(B/0.1))
Bmax=int(math.floor((B+1)/0.1)-1)
if Amax<Bmin or Bmax<Amin:
    ans=-1
else:
    ans=max(Amin,Bmin)

print(Amin)
print(Amax)
print(Bmin)
print(Bmax)
print(ans)

Fixed code:
import math

A,B=map(int, input().split())
Amin=int(math.ceil(A/0.08))
if A%2==0:
    Amax=int(math.floor((A+1)/0.08))
else:
    Amax=int(math.floor((A+1)/0.08)-1)
Bmin=int(math.ceil(B/0.1))
Bmax=int(math.floor((B+1)/0.1)-1)
if Amax<Bmin or Bmax<Amin:
    ans=-1
else:
    ans=max(Amin,Bmin)
print(ans)
Buggy code:
A, B = map(int, input().split())

# S * 0.08 = A + a, S * 0.10 = B + b
#  A < B
# A <= S * 0.08 < A+1 B <= S * 0.10 < B+1

def getS(A, B):
    if A / 0.08 <= B / 0.10:
        start = int(A / 0.08)
        end = int((B + 1) // 0.10 + 1)
        for S in range(start, end):
            if int(S * 0.08) == A and int(S * 0.10) == B:
                return S
        return -1
    elif B / 0.10 < A / 0.08:
        start = int(B / 0.10)
        end = int((A + 1) // 0.08 + 1)
        for S in range(start, end):
            if int(S * 0.08) == A and int(S * 0.10) == B:
                return S
        return -1
    
getS(A, B)

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

# S * 0.08 = A + a, S * 0.10 = B + b
#  A < B
# A <= S * 0.08 < A+1 B <= S * 0.10 < B+1

def getS(A, B):
    if A / 0.08 <= B / 0.10:
        start = int(A / 0.08)
        end = int((B + 1) // 0.10 + 1)
        for S in range(start, end):
            if int(S * 0.08) == A and int(S * 0.10) == B:
                return S
        return -1
    elif B / 0.10 < A / 0.08:
        start = int(B / 0.10)
        end = int((A + 1) // 0.08 + 1)
        for S in range(start, end):
            if int(S * 0.08) == A and int(S * 0.10) == B:
                return S
        return -1
    
print(getS(A, B))
Buggy code:
a, b = map(int, input().split())

import math
flag = True
for i in range(1009):
    if math.floor(i * 0.08) == a and math.floor(i * 0.10):
        print(i)
        flag = False
        break
if flag:
    print(-1)

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

import math
flag = True
for i in range(1009):
    if math.floor(i * 0.08) == a and math.floor(i * 0.10) == b:
        print(i)
        flag = False
        break
if flag:
    print(-1)
Buggy code:
a, b = map(int, input().split())

import math
aS = math.ceil(a / 0.08)
al = math.floor((a + 1) / 0.08)
bs = math.ceil(b / 0.10)
bl = math.floor((b + 1) / 0.10)

for i in range(1000):
    if aS <= i < al and bs <= i < bl:
        print(i)
        flag = False
        break
if flag:
    print(-1)

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

import math
aS = math.ceil(a / 0.08)
al = math.floor((a + 1) / 0.08)
bs = math.ceil(b / 0.10)
bl = math.floor((b + 1) / 0.10)

flag = True
for i in range(10000):
    if aS <= i < al and bs <= i < bl:
        print(i)
        flag = False
        break
if flag:
    print(-1)
Buggy code:
a, b = map(int, input().split())

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


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

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

while True:
  p=i*8//100
  q=i//10
  if p==a and q==b:
    break
  i+=1
  if i>=a*11 or i>b*11:
    print(-1)
    exit()
print(i)

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

while True:
  p=i*8//100
  q=i//10
  if p==a and q==b:
    break
  i+=1
  if i>=(a+1)*13 and i>(b+1)*10:
    print(-1)
    exit()
print(i)
Buggy code:
import math
A,B = list(map(int,input().split()))

A_min=12*A+math.floor(0.5*A)
A_max=12*(A+1)+math.ceil(0.5*(A+1))
B_min=10*B
B_max=10*(B+1)

print(A_min,A_max,B_min,B_max)
if A_max < B_min:
    print(-1)
elif B_max < A_min:
    print(-1)
else:
    print(max(A_,B_))

Fixed code:
import math
A,B = list(map(int,input().split()))
 
A_min=12*A+math.ceil(0.5*A)
A_max=12*(A+1)+math.floor(0.5*(A+1))
B_min=10*B
B_max=10*(B+1)
 
if A_max <= B_min:
    print(-1)
elif B_max <= A_min:
    print(-1)
else:
    print(max(A_min,B_min))
Buggy code:
from math import *
A,B=list(map(input().split()))
x=ceil(max(A/0.08,B/0.1))
y=min((A+1)/0.08,(B+1)/0.1)
if x<y:
  print(x)
else:
  print(-1)

Fixed code:
from math import *
A,B=list(map(int, input().split()))
x=ceil(max(A/0.08,B/0.1))
y=min((A+1)/0.08,(B+1)/0.1)
if x<y:
    print(x)
else:
    print(-1)
Buggy code:
import math

A, B = map(int, input().split())
min_ans = math.ceil(A / 0.08)

kouho = [min_ans]
to_continue = True
while to_continue:
    min_ans += 1
    if math.floor(min_ans * 0.08) == A:
        kouho.append(min_ans)
    else:
        break

print_flag = False
for i in kouho:
    if math.floor(i * 0.1) == B:
        print_flag = True
        print(i)
        break
    
if print_flag == False:
    print('No')

Fixed code:
import math
 
A, B = map(int, input().split())
min_ans = -(-A // 0.08)
 
kouho = [min_ans]
to_continue = True
while to_continue:
    min_ans += 1
    if math.floor(min_ans * 0.08) == A:
        kouho.append(min_ans)
    else:
        break
        
print_flag = False
for i in kouho:
    if math.floor(i * 0.1) == B:
        print_flag = True
        print(int(i))
        break
    
if print_flag == False:
    print(-1)
Buggy code:
import math
a = list(map(int, input().split()))
ans = [max([a[0] / 0.08, a[1] / 0.1]),
       min([(a[0] + 1) / 0.08, (a[1] + 1) / 0.1])]
if ((a[1] + 1) / 0.1 >= (a[1] + 1) / 0.1) or (a[1] / 0.1 >= (a[0] + 1) / 0.08):
    print(-1)
else:
    if math.ceil(ans[0]) > ans[1]:
        print(-1)
    else:
        print(math.ceil(ans[0]))


Fixed code:
import math
a = list(map(int, input().split()))
ans = [max([a[0] / 0.08, a[1] / 0.1]),
       min([(a[0] + 1) / 0.08, (a[1] + 1) / 0.1])]
if ((a[0]) / 0.08 >= (a[1] + 1) / 0.1) or (a[1] / 0.1 >= (a[0] + 1) / 0.08):
    print(-1)
else:
    if math.ceil(ans[0]) > ans[1]:
        print(-1)
    else:
        print(math.ceil(ans[0]))
Buggy code:
import math

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

start_plice = math.ceil(A / 0.08) if math.ceil(A / 0.08) < math.ceil(B / 0.1) else math.ceil(B / 0.1)

while True:
  if math.floor(start_plice * 0.08) > A:
    print(-1)
    break
  
  if math.floor(start_plice * 0.1) >= B:
    print(start_plice)
    break
  
  start_plice += 1

Fixed code:
import math

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

if math.ceil(A / 0.08) < math.ceil(B / 0.1):
  start_plice = math.ceil(A / 0.08)
  
  while True:
    if math.floor(start_plice * 0.08) > A:
      print(-1)
      break

    if math.floor(start_plice * 0.1) >= B:
      print(start_plice)
      break

    start_plice += 1
    
else:
  start_plice = math.ceil(B / 0.1)
  
  while True:
    if math.floor(start_plice * 0.1) > B:
      print(-1)
      break

    if math.floor(start_plice * 0.08) >= A:
      print(start_plice)
      break

    start_plice += 1
Buggy code:
import math

A, B = map(int, input().split())
big = math.floor(max(A, B) / 0.08)
sma = math.floor(min(A, B) / 0.1)
num_list = [int(i) for i in range(sma, big + 1)]

for i in num_list:
    if i * 0.08 == A and i * 0.1 == B:
        print(i)
        break
else:
    print(-1)

Fixed code:
import math

A, B = map(int, input().split())
big = math.floor(max(A, B) / 0.08)
sma = math.floor(min(A, B) / 0.1)
num_list = [int(i) for i in range(sma - 1, big + 2)]

for i in num_list:
    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 = (int(x) for x in input().split())
minA = math.ceil(A/0.08)
minB = math.ceil(B/0.1)
if minA >= minB:
  if minB*0.08 >= A:
    print(minA)
  else:
    print(-1)
else:
  if minA*0.1>= B:
    print(minB)
  else:
    print(-1)
  

Fixed code:
import math
A,B = (int(x) for x in input().split())
minA = math.ceil(A/0.08)
minB = math.ceil(B/0.1)
if minA > minB:
  if math.floor(minA*0.08) == A and math.floor(minA*0.1) == B:
    print(minA)
  else:
    print(-1)
else:
  if math.floor(minB*0.08) == A and math.floor(minB*0.1) == B:
    print(minB)
  else:
    print(-1)
Buggy code:
x,y=input(),input()
import math
x1=math.ceil(x*12.5)
x2=math.ceil((x+1)*12.5)-1
y1=math.ceil(y*10)
y2=math.ceil((y+1)*10)-1
if x1>y2 or y1>x2:
	print -1
else:
	print  int(max(x1,y1))

Fixed code:
x,y=map(int, input().split())
import math
x1=math.ceil(x*12.5)
x2=math.ceil((x+1)*12.5)-1
y1=math.ceil(y*10)
y2=math.ceil((y+1)*10)-1
if x1>y2 or y1>x2:
	print (-1)
else:
	print (int(max(x1,y1)))
Buggy code:
a,b = [int(x) for x in input().split()]
res = -1
for i in range(20000):
  if i * 8 // 100 == a and i * 10 // 100:
    res = i
    break
print(res)

Fixed code:
a,b = [int(x) for x in input().split()]
res = -1
for i in range(20000):
  if i * 8 // 100 == a and i * 10 // 100 == b:
    res = i
    break
print(res)
Buggy code:
from math import floor
a, b = map(int, input().split())
ans = -1
for i in range(10101):
  if floor(i*0.08) = a and floor(i*0.1) = b:
    ans = i
    break
print(ans)

Fixed code:
from math import floor
a, b = map(int, input().split())
ans = -1
for i in range(10101):
  if floor(i*0.08) == a and floor(i*0.1) == b:
    ans = i
    break
print(ans)
Buggy code:
A,B = map(int,input().split())
mina= 100
minb=100
a = set()
b = set()
C = A/0.08
D= B/0.08
E = (A+1)/0.08
F= (B+1)/0.08
if C.is_integer() ==False:
  C= C//0.08 +1

if D.is_integer() ==False:
  D= D//0.08

if E.is_integer() ==False:
  E= E//0.08 +1

if F.is_integer() ==False:
  F= F//0.08

for i in range(C,D):
  a.add(i)

for i in range(E,F):
  b.add(i)
c = a&b
d = list(c)
d.sort()
if d[0] == True:
  print(d[0])
else:
  print(-1)




Fixed code:
A,B = map(int,input().split())
mina= 100
minb=100
a = set()
b = set()
C = A/0.08
D= B/0.1
E=(A+1)/0.08
F=(B+1)/0.1 
if C.is_integer() ==False:
  C= A//0.08 +1
if D.is_integer() ==False:
  D= B//0.1 +1

if E.is_integer() ==False:
  E= (A+1)//0.08 

if F.is_integer() ==False:
  F= (B+1)//0.1

C=int(C)
D=int(D)
E=int(E)
F=int(F)
for i in range(C,E):
  a.add(i)
for i in range(D,F):
  b.add(i)
c = a&b
d = list(c)
d.sort()
if len(d) ==0:
  print(-1)
else:
  print(d[0])
Buggy code:
from math import ceil, floor

a, b = [int(c) for c in input()]
A = ceil(a / 0.08)
B = ceil(b/ 0.1)
 
if (A < B):
  if (floor(B * 0.08) == a):
    print(B)
  else:
    print(-1)
elif (B < A):
  if (floor(A*0.1) == b):
    print(A)
  else:
    print(-1)
else:
	print(-1);


Fixed code:
from math import ceil, floor
 
a, b = [int(c) for c in input().split(" ")]
A = ceil(a / 0.08)
B = ceil(b/ 0.1)
 
if (A < B):
  if (floor(B * 0.08) == a):
    print(B)
  else:
    print(-1)
elif (B < A):
  if (floor(A*0.1) == b):
    print(A)
  else:
    print(-1)
else:
  print(A);
Buggy code:
import math

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

c = math.ceil
min8, max8 = c(a*12.5), c((a+1)*12.5)
min10, max10 = c(b*10), c((b+1)*10)

l8, l10 = list(range(min8, max8)), list(range(min10, max10))
s8, s10 = set(l8), set(l10)

ss = s8 & s10
print(min8, max8, min10, max10)
print(min(ss) if len(ss) >0 else -1)
print(238*0.08)

Fixed code:
import math

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

c = math.ceil
min8, max8 = c(a*12.5), c((a+1)*12.5)
min10, max10 = c(b*10), c((b+1)*10)

l8, l10 = list(range(min8, max8)), list(range(min10, max10))
s8, s10 = set(l8), set(l10)

ss = s8 & s10
#print(min8, max8, min10, max10)
print(min(ss) if len(ss) >0 else -1)
#print(238*0.08)