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: Wrong Answer

Solution code:
N = int(input())

S = 0
M = 0
for i in range(N):
  amount = int(input())
  M = max(amount, M)
  S += amount

S -= M//2
print(amount)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
n = int(input())

price_list = []

for _ in range(n):
	price_list.append(int(input()))

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
n=int(input())
p=[int(i) for i in sys.stdin]
ans=p.pop()//2
print(sum(p)+ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
S=0 
A=0
for i in range(N) :
  B=int(input())
  S = S + B
  if A<B :
    A=B
print(int(S-B/2))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
input = int(input())
nums = []
max = 0
total = 0
for x in range(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: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

max_price = max(prices)

ans = sum(prices) - max_price/2

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())
ListP=[]
S=0
for i in range(1,N+1,1):
  pi=int(input())
  S+=pi
  ListP.append(pi)
  
PM=(max(ListP))/2
S-=PM
print(S)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
P = [int(p) for p in input().split()]
P.sort(reverse=True)
print(int(sum(P)-(P[0]/2)))

Submission status: Wrong Answer

Solution code:
item_num = int(input())

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

highest_price = max(price_list)

for i in range(item_num - 1):
    if price_list[i] == highest_price:
        price_list[i] = int(highest_price / 2)

print(sum(price_list))

Submission status: Wrong Answer

Solution code:
N = int(input())
kaimono_list = []
for i in range(N):
    kaimono_list.append(int(input()))
for i in range(N-1):
    for j in range(N):
        if i < j:
            if kaimono_list[i] > kaimono_list[j]:
                a = kaimono_list[i]
                kaimono_list[i] = kaimono_list[j]
                kaimono_list[j] = a
kaimono_sum = 0
for i in kaimono_list:
    if i == kaimono_list[N-1]:
        i = i // 2
    kaimono_sum += i
print(kaimono_sum)

Submission status: Wrong Answer

Solution code:
4
4320
4320
4320
4320

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
a=int(input())
b=list(map(int,input().split()))
print(sum(b)-int(max(b)/2))

Submission status: Wrong Answer

Solution code:
import math
a=int(input())
b=list(map(int,input().split()))
print(int(sum(b)-max(b)/2))

Submission status: Wrong Answer

Solution code:
import math
a=int(input())
b=list(map(int,input().split()))
print(math.floor(sum(b)-max(b)/2))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import sys;t = [int(l) for l in sys.stdin];print(int(sum([i for n,i in enumerate(t) if n != t.index(max(t))]) + max(t) /2))

Submission status: Wrong Answer

Solution code:
# 2019/02/02
# AtCoder Beginner Contest115 - B

# Input
n = int(input())
p = list()
max = 0
sum = 0

# Input and sum
for i in range(n):
    p.append(int(input()))
    if max < p[i]:
        max = p[i]
    sum += p[i]

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

# Output
print(sum)
print(p)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
N = input()
N = int(N)

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


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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

p = []

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

m = max(p)
s = 0

for value in p:
    if value == m:
        s += int(m/2)
    else:
        s += value

print(s)

Submission status: Wrong Answer

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

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

print(sum(p))

Submission status: Wrong Answer

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

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

print(sum(p))

Submission status: Wrong Answer

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

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: Wrong Answer

Solution code:
#!/usr/bin/python

def main():
    n = int(input())
    price_list = [int(input()) for i in range(n)]
    price_list.sort()
    price_list[-1] /=  2
    print(sum(price_list))

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

price[-1]=price[-1]/2

print(sum(price))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Wed Jan  2 09:53:30 2019

@author: Yamazaki Kenichi
"""

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

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def chrieve():

    num = int(input("品物の個数を入力してください。"))
    if 2 > num or 10 < num:
        return print("入力値は2～10です。")
    cost = []
    expensive = 0
    sum = 0
    for i in range(num):
        cost.append(int(input("品物の価格を入力してください。")))
        if 100 <= cost[i] <= 10000 and cost[i] % 2 == 0:
            if expensive <= cost[i]:
                expensive = cost[i]
            sum += cost[i]
        else:
            return print("商品の価格を守り、正しく入力してください。")

    sum -= expensive/2

    return print(int(sum))


chrieve()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
p = []
for i in range(n):
    p.append(int(input()))
p.reverse()
ans = 0
for i in range(n):
    if i == 0:
        ans += p[i]/2
    else:
        ans += p[i]
if ans - int(ans) != 0:
    print(ans)
else :
    print(int(ans))

Submission status: Wrong Answer

Solution code:
str = input()

list=[]
for i in range (int(str)):
    teika = int(input())
    list.append(teika)
    waribiki=max(list)
    goukei=sum(list)+waribiki/2-waribiki
print(goukei)

Submission status: Wrong Answer

Solution code:
n = int(input())
p_array = []
price_sum = 0
price_max = 0
for _ in range(n):
  element = int(input())
  price_sum += element
  price_max = max(element, price_sum)

print(price_sum - price_max//2)

Submission status: Wrong Answer

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]:
            max1 = i
list1[max1] = int(list1[max1]//2)

print(sum(list1))

Submission status: Wrong Answer

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]:
            max1 = i
list1[max1] = int(list1[max1]/2)

print(int(sum(list1)))

Submission status: Wrong Answer

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] = int(list1[max]/2)

print(int(sum(list1)))

Submission status: Wrong Answer

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: Wrong Answer

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: Wrong Answer

Solution code:
a = int(input())
list=[]
for i in range(a):
  i=int(input())
  list.append(i)
for i in list:
  if i == max(list):
    list.append(i/2)
    list.remove(i)
    break
sum(list)

Submission status: Wrong Answer

Solution code:
a = int(input())
list=[]
for i in range(a):
  i=int(input())
  list.append(i)
for i in list:
  if i == max(list):
    list.append(i/2)
    list.remove(i)
sum(list)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
p = [0 for i in range(n)]
for i in range(n):
    p[i] = int(input())
p2 = sorted(p)
print(p2)
print(int(sum(p2)-p2[n-1]*0.5))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(sm - mx / 2)

Submission status: Wrong Answer

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

print(sum - mx / 2)

Submission status: Wrong Answer

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

print(sum - mx / 2)

Submission status: Wrong Answer

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

p_sorted = sorted(p)
p[N-1] = round(p[N-1]/2)
print(sum(p))

Submission status: Wrong Answer

Solution code:
N = int(input())
sum = 0
max = -1
for i in range(N):
    price = int(input())
    sum += price
    if price > max:
        max = price
print(sum-max/2)

Submission status: Wrong Answer

Solution code:
N = int(input())
sum = 0
max = -1
while N:
    price = int(input())
    sum += price
    if price > max:
        max = price
    N = N - 1
print(sum-max/2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
N=int(input())
p=[int(input()) for i in range(N)]
po=sum(p)-max(p)/2
math.floor(po)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
N=int(input())
p=[int(input()) for x in range(N)]
p.sort(reverse = True)
p[0]=p[0]/2
math.floor(sum(p))

Submission status: Wrong Answer

Solution code:
N=int(input())
p=[int(x) for x in input().split()]
p.sort(reverse = True)
p[0]=p[0]/2
print(sum(p))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#abc115b

n=int(raw_input())
p=[]
for i in xrange(n):
 p.append(int(raw_input()))
print p
print sum(p)-max(p)/2

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

p[p.index(max(p))] /=2.0
print(sum(p))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
sum = 0
P = []
for i in range(N - 1):
    P.append(int(input()))
    sum += P[i]

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
sum =0
max =0
index=0
while index < n:
    p = int(input())
    sum+=p
    if p > max:
        max = p
    else:
        pass
    index+=1
print(max)    
print(sum - max//2)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
a = int(input())
c = [int(input()) for i in range(a)]
min_c = min(c)
print(int(sum(c)-min_c/2))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())


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


p[p_max] = p[p_max] / 2 

print(sum(p))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
p = []
for i in range(N):
    _p = int(input())
    p.append(_p)
biggest = 0
j = 0
for i in range(N):
    if(p[i]>biggest):
        j = i
        biggest=p[i]
p[j] = p[j] / 2
print(sum(p))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
p = list(map(int, input().split()))
p.sort(reverse=True)
a = p[1:]
b = p[0] // 2
print(sum(a, b))

Submission status: Wrong Answer

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

total = int(max(a)/2)
a.remove(max(a))
print(a)
total += sum(a)

print(total)

Submission status: Wrong Answer

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

total = int(max(a)/2)
print(max(a))
print(total)
a.remove(max(a))
print(a)
total += sum(a)

print(total)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
N = int(input())
gifts = []
price = 0

for i in range(N):
  gifts.append(int(input()))
  
price = sum(gifts) - max(gifts) / 2
print(price)

Submission status: Wrong Answer

Solution code:
N = int(input())
p_list = [int(input()) for i in range(N)] 
sum = 0
for i in range(N):
  if p_list[i] == max(p_list):
    sum += int(p_list[i]/2)
  else:
    sum += p_list[i]
print(sum)

Submission status: Wrong Answer

Solution code:
n = int(input())
num = 1
list = []

while num <= n:
    list.append(int(input()))
    num += 1

m = max(list)
l_replace = [int(m / 2) if i == m else i for i in list]


print(l_replace)
print(int(sum(l_replace)))

Submission status: Wrong Answer

Solution code:
n = int(input())
num = 1
list = []

while num <= n:
    list.append(int(input()))
    num += 1

m = max(list)
l_replace = [int(m / 2) if i == m else i for i in list]
print(sum(l_replace))

Submission status: Wrong Answer

Solution code:
N = int(input())
p_list = [int(i) for i in input().split()] 
sum = 0
for i in range(len(p_list)):
  if p_list[i] == max(p_list):
    sum += int(p_list[i]/2)
  else:
    sum += p_list[i]
print(sum)

Submission status: Wrong Answer

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

a.sort(reverse=True)
ans = 0
ans += int(a[0]) // 2
a.pop(0)
a = list(map(int, a))

print(ans + sum(a))

Submission status: Wrong Answer

Solution code:

N = int(input())

pl = []


for i in range(N):

    pl.append(int(input()))


max = 0

t = 0

for j in range(N):

    if max < pl[j]:
        max = pl[j]
        
    t = t + pl[j]

print(max)

t = t + (max / 2) -max

print(int(t))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
l = []
for i in range(n):
    l.append(int(input()))
m = 0
s = 0
for i in l:
    if m<i:
        m = i
        s = l.index(i)

l[s]=l[s]/2
ans = 0
for i in l:
    ans += i
print(ans,end="")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

a=max(p)
q=0
for i in range(0,len(p)):
    if p[i]==a:
        q=q+p[i]/2
    else:
        q=q+p[i]
print(int(q))

Submission status: Wrong Answer

Solution code:
n = int(input())
l = []
for i in range(n):
    l.append(int(input()))
m = 0
s = 0
for i in l:
    if m<i:
        m = i
        s = l.index(i)

l[s]=l[s]/2
ans = 0
for i in l:
    ans += i
print(ans)

Submission status: Wrong Answer

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

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

a=max(p)
q=0
for i in range(0,len(p)):
    if p[i]==a:
        q=q+int(p[i]/2)
    else:
        q=q+p[i]
print(q)

Submission status: Wrong Answer

Solution code:
m = int(input())
ls = []
for i in range(m):
    ls.append(int(input()))
ls = sorted(ls,reverse=True)
ls[0] = ls[0]/2
n=0
for i in range(m):
    n=n+ls[i]
print(n)

Submission status: Wrong Answer

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

A = sorted(S, reverse=True)

S[N-1] = S[N-1]/2

print(int(sum(S)))

Submission status: Wrong Answer

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

A = sorted(S, reverse=True)

S[0] = S[0]/2

print(int(sum(S)))

Submission status: Wrong Answer

Solution code:
n = int(input())
l = []
for i in range(n):
    l.append(int(input()))
m = 0
s = 0
for i in l:
    if m<i:
        m = i
        s = l.index(i)

l[s]=l[s]/2
print(sum(l))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = 0
ans += int(a[0]) // 2
a.pop(0)

for i in range(n-1):
    ans += int(a[i])

print(int(ans))

Submission status: Wrong Answer

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

A = sorted(S, reverse=True)

S[0] = S[0]/2

print(sum(S))

Submission status: Wrong Answer

Solution code:
n = int(input())
ans_ = []
for i in range(n):
    num = int(input())
    ans_.append(num)
ans_.sort()
a = int(ans_[0]/2)
ans_[0] = a
ans = 0
for i in ans_:
    ans += i
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
l = []
for i in range(n):
    l.append(int(input()))
m = 0
s = 0
for i in l:
    if m<i:
        m = i
        s = l.index(i)

print(sum(l)-m/2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

mx = max(a)
sum = 0

for p in a:
	if p == mx:
		sum += p//2
	else:
		sum += p

print(int(sum))

Submission status: Wrong Answer

Solution code:
n = int(input())

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

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

print(int(ans))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = 0
ans += int(a[0]) / 2
a.pop(0)

for i in range(n-1):
    ans += int(a[i])
    
print(int(ans))

Submission status: Wrong Answer

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

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

mx = max(a)
sum = 0

for p in a:
	if p == mx:
		sum += p//2
	else:
		sum += p

print(sum)

Submission status: Wrong Answer

Solution code:
n = int(input())
s = [0]*n
maxi=0
for i in range(n):
    s[i]=int(input())
    maxi=max(maxi,s[i])
ans=0
for i in s:
    if i==maxi:
        ans += i//2
    else :ans+=i
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
3
4980
7980
6980

Submission status: Wrong Answer

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: Wrong Answer

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

print(sum(A) - max(A) // 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:
def readinput():
    n=int(input())
    p=[]
    for _ in range(n):
        p.append(int(input()))
    return n,p

def main(n,p):
    p.sort(reverse=True)
    #print(p)
    p[0]=p[0]//2
    return sum(p)

if __name__=='__main__':
    n,p=readinput()
    ans=main(n,p)
    print(ans)

Submission status: Accepted

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

descending_p = sorted(p, reverse=True)
# print(descending_p)

# 一番の高額は半額
discount_price = descending_p[0] // 2
# print(discount_price)

# 他は定価で買う
list_price = sum(descending_p[1:])
# print(list_price)

total_price = discount_price + list_price
print(total_price)

Submission status: Accepted

Solution code:
# ABC115
# B Christmas Eve Eve
N = int(input())
P = []
for n in range(N):
    P.append(int(input()))
P = sorted(P,reverse=True)
print(sum(P) - P[0]//2)

Submission status: Accepted

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

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

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

print(math.floor(total_price))

Submission status: Accepted

Solution code:
N = int(input())
data = list(range(N))
m = 0
while m < N:
    data[m] = int(input())
    m += 1

kei = 0
max = 0
for i in range(len(data)):
    kei += data[i]
    if max < data[i]:
        max = data[i]

kei = kei - max / 2
print(int(kei))

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 = list(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)]

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

print(ans)

Submission status: Accepted

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

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

max_p = max(p)
ans = int(max_p/2) + sum(p) - max_p

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

def main():
    p = [int(input()) for i in range(int(input()))]
    print(sum(p) - max(p) // 2)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:

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

k=0

m=max(p)
l=int(m/2)

for i in p:
    k=k+i

print(k-l)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import collections
from sys import exit
from itertools import product

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

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

Submission status: Accepted

Solution code:
n=int(input())
p=[int(input()) for i in range(n)]
total=0
for i in range(n):
  total+=p[i]
total-=max(p)*0.5
print(int(total))

Submission status: Accepted

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

Submission status: Accepted

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

"""
m = P[N-1]
P = P[:N-1]
"""

print(sum(P) + m // 2)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

ans -=max(p)//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:
import math
N = int(input())
p = []
for i in range(N):
    p.append(int(input()))

result = max(p)/2 + sum(p) - max(p)

print(math.floor(result))

Submission status: Accepted

Solution code:
N = int(input())
S_list = [int(input()) for i in range(N)]
p_max = max(S_list)
p_sum = sum(S_list)
result = int(p_max / 2) + p_sum - p_max
print(result)

Submission status: Accepted

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