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: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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,x = MAP()
    L = [1]*n
    P = [1]*n

    for  i in range(1,n):
        L[i] = 2* L[i-1] +3
        P[i] = 2* P[i-1] + 1

    def func(N, X):
        if N==0:
            return 0 if X <= 0 else 1

        elif X<= L[N-1] + 1:
            return func(N-1, X-1)

        else:
            return P[N-1] + 1 + func(N-1, X-L[N-1] -2)

    print(func(n,x))

if  __name__=='__main__':
    main()

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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:
N,*P=map(int,open(0);print(sum(P)-max(P)//2)

Submission status: Runtime Error

Solution code:
import sys

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

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

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

Submission status: Runtime Error

Solution code:
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
N=int(input())

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

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b,c=int(input())
d=max(a,b,c)
if d==a :
    e==(d//2+b+c)
if d==b:
    e==(d//2+a+c)
if d==c:
    e==(d//2+a+b)
    print(e)

Submission status: Runtime Error

Solution code:
input()
x=sum(input())
y=max(input())
print(x-y//2)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N= int(input())

price = [int(input()) for i in range(N)]
price.sort()

total = sum(price)-price(-1)/2
print(int(total))

Submission status: Runtime Error

Solution code:
n = int(input())

max_index = 0
max_price = 0
price_list = []

for i in range(0, n + 1):
    p = int(input())
    price_list.append(p)
    if max_price < p:
        max_index = i

sum = 0
for i, p in enumerate(price_list):
    if i == max_index:
        sum += p / 2
    else:
        sum += p

print(sum)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())

input_list = []

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

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

ans = 0
for i in input_list:
  ans += i
  
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
li = input().split()
print(sum(li)-max(li)/2)

Submission status: Runtime Error

Solution code:
n = int(input())
maximum = 0
li = list(map(int,input().split()))
for i in range(n):
  if li[i] > maximum:
    maximum = li[i]
    s = i
  
sum = 0
for i in range(n):
  sum += li[i]
sum -= li[s]/2

print(sum)

Submission status: Runtime Error

Solution code:
nN = int(input())
nP = [ 0 for i in range(nN)]
 
for i in range(nN):
  nP[i] = int(input())

nP.sort(reverse=True)
 
nAns = 0
for i in range(nN):
  if i == 0:
    nAns += (nP[i]//2)
  else:
    nAns += nP[i]

print((%d) %(nAns))

Submission status: Runtime Error

Solution code:
nN = int(input())
nP = [ 0 for i in range(nN)]
 
for i in range(nN):
  nP[i] = int(input())
 
nP.sort(reverse=True)
 
nAns = 0
for i in range(nN):
  if i == 0:
    nAns += (nP[i]//2)
  else:
    nAns += nP[i]
 
print((%d) %(nAns))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
P = []
maximum_val = 0
maximum_index = Null

for i in range(N):
  a = int(input())
  P.append(a)
  if a > maximum_val:
    maximum_val = a
    maximum_index = i
print(sum(P) - P[maximum_index])

Submission status: Runtime Error

Solution code:
N = int(input())
P = []
maximum_val = 0
maximum_index = Null

for i in range(N):
  a = int(input())
  P.append(a)
  if a > maximum:
    maximum_val = a
    maximum_index = i
print(sum(P) - P[maximum_index])

Submission status: Runtime Error

Solution code:
l=input()
b=list()
for i in range(l)
    a=int(input())
    b.append(a)
print(sum(b)-max(b)/2)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N=input()
b={}
for i in range(N)
    a=int(input())
    b.append(a)
print(sum(b)-max(b)/2)

Submission status: Runtime Error

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

for i in range(n):
  item = int(input())
  goods.append(item)

goods = sorted(lst, reverse=True)
goods[0] = goods[0] // 2

print(sum(goods))

Submission status: Runtime Error

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

for item in range(n):
  goods.append(item)

goods = sorted(lst, reverse=True)
goods[0] = goods[0] // 2

print(sum(goods))

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:
N = int(input())
items = []
for _ in range(N):
    item = int(input())
    items.append(item)

items.sort()

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
a = int(input())
b = [int(input()) for _ in range(a)]
b = sorted(b, key=lambda, x: x[0], reverse=True)
c = 1
for i in range(a):
  if i == 0:
    c += b[i] // 2
  else:
    c += b[i]
print(c)

Submission status: Runtime Error

Solution code:
a = int(input())
b = [int(input()) for _ in range(a)]
b = sorted(b, key=lambda, x: x[0], reverse=True)
c = 0
for i in range(a):
  if i == 0:
    c += b[i] // 2
  else:
    c += b[i]
print(c)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
price = []
p = 0
for i in range(N):
  price.append(int(input())
m = price.index(max(price))
for j in range(len(price)):
  if j != m:
     p += price[j]
  else:
     p += price[j]//2
print(p)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(intput())

sum = 0
max = 0
for _ in range(N):
  p = int(intput())
  if(p > max):
    max = p
  sum += p
val = sum - max/2
print(int(val))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

p_max = max(p)

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

Submission status: Runtime Error

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

m = max(p)/2

c = sum(p) - m

print(int(c))

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
n = int(input)

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

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

Submission status: Runtime Error

Solution code:
n=int(input())
s=[list(map(int,list(input()))) for i in range(h)]

print(sum(s)-1/2max(s))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N, *d = map(int, open(0))
print(sum(d)-max(s)/2)

Submission status: Runtime Error

Solution code:
n = int(input())
sum = 0
discount = 0
for _ in range(n):
  p = int(input())
  sum += p
  discount = max(discount, p // 2)

print(max - discount)

Submission status: Runtime Error

Solution code:
x = [int(i) for i in input().split()]
pay = sum(x[1:]) - max(x[1:])//2
print(pay)

Submission status: Runtime Error

Solution code:
x = [int(i) for i in input().split()]
x.pop(0)
pay = int(sum(x) - max(x)/2)
print(pay)

Submission status: Runtime Error

Solution code:
x = [int(i) for i in input().split()]
x.pop(0)
pay = sum(x) - max(x)/2
print(int(pay))

Submission status: Runtime Error

Solution code:
v

Submission status: Runtime Error

Solution code:
h,w=map(int,input().split())
lst=[]
for _ in range(h):
    lst.append(input())
hl=[0]*h
wl=[0]*w
for i in range(h):
    for j in range(w):
        if lst[i][j]=="#":
            hl[i]=1
            wl[j]=1
            if hl[i]==1 and wl[j]==1:
                print(lst[i][j],end="")
    print("")

Submission status: Runtime Error

Solution code:
A = list()
for test in range(int(input()): A.append(int(input()))
print(int(sum(A)-max(A)/2))

Submission status: Runtime Error

Solution code:
n = int(input())
p = [int(input()) for _ in range(n)]
ex = l.pop(l.index(max(l)))
print(int(ex / 1) + sum(l))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input())
A=[int,input() for i in range(n)]
cnt=0

for i in range(n):
  cnt+=A[i]
cnt-=max(A)*0.5
print(cnt)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

b.sort()

b[-1::] == b[-1::] / 2

print(sum(b))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
SUM = 0
N = int(input())
for num in range(N):
	P[num] = int(input())

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

for num in range(N):
	SUM += P[num]

print(SUM)

Submission status: Runtime Error

Solution code:
SUM = 0
N = input()
for num in range(N):
	P[num] = input()

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

for num in range(N):
	SUM += P[num]

print(SUM)

Submission status: Runtime Error

Solution code:
N=int(input())
p=list(map(int,intput().split()))
sum=0
print(sum(p)-max(p)//2)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input())
a=list(map(int,input())
b=sum(a)-max(a)/2
print(b)

Submission status: Runtime Error

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

  a.append(int(input())
           
print(sum(a)-max(a)//2)

Submission status: Runtime Error

Solution code:
import numpy as np

N = int(input())
price = []

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

price = np.array(price)
max_index = np.argmax(price)

print(int(np.sum(price) - price[max_index] / 2

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
input = int(input())
nums = []
for _ in range(input):
  nums.append(int(input()))
print(0)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
input = int(input())
nums = []
max = 0
total = 0
for x in range(input):
  nums.append(int(input()))
  if(input > max):
    max = input
print(sum(nums)-max + max/2)

Submission status: Runtime Error

Solution code:
input = int(input())
nums = []
max = 0
total = 0
for x in range(input):
  nums.append(int(input()))
  if(input > max):
    max = input
  total += input
print(total-max + max/2)

Submission status: Runtime Error

Solution code:
input = int(input())
nums = []
max = 0
total = 0
for x in input:
  nums.append(int(input()))
  if(input > max):
    max = input
for x in range (1,len(nums)):
  total +=x
print(total - max + max/2)

Submission status: Runtime Error

Solution code:
input = int(input())
nums = []
max = 0
total = 0
for x in input:
  nums.append(input)
  if(input > max):
    max = input
for x in range (1,len(nums)):
  total +=x
print(total - max + max/2)

Submission status: Runtime Error

Solution code:
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
N = int(input())
p = []
for _ in range(N):
    p.append(int(input())

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

Submission status: Runtime Error

Solution code:
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
N = input()
p = []
for _ in range(N):
    p.append(int(input())

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
table = set()
for i in range(N):
    table.add(int(input()))
print(sum(table[:]) - max(table) * // 2)

Submission status: Runtime Error

Solution code:
N,K = map(int,input().split())
h =[]
dif = []
for n in range(0,N):
    h.append(int(input()))

h.sort()

m = 10**10

for i in range(0,N-K+1):
    m = min(m,abs(h[i] - h[i+K-1]))

print(m)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
N = int(input())

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

m = 0
for i in range(N):
    if p[i] > m:
        m = p[i]

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

Submission status: Runtime Error

Solution code:
n=input()
p={}
for i in range(n):
    p.append(i)=input()

for i in range(n):
    if p[i]==max(p):
        p[i]=max(p)/2

print(int(sum(p)))

Submission status: Runtime Error

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

for i in range(N):
    if p(i) > max:
        max=p(i)
        m=i

p(m) = p(m)/2

for i in range(N):
    A += p(i)

print(A)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
p = []
for i in range(N):
        p.append(int(input())
sum  = 0
max_value = max(p)
p.remove(max_value)

sum += max_value/2

for i in p:
        sum += i

print(sum)

Submission status: Runtime Error

Solution code:
#include <stdio.h>
#include <string.h>
#include <math.h>

int main(void){
        int N = 0;
        scanf("%d", &N);
        int l[N];
        for (int i = 0; i < N; i++) {
                        scanf("%d", &l[i]);
        }
        int tmp = -1;
        int sum = 0;
        for (int i = 0; i < N; i++) {
                        if (tmp < l[i]) tmp = l[i];sum += l[i];
        }
        printf("%d\n",sum - tmp / 2);
//      for (int i = 0; i < N; i++) {
//                      printf("%d\n",l[i]);
//      }
        return 0;
}

Submission status: Runtime Error

Solution code:
n = int(stdin.readline().rstrip())
data = [int(stdin.readline().rstrip()) for _ in range(n)]
data = sorted(data, reverse=True)
data[0] *= 0.5
data[0] = int(data[0])

print(sum(data))

Submission status: Runtime Error

Solution code:
n = int(stdin.readline().rstrip())
data = [int(stdin.readline().rstrip()) for _ in range(n)]
data = sorted(data, reverse=True)
data[0] *= 0.9
data[0] = int(data[0])

print(sum(data))

Submission status: Runtime Error

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

max_price = 0
sum_price = 0
for price in prices:
    sum_price += price
    if price > max_price:
        max_price = price

sum_price -= max_price/2

return sum_price

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
N = input()
a = [input() for i in range(N)]
b = sorted(a ,reverse = True)
res = sum(b[0]/2,sum(b[1:]))
print(res)

Submission status: Runtime Error

Solution code:
input_ = input()

m = 0
s = 0
for i in input_.splitlines():
    n = int(i)
    if i > max:
        max = i
    sum += n

print(sum - (max / 2))

Submission status: Runtime Error

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

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

price = sum(p) - max_value / 2
print(int(price)

Submission status: Runtime Error

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

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

disc = max(li)

print(sum(li) - disc)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
lst = []
V = 0

N = int(input())
for i in range(N):
    a = int(input())
    lst.append(a)
lst.sort()
l = lst[2]

for f in lst:
    V += f
print(int(V - (l/2)))

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
a = 0
c = 0
for i in range(int(input())):
	b = int(input())
	if b > a:
        a = b
        c += a
    else:
        c += b
c += (a/2)
print (round(c))

Submission status: Runtime Error

Solution code:
N = int(input())
list1 = []
for i in range(0,N,1):
    list1.append(int (input()))
    if i > 0:
        if list1[i] > list1[i-1]:
            max = i
list1[max] = list1[max]/2

print(int(sum(list1)))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

print(sum - mx / 2)

Submission status: Runtime Error

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

print(sum - mx / 2)

Submission status: Runtime Error

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

for i in range(times):
  prices.append(int(input())

max_price = max(prices)
prices.delete(max_prices)
prices.append(max_price/2)

print(sum(prices))

Submission status: Runtime Error

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

coupon = max(prices) / 2

total = sum(prices) - coupon
print(total)

Submission status: Runtime Error

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

p.sort().reverse()
total = int(p[0] * 0.5)
for i in range(1, len(p)):
    total += p[i]
print(total)

Submission status: Runtime Error

Solution code:
 = int(input())
highest_price = 0
sum = 0
for i in range(n):
    product = int(input())
    if highest_price < product:
        sum += highest_price/2
        highest_price = product
        sum += highest_price/2
    else:
        sum += product
print(int(sum))

Submission status: Runtime Error

Solution code:
N=int(input())
cnt=0
ans=0
max=0
while cnt<N:
  cnt++
  p=int(input())
  ans += p
  if p>max:
    max=p
ans-=(max/2)
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = 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(n)]
print(p.sum() - p.max()//2)

Submission status: Runtime Error

Solution code:
n = int(input())
a = sorted(list(map(int, input().split())))
ans = sum(a) - a[n-1] / 2
print(ans)

Submission status: Runtime Error

Solution code:
n,k=map(int,input().split())
l=[]
for _ in range(n):
    l.append(int(input()))
l.sort()
a=0
for i in range(n-k+1):
    if i==0:
        a=l[i+k-1]-l[i]
    else:
        a=min(a,abs(l[i+k-1]-l[i]))
print(a)

Submission status: Runtime Error

Solution code:
n,k=map(int,input().split())
l=[]
for _ in range(n):
    l.append(int(input()))
l.sort()
a=0
for i in range(n-k+1):
    if i==0:
        a=l[i+k-1]-l[i]
    else:
        a=min(a,abs(l[i+k-1]-l[i]))
print(a)
n,k=map(int,input().split())
l=[]
for _ in range(n):
    l.append(int(input()))
l.sort()
a=0
for i in range(n-k+1):
    if i==0:
        a=l[i+k-1]-l[i]
    else:
        a=min(a,abs(l[i+k-1]-l[i]))
print(a)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
total = max(a)/2
a.remove(max(a))
total += sum(a)
print(total)

Submission status: Runtime Error

Solution code:

p = list(map(int,input().split()))
max = 0
sum = 0
for i in range(1,p[0]+1):
    sum += p[i]
    a = p[i]
    if max < a :
        max = a
print(int(sum-(int(max/2))))

Submission status: Runtime Error

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

for I in range(n):
    l.append(int(input())
else:
    print(int(sum(l)-max(l)/2))

Submission status: Runtime Error

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

for i in range(num):
  prices[i].append(input())

max = prices[0]
for i in range(1,num):
  if prices[i]>max:
    max=prices[i]
    max_i = i

sum=0
for i in range(num):
  if i==max_i:
    sum = sum + int(prices[i]/2)
  else:
    sum = sum + prices[i]

Submission status: Runtime Error

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

for i in range(N):
    a = int(input().split("\n"))
    p.append(a)
    if max < a :
        max = a
print(int(sum(p)-(int(max/2))))

Submission status: Runtime Error

Solution code:
#coding:utf-8

N = input()

p = []
max_val = -1
for i in range(N):
    p_i = input()
    p.append(p_i)
    max_val = max(max_val, p_i)

s = 0
flag = 0
for p_i in p:
    if p_i == max_val and flag==0:
        s += p_i * 0.5
        flag = 1
    else:
        s += p_i
print(int(s))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#coding:utf-8

N = input()

p = []
max_val = -1
for i in range(N):
    p_i = input()
    p.append(p_i)
    max_val = max(max_val, p_i)

sum = 0
flag = 0
for p_i in p:
    if p_i == max_val and flag==0:
        sum += p_i * 0.5
        flag = 1
    else:
        sum += p_i
print(int(sum))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

A = sorted(S, reverse=True)

S[0] = S[0]/2

print(sum(int(S))

Submission status: Runtime Error

Solution code:
import heapq
no = int(input())
d = []
for i in range(no):
  data = input()
  d.append(data)
d_ = heapq.nlargest(no, d)
d_[0] = int(d_[0]/2)
ans = 0
for i in d_:
  ans = int(ans)+int(i)
print(ans)

Submission status: Runtime Error

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

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