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())
item=[]
total=0
for i in range(n):
  s=int(input())
  item.append(s)
item.sort()

for i in range(n):
  if i==n-1:
    total=total+int(item[i]/2)
  else:
    total=total+item[i]
print(total)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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()
print(sum(P[:n-1])+P[n-1]//2)

Submission status: Accepted

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

N = int(input())
AB = [int(input()) for _ in range(N)]
print(sum(AB)-max(AB)+max(AB)//2)

Submission status: Accepted

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

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:
l=[int(input()) for _ in range(int(input()))]
print(sum(l)-int(max(l)//2))

Submission status: Accepted

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

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())
List=[int(input()) for i in range(N)]
print(sum(List)-(max(List)//2))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
sum = 0
discount = 0
for _ in range(n):
  price = int(input())
  sum += price
  if price / 2 > discount:
    discount = price / 2
print(int(sum - discount))

Submission status: Accepted

Solution code:
"""#################################################################
【ABC115】
B_Christmas_Eve_Eve
#################################################################"""

#インポート
import sys

#入力用
def ILI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def ISI(): return map(int, sys.stdin.readline().rstrip().split())
def II(): return int(sys.stdin.readline().rstrip())
def ISS(): return sys.stdin.readline().rstrip().split()
def IS(): return sys.stdin.readline().rstrip()

N = II()
lst = []
for i in range(N):
    lst.append(II())
lst = sorted(lst)
print(int(lst[-1]/2)+sum(lst[:-1]))

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

N = int(input())
a = [int(input()) for _ in range(N)]
max_i = a.index(max(a))
a[max_i] = a[max_i] // 2
print(sum(a))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

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

P = sorted(P)
P = P[::-1]
Ans = sum(P) - P[0]//2

print(Ans)

Submission status: Accepted

Solution code:
N=int(input())
A=[int(input()) for i in range(N)]
x=sorted(A,reverse=True)
x[0]=x[0]/2
print(int(sum(x)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
p = [0] * N
for i in range(N):
  p[i]=int(input())
  
p = sorted(p,reverse=True)
ans = p.pop(0) / 2 +sum(p)
print(int(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 i in range(n)]
M = max(P) // 2
P.remove(max(P))
P.append(M)
print(sum(P))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

n = int(input())

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

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

print(int(payment))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a = [int(input()) for i in range(int(input()))]
print(sum(a) - max(a)//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())
a=[]
for i in range(N):
  p=int(input())
  a.append(p)
b=max(a)
c=b//2
a.remove(b)
d=sum(a)
print(d+c)

Submission status: Accepted

Solution code:
import sys
from collections import deque
stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

n = ni()
li = [ni() for i in range(n)]
print(sum(li) - max(li)//2)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
a=int(input())
pl=[]
for i in range(a):
	h=int(input())
	pl.append(h)
sum=sum(pl)-(max(pl)/2)
print(int(sum))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    p = [int(input()) for _ in range(N)]
    
    ans = 0
    max_p = max(p)
    flag = False
    for i in p:
        if i == max_p and flag == False:
            ans += i // 2
            flag = True
        else:
            ans += i

    print(ans)

main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
p = [int(input()) for i in range(n)]
s = 0
p2 = max(p)/2
p.remove(max(p))

for i in p:
  s += i
  
print(int(s + p2))

Submission status: Accepted

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

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 _ in range(N):
    l.append(int(input()))

mx = max(l)
i = l.index(mx)
l[i] = l[i] / 2

print('{:.0f}'.format(sum(l)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#B - Christmas Eve Eve
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:
# coding: utf-8
# submission # - User: herp_sy
# https://atcoder.jp/contests/

import math
import statistics

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 = []
for _ in range(n):
    p.append(int(input()))

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

Submission status: Accepted

Solution code:
p = [int(input()) for _ in range(int(input()))]
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()
p[-1]=p[-1]//2
print(sum(p))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
P = [0]*N

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

P.sort(reverse=True)
ans = 0.5*P[0]+sum(P[1:N])
print(int(ans))

Submission status: Accepted

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

ps.sort()
ans=0
for i in range(n):
  if i==n-1:
    ans+=ps[i]/2
  else:
    ans+=ps[i]
print(int(ans))

Submission status: Accepted

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

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

Submission status: Accepted

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

sump = sum(p)
x = max(p)//2

print(int(sump - x))

Submission status: Accepted

Solution code:
a = [int(input()) for i in range(int(input()))]
print(int(sum(a)-max(a)/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()) for i in range(int(input()))]
a = 0
for i in range(len(n)):
    a += n[i]
print(int(a-max(n)/2))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N= int(input())

price = [int(input()) for i in range(N)]

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

Submission status: Accepted

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

Submission status: Accepted

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

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

ans = 0
m = max(P)
ans += m//2
P.remove(m)
print(ans + sum(P))

Submission status: Accepted

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

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

Submission status: Accepted

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

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())
A=[int(input()) for _ in range(N)]
print(sum(A) - max(A)//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)]
maxp = max(p)
p.remove(maxp)
print(maxp//2 + sum(p))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from fractions import gcd
import bisect
 
stdin = sys.stdin
 
ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
s = lambda h: [list(map(int, stdin.readline().split())) for i in range(h)]

n = ni()
s = [ni() for _ in range(n)]
print(int(sum(s) - max(s)/2))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

max_index = 0
max_price = 0
price_list = []

for i in range(0, n):
    p = int(input())
    price_list.append(p)
    if max_price < p:
        max_price = p
        max_index = i

p_sum = 0
for i, p in enumerate(price_list):
    if i == max_index:
        p_sum += p / 2
    else:
        p_sum += p

print(int(p_sum))

Submission status: Accepted

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

Submission status: Accepted

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

p.sort()

p[-1] //= 2

print(sum(p, 0))

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
input = sys.stdin.readline

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

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 = list(int(input()) for _ in range(n))

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

Submission status: Accepted

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


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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N, *P = map(int,open(0).read().split())
print(sum(P)-max(P)//2)

Submission status: Accepted

Solution code:
p = [int(input()) for _ in range(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()
print(sum(p[:-1]) + p[-1] // 2)

Submission status: Accepted

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

p.sort(reverse = True)
answer = int(-p[0] // 2) + sum(p)
print(answer)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
mx=-1; s=0
for _ in range(N):
  t=int(input())
  mx=max(mx,t)
  s+=t
print(s-mx//2)

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())
a = sorted([int(input()) for _ in range(n)])
sum = 0
for i in a:
    sum += i
print(int(sum - a[n - 1] / 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)]
p.sort(reverse=True)
p[0]=0.5*p[0]
s=sum(p)
print(int(s))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

maxV = max(p)
count = 0
isDone = False

for i in range(n):
    if p[i] == maxV and not isDone:
        count += maxV // 2
        isDone = True
    else:
        count += p[i]

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import copy

inputa = input().split()
# inputb = input().split()
# inputc = input().split()

a = int(inputa[0])
# b = int(inputa[1])
# c = int(inputa[2])

# inputb = input().split()
# inputbList = [int(x) for x in inputb]

# x = int(inputb[0])
# y = int(inputb[1])

inputList=[]
for i in range(a):
    inputNum = input()
    # inputNum = [int(x) for x in inputNum]
    inputList.append(int(inputNum))

# inputList = [int(n) for n in inputList]

# b = [int(n) for n in inputb]
# c = [int(n) for n in inputc]

max = max(inputList)

sum = 0
for i in range(a):
    sum += inputList[i]

print(int(sum - max/2))

Submission status: Accepted

Solution code:
n=int(input())
x=0
y=0
for i in range(n):
    k=int(input())
    y+=k
    if k>x:
        x=k
print(y-x//2)

Submission status: Accepted

Solution code:


n = int(input())
values = [int(input()) for x in range(n)]
print(sum(values) - max(values)//2)

Submission status: Accepted

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

Submission status: Accepted

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

nl = sorted(l, reverse=True)
nlm = round(nl[0]/2)
nls = sum(nl[1:])
print(nlm + nls)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(sum(price_list))

Submission status: Accepted

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

print(sum(List)-int(max(List)/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())
_max = 0
result=0
for i in range(N):
    tmp = int(input())
    result+=tmp
    _max = tmp if tmp>_max else _max
print(int(result-(_max/2)))

Submission status: Accepted

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

max = 0

for j in range(N):
    if max < p[j]:
        max = p[j]
        tmp = j

ans = 0

for j in range(N):
    if j == tmp:
        ans += max // 2
    else:
        ans += p[j]

print(ans)

Submission status: Accepted

Solution code:
p = [int(input()) for _ in range(int(input()))]
print(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())
p = [int(input()) for _ in range(N)]

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

Submission status: Accepted

Solution code:
*s, h = sorted(int(input()) for _ in range(int(input())))
print(sum(s)+h//2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = sorted(map(int, [input() for _ in range(int(input()))]))
max_price_half = n[-1] / 2
total = sum(n) - n.pop(-1) + max_price_half
print(int(total))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
l = list()
for i in range(n):
  a = int(input())
  l.append(a)

l.sort()
p = 0.5*l[-1] + sum(l[:-1])
print(int(p))

Submission status: Accepted

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

Submission status: Accepted

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

sum = p[0] // 2

for i in p[1:]:
    sum += i

print(sum)

Submission status: Accepted

Solution code:
N = int(input())

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

tmp_max = tmp[tmp.index(max(tmp))]//2
tmp[tmp.index(max(tmp))] = 0
other = sum(tmp)

print(int(tmp_max+other))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
string_list=[int(input()) for i in range(n)]
int_list=sorted(string_list,reverse=True)
ix=0
res=0
for il in int_list:
    if ix == 0:
        res=int(il/2)
        ix=1
    else:
        res=res+il
print(res)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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())
Ps = [int(input()) for _ in range(n)]

Ps.sort()
m = Ps.pop() // 2
print(m + sum(Ps))

Submission status: Accepted

Solution code:

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

Ps.sort()
m = Ps.pop() // 2
print(m + sum(Ps))

Submission status: Accepted

Solution code:
import math
import sys
import itertools
import queue
from fractions import gcd

def lcm(a, b):
    return a * b // gcd(a, b)

def combination(n, r):
    return factorial(n) // (factorial(n - r) * factorial(r))

sys.setrecursionlimit(10000)

mod = 1000000007

"""
# 0埋め, 小数点出力桁指定時のときの出力
a = 100
b = 0.987654321
print("{0:06d}-{1:6f}".format(a,b))
000100-0.987654

# 文字列をリストに格納
char_list = list("abcd") # ["a","b","c","d"]

# 標準入力取得
## 文字列
    = sys.stdin.readline().rstrip()
    = list(sys.stdin.readline().rstrip())

## 数値
    = int(sys.stdin.readline())
    = map(int, sys.stdin.readline().split())
    = list(map(int, sys.stdin.readline().split()))
    = [list(map(int,list(sys.stdin.readline().split()))) for i in range(h)]  # 二次元配列入力　二次元マップみたいな入力のとき
"""

if __name__ == "__main__":
    N = int(sys.stdin.readline())
    L =[ int(sys.stdin.readline()) for _ in range(N)]
    m = max(L)
    print(sum(L) - int(m/2))

Submission status: Accepted

Solution code:
import math
import sys
import itertools
import queue
from fractions import gcd

def lcm(a, b):
    return a * b // gcd(a, b)

mod = 1000000007

"""
# 0埋め, 小数点出力桁指定時のときの出力
a = 100
b = 0.987654321
print("{0:06d}-{1:6f}".format(a,b))
000100-0.987654

# 文字列をリストに格納
char_list = list("abcd") # ["a","b","c","d"]

# 標準入力取得
## 文字列
    = sys.stdin.readline().rstrip()
    = list(sys.stdin.readline().rstrip())

## 数値
    = int(sys.stdin.readline())
    = map(int, sys.stdin.readline().split())
    = list(map(int, sys.stdin.readline().split()))
    = [list(map(int,list(sys.stdin.readline().split()))) for i in range(h)]  # 二次元配列入力　二次元マップみたいな入力のとき
"""

if __name__ == "__main__":
    n = int(sys.stdin.readline())
    p = list(map(int,sys.stdin.readlines()))
    p.sort()
    p[-1] = p[-1]//2
    ans = sum(p)
    print(ans)

Submission status: Accepted

Solution code:
n = int(input())
l = [int(input()) for _ in [0]*n]
print(sum(l)-max(l)//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())
lst = [int(input()) for i in range(N)]
ans = sum(lst) - max(lst) + max(lst)/2
print(round(ans))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
p = [int(input()) for i in range(n)]
ps = sorted(p)
s = sum(ps) - ps[-1]*0.5
print(int(s))

Submission status: Accepted

Solution code:
n=int(input())

products=[]

for i in range(n):
    products.append(int(input()))
#print(products)

ans=sorted(products,reverse=True)
ans[0]=ans[0]/2
print(int(sum(ans)))

Submission status: Accepted

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

for i in range(n):
    a = int(input())
    arr.append(a)

arr.sort()

print(sum(arr)-arr[-1]//2)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
p = [int(input()) for _ in range(n)]
p.sort()
print(sum(p) - p[len(p)-1] + p[len(p)-1] // 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:
d = int(input())

item = []
sum = 0
max = 0

for i in range(d):
    item.append(int(input()))
    sum += item[i]
    if item[i] >= max:
        max = item[i]

sum -= int(max/2)

print(sum)