qyliang/CodeNanoFix huggingface dataset:
Buggy code:
# -*- coding: <encoding name> -*-

d = int(input())
# print('Chrestmas' if d == 25 else 'Chrestmas Eve' if d == 24)
print('Chrestmas' + ' Eve' * (25 -d))

Fixed code:
# -*- coding: <encoding name> -*-

d = int(input())
# print('Chrestmas' if d == 25 else 'Chrestmas Eve' if d == 24)
print('Christmas' + ' Eve' * (25 -d))
Buggy code:
C = "Christmas"
E ="EVE"
D = input()
D = int(D)
a = 25 - D
q=""

while a > 0:
  q = q + E
  a = a - 1

print(C+q)

Fixed code:
C = "Christmas"
E =" Eve"
D = input()
D = int(D)
a = 25 - D
q=""
 
while a > 0:
  q = q + E
  a = a - 1
 
print(C+q)
Buggy code:
import functools
import math

import os

INF = float('inf')


def inp():
    return int(input())


def inpf():
    return float(input())


def inps():
    return input()


def inl():
    return list(map(int, input().split()))


def inlf():
    return list(map(float, input().split()))


def inls():
    return input().split()


def debug(fn):
    if not os.getenv('LOCAL'):
        return fn

    @functools.wraps(fn)
    def wrapper(*args, **kwargs):
        print('DEBUG: {}({}) -> '.format(
            fn.__name__,
            ', '.join(
                list(map(str, args)) +
                ['{}={}'.format(k, str(v)) for k, v in kwargs.items()]
            )
        ), end='')
        ret = fn(*args, **kwargs)
        print(ret)
        return ret

    return wrapper

d=inp()
print('Christmas' +' Eve' *( d -25))


Fixed code:
import functools
import math

import os

INF = float('inf')


def inp():
    return int(input())


def inpf():
    return float(input())


def inps():
    return input()


def inl():
    return list(map(int, input().split()))


def inlf():
    return list(map(float, input().split()))


def inls():
    return input().split()


def debug(fn):
    if not os.getenv('LOCAL'):
        return fn

    @functools.wraps(fn)
    def wrapper(*args, **kwargs):
        print('DEBUG: {}({}) -> '.format(
            fn.__name__,
            ', '.join(
                list(map(str, args)) +
                ['{}={}'.format(k, str(v)) for k, v in kwargs.items()]
            )
        ), end='')
        ret = fn(*args, **kwargs)
        print(ret)
        return ret

    return wrapper

d=inp()
print('Christmas' +(' Eve' *( 25-d)))
Buggy code:
d=int(input())
print("Christmas" + "Eve"*(25-d))

Fixed code:
d=int(input())
print("Christmas" + " Eve"*(25-d))
Buggy code:
D = int(input())

print('Christmas' + (D - 25) * ' Eve')

Fixed code:
D = int(input())

print('Christmas' + (25 - D) * ' Eve')
Buggy code:
d = int(input())
string = 'Christmas'
for i range(25 - d):
  string += ' Eve'
print(string)


Fixed code:
d = int(input())
string = 'Christmas'
for i in range(25 - d):
  string += ' Eve'
print(string)
Buggy code:
# -*- coding: utf-8 -*-

def solve():
    D = int(input())
    e = 25-D
    res = ' '.join(['Cristmas'] + ['Eve']*e)
    return res



if __name__ == '__main__':
    print(solve())

Fixed code:
# -*- coding: utf-8 -*-

def solve():
    D = int(input())
    e = 25-D
    res = ' '.join(['Christmas'] + ['Eve']*e)
    return res



if __name__ == '__main__':
    print(solve())
Buggy code:
a=int(input())
print(Christmas+"Eve"*(25-a))

Fixed code:
a=int(input())
print("Christmas"+" Eve"*(25-a))
Buggy code:
D = input()
print("Christmas" + "Eve" * (25 - D))

Fixed code:
D = 25 - int(input())
print("Christmas"+" Eve"*D)
Buggy code:
d = int(input())
sub =25 - d

print('Christmas', end=' ')

for i in range(sub):
    print('eve', end=' ')


Fixed code:
d = int(input())
sub = 25 - d

print('Christmas', end=' ')

for i in range(sub):
    print('Eve', end=' ')
Buggy code:
print('Christmas'+' Eve'*(25-int(input)))

