qyliang/CodeNanoFix huggingface dataset:
Buggy code:
class Pizza:
  def __init__(self, price, count = 0):
    self.price = price
    self.count = count
    
  def count_pay(self):
  	return self.price * self.count
  
  def add_count(self,n):
  	self.count += n
    
A, B, C, X, Y = map(int, input().split())
P_A = Pizza(A,X)
P_B = Pizza(B,Y)
P_AB = Pizza(C)

i = 0
pay_list = []
while i < max(X, Y):
  pay = P_A.count_pay() + P_B.count_pay() + P_AB.count_pay()
  pay_list.append(pay)
  P_A.add_count(-1)
  P_B.add_count(-1)
  P_AB.add_count(2)
  i += 1

print(min(pay_list))

Fixed code:
class Pizza:
  def __init__(self, price, count = 0):
    self.price = price
    self.count = count
    
  def count_pay(self):
  	return self.price * self.count
  
  def add_count(self,n):
    self.count += n
    if self.count <= 0:
      self.count = 0
      
A, B, C, X, Y = map(int, input().split())
P_A = Pizza(A,X)
P_B = Pizza(B,Y)
P_AB = Pizza(C)

i = 0
pay_list = []
while i <= max(X, Y):
  pay = P_A.count_pay() + P_B.count_pay() + P_AB.count_pay()
  pay_list.append(pay)
  P_A.add_count(-1)
  P_B.add_count(-1)
  P_AB.add_count(2)
  i += 1

