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:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)


def main():
    n = I()
    a = [I() for _ in range(n)]
    r = sum(a)
    r -= max(a) // 2

    return r


print(main())

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())
count = 0
m = 0
for i in range(a):
    l = int(input())
    count += l
    if m < l:
        m = l
print(count - m // 2)

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:

# coding: utf-8

# In[30]:


"""問題文

とある世界では、今日はクリスマスイブの前日です。

高羽氏は、デパートで N
個の品物を買おうとしています。i 個目の品物 (1≤i≤N) の定価は pi

円です。

彼は割引券を持っており、N
個のうち最も定価が高い品物 1 個を定価の半額で買うことができます。残りの N−1

個の品物に対しては定価を支払います。支払金額は合計でいくらになるでしょうか？
制約

    2≤N≤10

100≤pi≤10000
pi
は偶数である。"""


# In[32]:


N=int(input())

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

#pをソート
p.sort(reverse=True)
#一番値段の高いモノを半額
p[0]=p[0]/2

tot=0
for i in p:
    tot=tot+i
    
print(int(tot))

Submission status: Accepted

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

Submission status: Accepted

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

n = int(input())

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

p_max_half = max(p)/2
p_max_index = p.index(max(p))

p_sum = sum(p)

print(int(p_sum-p_max_half))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import numpy as np
N = int(input())

e = [0] * (N+1)

for i in range(1, N+1):
    e[i] = int(input())

print(np.sum(np.array(e))-int(np.max(np.array(e))/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())
l = []
sum = 0
for i in range (0,n) :
    x=int(input())
    l.append(x)
    sum+=x
l.sort()
sum-=l[n-1]//2
print(int(sum))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
n = int(input())
item = np.array([int(input()) for i in range(n)])

print(int(item.sum()-item.max()/2))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

sum_a=0
max_a=0
for a in p:
    sum_a+=a
    if max_a<a:
        max_a=a
        
sum_a-=max_a/2
print(int(sum_a))

Submission status: Accepted

Solution code:
N = int(input())
p_list = [None] * N
for n in range(N):
    p_list[n] = int(input())

max_price = max(p_list)
p_list[p_list.index(max_price)] = max_price // 2
print(sum(p_list))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
a=[0]*n
kei=0
for i in range(0,n,1):
    a[i]=int(input())
    kei=kei+a[i]

a.sort(reverse=True)
kei=kei-a[0]//2
print(kei)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
from sys import stdin

s_in = lambda: stdin.readline()[:-1]  # s = s_in()
d_in = lambda: int(stdin.readline())  # N = d_in()
ds_in = lambda: list(map(int, stdin.readline().split()))  # List = ds_in()


N = d_in()
cost = []
for _ in range(N):
    cost.append(d_in())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
sum = 0
max = 0
for _ in range(N):
    p = int(input())
    sum += p
    max = p if p > max else max

print(sum - max // 2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

p = list()
for _ in range(N):
    p.append(int(input()))

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
sm,mx = 0,0
for i in range(N):
  P = int(input())
  sm += P
  mx = max(mx, P)

a = int(sm - mx / 2)
print(a)

Submission status: Accepted

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

Submission status: Accepted

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

max_p = max(p_list) 
p_list.remove(max_p)

print(int(sum(p_list) + max_p / 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:
total = int(input())
price = []
for i in range(total):
    price.append(int(input()))

max_price = max(price)

print(int(sum(price) - max_price/2))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin


def main():
    N = int(stdin.readline().rstrip())
    p = [int(stdin.readline().rstrip()) for _ in range(N)]
    p = sorted(p)
    print(sum(p[:-1]) + p[-1] // 2)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N = int(input())

p = []
ans = 0

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

p.sort()

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

print(ans + p[N-1] // 2)

Submission status: Accepted

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

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

Submission status: Accepted

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

res = sum(L) - max(L)//2
print(res)

Submission status: Accepted

Solution code:
N = int(input())

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

max = max(P)

#print(max)
dif = int(0.5*max)
print(sum(P)-dif)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
sum = 0
max = -1
for i in range(N):
    price = int(input())
    sum += price
    if price > max:
        max = price
print(int(sum-max/2))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
p = list()
for x in range(0,N):
    p.append(int(input()))
p_sorted = sorted(p)
p_sorted[N-1] = p_sorted[N-1]//2
X = 0
for y in range(0,N):
    X += p_sorted[y]
print(X)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

ma = max(p)
for i in range(N):
    if p[i] == ma:
        p[i] = ma/2
        break

print(int(sum(p)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num = int(input())

l = []

for i in range(num):
    price = int(input())
    l.append(price)

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

Submission status: Accepted

Solution code:
#abc115b

n=int(raw_input())
p=[]
for i in xrange(n):
 p.append(int(raw_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) - int(max(p) / 2))

Submission status: Accepted

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


import sys


n = int(input())
ps = [int(input()) for l in range(n)]
ps.sort()

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

Submission status: Accepted

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

Submission status: Accepted

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

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

x=max(li)
total=sum(li)-x//2

print(total)

Submission status: Accepted

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

a.sort()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
L = []
for i in range(N):
    p_i = int(input())
    L.append(p_i)
k = L.index(max(L))
m = max(L) // 2
del L[k]
print(sum(L)+m)

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=input()
p=[]
total=0
flg=0
for i in range(N):
	p.append(input())
for i in range(N):
  if max(p) == p[i] and flg==0:
    flg=1
    total += p[i]/2
  else:
    total += p[i]
print total

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
N=int(input())

temp=0
out_sum=0
for i in range(N):
    present=int(input())
    if temp < present:
        temp=present
    out_sum+=present
        
out_sum-=temp/2

print(int(out_sum))

Submission status: Accepted

Solution code:
n = int(raw_input())

arr = []
for i in xrange(n):
    a = int(raw_input())
    arr.append(a)

max = -1
sum = 0
for i in xrange(n):
    if arr[i] > max:
        max = arr[i]
    sum += arr[i]

sum -= max/2

print sum

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
p=[]
i=1
while i<=N:
    p.append(int(input()))
    i=i+1

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

Submission status: Accepted

Solution code:
N = int(input())

P = map(int, [ input() for _ in range(N) ])
P = list(P)
print (int(sum(P) - max(P) / 2.0 ))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

num = p.index(max(p))
p[num] = p[num] // 2

print(sum(p))

Submission status: Accepted

Solution code:
N = int(input())
li = [int(input()) for i in range(N)]
x = max(li)

for i in range(N):
    if li[i] == x:
        li[i] = int(x / 2)
        break

print(sum(li))

Submission status: Accepted

Solution code:
N = int(input())

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

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

print(sum(value))

Submission status: Accepted

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

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

Submission status: Accepted

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

values = [int(input()) for _ in range(n)]
boro = max(values)
index = values.index(max(values))
del values[index]
boro = int(boro / 2.0)
values.append(boro)
sum = 0

for i in values:
    sum += i

print(sum)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
N = int(input())
a = [int(input()) for i in range(N)]
s = int(max(a)) // 2
a.remove(max(a)) #aの最大の要素を消去
print(sum(a) + s) #処理後のリストaにSを加えて足す

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
sum = 0
value = []
mv = 0
mn = 0
for i in range(N):
    val = int(input())
    value.append(val)
    if value[i] > mv:
        mv = value[i]
        mn = i

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

print(int(sum))

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8


def main():
    n = int(input())

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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from sys import stdin
a = stdin.readline()
w=int(a)
j=1
sumvalue=0
maxvalue=0
w2=[]
while j<=w:
    z = stdin.readline().rstrip('\n')
    sumvalue+=int(z)
    maxvalue=max(maxvalue,int(z))
    j+=1
print(sumvalue-int(maxvalue/2))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n=int(input())
s=[]
ans=0
for i in range(n):
    s.append(int(input()))
s.sort()

for i in range(n-1):
    ans+=s[i]
ans+=int(s[n-1]/2)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

s = sum(P)

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
p = []
for n in range(int(input())):
    p.append(int(input()))

max_value = max(p)
p.remove(max_value)
print(int(max_value / 2) + 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:
def main():
    n = int(input())
    p = []
    for i in range(n):
        p.append(int(input()))

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

    print(sum(p))

if __name__ == "__main__":
    main()

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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


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

    # See:
    # https://img.atcoder.jp/abc115/editorial.pdf
    print(sum(p) - max(p) // 2)


if __name__ == '__main__':
    main()

Submission status: Accepted

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


def main():
    n = int(input())
    p = sorted([int(input()) for _ in range(n)])
    ans = 0

    for index, pi in enumerate(p, 1):
        if index == n:
            ans += int(pi / 2)
        else:
            ans += pi

    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python

from collections import deque
import itertools as it
import sys
import math

sys.setrecursionlimit(1000000)

INF = 10 ** 18
MOD = 10 ** 9 + 7

N = input()

p = [input() for i in range(N)]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#
# coding: utf-8

n=int(input())
p=[] #pは値段のリスト
sum=0 #sumは合計金額

for i in range(n):
    p.append(int(input()))
p.sort() #pをソート
p[n-1]=int(p[n-1]/2) #p中で一番高いのを半額
for q in p:
    sum+=q

print(sum)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input());
p = [];

b = 0;

for i in range(N):
    p.append(int(input()));
    b += p[i];


a = max(p);
a /= 2;

b -= a;
print(round(b));

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

xs = sorted(p)
result = sum(xs) - xs[-1] // 2
print(result)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
a = int(input())
c = [int(input()) for i in range(a)]
max_c = max(c)
print(int(sum(c)-max_c/2))

Submission status: Accepted

Solution code:
N = int(input())
pi = list(map(lambda x: int(input()), range(N)))

max_pi = max(pi)
sum_pi = int(sum(pi) - max_pi/2)

print(sum_pi)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
ma = 0
ans = 0
for i in range(N):
    p = int(input())
    if ma < p/2:
        ma = int(p/2)
    ans += p
else:
    print(ans - ma)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
arr = []
s = 0
for i in range(n):
    temp = int(input())
    arr.append(temp)
    s += temp
print(int(s - max(arr)/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(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:
def solve(string):
    ins = list(map(int, string.split("\n")))[1:]
    ins.sort()
    ins[-1] //= 2
    return str(sum(ins))


if __name__ == '__main__':
    n = int(input())
    ins = [input() for _ in range(n)]
    print(solve("{}\n{}".format(n, "\n".join(ins))))

Submission status: Accepted

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

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

p.sort()

ans = round(sum(p) - p[-1] / 2)

print(ans)

Submission status: Accepted

Solution code:
# Title: Christmas Eve Eve
# Link: https://abc115.contest.atcoder.jp/tasks/abc115_b

import sys


sys.setrecursionlimit(10 ** 6)

read_single_int = lambda: int(sys.stdin.readline().strip())


def solution(ps: list):
    max_price = max(ps)
    return sum(ps) - max_price//2


def main():
    n = read_single_int()
    ps = []
    for _ in range(n):
        ps.append(read_single_int())
    print(solution(ps))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

price_s = sorted(price)
price_s[len(price_s)-1] = price_s[len(price_s)-1]/2

import numpy as np

a = np.array(price_s)
print(int(a.sum()))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# your code goes here
n=int(input())
l=[]
h=0
cnt=0
b=0
for a in range (0,n):
	l.append(int(input()))

for a in l:
	if a>h:
		h=a
		hn=b
		
	b+=1
for a in range(0,n):
	if hn==a:
		cnt+=l[a]/2
	else:
		cnt+=l[a]
		
print(int(cnt))

Submission status: Accepted

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

N = int(input())
l = [int(input()) for i in range(N)]
l = sorted(l)
sum = 0
for i in range(len(l)):
    if i==N-1:
        sum = sum+(l[i]/2)
    else:
        sum = sum+l[i]
        
        
print(int(sum))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = []
for i in range(int(input())):
    a.append(int(input()))
print(sum(a) - max(a)//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:
#!/usr/bin/env python3
N = int(input())
p = [None] * N
for i in range(N):
    p[i] = int(input())
print(sum(p) - max(p) // 2)

Submission status: Accepted

Solution code:
# B - Christmas Eve Eve
N = int(input())

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

p_max = max(p)

total = sum(p)
print('%d' % (total - (p_max / 2)))

Submission status: Accepted

Solution code:
n = int(input())
_max = 0
_sum = 0
for i in range(n):
    p = int(input())
    _sum += p
    if p > _max:
        _max = p
print(_sum - int(_max/2))

Submission status: Accepted

Solution code:
N = int(input())


p = []
for i in range(N):
  p.append(int(input()))
  
p_max = p.index(max(p))


p[p_max] = p[p_max] / 2 

print(int(sum(p)))

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
shouhin_list = []

kaisu = int(input().rstrip())

for _ in range(kaisu):
    shouhin_price = int(input().rstrip())
    shouhin_list.append(shouhin_price)
    
sorted_shouhin_list = sorted(shouhin_list, reverse=True)
sorted_shouhin_list[0] = int(sorted_shouhin_list[0] // 2)

print(sum(sorted_shouhin_list))

Submission status: Accepted

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

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

Submission status: Accepted

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

m = max(p)//2

print(sum(p)-m)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
highest = 0
sum=0
for i in range(n):
    v=int(input())
    sum+=v
    if v > highest:
        highest = v
print(sum-int(highest/2))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a = sorted(list(map(int, [input() for i in range(n)])))
ans = sum(a) - (a[n-1] / 2)
print(int(ans))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
l = []
for _ in [0]*int(input()):
  l += [int(input())]
print(sum(l)-max(l)//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(sum(p))

Submission status: Accepted

Solution code:
N=int(input())
p=[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())
ma=0
sum=0
for i in range(n):
    m=int(input())
    sum+=m
    ma=max(ma,m)
print(sum-ma//2)

Submission status: Accepted

Solution code:
N = int(input())
p = []
for i in range(N):
    _p = int(input())
    p.append(_p)
biggest = 0
j = 0
for i in range(N):
    if(p[i]>=biggest):
        j = i
        biggest=p[i]
p[j] = p[j] / 2
print(int(sum(p)))

Submission status: Accepted

Solution code:
N = int(input())
max = 0
sum = 0
for i in range(N):
  P = int(input())
  if P > max:
    sum += max
    max = P
  else:
    sum += P
sum += int(max / 2)
print(sum)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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