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

Submission status: Accepted

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

sum_ = 0
for i in range(N):
	sum_ += p[i];

ans = 1000000000
for i in range(N):
	ans = min(ans,sum_-p[i]//2)

print(ans)

Submission status: Accepted

Solution code:
# encoding: utf-8
N = int(input())
p = [int(input()) for i in range(N)]

p.sort()

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
N = int(input())
m = 0
re = 0
for i in range(N):
    p = int(input())
    if m < p:
        m = p
    re += p
    
re -= m // 2

print(re)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
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())
price_list = [int(input()) for i in range(N)]

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

Submission status: Accepted

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

total = 0
P.sort()

for i in range(N-1):
    total += P[i]

total += int(P[-1]/2)

print(total)

Submission status: Accepted

Solution code:
n = int(input())
d = []
for i in range(n):
    d.append(input())
# [d1, d2, d3, ..., dN]
d = [int(m) for m in d]#int型に直す
d.sort(reverse=True)
t = 0
for i in range(n):
    if i == 0:
        t += d[i]//2
    else:
        t += d[i]
print(t)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# vim: set fileencoding=utf-8:


def main():
    N = input()
    p = [input() for _ in xrange(N)]
    print(max(p) / 2 + sum(p) - max(p))


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N, = map(int, raw_input().split())
p = [0]*N
for i in range(N):
  p[i], = map(int, raw_input().split())