print(min(pay_list))
Buggy code:
cost_a,cost_b,cost_ab,num_a,num_b = map(int,input().split())
if num_a > num_b:
  num_ab = num_b * 2
  need_a = num_a - (num_ab // 2)
  if need_a < 0:
    need_a = -need_a
  cost1 = need_a * cost_a + num_ab * cost_ab
  
  num_ab = num_a * 2
  need_b = num_b - (num_ab // 2)
  cost3 = need_b * cost_b + num_ab * cost_ab
  
elif num_a < num_b:
  num_ab = num_a * 2
  need_b = num_b - (num_ab // 2)
  if need_b < 0:
    need_b = -need_b
  cost1 = need_b * cost_b + num_ab * cost_ab

  num_ab = num_b * 2
  need_a = num_b - (num_ab // 2)
  cost3 = need_a * cost_a + num_ab * cost_ab
else:
  num_ab = num_b * 2  
  cost1 = num_ab * cost_ab
cost2 = cost_a * num_a + cost_b * num_b
ans = min(cost1,cost2,cost3)
print(ans)



Fixed code:
cost_a,cost_b,cost_ab,num_a,num_b = map(int,input().split())
if num_a > num_b:
  num_ab = num_b * 2
  need_a = num_a - (num_ab // 2)
  cost1 = need_a * cost_a + num_ab * cost_ab
  
  num_ab = num_a * 2
  cost3 = num_ab * cost_ab
  cost1 = min(cost1,cost3)
elif num_a < num_b:
  num_ab = num_a * 2
  need_b = num_b - (num_ab // 2)
  cost1 = need_b * cost_b + num_ab * cost_ab

  num_ab = num_b * 2
  cost3 = num_ab * cost_ab
  cost1 = min(cost1,cost3)
else:
  num_ab = num_b * 2  
  cost1 = num_ab * cost_ab

cost2 = cost_a * num_a + cost_b * num_b
ans = min(cost1,cost2)
print(ans)
Buggy code:
def resolve():
    import sys
    input = sys.stdin.readline    
    a,b,c,x,y=map(int,input().split())
    z=min(x,y)
    ans=min(a*x+b*y,a*(x-z)+b*(y-z)+c*z*2)
    print(ans)

if __name__ == '__main__':
    resolve()

Fixed code:
def resolve():
    import sys
    input = sys.stdin.readline    
    a,b,c,x,y=map(int,input().split())
    z=min(x,y)
    ans=min(a*x+b*y,a*(x-z)+b*(y-z)+c*z*2,max(x,y)*2*c)
    print(ans)

if __name__ == '__main__':
    resolve()
Buggy code:
A, B, C, X, Y = map(int, input().split())

if A+B<=C*2:
    print(X*A+Y*B)
elif A<=C*2 and B<=C*2:
    if X>=Y:
        print(Y*C*2+(X-Y)*A)
    else:
        print(X*C*2+(Y-X)*B)
elif A>=C*2:
    if X>=Y:
        print(C*2*X)
    else:
        print(C*2*X+(Y-X)*B)
else:
    if X>=Y:
        print((X-Y)*A+C*2*Y)
    else:
        print(C*2*Y)

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

if A+B<=C*2:
    print(X*A+Y*B)
elif A<=C*2 and B<=C*2:
    if X>=Y:
        print(Y*C*2+(X-Y)*A)
    else:
        print(X*C*2+(Y-X)*B)
elif A>=C*2 and B>=C*2:
    print(max(X, Y)*C*2)
elif A>=C*2:
    if X>=Y:
        print(C*2*X)
    else:
        print(C*2*X+(Y-X)*B)
else:
    if X>=Y:
        print((X-Y)*A+C*2*Y)
    else:
        print(C*2*Y)
Buggy code:
A, B, C, X, Y = map(int, open(0).read().split())
ans = 0
res = 0
if A + B > C * 2:
    ans += C * min(X, Y) * 2
    res = X - Y
else:
    ans += A * X + B * Y
    
if res > 0:
    ans += min(C * res, A * res)
elif res < 0:
    ans += min(B * res, A * res)
    
print(ans)

Fixed code:
A, B, C, X, Y = map(int, open(0).read().split())
ans = 0
res = 0
if A + B > C * 2:
    ans += C * min(X, Y) * 2
    res = X - Y
else:
    ans += A * X + B * Y
    
if res > 0:
    ans += min(A * res, C * res * 2)
elif res < 0:
    ans += min(B * abs(res), C * abs(res) * 2)
    
print(ans)
Buggy code:
A, B, C, X, Y = map(int, input().split())
if A+B <= C*2:
    print(A*X+B*Y)
if A+B > C*2:
    if X>Y:
        if A*(X-Y) >= C*(X-Y)*2:
            print(C*2*X)
        else:
            print(C*2*Y + A*(X-Y))
    else:
        if B*(X-Y) >= C*(X-Y)*2:
            print(C*2*X)
        else:
            print(C*2*Y + B*(X-Y))

Fixed code:
A, B, C, X, Y = map(int, input().split())
if A+B <= C*2:
    print(A*X+B*Y)
if A+B > C*2:
    if X>Y:
        if A*(X-Y) > C*(X-Y)*2:
            print(C*2*X)
        else:
            print(C*2*Y + A*(X-Y))
    else:
        if B*(Y-X) > C*(Y-X)*2:
            print(C*2*Y)
        else:
            print(C*2*X + B*(Y-X))
Buggy code:
a,b,c,x,y=map(int,input().split())
ans=100000
for i in range(1,100001):
    tmp=i*2*c+max(0,x-i)*a+max(0,y-i)*b
    ans=min(ans,tmp)
print(ans)

Fixed code:
a,b,c,x,y=map(int,input().split())
ans=1000000000000000000000000
for i in range(100001):
    tmp=i*2*c+max(0,x-i)*a+max(0,y-i)*b
    ans=min(ans,tmp)
print(ans)
Buggy code:
a,b,c,x,y = map(int,input().split())
ans=a*x+b*y
if x>y:
    e = c*2*y
    f = a*(x-y)
    ans=min(ans,e+y)
    g= 2*c*x
    ans=min(ans,g)
else:
    e = c*2*x
    f = b*(y-x)
    ans = min(ans,e+f)
    g = 2*c*x
    ans = min(ans,g)

print(ans)
    

Fixed code:
a,b,c,x,y = map(int,input().split())
ans=a*x+b*y
if x>y:
    e = c*2*y
    f = a*(x-y)
    ans=min(ans,e+f)
    g= 2*c*x
    ans=min(ans,g)
else:
    e = c*2*x
    f = b*(y-x)
    ans = min(ans,e+f)
    g = 2*c*y
    ans = min(ans,g)

print(ans)
Buggy code:
a, b, c, x, y = [int(i) for i in input().split()]
print((2 * c * min(x, y) + min(a * (x - y), 2 * c * (x - y)) if x > y else min(b * (y - x), 2 * c * (y - x))) if a + b > c * 2 else a * x + b * y)

Fixed code:
a, b, c, x, y = [int(i) for i in input().split()]
print((2 * c * min(x, y) + min(a * (x - y), 2 * c * (x - y)) if x > y else 2 * c * min(x, y) + min(b * (y - x), 2 * c * (y - x))) if a + b > c * 2 else a * x + b * y)
Buggy code:
def main():
    A, B, C, X, Y = map(int, input().split())

    if A + B <= 2 * C:
        print(A * X + B * Y)
    else:
        if X <= Y:
            print(min((Y - X) * B + C * 2 * X, 2 * C * Y))
        else:
            print(min((X - Y) * B + C * 2 * Y, 2 * C * X))



main()

Fixed code:
def main():
    A, B, C, X, Y = map(int, input().split())

    if X <= Y:
        print(min((Y - X) * B + C * 2 * X, 2 * C * Y, A * X + B * Y))
    else:
        print(min((X - Y) * A + C * 2 * Y, 2 * C * X, A * X + B * Y))



main()
Buggy code:
a,b,c,x,y=map(int,input().split())
if a+b>2*c and x>y:
    if a<2*c:
        print(2*c*y+a*(x-y))
    else:
        print(2*c*x)
if a+b>2*c and x<y:
    if b<2*c:
        print(2*c*x+b*(y-x))
    else:
        print(2*c*y)
else:
    print(a*x+b*y)

Fixed code:
a,b,c,x,y=map(int,input().split())
if a+b>2*c and x>=y:
    if a<2*c:
        print(2*c*y+a*(x-y))
    else:
        print(2*c*x)
elif a+b>2*c and x<y:
    if b<2*c:
        print(2*c*x+b*(y-x))
    else:
        print(2*c*y)
else:
    print(a*x+b*y)
Buggy code:
A, B, C, X, Y = map(int, input().split())
C = min(C, A+B)

ans = 0
ans += C*min(X, Y)
if X > Y:
  ans += min(C, A) * abs(X-Y)
else:
  ans + min(C, B) * abs(X-Y)
print(ans)

Fixed code:
A, B, C, X, Y = map(int, input().split())
C = min(2*C, A+B)

ans = 0
ans += C*min(X, Y)
if X > Y:
  ans += min(C, A) * abs(X-Y)
else:
  ans += min(C, B) * abs(X-Y)
print(ans)
Buggy code:
a, b, c, x, y = map(int, input().split())

ans = 10**5
for i in range(10**5):
    tmp = 2*c*i + max((x-i), 0)*a + max((y-i), 0)*b
    if x < i and y < i:
            break
    ans = min(ans, tmp)
print(ans)

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

ans = 10**9
for i in range(10**5+1):
    tmp = 2*c*i + max((x-i), 0)*a + max((y-i), 0)*b
    if x < i and y < i:
            break
    ans = min(ans, tmp)
print(ans)
Buggy code:
A,B,C,X,Y=map(int,input().split())
if A+B<=2*C:
  print(X*A+Y*B)
else:
  if X<=Y:
    print(2*X*C+(Y-X)*B)
  else:
    print((X-Y)*A+2*Y*C)

Fixed code:
A,B,C,X,Y=map(int,input().split())
if A+B<=2*C:
  print(X*A+Y*B)
else:
  if X<=Y:
    print(min(2*Y*C,2*X*C+(Y-X)*B))
  else:
    print(min(2*X*C,(X-Y)*A+2*Y*C))
Buggy code:
A, B, C, X, Y = list(map(int, input().split()))
ans = 10**20
for nc in range(0, max(X,Y)*2+1, 2):
    na = X-nc//2
    nb = Y-nc//2
    ans = min(ans, na*A+nb*B+nc*C)
print(ans)

Fixed code:
A, B, C, X, Y = list(map(int, input().split()))
ans = 10**20
for nc in range(0, max(X,Y)*2+1, 2):
    na = max(X-nc//2, 0)
    nb = max(Y-nc//2, 0)
    ans = min(ans, na*A+nb*B+nc*C)
print(ans)
Buggy code:
A, B, C, X, Y = map(int, input().spllit())

ans = float("inf")
for c in range(0, max(X, Y)*2+1, 2):
    ans = min(A*max(X-c//2, 0) + B*max(Y-c//2, 0) + C*c, ans) 

print(ans)

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

ans = float("inf")
for c in range(0, max(X, Y)*2+1, 2):
    ans = min(A*max(X-c//2, 0) + B*max(Y-c//2, 0) + C*c, ans) 

print(ans)
Buggy code:
a,b,c,x,y=map(int,input().split())
normal=a*x+b*y
half=c*2*min(x,y)+max(a*(x-y),b*(y-x))
print(min(half,normal))

Fixed code:
a,b,c,x,y=map(int,input().split())
normal=a*x+b*y
half=c*2*min(x,y)+max(a*(x-y),b*(y-x))
allhalf=c*2*max(x,y)
print(min(half,normal,allhalf))
Buggy code:
A,B,C,X,Y = map(int,input().split(' '))
MIN = float('inf')

for i in range(10^5):
  sum = C*2*i + max(0,X-i)*A + max(0,Y-i)*B
  MIN = min(MIN,sum)
print(MIN)
  
    

Fixed code:
A,B,C,X,Y = map(int,input().split(' '))
MIN = float('inf')

for i in range(0,2*max(X,Y)):
  sum = C*2*i + max(0,X-i)*A + max(0,Y-i)*B
  MIN = min(MIN,sum)
print(MIN)
Buggy code:
A,B,C,X,Y = map(int, input().split())

List=[(A*3)+(B*2)]

AB=0
AP=0
BP=0
ANS=0
while 1:
    if AP>=X and BP>=Y:
        #print(ANS)
        List.append(ANS)
        break
    if AB==2:
        AP+=1
        BP+=1
        AB=0
    else:
        ANS+=C
        AB+=1

AB=0
AP=X
BP=Y
ANS=0
while 1:
    if AP==0:
        ANS+=(BP*B)
        List.append(ANS)
        break
    elif BP==0:
        ANS+=(AP*A)
        List.append(ANS)
        break
    else:
        if AB==2:
            AP-=1
            BP-=1
            AB=0
        else:
            ANS+=C
            AB+=1
        
print(min(List))


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

List=[(A*X)+(B*Y)]

AB=0
AP=0
BP=0
ANS=0
while 1:
    if AP>=X and BP>=Y:
        #print(ANS)
        List.append(ANS)
        break
    if AB==2:
        AP+=1
        BP+=1
        AB=0
    else:
        ANS+=C
        AB+=1

AB=0
AP=X
BP=Y
ANS=0
while 1:
    if AP==0:
        ANS+=(BP*B)
        List.append(ANS)
        break
    elif BP==0:
        ANS+=(AP*A)
        List.append(ANS)
        break
    else:
        if AB==2:
            AP-=1
            BP-=1
            AB=0
        else:
            ANS+=C
            AB+=1
            
#print(List)
print(min(List))
Buggy code:
import math
import copy
from copy import deepcopy
import sys
import fractions
# import numpy as np
from functools import reduce
# import statistics
import decimal
import heapq
import collections
import itertools
from operator import mul

sys.setrecursionlimit(100001)


# input = sys.stdin.readline
# sys.setrecursionlimit(10**6)

# ===FUNCTION===

def getInputInt():
    inputNum = int(input())
    return inputNum


def getInputListInt():
    outputData = []
    inputData = input().split()
    outputData = [int(n) for n in inputData]

    return outputData


def getSomeInputInt(n):
    outputDataList = []
    for i in range(n):
        inputData = int(input())
        outputDataList.append(inputData)

    return outputDataList


def getSomeInputListInt(n):
    inputDataList = []
    outputDataList = []
    for i in range(n):
        inputData = input().split()
        inputDataList = [int(n) for n in inputData]
        outputDataList.append(inputDataList)

    return outputDataList


# ===CODE===

a, b, c, x, y = map(int, input().split())

itr = max(x, y)*2+1

ans = sys.maxsize
for i in range(itr):
    tmpa = a*(x-i//2)
    tmpb = b*(y-i//2)
    tmpc = c*i
    tmp_cost = tmpa+tmpb+tmpc
    ans = min(ans, tmp_cost)

print(ans)





Fixed code:
import math
import copy
from copy import deepcopy
import sys
import fractions
# import numpy as np
from functools import reduce
# import statistics
import decimal
import heapq
import collections
import itertools
from operator import mul

sys.setrecursionlimit(100001)


# input = sys.stdin.readline
# sys.setrecursionlimit(10**6)

# ===FUNCTION===

def getInputInt():
    inputNum = int(input())
    return inputNum


def getInputListInt():
    outputData = []
    inputData = input().split()
    outputData = [int(n) for n in inputData]

    return outputData


def getSomeInputInt(n):
    outputDataList = []
    for i in range(n):
        inputData = int(input())
        outputDataList.append(inputData)

    return outputDataList


def getSomeInputListInt(n):
    inputDataList = []
    outputDataList = []
    for i in range(n):
        inputData = input().split()
        inputDataList = [int(n) for n in inputData]
        outputDataList.append(inputDataList)

    return outputDataList


# ===CODE===

a, b, c, x, y = map(int, input().split())

itr = max(x, y)*2+1

ans = sys.maxsize
for i in range(itr):
    tmpa = max(0, a*(x-i//2))
    tmpb = max(0, b*(y-i//2))
    tmpc = c*i
    tmp_cost = tmpa+tmpb+tmpc
    ans = min(ans, tmp_cost)

print(ans)
Buggy code:
ab,c,x,y=map(int,input().split())
ans=10**12
for i in range(0,(max(x,y)*2)+1,2):
    xr=max(x-i//2,0)
    yr=max(0,y-i//2)

    if ans>(i*c)+(xr*a)+(yr*b):
        ans=(i*c)+(xr*a)+(yr*B)

print(ans)

Fixed code:
a,b,c,x,y = map(int, input().split())
ans = 10**12
for i in range(0, (max(x,y)*2)+1, 2):
    xr = max(x-(i//2), 0)
    yr = max(0, y-(i//2))

    if ans > (i*c)+(xr*a)+(yr*b):
        ans = (i*c)+(xr*a)+(yr*b)

print(ans)
Buggy code:
a,b,c,x,y=map(int,input().split())
ans=float("inf")
for i in range(2*max(x,y)):
  p=i*c
  p+=max(x-i//2,0)*a
  p+=max(y-i//2,0)*b
  ans=min(p,ans)
print(ans)

Fixed code:
a,b,c,x,y=map(int,input().split())
ans=float("inf")
for i in range(2*(max(x,y)+1)):
  p=i*c
  p+=max(x-i//2,0)*a
  p+=max(y-i//2,0)*b
  ans=min(p,ans)
print(ans)
Buggy code:
A, B, C, X, Y = map(int, input().split())
ans = 0

if A + B <= C:
    ans = A*X + B*Y
else:
    ans += 2*C*min(X, Y)

    if X >= Y:
        ans + = A*(X-Y)
    else:
        ans + = B*(X-Y)

print (ans)


Fixed code:
A, B, C, X, Y = map(int, input().split())
ans = 0

if A + B <= 2*C:
    ans = A*X + B*Y
else:
    ans += 2*C*min(X, Y)

    if X >= Y:
        ans += min(A, 2*C) * (X-Y)
    else:
        ans += min(B, 2*C) * (Y-X)

print (ans)
Buggy code:
A, B, C, X, Y = map(int, input().split())
minim = 1e10
for i in range(max(X, Y)):
    bill = i*2*C + A*max(0, X-i) + B*max(0, Y-i)
    minim = min(minim, bill)
print(minim)

Fixed code:
A, B, C, X, Y = map(int, input().split())
minim = 1e10
for i in range(max(X, Y)+1):
    bill = i*2*C + A*max(0, X-i) + B*max(0, Y-i)
    minim = min(minim, bill)
print(minim)
Buggy code:
A,B,C,X,Y = map(int,input().split())

ans = 10**18
for c in range(10**5+1):
  a = X-c
  b = Y-c
  cost = C*c*2
  cost += max(a,0)*A
  cost += max(b,0)*B
  ans = min(ans,cost)
print(answer)

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

answer = 10**18
for c in range(10**5+1):
  a = X-c
  b = Y-c
  cost = C*c*2
  cost += max(a,0)*A
  cost += max(b,0)*B
  answer = min(answer,cost)
print(answer)
Buggy code:
a,b,c,x,y = map(int,input().split())
A_B = a*x+b*y
AB = 2*c*max(x,y)
A_AB = 10**11111111
AB_B = 10**11111111
if x-y > 0:
  A_AB = a*(x-y)+2*c*y
if y-x > 0:
  AB_B = 2*c*x+b*(y-x)

ans = min(A_B,A_AB,AB_B,AB)
print(ans)


Fixed code:
a,b,c,x,y = map(int,input().split())
A_B = a*x+b*y
AB = 2*c*max(x,y)
A_AB = 10**11
AB_B = 10**11
if x-y > 0:
  A_AB = a*(x-y)+2*c*y
if y-x > 0:
  AB_B = 2*c*x+b*(y-x)

ans = min(A_B,A_AB,AB_B,AB)
print(ans)
Buggy code:
a,b,c,x,y=map(int,input().split())
if 2*c>=a+b:
	print(a*x+b*y)
elif x<y:
	print(c*2*x+b*(y-x))
else:
	print(c*2*y+a*(x-y))

Fixed code:
a,b,c,x,y=map(int,input().split())
if 2*c>=a+b:
	print(a*x+b*y)
elif x<y:
	print(min(c*2*x+b*(y-x),c*2*y))
else:
	print(min(c*2*y+a*(x-y),c*2*x))
Buggy code:
A, B, C, X, Y=map(int, input().split())
if (A+B)>2*c:
  ans=2*C*min(X, Y)
  if X>Y:
    if A>2*C:
      ans+=2*C*(X-Y)
    else:
      ans+=A*(X-Y)
  else:
    if B>2*C:
      ans+=2*C*(Y-X)
    else:
      ans+=B*(Y-X)
else:
  ans=A*X+B*Y

print(ans)

Fixed code:
A, B, C, X, Y=map(int, input().split())
if (A+B)>2*C:
  ans=2*C*min(X, Y)
  if X>Y:
    if A>2*C:
      ans+=2*C*(X-Y)
    else:
      ans+=A*(X-Y)
  else:
    if B>2*C:
      ans+=2*C*(Y-X)
    else:
      ans+=B*(Y-X)
else:
  ans=A*X+B*Y

print(ans)
Buggy code:
a,b,c,x,y=map(int,input().split())
ans=[]
ans.append(a*x+b*y)
ans.append(c*x+b*max(0,y-x))
ans.append(c*y+a*max(0,x-y))
print(min(ans))

Fixed code:
a,b,c,x,y=map(int,input().split())
ans=[]
ans.append(a*x+b*y)
ans.append(c*2*x+b*max(0,y-x))
ans.append(c*2*y+a*max(0,x-y))
print(min(ans))
Buggy code:
A, B, C, X, Y = map(int, input().split())
ans = 2*(5000*10**5)
for Z in range(10**5+1):
    total = A*abs(X-Z)+B*abs(Y-Z)+2*C*Z
    ans = min(total,ans)
print(ans)

Fixed code:
A, B, C, X, Y = map(int, input().split())
ans = 2*(5000*10**5)
for Z in range(10**5+1):
    total = A*max(X-Z, 0)+B*max(Y-Z, 0)+2*C*Z
    ans = min(total,ans)
print(ans)
Buggy code:
A,B,C,X,Y = map(int,input().split())
if A+B <　2*C:print(A*X+B*Y)
else:
    if X>Y:print(min(2*Y*C+(X-Y)*A, 2*X*C))
    else:print(min(2*X*C+(Y-X)*B, 2*Y*C))

Fixed code:
A,B,C,X,Y=map(int,input().split())
if A+B<2*C:print(A*X+B*Y)
else:
    if X>Y:print(min(2*Y*C+(X-Y)*A,2*X*C))
    else:print(min(2*X*C+(Y-X)*B,2*Y*C))
Buggy code:
a,b,c,x,y = map(int,input().split())
y=min(a+b,2*c)
s=min(x,y)
if x>y:
    n=x-y
    k=a
else:
    n=y-x
    k=b
print(y*s+n*min(k,2*c))

Fixed code:
a,b,c,x,y = map(int,input().split())
ya=min(a+b,2*c)
s=min(x,y)
if x>y:
    n=x-y
    k=a
else:
    n=y-x
    k=b
print(ya*s+n*min(k,2*c))
Buggy code:
#!/usr/bin/env python
# coding: utf-8
"""
purpose
"""


def main() -> None:
    """
    main function
    """
    (A, B, C, X, Y) = map(int, input().split())

    if 2 * C <= A + B:
        ans = C * min(X, Y) * 2 + max((X-Y)*A, (Y-X)*B)

    else:
        ans = A * X + B * Y

    print(ans)


if __name__ == "__main__":
    main()


Fixed code:
#!/usr/bin/env python
# coding: utf-8
"""
purpose
"""


def main() -> None:
    """
    main function
    """
    (A, B, C, X, Y) = map(int, input().split())

    if 2 * C <= A + B:
        ans = C * min(X, Y) * 2 + min(max((X-Y)*A, (Y-X)*B), max(X-Y, Y-X)*C*2)
    else:
        ans = A * X + B * Y

    print(ans)


if __name__ == "__main__":
    main()
Buggy code:
A,B,c,a,b=map(int,input().split());print(min([c*max(a,b)*2,A*a+B*b,[A,B][a<b]*(b-a)+c*min(a,b)*2]))

Fixed code:
A,B,c,a,b=map(int,input().split());print(min(c*max(a,b)*2,A*a+B*b,[A,B][a<b]*abs(a-b)+c*min(a,b)*2))
Buggy code:
a, b, x = map(int, input().split())
if x <= b:
  print('YES')
else:
  print('NO')

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

if a <= x:
    if (a+b) >= x:
        print("YES")
    else:
        print("NO")
else:
    print("NO")
Buggy code:
a,b,c=map(int, input().split())
if a+b>=c:
  print('YES')
else:
  print('NO')

Fixed code:
a, b, c = map(int, input().split())
if a <= c <= a + b:
    print("YES")
else:
    print("NO")
Buggy code:
a, b, x = map(int, input().split())

if a + b >= x:
    print('YES')
else:
    print('NO')

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

if a>x:
    print("NO")
elif a+b < x:
    print("NO")
else:
    print("YES")
Buggy code:
a, b, x = map(int,input().split())

if a+b > b:
  print("YES")
else;
  print("NO")


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

if a+b >= x:
  if a > x:
    print("NO")
  else:
    print("YES")
else:
  print("NO")
Buggy code:
a,b,x = map(int,input().split())
if a<=x:
    print('YES')
else:
    print('NO')

Fixed code:
a, b, x = map(int, input().split())
if (a <= x) and (x <= a+b):
    print('YES')
else:
    print('NO')
Buggy code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

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

if ((a + b >= c and a < c) or a == c):
  print("YES")
else:
  print ("No")


Fixed code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

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

if ((a + b >= c and a < c) or a == c):
  print("YES")
else:
  print ("NO")
Buggy code:
A,B,X = map(int, input().split())
if A < X:
    print("NO")
elif B > X - A:
    print("YES")
else:
    print("NO")



Fixed code:
A, B, X = map(int, input().split())
if X < A:
    print("NO")
elif X - A <= B:
    print("YES")
else:
    print("NO")
Buggy code:
a, b, x = map(int, input().split())
if a+b >= x:
    print('YES')
else:
    print('NO')


Fixed code:
a, b, x = map(int, input().split())
if a > x:
    print('NO')
else:
    if a+b >= x:
        print('YES')
    else:
        print('NO')
Buggy code:
a,b,x=map(int,input().split())
print("YES" if x<=a+b and b<=x else "NO")

Fixed code:
a,b,x=map(int,input().split())
print("YES" if x<=a+b and a<=x else "NO")
Buggy code:
A,B,X = map(int, input().split())

print('YES' if A =< X and A+B >= X else 'NO')


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

if X >= A and X <= A+B:print("YES")
else:print("NO")
Buggy code:
a,b,c=map(int,input().split())
print('YES' if a+b>=c else 'NO')

Fixed code:
a,b,c=map(int,input().split())
print("YES" if a <=c<= a+b else "NO")
Buggy code:
A, B, X = map(int,input().split())
if(A <= X and A+B => X):
  print('YES')
else:
  print('NO')

Fixed code:
A,B,X=map(int,input().split())
if A+B<X or A>X:
  print('NO')
else:
  print('YES')
Buggy code:
a,b,x=map(int,input().split())
if x-a<=b:
  print("YES")
else:
    print("NO")

Fixed code:
a, b, x = map(int, input().split())
 
if a <= x <= a + b:
    print("YES")
else:
    print("NO")
Buggy code:
A,B,X = map(int,input().split())
if A <= X:
  print("YES")
elif X <= A+B:
  print("YES")
else:
  print("NO")

Fixed code:
A, B, X = map(int, input().split())
if A<=X and X<=A+B:
	print("YES")
else :
	print("NO")
Buggy code:
a, b, x = map(int. input().split())
if a <= x and x <= a + b:
  print("YES")
else:
  print("NO")

Fixed code:
a,b,x=map(int,input().split())
if a<=x<=a+b:
 print("YES")
else:
 print("NO")
Buggy code:
from sys import stdin
import numpy as np
a,b,c= [int(x) for x in stdin.readline().rstrip().split()]

if c-a >= b:
    print("YES")
else:
    print("NO")

Fixed code:
from sys import stdin
import numpy as np
a,b,c= [int(x) for x in stdin.readline().rstrip().split()]

if c-a <= b and a <= c:
    print("YES")
else:
    print("NO")
Buggy code:
a,b,x=map(int,input().split())
if a>x:
  print('NO')
else:
  print('YES')

Fixed code:
a,b,x=map(int,input().split())
print("YES"if a+b>=x>=a else"NO")
Buggy code:
a, b, x = map(int, input().split())
if a < x:
    print("NO")
else:
    if (x - a)>b:
        print("NO")
    else:
        print("YES")

Fixed code:
a, b, x = map(int, input().split())
if a > x:
    print("NO")
else:
    if (x - a)>b:
        print("NO")
    else:
        print("YES")
Buggy code:
a,b,x=map(int,input().split())
if(a+b>x):print("YES")
if(a+b<=x):print("NO")

Fixed code:
a,b,x = map(int,input().split())
if a <= x <= (a+b):
	print('YES')
else:
	print('NO')
Buggy code:
a,b,x=list(map(int,input().split()))
if a+b >= x:
  print("YES")
else:
  print("NO")


Fixed code:
a,b,x=list(map(int,input().split()))
if a+b >= x and a <= x:
  print("YES")
else:
  print("NO")
Buggy code:
import sys


def input():
    return sys.stdin.readline()[:-1]

# N = int(input())
# A = [int(x) for x in input().split()]
# a, b, c = map(int, input().split())
# name1 = str(input())
# alph = {"A": 1, "B": 2, "C": 3, "D": 4, "E": 5}


a,b,c=map(int,input().split())
if b>=c:
    print("YES")
else:
    print("NO")

Fixed code:
import sys


def input():
    return sys.stdin.readline()[:-1]

# N = int(input())
# A = [int(x) for x in input().split()]
# a, b, c = map(int, input().split())
# name1 = str(input())
# alph = {"A": 1, "B": 2, "C": 3, "D": 4, "E": 5}


a,b,c=map(int,input().split())
if 0<= c-a <=b:
    print("YES")
else:
    print("NO")