qyliang/CodeNanoFix huggingface dataset:
Buggy code:
n = int(input())
sum = 0
high = 0
for i in range(n):
	x = int(input())
	sum += x
	if high<x:
		high = x
sum -= x//2
print(sum)

Fixed code:
n = int(input())
sum = 0
high = 0
for i in range(n):
	x = int(input())
	sum += x
	if high<x:
		high = x
sum -= high//2
print(sum)
Buggy code:
n = int(input())
p = []
for i in range(n):
    p.append(int(input()))
print(p)
print(sum(p)-max(p)//2)

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

ans = 0
for i in range(N):
    if p[i] == max(p):
       ans += int(p[i]/2)
    else:
        ans += p[i]

print(ans)

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

ans = 0
for i in range(N):
    if p[i] == max(p):
       ans += int(p[i]/2)
       p.append(max(p) + 1)
    else:
        ans += p[i]

print(ans)
Buggy code:
N,*p = map(int,open(0).read().split())
p.sort()
p[-1] /= 2
print(sum(p))


Fixed code:
N,*p = map(int,open(0).read().split())
p.sort()
p[-1] /= 2
print(int(sum(p)))
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())
plist = []
for i in range(N):
    plist.append(int(input()))

print(sum(plist)-int(max(plist)//2))
Buggy code:
p=[int(input()) for _ in range(int(input()))]
ans=0
for i in range(len(p)):
    ans+=p[i]
ans=ans-max(p)+max(p)/2
print(ans)

Fixed code:
p=[int(input()) for _ in range(int(input()))]
ans=0
for i in range(len(p)):
    ans+=p[i]
ans=ans-max(p)+max(p)/2
print(int(ans))
Buggy code:
n = int(input())
l = [int(input()) for _ in [0]*n]
print(l)
print(sum(l)-max(l)//2)


Fixed code:
n = int(input())
l = [int(input()) for _ in [0]*n]

print(sum(l)-max(l)//2)
Buggy code:
N = int(input())
i = 0
goods = []
while i < N:
    goods.append(int(input()))
    i += 1
print(sum(goods))
print(max(goods))
print(max(goods) // 2)
ans = sum(goods) - max(goods) + (max(goods) // 2)
print(ans)

Fixed code:
N = int(input())
i = 0
goods = []
while i < N:
    goods.append(int(input()))
    i += 1

ans = sum(goods) - max(goods) + (max(goods) // 2)
print(ans)
Buggy code:
max = 0
s = 0
n = int(input())
for i in range(1, n + 1):
    p = int(input())
    if max < p:
        max = p
        s = s + max
print(s + max // 2)


Fixed code:
max = 0
s = 0
n = int(input())
for i in range(1, n + 1):
    p = int(input())
    if max <= p:
        max = p
    s = s + p
print(s - max//2)
Buggy code:
N = int(input())
l = sorted([int(input()) for _ in range(N)])

s = int(sum(l[0:-2]) + l[-1]/2)
print(s)

Fixed code:
N = int(input())
l = sorted([int(input()) for _ in range(N)])

s = int(sum(l[0:-1]) + l[-1]/2)
print(s)
Buggy code:
n=int(input())

list=[]

for i in range(n):
  list.append(int(input()))
  
print(sum(list)-max(list)/2)

Fixed code:
n=int(input())

list=[]

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

p.sort()
print(sum(p[:-1] + p[-1] // 2))

Fixed code:
n = int(input())
p = [int(input()) for _ in range(n)]

p.sort()
print(sum(p[:-1]) + p[-1] // 2)
Buggy code:
N = int(input())
ans = 0
p_max = 0
for i in range(N):
    p = int(input())
    if p > p_min:
        print
        p_min = p
    ans+=p
print(ans-p_min//2)

Fixed code:
N = int(input())
ans = 0
p_max = 0
for i in range(N):
    p = int(input())
    if p > p_max:
        print
        p_max = p
    ans+=p
print(ans-p_max//2)
Buggy code:
a = int(input())
b = []
for i in range(a):
  b.append(int(input()))

b.sort()

b[-1::] == b[-1::] / 2

print(sum(b))

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

b.sort()

b[-1] = b[-1] / 2

print(int(sum(b)))
Buggy code:
N = int(input())
a = []
for i in range(N):

  a.append(int(input())
           
print(sum(a)-max(a)//2)
     

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

  a.append(int(input()))
           
print(sum(a)-max(a)//2)
Buggy code:
n = input(); l=sorted([int(input()) for _ in range(n)])
print(int(sum(l)-l[-1]/2))

Fixed code:
n = int(input()); l=sorted([int(input()) for _ in range(n)])
print(int(sum(l)-l[-1]/2))
Buggy code:
N = int(input())
p = [0]*N
for i in range(N):
    p[i] = int(inout())

ans = sum(p)-0.5*max(p)
print(ans)

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

ans = sum(p)-0.5*max(p)
print(int(ans))
Buggy code:
from sys import stdin
N = int(input())
P = sorted([int(p) for p in stdin.read().splitlines()])

print(P[-1]+sum(P[:-1]))



Fixed code:
from sys import stdin
N = int(input())
P = sorted([int(p) for p in stdin.read().splitlines()])
 
print(int(P[-1]/2)+sum(P[:-1]))
Buggy code:
#!/usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def S(): return input().rstrip()
def LS(): return S().split()
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float("INF")

#solve
def solve():
    n = II()
    p = IR(n)
    print(sum(n) - max(n) // 2)
    return


#main
if __name__ == '__main__':
    solve()


Fixed code:
#!/usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def S(): return input().rstrip()
def LS(): return S().split()
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float("INF")

#solve
def solve():
    n = II()
    p = IR(n)
    print(sum(p) - max(p) // 2)
    return


#main
if __name__ == '__main__':
    solve()
Buggy code:
n = int(input()) 
t = [int(input()) for i in range(n)] 
kk = max(t)
print(sum(t)-kk/2)

Fixed code:
n = int(input()) 
t = [int(input()) for i in range(n)] 
kk = max(t)
print(int(sum(t)-kk/2))
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) - int(max(p)/2))
Buggy code:
l = [int(input()) for _ in range(int(input()))]
print(sum(l) - max(l)/2)

Fixed code:
l=[int(input()) for _ in range(int(input()))]
print(sum(l)-(max(l)//2))
Buggy code:
# coding: utf-8

num = int(input())
table = []
total = 0
for i in range(num):
    table.append(int(input()))
print(table)
list.sort(table)
total += table[num-1] / 2
for i in range(num-1):
    total += table[i]
print(int(total))

Fixed code:
# coding: utf-8

num = int(input())
table = []
total = 0
for i in range(num):
    table.append(int(input()))
list.sort(table)
total += table[num-1] / 2
for i in range(num-1):
    total += table[i]
print(int(total))
Buggy code:
#!/usr/bin/env python3

a = int(input())
p = [int(input()) for _ in range(p)]

print(sum(p)-max(p)+max(p)//2)


Fixed code:
#!/usr/bin/env python3

a = int(input())
p = [int(input()) for _ in range(a)]

print(sum(p)-max(p)+max(p)//2)
Buggy code:
n=int(input())
p=[int(input()) for i in range(n)]
p.sort(reverse=True)
s=p[0]/2
for j in range(1,n):
    s+=p[j]
print(s)

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

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

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

print(sum(p) - m // 2)

Fixed code:
N = int(input())

p = [0] * N
for i in range(N):
    p[i] = int(input())

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

print(sum(p) - m // 2)
Buggy code:
#!/usr/bin/env python3

import sys

input = iter(sys.stdin.read().splitlines()).__next__

N = int(input())
P = []
for i in range(N):
   P.append(int(input()))


P.sort()
print(P)

res = sum(P[:-1]) + P[-1]//2

print(res)


Fixed code:
#!/usr/bin/env python3

import sys

input = iter(sys.stdin.read().splitlines()).__next__

N = int(input())
P = []
for i in range(N):
   P.append(int(input()))


P.sort()
#print(P)

res = sum(P[:-1]) + P[-1]//2

print(res)
Buggy code:
import sys
def input():
    return sys.stdin.readline()[:-1]
n=int(input())
p=[int(input()) for i in range(n)]
ans=0
print(sum(p)-max(p)/2)

Fixed code:
import sys
def input():
    return sys.stdin.readline()[:-1]
n=int(input())
p=[int(input()) for i in range(n)]

print(sum(p)-max(p)//2)
Buggy code:
def bChristmas(n, pl):

    return sum(pl) - (max(pl)/ 2)

def main():
    n = int(input())
    pl = [int(input()) for i in range(n)]
    print(bChristmas(n, pl))

if __name__ == '__main__':
    main()


Fixed code:
def bChristmas(n, pl):

    return int(sum(pl) - (max(pl)/ 2))

def main():
    n = int(input())
    pl = [int(input()) for i in range(n)]
    print(bChristmas(n, pl))

if __name__ == '__main__':
    main()
Buggy code:
n = int(input())
p = [int(input()) for i in range(n)]

m = max(p)/2

sum = 0

for i in p:
  sum += i
ans = sum - m

print(ans)

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

m = max(p)//2

sum = 0

for i in p:
  sum += i
ans = sum - m

print(ans)
Buggy code:
N = int(input())

prices = [int(input()) for _ in range(N)]

max_price = max(prices)

ans = sum(prices) - max_price/2

print(ans)

Fixed code:
N = int(input())
 
prices = [int(input()) for _ in range(N)]
 
max_price = max(prices)
 
ans = int(sum(prices) - max_price/2)
 
print(ans)
Buggy code:
N = int(input())
p = [0] * N
max_value = 0

for i in range(N):
    p[i] = int(input())
    max_value = max(max_value, p[i])

price = sum(p) - max_value / 2
print(int(price)

Fixed code:
N = int(input())
p = [0] * N
max_value = 0

for i in range(N):
    p[i] = int(input())
    max_value = max(max_value, p[i])

price = sum(p) - max_value / 2
print(int(price))
Buggy code:
n=int(input())
l=[]
for i in range(n):
    a =input()
    l.append(int(a))
lm=sorted(l)
lm2=l[0:n-1]
b=l[-1]
print(sum(lm2)+int(b//2))

Fixed code:
n=int(input())
l=[]
for i in range(n):
    a =input()
    l.append(int(a))
lm=sorted(l)
lm2=lm[0:n-1]
b=lm[-1]
print(sum(lm2)+int(b)//2)
Buggy code:
n=int(input())
lstA=[int(input()) for i in range(n)]
print(sum(lstA)-max(lstA)/2)


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

sort(A)
print(sum(A) - A[-1]/2)

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

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

for i in range(n):
  cnt+=A[i]
cnt-=max(A)*0.5
print(cnt)

Fixed code:
n=int(input())
A=[int(input()) for i in range(n)]
cnt=0

for i in range(n):
  cnt+=A[i]
cnt-=max(A)*0.5
print(int(cnt))
Buggy code:
n=int(input())
p=[int(i) for i in input()]
p.sort(reverse=True)
ans=sum(p)-p[0]//2
print(ans)

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

Fixed code:
n= int(input())
p= [int(input()) for _ in range(n)]
print(sum(p) - max(p) // 2)
Buggy code:
n = int(input())
a = [ int(input()) for i in range(n)]
ans = 0
for i in range(n):
 ans += a[i]
ans -= min(a)//2
print(ans)


Fixed code:
n = int(input())
a = [ int(input()) for i in range(n)]
ans = 0
for i in range(n):
 ans += a[i]
ans -= max(a)//2
print(ans)
Buggy code:
n = int(input())
l = []
for i in range(n):
    l.append(int(input()))
m = 0
s = 0
for i in l:
    if m<i:
        m = i
        s = l.index(i)

l[s]=l[s]/2
ans = 0
for i in l:
    ans += i
print(ans)

Fixed code:
n = int(input())
l = []
for i in range(n):
    l.append(int(input()))
m = 0
s = 0
for i in l:
    if m<i:
        m = i
        s = l.index(i)

l[s]=l[s]/2
ans = 0
for i in l:
    ans += i
print(int(ans))
Buggy code:
S=int(input())

p=[int(input()) for i in  range(S)]

p.sort(reverse=True)

money=0

for i in range(S):
    money+=p[i]

print(money-p[0]/2)


Fixed code:
S=int(input())

p=[int(input()) for i in  range(S)]

p.sort(reverse=True)

money=0

for i in range(S):
    money+=p[i]

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

M = max(P)

print(sum(P) - M + M/2)

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

M = int(max(P))

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

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

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

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

Fixed code:
N = int(input())
P = []
for i in range(N):
    p = int(input())
    P.append(p)
    
price = sum(P) - max(P) / 2
print(int(price))
Buggy code:
s = int(input())
m = [int(input()) for i in range(s)]
l = sorted(m)
print(l[-1]/2 + sum(l) - l[-1])


Fixed code:
s = int(input())
m = [int(input()) for i in range(s)]
l = sorted(m)
print(l[-1]//2 + sum(l) - l[-1])
Buggy code:
n=int(input())
a=[]
b=0
for i in range(n):
    a.append(i)
for u in a:
    b+=u
print(b-(max(a)//2))

Fixed code:
n=int(input())
a=[]
b=0
for i in range(n):
    c=int(input())
    a.append(c)
for u in a:
    b+=u
print(b-(max(a)//2))
Buggy code:
N = int(input())
gifts = []
price = 0

for i in range(N):
  gifts.append(int(input()))
  
price = sum(gifts) - max(gifts) / 2
print(price)


Fixed code:
N = int(input())
gifts = []

for i in range(N):
  gifts.append(int(input()))
  
price = sum(gifts) - max(gifts) // 2
print(price)
Buggy code:
max=0
k=0
N=int(input())
for i in range(1,N+1):
    p=int(input())
    if p>max:max=p
    k=k+p
    print((k-max)+(max//2))

Fixed code:
max=0
k=0
N=int(input())
for i in range(1,N+1):
    p=int(input())
    if p>max:max=p
    k=k+p
print((k-max)+(max//2))
Buggy code:
pr = int(input())
li =[]

for i in range(pr):
    li.append(int(input))

disc = max(li)

print(sum(li) - disc)

Fixed code:
pr = int(input())
li =[]

for i in range(pr):
    li.append(int(input()))

disc = max(li) // 2

print(sum(li) - disc)
Buggy code:
N = input()
p = []
for i in range(N):
    p.append(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())
list=[]
for i in range(N):
    list.append(i)
print(sum(list)-max(list)//2)


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

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

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

Fixed code:
n = int(input())
ls = [int(input()) for i in range(n)]
list.sort(ls,reverse=True)
ls[0] = ls[0]//2
a = 0
for i in range(n):
    a += ls[i]
print(a)
Buggy code:
n = int(input())
l = [int(i) for i in range(n)]
print(sum(l)-0.5*max(l))

Fixed code:
n=int(input())
l=[int(input()) for _ in range(n)]
print(sum(l)-int(0.5*max(l)))
Buggy code:
n = int(input())
p = [map(int, input()) for i in range(n)]

print(sum(p)-int(max(d)/2))

Fixed code:
n = int(input())
p = list(map(int, [input() for i in range(n)]))

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

print(sum(p)-M/2)

Fixed code:
N = int(input())
p = []
for i in range(N):
  pi = [int(input())]
  p = p + pi
  
M = max(p)

print(int(sum(p)-M/2))
Buggy code:
N=int(input())
p=[int(input()) for i in range(N)]
p.sort(reverse=True)
p[0]=0.5*p[0]
s=sum(p)
print(s)

Fixed code:
N=int(input())
p=[int(input()) for i in range(N)]
p.sort(reverse=True)
p[0]=0.5*p[0]
s=sum(p)
print(int(s))
Buggy code:
n = int(input())
prices = []
for i in range(0,n):
    prices[i] = int(input())

coupon = max(prices) / 2

total = sum(prices) - coupon
print(total)

Fixed code:
n = int(input())
prices = []
for i in range(0,n):
    prices.append(int(input()))
    
coupon = max(prices) // 2
    
total = sum(prices) - coupon
print(total)
Buggy code:
N = int(input())
S = [int(input()) for _ in range(N)]

A = sorted(S, reverse=True)

S[0] = S[0]/2

print(sum(S))

Fixed code:
N = int(input())
S = [int(input()) for _ in range(N)]

A = sorted(S, reverse=True)

A[0] = A[0]/2

print(int(sum(A)))
Buggy code:
N = int(input())
p = []
for i in range(N):
    p.append(int(input()))

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

print(ans)


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

print(int(sum(A)-max(A)/2))
Buggy code:
import sys
import os


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    N = int(sys.stdin.readline().rstrip())
    P = [int(sys.stdin.readline().rstrip()) for i in range(N)]

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


if __name__ == '__main__':
    main()


Fixed code:
import sys
import os


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    N = int(sys.stdin.readline().rstrip())
    P = [ int(sys.stdin.readline().rstrip()) for i in range(N)]

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



if __name__ == '__main__':
    main()
Buggy code:
N = int(input())
P = sorted([int(input()) for X in range(0,N)])
P[-1] = P[-1]//2
print(sum(SP))

Fixed code:
N = int(input())
P = sorted([int(input()) for X in range(0,N)])
P[-1] = P[-1]//2
print(sum(P))
Buggy code:
p=sorted([int(input()) for _ in range(int(input()))])
print(sum(p[0:-1]+p[-1]/2)

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


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

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

P.sort()
print(int(P[0]/2) + sum(P[1:]))


Fixed code:
n = int(input())
P = [int(input()) for _ in range(n)]

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


Fixed code:
N = int(input())
p=[]
max=0
for i in range(N):
    p.append(int(input()))
    if max<=p[i]:
        max=p[i]
sum=0
for i in range(N):
    sum+=p[i]
sum-=max
sum+=max/2
print(int(sum))
Buggy code:
Row = int(input())
List = []
for i in range (Row):
  List.append(int(input()))
List.sort()
List[Row-1] = List[Row-1]//2
for i in range (Row):
  res = List[i]
print(res)

Fixed code:
Row = int(input())
List = []
res = 0
for i in range (Row):
  List.append(int(input()))
List.sort()
List[Row-1] = List[Row-1]//2
for i in range (Row):
  res += List[i]
print(res)
Buggy code:
n = int(input())
#p =[]
max_p = 0
s =0
for i in range(n):
  pi = int(input())
  max_p = max(pi, max_p)
  s += pi
s = s-max_p + max_p/2
print(s)
  


Fixed code:
n = int(input())
#p =[]
max_p = 0
s =0
for i in range(n):
  pi = int(input())
  max_p = max(pi, max_p)
  s += pi
s = s-max_p + max_p//2
print(s)
Buggy code:
N=int(input())
P=[int(input()) for _ in range(N)]
P=sorted(P)
P[N-1]=P[N-1]/2
print(int(sum(P))

Fixed code:
N=int(input())
P=[int(input()) for _ in range(N)]
P=sorted(P)
P[N-1]=P[N-1]/2
print(int(sum(P)))
Buggy code:
N = int(input())
p_List = list(int(input()) for i in range(N))
print(p_List)
Max = max(p_List)

Sum = sum(p_List) - Max / 2

print(int(Sum))






Fixed code:
N = int(input())
p_List = list(int(input()) for i in range(N))
Max = max(p_List)

Sum = sum(p_List) - Max / 2

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

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

list=[]
for i in range (int(str)):
    teika = int(input())
    list.append(teika)
    waribiki=max(list)
    goukei=sum(list)+waribiki/2-waribiki
print(goukei)


Fixed code:
str = input()

list=[]
for i in range (int(str)):
    teika = int(input())
    list.append(teika)
    waribiki=max(list)
    #print(max(list))
    goukei=sum(list)+waribiki/2-waribiki
print(int(goukei))
Buggy code:
n = int(input())
    l = [int(input()) for i in range(n)]
    l = sorted(l)
    print(sum(l) - l[-1]//2)

Fixed code:
n = int(input())
l = [int(input()) for i in range(n)]
l = sorted(l)
print(sum(l) - l[-1]//2)
Buggy code:
n = int(input())
pL = [input() for i in range(n)]
print(sum(pL)-max(pL)/2)

Fixed code:
n = int(input())
pL = [int(input()) for i in range(n)]
print(int(sum(pL)-(max(pL)/2)))
Buggy code:
import sys
n=int(input())
p=[int(i) for i in sys.stdin]
ans=p.pop()//2
print(sum(p)+ans)

Fixed code:
import sys
n=int(input())
p=[int(i) for i in sys.stdin]
p.sort()
ans=p.pop()//2
print(int(sum(p))+ans)
Buggy code:
N = int(input())
p = list()
for i in range(N):
    p.append(int(input()))
sum = 0
for i in range(0,N):
    sum += p[i]
print(sum - max(p) + max(p)/2)


Fixed code:
N = int(input())
p = list()
for i in range(N):
    p.append(int(input()))
sum = 0
for i in range(0,N):
    sum += p[i]
print(sum - max(p) + max(p)//2)
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(int(sum(p)-max(p)/2))
Buggy code:
N = int(input())
p_list = [0]*10
i = 0
for i in range(N):
    x = int(input())
    p_list[i] = x
    x = 0


print(p_list)
p_list.sort()
print(p_list)
kari = sum(p_list)
print(int(kari - (p_list[-1]/2)))


Fixed code:
N = int(input())
p_list = [0]*10
i = 0
for i in range(N):
    x = int(input())
    p_list[i] = x
    x = 0

p_list.sort()
kari = sum(p_list)
print(int(kari - (p_list[-1]/2)))
Buggy code:
N = int(input())
prices = [int(input()) for i in  range(N)]
print(sum(prices)-max(prices)/2)

Fixed code:
N = int(input())
prices = [int(input()) for i in  range(N)]
print(int(sum(prices)-max(prices)/2))
Buggy code:
total_item = int(input())
item_cost = []
for i in range(total_item):
    item_cost.append(int(input()))
print(sum(item_cost) - max(item_cost) // 2)v

Fixed code:
total_item = int(input())
item_cost = []
for i in range(total_item):
    item_cost.append(int(input()))
print(sum(item_cost) - max(item_cost) // 2)
Buggy code:
N = int(input())
items = []
for _ in range(N):
    item = int(input())
    items.append(item)

items.sort()

print(int(sum(items[0:N-1]) + items[N]/2))

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

items.sort()

print(int(sum(items[0:N-1]) + items[-1]/2))