print sum(p)-max(p)//2

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
def solve(N, Ps):
    return sum(Ps) - (max(Ps) // 2)

if __name__ == "__main__":
    N = int(input())
    Ps = [int(input()) for _ in range(N)]
    print(solve(N, Ps))

Submission status: Accepted

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

ans = int((max(p) / 2) - max(p))
for i in p:
    ans += i
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
maxp = 0
res = 0
for i in range(n):
    inp = int(input())
    res += inp
    if inp > maxp:
        maxp = inp

res -= maxp / 2
print(int(res))

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, [input() for i in range(n)]))
a.sort()
print(sum(a[:-1])+a[-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 = 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())
p = []
for i in range(N):
    pi = int(input())
    p.append(pi)

ma = max(p)
su = sum(p)
print(su - ma + ma // 2)

Submission status: Accepted

Solution code:
N = int(input())

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

L.sort()

res = 0
res += sum(L)
res -= L[-1]/2

print(int(res))

Submission status: Accepted

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

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

print(total)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a = int(input())
c = []

for i in range(a):
	c.append(int(input()))

k = max(c)

print(sum(c)-max(c)+(k//2))

Submission status: Accepted

Solution code:
n = int(input())

a_list = []

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


a_list.sort()

b_list = a_list[:-1]
print(a_list[-1]//2 + sum(b_list))

Submission status: Accepted

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

Submission status: Accepted

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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#JMD
#Nagendra Jha-4096

 
import sys
import math

#import fractions
#import numpy
 
###File Operations###
fileoperation=0
if(fileoperation):
    orig_stdout = sys.stdout
    orig_stdin = sys.stdin
    inputfile = open('W:/Competitive Programming/input.txt', 'r')
    outputfile = open('W:/Competitive Programming/output.txt', 'w')
    sys.stdin = inputfile
    sys.stdout = outputfile

###Defines...###
mod=1000000007
 
###FUF's...###
def nospace(l):
    ans=''.join(str(i) for i in l)
    return ans
 
 
 
##### Main ####
a=[]
n=int(input())
for tt in range(n):
    j=int(input())
    a.append(j)
a.sort()
print(int(sum(a)-(a[-1]/2)))
    
    
#####File Operations#####
if(fileoperation):
    sys.stdout = orig_stdout
    sys.stdin = orig_stdin
    inputfile.close()
    outputfile.close()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())

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

m = max(p)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

sum = 0
for i in range(N) :
	p = int(input())
	prices.append(p)
	sum += p

max_p = max(prices)
sum -= max_p
sum += int(max_p/2)

print(sum)

Submission status: Accepted

Solution code:
# coding:utf-8

import sys
from collections import Counter


input = sys.stdin.readline
INF = float('inf')
MOD = 10 ** 9 + 7


def inpl(): return list(map(int, input().split()))


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 = [ 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)]

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

Submission status: Accepted

Solution code:
n=int(input())
l=[]
for i in range(n):
  l.append(int(input()))
l.sort()
l.reverse()
s=0
for i in range(n):
  if i==0:
    s+=l[i]//2
  else:
    s+=l[i]
print(s)

Submission status: Accepted

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

max_num = max(num_list)
print(str(sum(num_list) - int(max_num/2 + 0.1)))

Submission status: Accepted

Solution code:
n = int(input())
m = None
s = 0
for i in range(n):
    w = int(input())
    s += w
    if i == 0:
        m = w
    elif m < w:
        m = w
print(int(s - m/2))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

def B():
    N = int(input())
    p = [int(input()) for i in range(N)]
    p.sort()
    ans = 0
    for i in range(N - 1):
        ans += p[i]
    ans += p[N - 1] // 2
    print(ans)
B()

Submission status: Accepted

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

P = sorted(P)

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
def inpl(): return list(map(int, input().split()))
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())
p=[]
for i in range(n):
    p.append(int(input()))
print(sum(p)-max(p)//2)

Submission status: Accepted

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

def getMN():
    a = input().split()
    b = [int(i) for i in a]
    return b[0],b[1]

def getlist():
    a = input().split()
    b = [int(i) for i in a]
    return b

n = getN()

price = []
for i in range(n):
    price.append(getN())

wari = max(price) // 2
print(sum(price) - wari)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0
p.sort(reverse=True)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
p = []
m = 0
Max = 0
for i in range(n):
    t = int(input())
    if t > Max:
        Max = t
        m = i
    p.append(t)
p[m] //= 2
print(sum(p))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

print(sum(p)-int(max(p)/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())

tmp = 0
t_max = 0
for _ in range(n):
    a = int(input())
    tmp += a
    t_max = max(t_max, a)

print(tmp - t_max // 2)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

import array
from bisect import *
from collections import *
import fractions
import heapq 
from itertools import *
import math
import random
import re
import string
import sys

N = int(input())
As = []
for n in range(N):
    As.append(int(input()))
As.sort()
ans = sum(As)
ans -= As[-1] // 2
print(ans)

Submission status: Runtime Error

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

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

total_price = max(N) / 2 + sum(N) - max(N)

print(math.floor(total_price))

Submission status: Runtime Error

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

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

total_price = max(N) / 2 + sum(N) - max(N)

print(total_price)

Submission status: Runtime Error

Solution code:
N = int(input())
p = list(map(int, input().split()))

total_price = (max(N) / 2) + (sum(N) - max(N))

print(total_price)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input())
p=list(map(int,input().split('\n')))
s=0
p.sort()
for i in range(0,n-1):
    s += p[i]
s += p[n-1]//2
print(s)

Submission status: Runtime Error

Solution code:

n=int(input())
p=list(map(int,input().split('\n')))
s=0
p.sort()
s=sum(p)-p[n-1]
s += p[n-1]//2
print(s)

Submission status: Runtime Error

Solution code:
a=int(input())
b=[input().split() for i in range(a)]
b=int(b)
b.sort()
c=sum(b)
print(int(c-b[a]/2))

Submission status: Runtime Error

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

a.sort()
s=p[n-1]//2
print(sum(a)-s)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
max=0
for i in range(1,n+1):
    p=int(input())
    if p>max:
        max=p//2
        print(max)

Submission status: Runtime Error

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, M = list(map(int, line.split()))
    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: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
a = list([input() for i in range(n)])
z = 0
for i in range(n):
  a[i] = int(a[i])
  if a[i] > z:
    z = i+1

print(sum(a)-a[z]/2)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
3
4980
7980
6980
n = raw_input()
prices = [ int(raw_input()) for _ in range(n)] #.split(' '))
prices.sort()
print sum(prices) - prices[-1] /2

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
#N, K = map(int, input().split())
# 文字列の入力
N = int(input())
#開業されたN個要素を受け付ける
list = [int(input()) for i in range(N)]

list=sorted(list)
list.reverse()
#print(list)

ans = 0

for i, l in enumerate(list):
    if i==0:
        ans = l/2
    else:
        ans = ans + l

print(int(ans)

Submission status: Runtime Error

Solution code:
import sys

s = sys.stdin.readline()
N = s[0]
p = sorted(s[1:])
print(p[:-1].sum() + p[-1]/2)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input())
p=[int(input()) for i in range(n)]
print(a/2+p)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
s = list()
[a = int(input()) for i in range(n):]
  s.add(a)
m = max(s)
print(sum(s)-m)

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def S(): return input().rstrip()
def LS(): return S().split()
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float("INF")

#solve
def solve():
    n = II()
    p = IR(n)
    print(sum(n) - max(n) // 2)
    return


#main
if __name__ == '__main__':
    solve()

Submission status: Runtime Error

Solution code:
N = int(input())
num = N+1price = []
for i in range (1,num):
  price.append(int(input()))
else:
  exp = max(price)//2
  total = sum(price) - exp
  print(total)

Submission status: Runtime Error

Solution code:
N=int(input())
p=list(map(int,input().split()))
half=max(p)
sum=0
i=0
for i in range(N):
  sum+=p[i]
  i+=1
all=sum-half
print(half//2+all)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
max = 0
sum = 0

#print ("START")
for i in range(n):
	data = (input()
#	print("aaa")
	data = int(data)
#	print(data)
	if max < data:
		max = data
	sum = sum + data
print(sum - max//2)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())

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

Submission status: Runtime Error

Solution code:
import sys
a = []
for l in sys.stdin:
    a.append(int(l))

b = list.sort(a,reversed)

counter = 0
i2 = 0
for i in b:
    if counter == 0:
      i/2 + i2
    else:
      i2 + i
    counter +=1
print(i2)

Submission status: Runtime Error

Solution code:
import sys
a = []
for l in sys.stdin:
    a.append(int(l))
b = list.sort(a,reversed)

counter = 0
i2 = 0
for i in b:
    if counter == 0:
      i2 = i/2
    else:
      i2 + i
    counter +=1
print(i2)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import strutils,future,math;var a=lc[stdin.readline.parseInt|(x<-1..stdin.readline.parseInt),int];echo a.sum-a.max div 2

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
L, H = map(int, input().split())
N = int(input())
worked_time = [int(input()) for _ in range(N)]

for time in worked_time:
    result = L - time if L > time else "0" if H >= time else "-1"
    print(result)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:


fun main(args:Array<String>) {
    val itemCount = readLine()!!.toInt()
    val items = (1..itemCount).map { readLine()!!.toInt() }.sortedDescending()
    val ans = items[0] / 2 + items.drop(1).sum()
    println(ans)
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline
import numpy as np


N = int(input())

p = []

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


new_p = sorted(p, reverse=True)

new_p[0] = new_p[0]//2

print(sum(new_p))

Submission status: Runtime Error

Solution code:
N = int(input())

p = []

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


new_p = sorted(p, reverse=True)

new_p[0] = new_p[0]//2

print(sum(new_p))

Submission status: Runtime Error

Solution code:
N = int(input())

p = []

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


new_p = sorted(p, reverse=True)

p_max = (new_p[0]/2)

NEW_p = (new_p[1:len(new_p)])

NEWP_SUM = sum(NEW_p)

print(int((p_max) + (NEWP_SUM)))

Submission status: Runtime Error

Solution code:
N = int(input())

p = []

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


new_p = sorted(p, reverse=True)

p_max = (new_p[0]/2)

NEW_p = (new_p[1:len(new_p)])

NEWP_SUM = sum(NEW_p)

print(int((p_max) + (NEWP_SUM)))

Submission status: Runtime Error

Solution code:
N = int(input())

p = []

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


new_p = sorted(p, reverse=True)

p_max = (new_p[0]/2)

NEW_p = (new_p[1:len(new_p)])

NEWP_SUM = sum(NEW_p)

print(int((p_max) + (NEWP_SUM)))

Submission status: Runtime Error

Solution code:
A,B = map(int,input().split())
C = [int(input()) for _ in range(A)]
c = []
p = 0
C = sorted(C)
for i in range(B,A+1):
  c.append(max(C[i-(B):i]) - min(C[i-(B):i]))
  print(C[i-(B):i])
print(min(c))

Submission status: Runtime Error

Solution code:
A,B = map(int,input().split())
C = [int(input()) for _ in range(A)]
c = []
p = 0
C = sorted(C)
for i in range(B-1,A):
  c.append(max(C[i-(B-1):i]) - min(C[i-(B-1):i]))
print(min(c))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import fractions
n = int(input())
a = list(map(int, input().split()))
ans = a[0]
for i in range(1, n):
    ans = fractions.gcd(ans, a[i])
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N=int(input())
p=list(map(int,input().split("\n")))
ans=sum(p)-(max(p)2)
print(int(ans))