Problem:


Score : 200 points

Problem Statement

In some other world, today is the day before Christmas Eve.

Mr. Takaha is buying N items at a department store. The regular price of the i-th item (1 \leq i \leq N) is p_i yen (the currency of Japan).

He has a discount coupon, and can buy one item with the highest price for half the regular price. The remaining N-1 items cost their regular prices. What is the total amount he will pay?

Constraints

2 \leq N \leq 10

100 \leq p_i \leq 10000

p_i is an even number.

Input

Input is given from Standard Input in the following format:

N
p_1
p_2
:
p_N

Output

Print the total amount Mr. Takaha will pay.

Sample Input 1

3
4980
7980
6980

Sample Output 1

15950

The 7980-yen item gets the discount and the total is 4980 + 7980 / 2 + 6980 = 15950 yen.

Note that outputs such as 15950.0 will be judged as Wrong Answer.

Sample Input 2

4
4320
4320
4320
4320

Sample Output 2

15120

Only one of the four items gets the discount and the total is 4320 / 2 + 4320 + 4320 + 4320 = 15120 yen.



Sample input:
3
4980
7980
6980


Sample output:
15950

Submission status: Accepted

Solution code:
n = int(input())
A = [int(input()) for i in range(n)]

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

Submission status: Accepted

Solution code:
N = int(input())
p = []
for _ in range(N):
  p.append(int(input()))
