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())
ans_list =[]
for i in range(N):
    ans_list.append(int(input()))
max = max(ans_list)
ans = 0    
for i in ans_list:
    ans = ans + i
ans = ans-int(max/2)
print(ans)

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 i in range(N)]

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

Submission status: Accepted

Solution code:
n = int(input())

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

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

print(int(ans))

Submission status: Accepted

Solution code:
N = int(input())

list_p = []

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

sum_p = 0
cnt = 0
for i in list_p:
    if i == max(list_p):
        if cnt == 0:
            sum_p += int(i / 2)
            cnt += 1
        else:
            sum_p += i
    else:
        sum_p += i
print(int(sum_p))

Submission status: Accepted

Solution code:
import sys
import numpy as np

plist = np.array([int(price) for price in sys.stdin.readlines()[1:]])
plist[plist.argmax()]/=2
print(int(plist.sum()))

Submission status: Accepted

Solution code:
n = int(input())

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

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

Submission status: Accepted

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


#%% 
# n = 3
# p = [4980, 7980, 6980]


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

#%%

Submission status: Accepted

Solution code:
import sys, copy, math, collections, itertools

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

Submission status: Accepted

Solution code:
list = []
max_value = 0
sum_value = 0
n = int(input())

for i in range(n):
    value = int(input())
    list.append(value)
    if max_value < value:
        max_value = value
    sum_value = sum_value + list[i]

print(sum_value - int(max_value / 2))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
def main():
	
	n = int(input())
	sum = 0
	l = np.zeros(n)
	for i in range(n):
		buf = int(input())
		l[i] = buf
		sum += buf
	
	print(int(sum-np.max(l)/2))
		
	
		
main()# your code goes here

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

amax = 0
asum = 0
for i in range(N):
    a = int(input())
    asum += a
    if amax < a:
        amax = a

sum = asum - amax/2
print(int(sum))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

max_p = max(ps)
ps.remove(max(ps))
print(int(sum(ps) + max_p / 2))

Submission status: Accepted

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

p.sort()
m = p.pop(n-1)

for _ in p:
    t += _
print(int(t+m/2))

Submission status: Accepted

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

#print(b)

b=sorted(b)
print(int(b[-1]/2+sum(b)-b[-1]))

Submission status: Accepted

Solution code:
n = int(input())

values = []

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

pay = sum(values) - max(values)//2

print(pay)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sat Dec  8 20:50:55 2018

@author: Owner
"""

import collections
import scipy.misc
import sys
import numpy as np
import math
from operator import itemgetter

def prime_decomposition(n):
  i = 2
  table = []
  while i * i <= n:
    while n % i == 0:
      n /= i
      table.append(int(i))
    i += 1
  if n > 1:
    table.append(int(n))
  return table   

def digit(i):
    if i > 0:
        return digit(i//10) + [i%10]
    else:
        return []

"""
N, X = map(int, input().split())

x = [0]*N
x[:] = map(int, input().split())

P = [0]*M
Y = [0]*M
for m in range(M):
    P[m], Y[m] = map(int, input().split())
    
