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:
# abc115_b.py
# https://atcoder.jp/contests/abc115/tasks/abc115_b

# B - Christmas Eve Eve /
# 実行時間制限: 2 sec / メモリ制限: 1024 MB
# 配点 : 200点

# 問題文
# とある世界では、今日はクリスマスイブの前日です。
# 高羽氏は、デパートで N個の品物を買おうとしています。i 個目の品物 (1≤i≤N) の定価は pi円です。
# 彼は割引券を持っており、N個のうち最も定価が高い品物 1 個を定価の半額で買うことができます。
# 残りの N−1個の品物に対しては定価を支払います。支払金額は合計でいくらになるでしょうか？

# 制約
#     2≤N≤10
#     100≤pi≤10000
#     piは偶数である。

# 入力
# 入力は以下の形式で標準入力から与えられる。
# N
# p1
# p2
# :
# pN

# 出力
# 合計支払金額を (整数として) 出力せよ。

# 入力例 1
# 3
# 4980
# 7980
# 6980

# 出力例 1
# 15950

# 7980円の品物が半額になり、合計 4980+7980/2+6980=15950円です。
# 15950.0 などと出力すると Wrong Answer と判定されるので注意してください。

# 入力例 2
# 4
# 4320
# 4320
# 4320
# 4320

# 出力例 2
# 15120

# 4個の品物のうち 1 個だけが半額になり、合計 4320/2+4320+4320+4320=15120 円です。


def calculation(lines):
    # X = lines[0]
    N = int(lines[0])
    # N, M = list(map(int, lines[0].split()))
    values = list()
    for i in range(N):
        values.append(int(lines[i+1]))

    result = sum(values) - int(max(values)/2)

    return [result]


# 引数を取得
def get_input_lines():
    line = input()
    N = int(line)
    lines = list()
    lines.append(line)
    for _ in range(N):
        lines.append(input())
    return lines


# テストデータ
def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['3', '4980', '7980', '6980']
        lines_export = [15950]
    if pattern == 2:
        lines_input = ['4', '4320', '4320', '4320', '4320']
        lines_export = [15120]
    return lines_input, lines_export


# 動作モード判別
def get_mode():
    import sys
    args = sys.argv
    if len(args) == 1:
        mode = 0
    else:
        mode = int(args[1])
    return mode


# 主処理
def main():
    import time
    started = time.time()
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines()
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    # if mode > 0:
    #     print(f'lines_input=[{lines_input}]')
    #     print(f'lines_export=[{lines_export}]')
    #     print(f'lines_result=[{lines_result}]')
    #     if lines_result == lines_export:
    #         print('OK')
    #     else:
    #         print('NG')
    # finished = time.time()
    # duration = finished - started
    # print(f'duration=[{duration}]')


# 起動処理
if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

print(int(sorted(p)[-1]*0.5+sum(sorted(p)[:-1])))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math
n = int(input())
p = []
for i in range(n):
  p.append(int(input()))
p = sorted(p, reverse=True)
cnt = p[0] /2
for i in p[1:]:
  cnt += i
print(math.floor(cnt))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline

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

ma = max(p)
s = sum(p)