print(sum(p)-max(p)//2)

Submission status: Accepted

Solution code:
#
# Written by NoKnowledgeGG @YlePhan
# ('ω')
#
#import math
#mod = 10**9+7
#import itertools
#import fractions
#import numpy as np
#mod = 10**4 + 7
"""def kiri(n,m):
  r_ = n / m
  if (r_ - (n // m)) > 0:
    return (n//m) + 1
  else:
    return (n//m)"""
 
def main():
  n = int(input())
  P = [int(input()) for i in range(n)]
  
  P = sorted(P,reverse=True)
  ans = P[0] //2
  for i in range(1,len(P)):
    ans += P[i]
  print(ans)
  
if __name__ == '__main__':
  main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
pn=[]
for i in range(n):
    pi=int(input())
    pn.append(pi)
ans=sorted(pn,reverse=True)
an=0
for i in range(n-1):
    an+=ans[i+1]
print((ans[0]//2)+an)

Submission status: Accepted

Solution code:
n = int(input())
price = [int(input()) for _ in range(n)]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
p=[int(input()) for _ in range(n)]
p.sort()
k=p.pop(-1)
print(sum(p)+k//2)

Submission status: Accepted

Solution code:
l = [int(input()) for _ in range(int(input()))]
m = max(l) // 2
sl = sorted(l)
sl.pop()
sm = sum(sl)
print(sm + m)

Submission status: Accepted

Solution code:
n = [int(input()) for i in range(int(input()))]
print(int(sum(n) - max(n)*0.5))

Submission status: Accepted

Solution code:
def solve():
    N = int(input())
    p = [int(input()) for i in range(N)]
    p.sort(reverse=True)

    print(p[0] // 2 + sum(p[1:]))
if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
n = int(input())
p = [int(input()) for _ in range(n)]
p.sort()
p[-1] = p[-1]//2
print(int(sum(p)))

Submission status: Accepted

Solution code:
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))

n = ii()
prices = []
for i in range(n):
    prices.append(ii())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
ans = 0
price = []
for _ in range(N):
    price.append(int(input()))

max_price = max(price)
price.remove(max_price)
print(int(sum(price) + max_price//2))

Submission status: Accepted

Solution code:
def main():
    from builtins import int, map, list, print, max
    import sys
    sys.setrecursionlimit(10 ** 6)

    input = sys.stdin.readline
    input_list = (lambda: input().rstrip().split())
    input_number = (lambda: int(input()))
    input_number_list = (lambda: list(map(int, input_list())))

    N = input_number()
    p = [input_number() for i in range(N)]
    ans = sum(p) - max(p) // 2
    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
INF = 10 ** 11
MOD = 10 ** 9 + 7
from collections import deque
sys.setrecursionlimit(100000000)
from heapq import heapify,heappush,heappop   

def main():
    n = int(input())
    p = [int(input()) for _ in range(n)]
    p.sort()
    ans = 0
    for i in range(n - 1):
        ans += p[i]
    ans += p[-1]//2
    print(ans)
if __name__=='__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
pi = [int(input()) for _ in range(N)]
print(sum(pi)-max(pi)//2)

Submission status: Accepted

Solution code:
a=int(input())
b=[]
for i in range(a):
    b.append(int(input()))
print(int(sum(b)-max(b)/2))

Submission status: Accepted

Solution code:
N = int(input())
p = [int(input()) for i in range(N)]
print(sum(p)-int(max(p)*0.5))

Submission status: Accepted

Solution code:
n = int(input())
cost = []
for i in range(n):
    cost.append(int(input()))
cost.sort()
print(sum(cost[:-1]) + cost[-1]//2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
max = 0
sum = 0

#print ("START")
for i in range(n):
	data = input()
#	print("aaa")
	data = int(data)
#	print(data)
	if max < data:
		max = data
	sum = sum + data
print(sum - max//2)

Submission status: Accepted

Solution code:
import sys
from bisect import *
from heapq import *
from collections import *
from itertools import *
from functools import *
from math import *
from fractions import *

sys.setrecursionlimit(100000000)
input = lambda: sys.stdin.readline().rstrip()

def main():
    N = int(input())
    p = [int(input()) for _ in range(N)]
    print(max(p) // 2 + sum(p) - max(p))

main()

Submission status: Accepted

Solution code:
N = int(input())
li = []

for i in range(N):
    li.append(int(input()))
    
li2 = sorted(li,reverse=True)
li2[0] = li2[0]/2

print(int(sum(li2)))

Submission status: Accepted

Solution code:
n = int(input())
l = []
for i in range(n):
  s = int(input())
  l.append(s)
print(int(sum(l)-max(l)/2))

Submission status: Accepted

Solution code:
n=int(input())
p=[]
for _ in range(n):
    p.append(int(input()))
p.sort()
ans=sum(p)
ans-=p[-1]//2
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
p = [int(input()) for i in range(N)]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
list = [int(input())for _ in range(N)]
print(round(sum(list) - max(list)/2))

Submission status: Accepted

Solution code:
N = int(input())
List = sorted([int(input()) for _ in range(N)],reverse=True)
List[0] /= 2
Sum = sum(List)
print(int(Sum))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
N = int(input().strip())
ps = [int( input().strip() ) for _ in range(N)]

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

Submission status: Accepted

Solution code:
n=int(input())
l=[]
for i in range(n):
    p = int(input())
    l.append(p)
l.sort()
l.reverse()
x=0
for i in range(1,n):
    x+=(l[i])
print(x+(l[0]//2))

Submission status: Accepted

Solution code:
n = int(input())
l = []
for _ in range(n):
    l.append(int(input()))
print(sum(l)-max(l)//2)

Submission status: Accepted

Solution code:
N = int(input())
P = sorted([int(input()) for _ in range(N)])
print(sum(P[:-1]) + P[-1] // 2)

Submission status: Accepted

Solution code:
N = int(input())
P = []
for i in range(N):
    P.append(int(input()))
print(sum(P)-int(1/2*max(P)))

Submission status: Accepted

Solution code:
n = int(input())
list_P = [int(input()) for _ in range(n)]

list_P.sort()
list_P[-1] = list_P[-1]//2
print(sum(list_P))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
p = sorted([int(input()) for _ in range(int(input()))], reverse=True)
print(p[0]//2+sum(p[1::]))

Submission status: Accepted

Solution code:
n = int(input())
p = list(int(input()) for _ in range(n))
dis = max(p) // 2
ans = sum(p) - dis
print(ans)

Submission status: Accepted

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

nax = max(p)

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

Submission status: Accepted

Solution code:
N = int(input())
P = [int(input()) for _ in range(N)]

P.sort()
P[-1] //=2

ret = sum(P)
print(ret)

Submission status: Accepted

Solution code:
s=[int(input()) for _ in range(int(input()))]
print(sum(s)-max(s)//2)

Submission status: Accepted

Solution code:
N = int(input())
p = [0] * N
for i in range(N):
    p[i] = int(input())
p.sort()
p[-1] = p[-1] // 2
print(sum(p))

Submission status: Accepted

Solution code:
N=int(input())
p=[int(input()) for _ in range(N)]

p=sorted(p)
answer=0

for i in range(N-1):
    answer+=p[i]

answer+=p[N-1]//2

print(answer)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution 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)

Submission status: Accepted

Solution code:

n = int(input())
ans = 0
high = 0
for i in range(n):
    p = int(input())
    ans += p
    high = max(high, p)

print(int(ans - high / 2))

Submission status: Accepted

Solution code:
n = int(input())
p = list(int(input()) for i in range(n))
p_max = max(p)
a = sum(p) - p_max
print(int(p_max / 2) + a)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    ps = [int(input()) for _ in range(n)]
    ps.sort(reverse=True)
    ans = ps[0]//2 + sum(ps[1:])
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
P = [int(input()) for _ in range(N)]

P.sort()

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

Submission status: Accepted

Solution code:
#abc115 b
n=int(input())
p_max=0
ans=0
for i in range(n):
    x=int(input())
    ans+=x
    p_max=max(p_max,x)
ans-=p_max/2
print(int(ans))

Submission status: Accepted

Solution code:
n = int(input())
l = [int(input()) for i in range(n)]
sum = sum(l) - max(l)*0.5
print(int(sum))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
sum = 0
m = 0
for i in range(N):
  p = int(input())
  sum += p
  m = max(m,p)
print(sum-m//2)

Submission status: Accepted

Solution code:
n = int(input())
m = 0
c = 0
for _ in range(n):
    p = int(input())
    c += p
    if m < p:
        m = p
print(c - m // 2)

Submission status: Accepted

Solution code:
N = int(input())
P = [int(input()) for _ in range(N)]
P.sort()
print(P[-1]//2 + sum(P[:N-1]))

Submission status: Accepted

Solution code:
N = int(input())
P = [int(input()) for _ in range(N)]

P.sort()
P[-1] = int(P[-1]/2)

print(sum(P))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
P = [int(input()) for i in range(N)]
P.sort(reverse=True)
sum = 0

for i in range(N):
  if i == 0:
    sum += P[0] // 2
  else:
    sum += P[i]

print(sum)

Submission status: Accepted

Solution 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)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution 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)

Submission status: Accepted

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

p[-1] = p[-1]//2
print(int(sum(p)))

Submission status: Accepted

Solution 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()

Submission status: Accepted

Solution code:
def main(n, p):
    p.sort()

    t = p.pop() // 2

    print(sum(p) + t)


if __name__ == "__main__":
    n = int(input())
    p = [int(input()) for _ in range(n)]

    main(n, p)

Submission status: Accepted

Solution code:
#ABC115

n = int(input())
p = sorted([int(input()) for _ in range(n)])
p[-1] = p[-1] // 2
print(sum(p))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
P = []
for i in range(N):
    P.append(int(input()))
P.sort(reverse=True)
print(P[0]//2 + sum(P[1:]))

Submission status: Accepted

Solution code:
n = int(input())
p=[]
for i in range(n):
    p.append(int(input()))
p.sort()
price = p[-1]//2 + sum(p[:-1])
print(price)

Submission status: Accepted

Solution code:
import math
import itertools
import statistics
#n = int(input())
n = int(input())
p = []
for i in range(n):
    p.append(int(input()))

total = sum(p)
print(int(total-max(p)+max(p)/2))

Submission status: Accepted

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

ans = p[-1] // 2 + sum(p[:-1])
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
P = [int(input()) for _ in range(N)]

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

Submission status: Accepted

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

#sortしてもよさそうだが、全て足し合わせてから最大値の半分を引けばOK
ans = sum(p) - (max(p) // 2)
print(ans)

Submission status: Accepted

Solution code:
p=sorted([int(input()) for _ in range(int(input()))])
print(sum(p[:-1])+p[-1]//2)

Submission status: Accepted

Solution code:
n = int(input())
P = sorted(int(input()) for _ in range(n))
P[-1] //= 2
print(sum(P))

Submission status: Accepted

Solution code:
X = [int(input()) for _ in range(int(input()))]
maxX = max(X)
X.remove(maxX)
print(sum(X) + round(maxX / 2))

Submission status: Accepted

Solution code:
n = int(input())
p = [int(input()) for _ in range(n)]
p[p.index(max(p))] = max(p)/2
print(round(sum(p)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
p=[]
for i in range(n):
    p.append(int(input()))
h=max(p)
print(sum(p)-h+h//2)

Submission status: Accepted

Solution code:
n = int(input())
p = [int(input()) for i in range(n)]
s = 0

for i in range(n):
    s += p[i]

ans = s - (max(p)/2)
ans = format(ans,'.0f')
print(ans)

Submission status: Accepted

Solution code:
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    n=INT()
    p=[]
    for i in range(n):
        p.append(INT())
    print(int(sum(p)-max(p)/2))
    
if __name__ == '__main__':
    do()

Submission status: Accepted

Solution code:
n = int(input())
p = sorted([int(input()) for i in range(n)])
print(sum(p[:-1])+p[-1]//2)

Submission status: Accepted

Solution code:
n = int(input())
p = [int(input()) for i in range(n)]
p.sort()
p[-1]//=2
print(sum(p))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
l=[]
for i in range(n):
            p_i=int(input())
            l.append(p_i)
print(sum(l)-max(l)//2)

Submission status: Accepted

Solution code:
import math
import string


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


def nCr(n, r):
    return math.factorial(n)//math.factorial(n-r)*math.factorial(r)


n = int(input())
b = 0
x = 0
for i in range(n):
    a = int(input())
    b += a
    x = max(x, a)
print(b-(x//2))

Submission status: Accepted

Solution code:
n=int(input())
m=0
s=0
for i in range(n):
    p=int(input())
    s+=p
    m=max(m,p)
print(int(s-(m/2)))

Submission status: Accepted

Solution code:
N = int(input())
P = sorted([int(input()) for p in range(N)])
print(sum(P[:N - 1]) + int(P[N - 1] / 2))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())

p=[]

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


p.sort(reverse=True)

max = p[0]
els = p[1:]


print(sum(els) + int((max/2)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
N = int(input())
P = [int(input()) for _ in range(N)]

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

Submission status: Accepted

Solution code:
N = int(input())
p_li = [int(input()) for i in range(N)]
ans = 0
p_li.sort(reverse=True)
for i in range(N) :
    if i == 0 :
        ans += int(p_li[i] / 2)
    else :
        ans += p_li[i]
print(ans)

Submission status: Accepted

Solution code:
n=int(input())
l=[int(input()) for _ in range(n)]
l.sort(reverse=True)
print(l[0]//2+sum(l[1:]))

Submission status: Accepted

Solution code:
n = int(input())
p = []

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

Submission status: Accepted

Solution code:
n = int(input())
a = []
for i in range(n):
    a.append(int(input()))
a.sort(reverse=True)
p = a[0]
a.pop(0)

print(p//2+sum(a))

Submission status: Accepted

Solution code:
N = int(input())
L = []
a = 0
for i in range(N):
    L.append(int(input()))
L.sort()
L[N-1] = L[N-1]//2
for i in range(N):
    a = a + L[i]
print(a)

Submission status: Accepted

Solution code:
N=int(input())
total=0
maximum=100
for i in range(N):
    p=int(input())
    total+=p
    maximum=max(maximum,p)
print(total-maximum//2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
p = []
for _ in range(n):
    p.append(int(input()))
p.sort()
answer = sum(p[:n-1])
answer += p[n-1] // 2
print(answer)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
ar = [int(input()) for i in range(n)]
print(int(max(ar)/2 + sum(ar) - max(ar)))

Submission status: Accepted

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

#----------
N = int(input().strip())
p_list = [int(input().strip()) for _ in range(N)]
#----------
p_list.sort()

sum = p_list[-1] / 2
for i in p_list[:-1]:
    sum += i

print(int(sum))

Submission status: Accepted

Solution code:
n=int(input())
p = sorted([int(input()) for _ in range(n)], reverse=True)
print(p[0]//2 + sum(p[1:]))

Submission status: Accepted

Solution code:
N = int(input())
Price = [int(input()) for i in range(N)]
Price.sort()

total = sum(Price[:-1]) + Price[-1] // 2
print(total)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
p, *P = sorted((int(input()) for _ in range(N)), reverse=True)
print(p // 2 + sum(P))

Submission status: Accepted

Solution code:
#115_B
N=int(input())
p=[int(input()) for _ in range(N)]
p.sort()
print(p[-1]//2+sum(p[:-1]))

Submission status: Accepted

Solution code:
N=int(input())
p_list=[int(input()) for i in range(N)]
s=sorted(p_list)
print(sum(s[:N-1])+s[N-1]//2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve():
    p = [int(input()) for _ in range(int(input()))]
    return sum(p) - max(p)//2

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

Submission status: Accepted

Solution code:
N = int(input())
p=[int(input()) for _ in range(N)]
#print(p)
p.sort()

_sum=sum(p)-int(p[-1]/2)
print(_sum)

Submission status: Accepted

Solution code:
n=int(input())
l=[]
for i in range(n):
            p_i=int(input())
            l.append(p_i)
l.sort()
print(l[-1]//2+sum(l[:n-1]))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
p=[]
total=0
for i in range(N):
    p.append(int(input()))
p=sorted(p)
for i in range(N):
    total+=p[i]
print(int(total-p[N-1]/2))

Submission status: Accepted

Solution code:
N=int(input())
P=list(int(input()) for i in range(N))
#print(*P)
P.sort()
print(sum(P)-P[-1]//2)

Submission status: Accepted

Solution code:
n = int(input())

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

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

Submission status: Accepted

Solution code:
l=[int(input()) for _ in range(int(input()))]
print(sum(l)-int(max(l)/2))

Submission status: Accepted

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

M = max(p)
p.remove(M)

print(M // 2 + sum(p))

Submission status: Accepted

Solution code:
n = int(input())
p = sorted([int(input()) for _ in range(n)], reverse=True)
print(int(p[0]/2)+sum(p[1:]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
p =[int(input()) for i in range(N)]
p.sort(reverse=True)
p[0] = p[0]/2
print(int(sum(p)))

Submission status: Accepted

Solution code:
n = int(input())
p = []
ans = 0
for i in range(n):
    a = int(input())
    p.append(a)
    ans+=a
print(ans-max(p)//2)

Submission status: Accepted

Solution code:
n=int(input())
l=[]
for i in range(n):
  v=int(input())
  l.append(v)
l.sort()
l[n-1]=l[n-1]//2
sum=0
for i in range(n):
  sum+=l[i]
print(sum)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
p = list(int(input()) for i in range(N))
p.sort()
p[-1] = p[-1] // 2
print(sum(p))

Submission status: Accepted

Solution code:
N=int(input())
ls=[]
for i in range(N):
  p=int(input())
  ls.append(p)
a=max(ls)/2
b=sum(ls)
c=int(b-a)
print(c)

Submission status: Accepted

Solution code:
n = int(input())
l = []
for i in range(n):
    l.append(int(input()))
l.sort(reverse=True)
print(l[0]//2+sum(l[1:]))

Submission status: Accepted

Solution code:
n,*p=map(int,open(0))
print(sum(p)-max(p)//2)

Submission status: Accepted

Solution code:
N = int(input())

l = [int(input()) for p in range(N)]
l[l.index(max(l))] = max(l) * 0.5
print(int(sum(l)))

Submission status: Accepted

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

p_sorted = sorted(p)

p_sorted[n-1] = p_sorted[n-1] // 2

print(sum(p_sorted))

Submission status: Accepted

Solution code:
N = int(input())
p = sorted([int(input()) for _ in range(N)], reverse=True)
ans = p[0] // 2 + sum(p[1:])
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
lst = list()
for i in range(n):
    p = int(input())
    lst.append(p)
print(int(sum(lst)-max(lst)/2))

Submission status: Accepted

Solution code:
N = int(input())
P = []
max = 0
for i in range(N):
    p = int(input())
    P.append(p)
    if p > max:
        idx = i
        max = p
print(sum(P) - P[idx]//2)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    N = int(input())
    P = [int(input()) for _ in range(N)]
    P.sort(reverse=True)
    print(P[0] // 2 + sum(P[1:]))


if __name__ == "__main__":
    main()

Submission status: Accepted

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

p.sort()
p[-1] //= 2

print(sum(p))

Submission status: Accepted

Solution code:
N=int(input())
coupen=0
ans=0
for i in range(N):
    p=int(input())
    ans+=p
    coupen=max(coupen,p)

ans-=int(coupen/2)
print(ans)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.buffer.readline

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
l = [int(input()) for i in range(n)]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().rstrip()

def main():
    N = int(input())
    P = [int(input()) for _ in range(N)]
    print(sum(P) - max(P) // 2)
    
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a = int(input())
b = [int(input()) for i in range(a)]
b.sort(reverse = True)
print(sum(b)-b[0]//2)

Submission status: Accepted

Solution code:
n = int(input())
p = []

for i in range(n):
    p.append(int(input()))
max_p = max(p)
sum_p = sum(p)
print(str(int(sum_p - max_p // 2)))

Submission status: Accepted

Solution code:
N = int(input())
count=0
P=[]
for i in range(N):
	P.append(int(input()))
P_2=sorted(P)
for i in range(N):
	if i == N-1:
		count+=(P_2[i]//2)
	else:
		count+=P_2[i]

print(count)

Submission status: Accepted

Solution code:
n=int(input())
p=[int(input()) for i in range(n)]
p=sorted(p,reverse=True)

print(sum(p[1:])+p[0]//2)

Submission status: Accepted

Solution code:
#
# 　　  ⋀_⋀　 
#　　  (･ω･)  
# .／ Ｕ ∽ Ｕ＼
#  │＊　合　＊│
#  │＊　格　＊│ 
#  │＊　祈　＊│ 
#  │＊　願　＊│ 
#  │＊　　　＊│ 
#      ￣
#
import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,sqrt,factorial,hypot,log #log2ないｙｐ
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from fractions import gcd
from random import randint
def ceil(a,b): return (a+b-1)//b
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    N=I()
    P=LIN(N)
    print(sum(P)-max(P)//2)
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    A = [int(input()) for i in range(N)]
    A.sort()
    A[-1] //= 2
    print(sum(A))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
 
stdin = sys.stdin
 
ni = lambda: int(ns())
nin = lambda x: [ni() for _ in range(x)]
na = lambda: list(map(int, stdin.readline().split()))
nan = lambda x: [na() for _ in range(x)]
ns = lambda: stdin.readline().rstrip()
nas = lambda: stdin.readline().split()

n = ni()
p = nin(n)
print(sum(p) - max(p) + max(p) // 2)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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