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())
p=[int(input()) for i in range(n)]
p=sorted(p)
ans=sum(p[:n-1])+int(p[-1]/2)
print(ans)

Submission status: Accepted

Solution code:

#n回の入力をリストに入れる
n = int(input())
l=[int(input()) for i in range(n)]

l.sort()
l[len(l)-1]=l[len(l)-1]/2

print(int(sum(l)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
l = []
for i in range(N):
    p = int(input())
    l.append(p)
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()))
x=max(p)/2
print(int(sum(p)-x))

Submission status: Accepted

Solution code:
# B - Christmas Eve Eve
N = int(input())
A = list(int(input()) for i in range(N))

A.sort(reverse=True)

A[0] = int(A[0]//2)
ans = 0
for i in range(len(A)):
    ans += A[i]

print(ans)

Submission status: Accepted

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

max = items.pop(items.index(max(items)))
print(max//2 + sum(items))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 2019-11-11 18:30:26(JST)
import sys
# import collections
# import math
# from string import ascii_lowercase, ascii_uppercase, digits
# from bisect import bisect_left as bi_l, bisect_right as bi_r
# import itertools
# from functools import reduce
# import operator as op
# from scipy.misc import comb # float
# import numpy as np 

def main():
    n, *p = (int(x) for x in sys.stdin.read().split())
    total_cost = sum(p) - max(p) // 2
    print(total_cost)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0
ans += int(l.pop(l.index(max(l)))/2)

for i in l:
  ans += i
  
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import numpy as np
N = int(input())
p = np.zeros(N, dtype=int)
for i in range(N):
  p[i] = int(input())

p_sort = np.sort(p)
sum = p_sort[-1]*0.5
for i in range(N-1):
  sum += p_sort[i]
print(int(sum))

Submission status: Accepted

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

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

main()

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

Submission status: Accepted

Solution code:
import os, sys, re, math

N = int(input())

item = []

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
from itertools import groupby

n = int(stdin.readline().rstrip())
li = [int(stdin.readline().rstrip()) for _ in range(n)]

li.sort()

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

Submission status: Accepted

Solution code:
n = int(input())
maxv = 0
total = 0
for i in range(n):
	tmp = int(input())
	maxv = max(maxv, tmp)
	total += tmp
print (total - int(maxv / 2))

Submission status: Accepted

Solution code:
import os, sys, re, math

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())
ps = [int(input()) for _ in range(n)]
ans = sum(ps)
for i in range(n):
  ans = min(ans, sum([(ps[j] // 2 if i == j else ps[j]) for j in range(n)]))
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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


def solve(N: int, p: "List[int]"):
    ans = sum(p) - max(p)/2
    print(int(ans))


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    p = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, p)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

m = 0
to = 0
for i in range(n):
	a = int(input())
	to += a
	if a > m:
		m = a
print(to-m//2)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

print(sum(present))

Submission status: Accepted

Solution code:
import math
N=int(input())
x=[int(input()) for _ in range(N)]
total=0
x.sort()

for i in range(0,len(x)-1):
  total += x[i]
  
total += math.ceil(x[-1]/2)

print(total)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

ans = sum(P) - max(P)*0.5
print(int(ans))

Submission status: Accepted

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

max_cost = max(cost_list)
max_index = cost_list.index(max_cost)
cost_list.pop(max_index)
print(int((max_cost / 2) + sum(cost_list)))

Submission status: Accepted

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

print(sum(p))

Submission status: Accepted

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

M = max(P)

S = sum(P)

print(S - int(M / 2))

Submission status: Accepted

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

s_list.sort()
s_list[n-1] = s_list[n-1]//2

print(sum(s_list))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
p = [ int(input()) for _ in range(n) ]
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())
p = []
for i in range(n):
  pi = int(input())
  p.append(pi)
p.sort(reverse=True)
p[0] //= 2
print(sum(p))

Submission status: Accepted

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

Submission status: Accepted

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

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

x = int(max(p_list)/2)
ans = sum(p_list)-x
print(ans)

Submission status: Accepted

Solution code:
a = int(input())
p = [int(input()) for _ in range(a)]
list.sort(p, reverse=True)
print (sum(p) - max(p) // 2)

Submission status: Accepted

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

prices.sort()

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

print(sum(prices))

Submission status: Accepted

Solution code:
banig = []
for x in range(int(input())):
  banig.append(int(input()))

sum = 0
big = max(banig)
banig.remove(big)
summation = 0
for e in banig:
  summation += e
print(summation + int(big/2))

Submission status: Accepted

Solution code:
n = int(input())
items = []
for i in range(n):
  items.append(int(input()))
result = str(sum(items)-max(items)/2)
print(result[:len(result)-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=[]
for i in range(n):
    p.append(int(input()))

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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)]
p.sort()
ans = sum(p) - int(p[n - 1]/2)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
p=[]
for _ 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))
p.sort()
work = p.pop()
work = work // 2
p.append(work)
print(sum(p))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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(sum(P) - max(P)//2)

Submission status: Accepted

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

Submission status: Accepted

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

import sys
import copy
import math

sys.setrecursionlimit(1000000)

# input = sys.stdin.readline

# ~~~~~~~~~~~~~~~~~~~~~_(＾～＾ ｣ ∠)_~~~~~~~~~~~~~~~~~~

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

p.sort(reverse=True)
print(p[0] // 2 + sum(p[1:]))

Submission status: Accepted

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

    most_price = 0
    most_index = 0
    for i in range(len(p_list)):
        if p_list[i] > most_price:
            most_index = i
            most_price = p_list[i]
    
    result_price = 0
    for i in range(len(p_list)):
        if i == most_index:
            result_price = result_price + round(p_list[i]/2)
        else:
            result_price = result_price + p_list[i]

    print(result_price)

if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy,copy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

def main():
    n=INT()
    p = [INT() for _ in range(n)]

    p_max = max(p)

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

if  __name__=='__main__':
    main()

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

N = INT()
p = [INT() for _ in range(N)]

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

Submission status: Accepted

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

Submission status: Accepted

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

N = int(input().split()[0])
p_list = []

for _ in range(N):
    p = int(input().split()[0])
    p_list.append(p)

p_list = sorted(p_list, reverse=True)
ans = p_list[0] // 2 + sum(p_list[1:])

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

p.sort()
max_p = p.pop(-1)

print(int(sum(p)+max_p/2))

Submission status: Accepted

Solution code:
n = int(input())
s = 0
b = 0
for i in range(n):
  n = int(input())
  b = max(b, n)
  s += n
ans = s - b + b//2
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 _ in range(int(input()))]
print(sum(p)-max(p)//2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def slove():
    import sys
    input = sys.stdin.readline
    n = int(input().rstrip('\n'))
    p = [int(input().rstrip('\n')) for _ in range(n)]
    p.sort()
    print(sum(p[:-1]) + p[-1] // 2)


if __name__ == '__main__':
    slove()

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = P[0]//2
for i in range(1, N):
    ans += P[i]
    
print(ans)

Submission status: Accepted

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

p = sorted(p, reverse = True)

p[0] = int(p[0] /2)

sum = 0

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

Submission status: Accepted

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

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())
ans = 0
m = 0
for i in range(n):
  a = int(input())
  ans += a
  m = max(m, a)
  
print(ans - int(m/2))

Submission status: Accepted

Solution code:
import sys
from bisect import *
from collections import *
from copy import deepcopy
from datetime import *
from heapq import *
from itertools import *
# from math import *
from operator import *
from pprint import *

sys.setrecursionlimit(10**8)

input = sys.stdin.readline

def main():
    """ main """
    N = int(input())
    PS = [int(input()) for _ in range(N)]
    PS.sort()
    PS[-1] >>= 1
    print(sum(PS))

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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


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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline


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


if __name__ == "__main__":
    main()

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())
ls=[int(input()) for _ in range(n)]
x=max(ls)
ls.remove(x)
print(x//2+sum(ls))

Submission status: Accepted

Solution code:
n = int(input())
p =[int(input()) for i in range(n)]
p.sort(reverse =True)
p[0] = p[0]*0.5
print(int(sum(p)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(round(sum(ls)-(max(ls))/2))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

# 最高値を調べる
maxVal = 0
maxID = 0
for i in range(n):
    if p[i] >= maxVal:
        maxID = i
        maxVal = p[i]

# 合計金額の計算
sum = 0
for i in range(n):
    if i == maxID:
        p[i] /= 2

    sum += p[i]

print sum

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

n = int(input())
p = ["" 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())

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

Submission status: Accepted

Solution code:
N = int(input())
p_list = [int(input()) for _ in range(N)]
p_max = max(p_list)
p_list.remove(p_max)
p_list.append(int(p_max/2))

print(sum(p_list))

Submission status: Accepted

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

Submission status: Accepted

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

max_price = max(p)
p.remove(max_price)

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

Submission status: Accepted

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

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

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

print(ans - max_//2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
n=int(input())
p=[int(input()) for x in range(n)]
print(sum(p)-max(p)//2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(sum)

Submission status: Accepted

Solution code:
N = int(input())
max_price = 0
sum_price = 0

for i in range(N):
    p = int(input())
    if max_price < p:
        max_price = p
    sum_price += p

ans = sum_price - (max_price // 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())
src = [int(input()) for _ in range(n)]
sorted_src = sorted(src)
sorted_src[-1] = sorted_src[-1]/2
print(int(sum(sorted_src)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def MAP(): return list(map(int,input().split()))
def INT(): return int(input())
def FLOAT(): return float(input())
MOD = 10**9+7

n = INT()
p = [INT() for _ in range(n)]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

P.sort()

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

Submission status: Accepted

Solution code:
# ABC115b
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

present.sort()
ans = present.pop(-1) // 2
ans += sum(present)
print(int(ans))

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
  a=max/2
  
print(int(sum-a))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(sum(price_list) - max(price_list)//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())
prices = [int(input()) for _ in range(n)]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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


P.sort()


print(sum(P[0:N-1])+P[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)]
q=sorted(p)
ans=sum(p)-q[-1]//2
print(ans)

Submission status: Accepted

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

for i in range(n):
  ans+=p[i]
ans-=(max(p)/2)

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

Submission status: Accepted

Solution code:
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
N=int(input())
pay=0
p=[int(input()) for _ in range(N)]

for i in range(N):
	pay+=p[i]

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

Submission status: Accepted

Solution code:
n = int(input())
out = [list(map(int,input().split())) for i in range(n)]
p=0
l=0
for i in range(n):
    p = p+out[i][0]
    a = int(out[i][0])
    l = max(l,a)
print(int(p-l/2))

Submission status: Accepted

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

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