all(nstr.count(c) for c in '753')
"""

N = int(input())

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

p[np.argmax(p)] = p[np.argmax(p)]/2

print(int(sum(p)))

Submission status: Accepted

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

mx = max(arr)

ans = sum(arr) - mx / 2

print(int(ans))

Submission status: Accepted

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

newp=int(max(p)/2)
p.remove(max(p))
p.append(newp)
print(sum(p))

Submission status: Accepted

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

Submission status: Accepted

Solution code:

import sys
N = int(input())
aP = sorted([int(_) for _ in sys.stdin.readlines()])
print(sum(aP)-(aP[-1]//2))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/mnt/c/Users/moiki/bash/env/bin/python
N = int(input())
p = []
sum = 0
for i in range(N):
    p.append(int(input()))
    sum += p[i]

p = sorted(p)
p.reverse()
sum -= p[0] // 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) - int(p[N-1] / 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=input()

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

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())
mx = 0
sm = 0
for i in range(N):
    p = int(input())
    if p > mx:
        sm = sm + mx
        mx = p
    else:
        sm = sm + p
sm = sm + mx // 2
print(sm)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(int(ans))

Submission status: Accepted

Solution code:
N=int(input())
P=list()
for i in range(N):
  pn=int(input())
  P.append(pn)
print(sum(P)-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:
import numpy as np
N = int(input())
p = np.array([ int(input()) for i in range(N)])
p.sort()
print(p.sum() - p[-1]//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())
p.sort()
p[-1] = int(p[-1]/2)
z = 0
for i in range(N):
	z += p[i]
print(z)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
add = 0
max_val = -1
for i in range(N):
    val = int(input())
    add += val
    if val > max_val:
        max_val = val
add -= max_val/2
print(int(add))

Submission status: Accepted

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

Submission status: Accepted

Solution code:

def solve():
  N = int(input())
  p = []
  for i in range(N):
    p.append(int(input()))
  mx = max(p)
  ans = 0
  for i in range(N):
    if p[i] == mx:
      p[i] = int (p[i] / 2)
      mx = 0
    ans = ans + p[i]
  print(ans)

if __name__ == '__main__':
  solve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
N = int(input())
lst = [int(input()) for _ in range(N)]
index_max = lst.index(max(lst))
lst[index_max] //= 2
print(sum(lst))

Submission status: Accepted

Solution code:
n = int(input())

sum = 0
max = 0

for i in range(n):
    p = int(input())
    sum += p
    if max < p:
        max = p

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
p = []
sum_p = 0
max_p = 0
for i in range(N):
    tmp = int(input())
    p.append(tmp)
    sum_p += tmp
    if tmp>max_p:
        max_p = tmp

print(sum_p-max_p//2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(int(a))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

max_i = p.index(max(p))
res = sum(p) - p[max_i] + p[max_i] // 2
print(res)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#coding:utf-8
n=[]
sum=0
a=int(input())
for i in range(a):
  n.append(int(input()))
n.sort()
for i in range(a):
  if(i==a-1):
    sum+=n[i]/2
  else:
    sum+=n[i]
print(int(sum))

Submission status: Accepted

Solution code:
import math
n = int(input())
p_list = list(map(int, [input() for _ in range(n)]))
max_p = max(p_list)
argmax_p = p_list.index(max_p)
discount_price = int(max_p / 2)
p_list[argmax_p] = discount_price
total_price = sum(p_list)
print(total_price)

Submission status: Accepted

Solution code:
N = int(input())
p_list = []
pmax = 0

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

    if pmax < P:
        pmax = P

Ans = sum(p_list) - pmax + int(pmax/2) 

print(Ans)

Submission status: Accepted

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

max_item = max(items)

print(sum(items) - max_item + max_item // 2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
l = list([])
max_price = 0
for i in range(n):
    p = int(input())
    l.append(p)
    if max_price < p:
        max_price = p
print((sum(l) - int(max_price/2)))

Submission status: Accepted

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

sum = 0
max = 0

for i in p:
    if max < i:
        max = i
    sum += i

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

Submission status: Accepted

Solution code:
N=int(input())
sump=0
maxp=0
for i in range(N):
  x=int(input())
  maxp=max(x,maxp)
  sump+=x
print(int(sump-maxp/2))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
pList=[]
ans=0
takai=0
for i in range(n):
  nedan=int(input())
  ans+=nedan
  if(takai<nedan):
    takai=nedan

ans=ans-(takai//2)

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
plist=[]
maxx=0

for i in range(N):
	p=int(input())
	plist.append(p)
	if p>maxx:
		maxx=p

ans=sum(plist)
ans-=maxx//2

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())

prices = [int(input()) for i in range(n)]
discount = max(prices) // 2

print(sum(prices) - discount)

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) + max(P)//2

print(price)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

p = []

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

max = 0

for i in p:
    if max <= i:
        max = i

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

Submission status: Accepted

Solution code:
n = int(input())

p = []
maxIdx = 0
max = 0
for i in range(n) :
    t = int(input())
    p.append(t)
    if t > max : 
        max = t
        maxIdx = i

sum = 0
for i in range(n) :
    if maxIdx == i :
        sum += p[i]>>1
    else:
        sum += p[i]

print(sum)

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:
import sys
from collections import deque
import copy
import math
def get_read_func(fileobject):
    if fileobject == None :
        return raw_input
    else:
        return fileobject.readline


def main():
    if len(sys.argv) > 1:
        f = open(sys.argv[1])
    else:
        f = None
    read_func = get_read_func(f);
    input_raw = read_func().strip().split()
    [N] = [int(input_raw[0])]
    p_list = []
    for i in range(N):
        input_raw = read_func().strip().split()
        [p]= [int(input_raw[0])]
        p_list.append(p)

    p_list.sort(reverse = True)
    print p_list[0]/2 + sum(p_list[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(reverse=True)
print(sum(p) - p[0]//2)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
n = int(input())

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

s -= mx//2
print(s)

Submission status: Accepted

Solution code:
n, = map(int, input().split())

p = [None for _ in range(n)]
for i in range(n):
    pi, = map(int, input().split())
    p[i] = pi

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n=int(input())
sum=0
maxs=0
for i in range(n):
    t=int(input())
    sum+=t
    maxs=max(maxs,t)
print(sum-maxs//2)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
from sys import stdin

def solve():
    n = int(stdin.readline().strip())

    maxi = 0
    cost = 0
    for i in range(n):
        item = int(stdin.readline().strip())
        cost += item
        if item>maxi:
            maxi = item
    cost -= maxi//2
    print(cost)

solve()

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline
n = int(input())
p_list = []
for _ in range(n):
    p = int(input())
    p_list.append(p)
p_list.sort(reverse=True)
value = 0
for i in range(n):
    if i == 0:
        value += int(p_list[i]/2)
    else:
        value += p_list[i]
print(value)

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(raw_input())
price = []
for i in xrange(n):
	x = int(raw_input())
	price.append(x)
val = sum(price) - max(price)/2
print val

Submission status: Accepted

Solution code:

N = int(input())

max_v = 0
s = 0
for i in range(N):
    p = int(input())
    max_v = max(max_v, p)
    s += p

print(s - max_v + int(max_v/2))

Submission status: Accepted

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

sorted_p_list = sorted(p_list)
sorted_p_list[-1] = sorted_p_list[-1] / 2

ans = int(sum(sorted_p_list))
print(ans)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

pay = sum(price) - int(max(price)/2)

print(pay)

Submission status: Accepted

Solution code:
n = int(input())
al = [int(input()) for _ in range(n)]
m = max(al)
s, f = 0, True
for i in range(n):
  if al[i] == m and f:
    s += al[i] // 2
    f = False
  else:
    s += al[i]
print(s)

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
n = int(input())

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

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

Submission status: Accepted

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

Submission status: Accepted

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

P.sort()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

max = 0
ans = 0
for _ in range(n):
    p = int(input())
    ans += p
    if p > max:
        max = p

ans -= max / 2

print(int(ans))

Submission status: Accepted

Solution code:
n = int(input())

total = 0
maxp = 0
for i in range(n):
    p = int(input())
    if p > maxp:
        maxp = p
    total += p

total -= maxp // 2

print(total)

Submission status: Accepted

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

a = max(p)//2
r = sum(p)-a

print(r)

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:
import numpy as np

N = int(input())

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

max_p = max(p_list)
p_i = p_list.index(max_p)
p_list[p_i] /= 2

print(int(np.sum(p_list)))

Submission status: Accepted

Solution code:
n = int(input())

p = [i for i in range(n)]

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

d = max(p) / 2

print(int(sum(p) - d))

Submission status: Accepted

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

max_num = 0
max_index = 0
for i in range(N):
    p = P[i]
    if p > max_num:
        max_num = p
        max_index = i
for i in range(N):
    if i == max_index:
        P[i] = P[i]//2
sum_num = 0
for i in range(N):
    sum_num += P[i]
print(sum_num)

Submission status: Accepted

Solution code:
N = int(input())
maxnum = 0
result = 0
for _ in range(N):
    p = int(input())
    result += p
    maxnum = max(maxnum, p)

print(result - maxnum // 2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import collections
import itertools
import math
import re
from collections import deque

MOD = 10 ** 9 + 7

# N = int(input())
# A = [int(x) for x in input().split()]
# V = [[0] * 100 for _ in range(100)]

N = int(input())

ma = 0
sum = 0
for i in range(N):
    p = int(input())
    sum += p
    ma = max(ma, p)

print(sum - ma // 2)

Submission status: Accepted

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


ans = 0
p = max(P)
last = 1
for i, v in enumerate(P):
    if v == p and last == 1:
        ans += int(v / 2)
        last -= 1
    else:
        ans += v


print(ans)

Submission status: Accepted

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

ma =max(p)
ans = 0
cnt = 0
for i in p:
    if i == ma and cnt ==0:
        ans += i/2
        cnt = 1
    else:
        ans += i
print(int(ans))

Submission status: Accepted

Solution code:
N = int(input())

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

A.sort()

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

price = []
total = 0

for i in range(N):
    p = int(input())
    price.append(p)
    total += p


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

print(total)

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=[]
for i in [0]*N:
	p.append(int(input()))

ans = 0
m = 0
for price in p:
	ans += price
	if m < price:
		m = price

ans = ans - m//2
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
P = []
for i in range(N):
  P.append(int(input()))
Sum = 0
k = 0
for i in range(N):
  if max(P) == P[i] and k==0:
    Sum += P[i]/2
    k+=1
  else:
    Sum += P[i]
print(int(Sum))

Submission status: Accepted

Solution code:
#coding:utf-8
s = int(input())
ls = []
for i in range(s):
    ls.append(int(input()))
ans = sum(ls)-max(ls)/2
print (int(ans))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin

def main():
    N = int(input())
    P = [int(input()) for _ in [0] * N]

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

input = lambda: stdin.readline()
main()

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

answer = 0
big = 0

for i in range(N):
	a = int(input())
	answer += a
	if big < a:
		big = a

print(int(answer-(big/2)))

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    s = 0
    m = 10
    for i in range(n):
        p = int(input())
        s += p
        if p > m:
            m = p
    print(s - m//2)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

maxp = 0
for pi in p:
    maxp = max(maxp, pi)

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

Submission status: Accepted

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


abc115_b()

Submission status: Accepted

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

def main():
    """Function."""
    n = int(input())

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

    print(int(sum(price) - 0.5*max(price)))

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
a = int(input())
p = []
for i in range(a):
	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 += [int(input())]
p.sort(reverse=1)
ans = p[0]//2
for i in range(n-1):
  ans += p[i+1]
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
p=[int(input()) for i in range(n)]
print(sum(p)-max(p)+int(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(sum(P))

Submission status: Accepted

Solution code:
import numpy as np
N = int(input())
p_list = [int(input()) for i in range(N)]

highest = np.max(p_list)
print(int(sum(p_list) - highest/2))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

sort_Ps =  sorted(Ps)[::-1]
sum = sort_Ps[0] // 2
for p in range(1,N):
    sum += sort_Ps[p]

print(int(sum))

Submission status: Accepted

Solution code:
def main() -> None:
    n = int(input())

    mx = 0
    ans = 0

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

    ans -= mx // 2
    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

def solve():
    N = int(input())
    P = list(map(int, (input() for _ in range(N))))
    res = sum(P) - max(P)//2
    return str(res)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())

items = []

for i in range(N):
  items.append(int(input()))
  
ans = sum(items) - max(items) // 2

print(ans)