Fixed code:
print("Christmas" + " Eve" * (25-int(input())))
Buggy code:
#!/usr/bin/env python3
d=int(input())
c = 'Christmas'
c+=' eve'*(25-d)
print(c)


Fixed code:
#!/usr/bin/env python3
d=int(input())
c = 'Christmas'
c+=' Eve'*(25-d)
print(c)
Buggy code:
x=int(input())-25
s="Christmas"+x*" Eve"
print(s)

Fixed code:
x=25-int(input())
print("Christmas"+x*" Eve")
Buggy code:
print("Christmas",end="")
for i in range(25-int(input())):
  print("Eve ",end="")

Fixed code:
print("Christmas",end="")
for i in range(25-int(input())):
  print(" Eve",end="")
Buggy code:
D = int(input())
print('Christmas'+'Eve'*(25 - D)

Fixed code:
D = int(input())
print('Christmas'+' Eve'*(25 - D))
Buggy code:
# -*- coding: utf-8 -*-
D = int(input())
print("Christmas"+"Eve"*(D-25).split())

Fixed code:
# -*- coding: utf-8 -*-
D = int(input())
print("Christmas " + "Eve "*(25 - D))
Buggy code:
d = int(input())
s = 'Christmas'
for i range(25-d):
  s = s+' Eve'
print(s)

Fixed code:
d = int(input())
s = 'Christmas'
for i in range(25-d):
  s = s+' Eve'
print(s)
Buggy code:
d=int(input())
print('Christmas'+'Eve'*(25-d))


Fixed code:
d = int(input())
print("Christmas" + " Eve" * (25 - d))
Buggy code:
D = int(input())
print("Christmas" + "Eve "*(25-D))

Fixed code:
D = int(input())
print("Christmas" + " Eve"*(25-D))
Buggy code:
print('Christmas' + *' Eve'(25-int(input())))

Fixed code:
print('Christmas' + ' Eve'*(25 - int(input())))
Buggy code:
n=int(input())
a=[int(input()) for i in range(n)]
b=sum(a)-max(a)/2
print(b)

Fixed code:
n=int(input())
a=[int(input()) for i in range(n)]
b=sum(a)-max(a)/2
print(int(b))
Buggy code:
n,*p=map(int,open(0).read().split())
print(sum(sorted(p)[:-1])+p[-1]//2)

Fixed code:
n,*p=map(int,open(0).read().split())
print(sum(sorted(p)[:-1])+sorted(p)[-1]//2)
Buggy code:
#!/usr/bin/python

def main():
    n = int(input())
    price_list = [int(input()) for i in range(n)]
    price_list.sort()
    price_list[-1] /=  2
    print(sum(price_list))

if __name__ == '__main__':
    main()

Fixed code:
#!/usr/bin/python

def main():
    n = int(input())
    price_list = [int(input()) for i in range(n)]
    price_list.sort()
    price_list[-1] //=  2

    print(sum(price_list))

if __name__ == '__main__':
    main()
Buggy code:
def resolve():
    P = list(int(input()) for _ in range(int(input())))
    print(sum(P)-max(P)//2)
print(resolve())

Fixed code:
def resolve():
    P = list(int(input()) for _ in range(int(input())))
    print(sum(P)-max(P)//2)
resolve()
Buggy code:
N = int(input())

input_list = []

for i in range(N):
  input_list.append(int(input)) 
  
input_list.sort()

input_list[-1] = int(input_list[-1] / 2)

ans = 0
for i in input_list:
  ans += i
  
print(ans)

Fixed code:
N = int(input())
 
input_list = []
 
for i in range(N):
  input_list.append(int(input())) 
  
input_list.sort()
 
input_list[-1] = int(input_list[-1] / 2)
 
ans = 0
for i in input_list:
  ans += i
  
print(ans)
Buggy code:
N = int(input())

S = 0
M = 0
for i in range(N):
  amount = int(input())
  M = max(amount, M)
  S += amount

S -= M//2
print(amount)
  

Fixed code:
N = int(input())

S = 0
M = 0
for i in range(N):
  amount = int(input())
  M = max(amount, M)
  S += amount

S -= M//2
print(S)
Buggy code:
n = int(input()) 
prices = [int(input()) for i in range(n)] 

max_price = 0
sum_price = 0
for price in prices:
    sum_price += price
    if price > max_price:
        max_price = price

sum_price -= max_price/2

return sum_price

Fixed code:
n = int(input()) 
prices = [int(input()) for i in range(n)] 

max_price = 0
sum_price = 0
for price in prices:
    sum_price += price
    if price > max_price:
        max_price = price

sum_price -= max_price/2

print(int(sum_price))
Buggy code:
N = int(input())
sum = 0
P = []
for i in range(N - 1):
    P.append(int(input()))
    sum += P[i]

print(sum - max(P) // 2)


Fixed code:
N = int(input())
sum = 0
P = []
for i in range(N):
    P.append(int(input()))
    sum += P[i]

print(sum - max(P) // 2)
Buggy code:
n=int(input())
a=[]
for i in range(n):
  a.append(i)
a.sort()
print(sum(a)-a[-1]//2)

Fixed code:
n=int(input())
a=[]
for i in range(n):
  a.append(int(input()))
a.sort()
print(sum(a)-a[-1]//2)
Buggy code:
N = int(input())
p = []
for i in range(N):
        p.append(int(input())
sum  = 0
max_value = max(p)
p.remove(max_value)

sum += max_value/2

for i in p:
        sum += i

print(sum)

Fixed code:
N = int(input())
p = []
for i in range(N):
        p.append(int(input()))
sum  = 0
max_value = max(p)
p.remove(max_value)

sum += max_value/2

for i in p:
        sum += i

print(int(sum))
Buggy code:
N = int(input())
num = N+1price = []
for i in range (1,num):
  price.append(int(input()))
else:
  exp = max(price)//2
  total = sum(price) - exp
  print(total)

Fixed code:
N = int(input())
num = N+1
price = []
for i in range (1,num):
  price.append(int(input()))
else:
  exp = max(price)//2
  total = sum(price) - exp
  print(total)
Buggy code:
N = int(input())
P = []
for i in range(N):
  P.append(int(input())
print(sum(P) - max(P) // 2)

Fixed code:
N = int(input())
P = []
for i in range(N):
  P.append(int(input()))
print(sum(P) - max(P) // 2)
Buggy code:
n = int(input())
p = list(range(n))

for i in range(n):
	p[i] = int(input())
	p[p.index(max(p))] //= 2
	ans = sum(p)
print(ans)

Fixed code:
n = int(input())
p = list(range(n))

for i in range(n):
	p[i] = int(input())
p[p.index(max(p))] //= 2
ans = sum(p)
print(ans)
Buggy code:
N = int(input())
max_item = 0
sum_item = 0
for _ in range(N):
  c = int(input())
  sum_item += c
  max_item = max(c, max_item)

sum_item -= max_item / 2

print(sum_item)

Fixed code:
N = int(input())
max_item = 0
sum_item = 0
for _ in range(N):
  c = int(input())
  sum_item += c
  max_item = max(c, max_item)

sum_item -= max_item // 2 
print(sum_item)
Buggy code:
n = int(input())
array = []
for i in range(n):
    a = int(input())
    array.append(a)

array.sort()
array[-1] = max(array) // 2
total = sum(array)
print(array)
print(total)


Fixed code:
n = int(input())
array = []
for i in range(n):
    a = int(input())
    array.append(a)

array.sort()
array[-1] = max(array) // 2
total = sum(array)

print(total)
Buggy code:
N=int(input())
cnt=0
ans=0
max=0
while cnt<N:
  cnt++
  p=int(input())
  ans += p
  if p>max:
    max=p
ans-=(max/2)
print(ans)

Fixed code:
N=int(input())
cnt=0
ans=0
max=0
while cnt<N:
  cnt+=1
  p=int(input())
  ans += p
  if p>max:
    max=p
ans-=int(max/2)
print(ans)
Buggy code:
import math
N = int(input())
p = []

for i in range(N):
    p.append(int(input()))

total_price = max(N) / 2 + sum(N) - max(N)

print(math.floor(total_price))

Fixed code:
import math
N = int(input())
p = []

for i in range(N):
    p.append(int(input()))

total_price = max(p) / 2 + sum(p) - max(p)

print(math.floor(total_price))
Buggy code:
lst = [int(input()) for _ in range(int(input()))]
print(sum(lst) - max(lst) / 2)

Fixed code:
lst = [int(input()) for _ in range(int(input()))]
print(sum(lst) - int(max(lst) / 2))
Buggy code:
N = int(input())
p = []

for i in range(N):
    p.append(int(input()))

total_price = max(N) / 2 + sum(N) - max(N)

print(total_price)

Fixed code:
N = int(input())
p = []
for i in range(N):
    p.append(int(input()))

print(sum(p)-int(max(p)/2))
Buggy code:
n = int(input())
p = [int(input()) for in range(n)]
print(sum(p) - max(p)//2)



Fixed code:
n = int(input())
p = [int(input()) for i in range(n)]
print(sum(p) - max(p)//2)
Buggy code:
input =int(input())
l = []
for x in range(input):
  l.append(int(input()))
  
ans = int(sum(l) -max(l)/2)
print(ans)


Fixed code:
N =int(input())
l = []
for x in range(N):
  l.append(int(input()))
  
ans = int(sum(l) -max(l)/2)
print(ans)
Buggy code:
n=int(input())
A=[]
for i in range(n):
  A.append(int(input())
A.sort()
print(sum(A)-A[-1]/2)

Fixed code:
n=int(input())
A=[]
for i in range(n):
  A.append(int(input()))
A.sort()
print(int(sum(A)-A[-1]/2))
Buggy code:
n = int(input())

price_list = []

for _ in range(n):
	price_list.append(int(input()))

print(sum(price_list)-max(price_list)/2)

Fixed code:
n = int(input())

price_list = []

for _ in range(n):
	price_list.append(int(input()))

print(int(sum(price_list)-max(price_list)/2))
Buggy code:
# 2019/02/02
# AtCoder Beginner Contest115 - B

# Input
n = int(input())
p = list()
max = 0
sum = 0

# Input and sum
for i in range(n):
    p.append(int(input()))
    if max < p[i]:
        max = p[i]
    sum += p[i]

print(sum)
sum -= int(max / 2)

# Output
print(sum)
print(p)

Fixed code:
# 2019/02/02
# AtCoder Beginner Contest115 - B

# Input
n = int(input())
p = list()
max = 0
sum = 0

# Input and sum
for i in range(n):
    p.append(int(input()))
    if max < p[i]:
        max = p[i]
    sum += p[i]

sum -= int(max / 2)

# Output
print(sum)
Buggy code:
n=int(input())
l=[]

for I in range(n):
    l.append(int(input())
else:
    print(int(sum(l)-max(l)/2))

Fixed code:
n = int(input())
l = []
for i in range(n):
    l.append(int(input()))
else:
    print(sum(l)-max(l)//2)
Buggy code:
n=int(input())
k = [int(input()) for i in range(n)]
print(int((sum(k)-max(k)//2))

Fixed code:
n=int(input())
k = [int(input()) for i in range(n)]
print(sum(k)-max(k)//2)
Buggy code:
N =int(input())
list = [int(input()) for i in range(N)]
print(sum(list)-list[-1]//2)

Fixed code:
N =int(input())
list = [int(input()) for i in range(N)]
list.sort()
print(sum(list)-list[-1]//2)
Buggy code:
a = int(input())
b = [int(input()) for _ in range(a)]
b = sorted(b, reverse=True)
c = 1
for i in range(a):
    if i == 0:
        c += b[i] // 2
    else:
        c += b[i]
print(c)


Fixed code:
a = int(input())
b = [int(input()) for _ in range(a)]
b = sorted(b, reverse=True)
c  = 0
for i in range(a):
    if i == 0:
        c += b[i] // 2
    else:
        c += b[i]
print(c)
Buggy code:
N = int(input())
listP = [int(input()) for i in range(N)]
print(sum(listP)-min(listP)//2)

Fixed code:
N = int(input())
listP = [int(input()) for i in range(N)]
print(sum(listP)-max(listP)//2)
Buggy code:
n = int(input())
p = sorted([int(input()) for _ in range(n)])
print(p[:-1] + p[-1]//2)

Fixed code:
n = int(input())
p = sorted([int(input()) for _ in range(n)])
print(sum(p[:-1]) + p[-1]//2)
Buggy code:
N = int(input())
kaimono_list = []
for i in range(N):
    kaimono_list.append(int(input()))
for i in range(N-1):
    for j in range(N):
        if i < j:
            if kaimono_list[i] > kaimono_list[j]:
                a = kaimono_list[i]
                kaimono_list[i] = kaimono_list[j]
                kaimono_list[j] = a
kaimono_sum = 0
for i in kaimono_list:
    if i == kaimono_list[N-1]:
        i = i // 2
    kaimono_sum += i
print(kaimono_sum)

Fixed code:
N = int(input())
kaimono_list = []
for i in range(N):
    kaimono_list.append(int(input()))
for i in range(N-1):
    for j in range(N):
        if i < j:
            if kaimono_list[i] > kaimono_list[j]:
                a = kaimono_list[i]
                kaimono_list[i] = kaimono_list[j]
                kaimono_list[j] = a
kaimono_sum = 0
for i in kaimono_list:
    kaimono_sum += i
print(kaimono_sum - kaimono_list[N-1]//2)
Buggy code:
n =int(input())
p =[]
for i in range(n):
    a =int(input())
    p.append(a)
p.sort()
new_p =p[n-1]/2
ans =sum(p[:n-1])+new_p
print(new_p)
print(int(ans))

Fixed code:
n =int(input())
p =[]
for i in range(n):
    a =int(input())
    p.append(a)
p.sort()
new_p =p[n-1]/2
ans =sum(p[:n-1])+new_p
print(int(ans))
Buggy code:
N=int(input())
p=[]
for _ in range(N):
  p.append(int(input()))

p.sort()
ans=0
for i in range(N):
  if i==0:
    ans+=p[i]//2
  else:
    ans+=p[i]
print(ans)

Fixed code:
N=int(input())
p=[]
for _ in range(N):
  p.append(int(input()))

p.sort(reverse=True)
ans=0
for i in range(N):
  if i==0:
    ans+=p[i]//2
  else:
    ans+=p[i]
print(ans)
Buggy code:
n = int(input())
list1 = [list(int(input())) for i in range(n) ]
list1.sort(reverse = True)
print(list1[0]//2+sum(list1[1:]))

Fixed code:
n = int(input())
list1 = [int(input()) for i in range(n) ]
list1.sort(reverse = True)
print(list1[0]//2+sum(list1[1:]))
Buggy code:
n = int(input())
p = [int(input()) for i in range(n)]

p.sort()
print(sum(p) - int(a[-1]/2))

Fixed code:
n = int(input())
a = [int(input()) for i in range(n)]

a.sort()
print(sum(a) - int(a[-1]/2))
Buggy code:
n = int(input())
p = [0 for i in range(n)]
for i in range(n):
    p[i] = int(input())
p2 = sorted(p)
print(p2)
print(int(sum(p2)-p2[n-1]*0.5))


Fixed code:
n = int(input())
p = [0 for i in range(n)]
for i in range(n):
    p[i] = int(input())
p2 = sorted(p)
print(int(sum(p2)-p2[n-1]*0.5))
Buggy code:

p = list(map(int,input().split()))
max = 0
sum = 0
for i in range(1,p[0]+1):
    sum += p[i]
    a = p[i]
    if max < a :
        max = a
print(int(sum-(int(max/2))))



Fixed code:
N = list(map(int,input().split()))
p = []
for i in range(N[0]):
  p.append(int(input()))
max = 0
sum = 0
for i in range(N[0]):
    sum += p[i]
    a = p[i]
    if max < a :
        max = a
print(int(sum-(int(max/2))))
Buggy code:
n = int(input())
ans_ = []
for i in range(n):
    num = int(input())
    ans_.append(num)
ans_.sort()
a = int(ans_[0]/2)
ans_[0] = a
ans = 0
for i in ans_:
    ans += i
print(ans)

Fixed code:
n = int(input())
ans_ = []
for i in range(n):
    num = int(input())
    ans_.append(num)
ans_.sort()
a = int(ans_[n-1]/2)
ans_[n-1] = a
ans = 0
for i in ans_:
    ans += i
print(ans)
Buggy code:
n = int(input())
l = []
for i in range(n):
    l.append(int(input()))
print(sum(l)-max(l)/2)

Fixed code:
n = int(input())
list01 = []
for i in range(n):
    list01.append(int(input()))
print(sum(list01) - max(list01) // 2)
Buggy code:
n = int(input())

price_list = []
for i in range(n):
    price_list.append(int(input()))

price_list.sort()
ans = 0
for i, ele in enumerate(price_list):
    print(ele)
    if i != n-1:
        ans += ele
    else:
        ans += ele / 2

print(int(ans))




Fixed code:
n = int(input())

price_list = []
for i in range(n):
    price_list.append(int(input()))

price_list.sort()
ans = 0
for i, ele in enumerate(price_list):
    if i != n-1:
        ans += ele
    else:
        ans += ele / 2

print(int(ans))
Buggy code:
N = input()
p = [int(input()) for i in range(N)]
print(sum(p) - max(p) // 2)

Fixed code:
N=int(input())
p=[int(input()) for i in range(N)]
print(sum(p)-max(p)//2)
Buggy code:
n = int(input())
p = []
for i in range(n):
  p[i]= int(input())
p.sort()
print(p[-1]//2 + sum(p[:-2]))

Fixed code:
n = int(input())
li = [int(input()) for i in range(n)]
li.sort()
print(sum(li[:-1])+li[-1]//2)
Buggy code:
n = int(input())
arr = []
for i in range(n):
  arr[i]=int(input())
arr.sort()
ans = arr[-1]//2+sum(arr[:-1])
print(ans)

Fixed code:
n = int(input())
arr = [0]*n
for i in range(n):
    arr[i]=int(input())
arr.sort()
ans = arr[-1]//2+sum(arr[:-1])
print(ans)
Buggy code:
N = int(input())
p = [0]*N
for i in range(N):
    p[i] = int(input())
p.sort()
print(-p[-1] / 2 + sum(p))

Fixed code:
N = int(input())
p = [0]*N
for i in range(N):
    p[i] = int(input())
p.sort()
print(int(-p[-1] / 2 + sum(p)))
Buggy code:
n=int(input())
A = [int(input()) for _ in range(n)]

A.sort(reverse=True)
print(A)
A[0]=int(A[0]/2)
print(sum(A))

Fixed code:
n=int(input())
A = [int(input()) for _ in range(n)]
A.sort(reverse=True)
A[0]=int(A[0]/2)
print(sum(A))
Buggy code:
n = int(input())
lists =[int(input()) for i in range(n)]
sums = sum(lists)
maxs = max(lists)
print(sums-max//2)


Fixed code:
n = int(input())
lists =[int(input()) for i in range(n)]
sums = sum(lists)
maxs = max(lists)
print(sums-maxs//2)
Buggy code:
 = int(input())
highest_price = 0
sum = 0
for i in range(n):
    product = int(input())
    if highest_price < product:
        sum += highest_price/2
        highest_price = product
        sum += highest_price/2
    else:
        sum += product
print(int(sum))

Fixed code:
n = int(input())
highest_price = 0
sum = 0
for i in range(n):
    product = int(input())
    if highest_price < product:
        sum += highest_price/2
        highest_price = product
        sum += highest_price/2
    else:
        sum += product
print(int(sum))
Buggy code:
n = int(input())
p = [int(input()) for i in range(n)]
print(sum(p) - max(p) / 2)

Fixed code:
n=int(input())
p=[int(input()) for i in range(n)]
print(sum(p)-max(p)+int(max(p)/2))
Buggy code:
n = int(input())
k = []
for i in range(n):
  a = int(input())
  k.append(a)
b = max(k)/2
k.remove(max(k))
k.append(b)
print(sum(k))
  

Fixed code:
n = int(input())
k = []
for i in range(n):
  a = int(input())
  k.append(a)
b = max(k)/2
k.remove(max(k))
k.append(b)
print(int(sum(k)))
Buggy code:
N = int(input())
a = [int(input()) for i in range(N)]

total = max(a)/2
print(max(a))
print(total)
a.remove(max(a))
print(a)
total += sum(a)

Fixed code:
N = int(input())
a = [int(input()) for i in range(N)]

total = int(max(a)/2)
a.remove(max(a))
total += sum(a)

print(total)
Buggy code:
N = int(input())
p = sorted([int(input()) for i in range(N)])
print(p)
p[N - 1] = p[N - 1] // 2
print(sum(p))


Fixed code:
N = int(input())
p = sorted([int(input()) for i in range(N)])
p[N - 1] = p[N - 1] // 2
print(sum(p))
Buggy code:
n=int(input())
p=[input() for _ in range(n)]
p.sort()
s=0
for i in range(n-1):
  s+=p[i]
ans=s+(p[n-1]//2)
print(ans)


Fixed code:
n=int(input())
p=[int(input()) for _ in range(n)]
p.sort()
s=0
for i in range(n-1):
  s+=p[i]
ans=s+(p[n-1]//2)
print(ans)
Buggy code:
N = int(input())
p = [int(input()) for i in range(N)]
A = 0
max=99

for i in range(N):
    if p[i] > max:
        max = p[i]
        m = i

p[m] = p[m]/2


for i in range(N):
    A += p[i]

print(A)   

Fixed code:
N = int(input())
p = [int(input()) for i in range(N)]
A = 0
max=99

for i in range(N):
    if p[i] > max:
        max = p[i]
        m = i

p[m] = p[m]/2


for i in range(N):
    A += p[i]

print(int(A))
Buggy code:
n = int(input())
sum =0
max =0
index=0
while index < n:
    p = int(input())
    sum+=p
    if p > max:
        max = p
    else:
        pass
    index+=1
print(max)    
print(sum - max//2)

Fixed code:
n = int(input())
sum =0
max =0
index=0
while index < n:
    p = int(input())
    sum+=p
    if p > max:
        max = p
    else:
        pass
    index+=1
  
print(sum - max//2)
Buggy code:
num = int(input())
prices = []

for i in range(num):
  prices[i].append(input())

max = prices[0]
for i in range(1,num):
  if prices[i]>max:
    max=prices[i]
    max_i = i

sum=0
for i in range(num):
  if i==max_i:
    sum = sum + int(prices[i]/2)
  else:
    sum = sum + prices[i]

Fixed code:
num = int(input())
prices = []
 
for i in range(num):
  prices.append(int(input()))

max_i=0
max = prices[0]
for i in range(1,num):
  if prices[i]>max:
    max=prices[i]
    max_i = i
 
sum=0
for i in range(num):
  if i==max_i:
    sum += int(prices[i]/2)
  else:
    sum += prices[i]

print(sum)
Buggy code:
N=int(input())
P=[int(input()) for i in range (N)]
print(sum(N) - max(N)//2)

Fixed code:
N=int(input())
P=[int(input()) for i in range (N)]
print(sum(P) - max(P)//2)
Buggy code:
n = int(input())
p = list(int(input()) for i in range(n))
a = p.pop(p.index(max(p))) / 2
print(sum(p) + a)

Fixed code:
n = int(input())
p = list(int(input()) for i in range(n))
a = p.pop(p.index(max(p))) / 2
print(int(sum(p) + a))
Buggy code:
banig = []
for x in range(int(input())):
  banig.append(int(input()))

sum = 0
big = max(banig)
banig.remove(big)
summation = 0
for e in banig:
  summation += e
print(summation + big/2)

Fixed code:
banig = []
for x in range(int(input())):
  banig.append(int(input()))

sum = 0
big = max(banig)
banig.remove(big)
summation = 0
for e in banig:
  summation += e
print(summation + int(big/2))
Buggy code:
N = int(input())
P = [None] * N
for i in range(N):
  P[i] = int(input())
ans = sum(P) - max(P)/2
print(ans)

Fixed code:
N = int(input())
P = [None] * N
for i in range(N):
  P[i] = int(input())
ans = sum(P) - max(P)/2
print(int(ans))
Buggy code:
n=int(input())
p=[int(input()) for i in range(n)]
ans=sum(p)
ans-=max(p)/2
print(ans)

Fixed code:
n=int(input())
p=[int(input()) for i in range(n)]
ans=sum(p)
ans-=max(p)/2
print(int(ans))
Buggy code:
N = int(input())                                                                                                            [0/0]
p = []
for i in range(N):
    p.append(int(input()))

ans = sum(p) - max(p)//2

print(ans)


Fixed code:
N = int(input())
p = []
for i in range(N):
    p.append(int(input()))

ans = sum(p) - max(p)//2

print(ans)
Buggy code:
n=int(input())
p=[input() for i in range(n)]
print(sum(p)-max(p)/2)

Fixed code:
n = int(input())

p = [int(input()) for i in range(n)]
#print(p)

hp = int(max(p)/2)
print(sum(p)-hp)
Buggy code:
n=int(input())
p=[int(input()) for _ in range(n)]
print(sum(p)-max(p)/2)

Fixed code:
n = int(input())
p = [int(input()) for _ in range(n)]
print(int(sum(p) - max(p) // 2))