print(s - ma + ma // 2)

Submission status: Accepted

Solution code:
import math
def main():
  n = int(input())
  p = [int(input()) for i in range(n)]
  ans=p[0]
  max=p[0]
  for i in range(1,n):
    ans+=p[i]
    if max<p[i]:
      max=p[i]
  ans-=int(max/2)
  print(ans)
main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

P = [int(input()) for _ in range(N)]
P.sort(reverse=True)

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math
import sys
import collections
from decimal import Decimal # 10進数で考慮できる

mod = 10**9+7
sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000

d = collections.deque()
def LI(): return list(map(int, sys.stdin.readline().split()))

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

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

Submission status: Accepted

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

p.sort()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

max_ = max(p)
flag = True
cnt = 0
for i in p:
    if i == max_ and flag:
        cnt += i // 2
        flag = False
    else:
        cnt += i
print(cnt)

Submission status: Accepted

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

import sys

input = iter(sys.stdin.read().splitlines()).__next__

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


P.sort()
#print(P)

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

print(res)

Submission status: Accepted

Solution code:
def solve():
    n = int(input())
    s = []
    for i in range(n):
        s.append(int(input()))
    s.sort()
    res = 0
    for i, x in enumerate(s):
        res += x
        if i == n - 1:
            res -= x // 2
    print(res)

solve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a = list([input() for i in range(n)])
z = 0
ax = 0
for i in range(n):
    a[i] = int(a[i])
    if a[i] > ax:
        z = i
        ax = a[i]
        
print(int(sum(a)-a[z]/2))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
P = [int(input()) for X in range(0,N)]
P[P.index(max(P))] = max(P)//2
print(sum(P))

Submission status: Accepted

Solution code:
import sys
N = int(input())
array = []
for I in range(N): array.append(int(input()))
for J in array:
    if not ( 100 <= J <= 10000 ): sys.exit()
if not ( 2 <= N <= 10 ): sys.exit()

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

Submission status: Accepted

Solution code:
import sys
N = int(input())
array = []
for I in range(N): array.append(int(input()))
for J in array:
    if not ( 100 <= J <= 10000 ): sys.exit()
if not ( 2 <= N <= 10 ): sys.exit()

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

Submission status: Accepted

Solution code:
# 初期入力
import sys
input = sys.stdin.readline
N = int(input())
p =[0]*N
for i in range(N):
    p[i] = int(input())
p.sort()
ans =sum(p[:-1]) +p[-1]//2
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
p = [int(input()) for _ in range(N)]
max_p = max(p)
max_index = p.index(max_p)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

n = ri()
li = sorted([ri() for _ in range(n)])
print(sum(li[:-1]) + li[-1]//2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
N = I()
pl = [I() for _ in range(N)]
pl.sort(reverse=True)
ans = 0
for i in range(N):
    if i == 0:
        ans += pl[i]//2
    else:
        ans += pl[i]
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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(raw_input())
prices = [ int(raw_input()) for _ in range(n)] #.split(' '))
prices.sort()
print sum(prices[:-1]) + prices[-1] /2

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8

# https://atcoder.jp/contests/abc115


def main():
    N = int(input())
    p = [None] * N
    for i in range(N):
        p[i] = int(input())
    
    p = sorted(p)
    return sum(p[:-1]) + p[-1]//2


print(main())

Submission status: Accepted

Solution code:
n,*l=map(int,open(0));l.sort();l[-1]=l[-1]//2;print(sum(l))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.read
readline = sys.stdin.buffer.readline
INF = float('inf')


def main():
    N = int(readline())
    total = 0
    maximum = 0

    for _ in range(N):
        p = int(readline())
        total += p
        maximum = max(maximum,p)

    ans = total - maximum//2
    print(ans)
if __name__ == '__main__':
    main()

Submission status: Accepted

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

p=sorted(p)
print(int(sum(p[:-1])+0.5*p[-1]))

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())
M = 0
P = 0
for i in range(N):
    A = int(input())
    P += A
    M = max(M,A)

print(P - M//2)

Submission status: Accepted

Solution code:
def main():
    p=sorted(int(input()) for _ in range(int(input())))
    p[-1] //= 2
    print(sum(p))
    
if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

p.sort()

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

print(sum(p))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
p = list(int(input()) for i in range(n))
p.sort(reverse = True)
s = p.pop(0) // 2
print(sum(p,s))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline

n = int(input())
a = list(int(input()) for i in range(n))

ma = max(a)

ans = sum(a)-ma//2

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(sum(p))

Submission status: Accepted

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

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

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

print(sum(A))

Submission status: Accepted

Solution code:
n = int(input())
p_l = []
for _ in range(n):
    p_l.append(int(input()))
    
# print(p_l)
# print(sum(p_l))

p_l_s = sorted(p_l, reverse=True)
# print(p_l_s)
p_l_s[0] = int(p_l_s[0] / 2)
# print(p_l_s)

print(sum(p_l_s))

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())
ans=0
l=0
for _ in range(N):
  p=int(input())
  ans+=p
  l=max(p,l)
print(ans-l//2)

Submission status: Accepted

Solution code:
n = int(input())
p = []
for i in range(n):
    p.append(int(input()))
p = sorted(p, 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 = [int(input()) for i in range(n)]
p1 = sorted(p)
a = p1.pop(-1)
a1 = a // 2
ans = sum(p1)
ans += a1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
n, *p = map(int, open(0).read().split())
print(sum(p)-max(p)//2)

Submission status: Accepted

Solution code:
mod = 1000000007
eps = 10**-9


def main():
    import sys
    input = sys.stdin.readline

    N = int(input())
    ans = 0
    M = -1
    for _ in range(N):
        p = int(input())
        ans += p
        if p > M:
            M = p
    print(ans - M // 2)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
import math
import itertools
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7

N = i()
p = [i() for _ in range(N)]
p.sort()
p[-1] = p[-1]//2
print(sum(p))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
l=[]
x=0
for i in range(n):
    l.append(int(input()))
y=l.index(max(l))

for i in range(n):
    if i==y:
        x+=l[i]//2
    else:
        x+=l[i]
             
print(x)

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

pp = sorted(pp)
pp[-1] //= 2
print(sum(pp))

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def actual(n, P):
    return int(sum(P) - (max(P) // 2))

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

print(actual(n, P))

Submission status: Accepted

Solution code:
N = int(input())
p = [int(input()) for i 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):
    p.append(int(input()))
    
p.sort()

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
n = int(input())

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

print(int(max(lis)/2) + sum(lis[:n-1]))

Submission status: Accepted

Solution code:
def ip():return int(input())

ans=0
m=99
for _ in range(ip()):
    p=ip()
    ans+=p
    m=max(m,p)
print(ans-m//2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())

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

saidai = max(p)
del p[p.index(saidai)]
print(sum(p)+ saidai//2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

if __name__ == '__main__':
    n = int (input())
    list = []
    for i in range(n):
        list.append(int(input()))
    list.sort(reverse=True)
    list[0]= list[0]//2

    print(sum(list))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())

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

Submission status: Accepted

Solution code:
import sys
import math
from collections import Counter
import itertools
import fractions
import datetime
from decimal import Decimal
#from functools import reduce

# 入力を整数に変換して受け取る
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
# 入力全てを整数に変換したものの配列を受け取る
def LI(): return list(map(int, sys.stdin.readline().split()))
# 入力全てを整数に変換して1引いたものの配列を受け取る
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SR(): return sys.stdin.readline().rstrip()

ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'
ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ascii_uppercase2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'

# リストを改行区切りで出力する
p2D = lambda x: print(*x, sep="\n")
p2E = lambda x: print(''.join(x))
p2S = lambda x: print(*x, sep=" ")

# ###########################################

N=II()
P=[II() for _ in range(N)]
P.sort()
print(sum(P) - (int(P[-1]/2)))

Submission status: Accepted

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