TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: 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?

Submission attempts (in order):
import math
a=int(input())
b=list(map(int,input().split()))
print(sum(b)-int(max(b)/2))

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

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

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

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

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

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
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)

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

Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
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))


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


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


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


Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Accepted
Problem: 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?

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

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

Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
N = int(input())
p_List = list(int(input()) for i in range(N))
print(p_List)
Max = max(p_List)

Sum = sum(p_List) - Max / 2

print(int(Sum))






N = int(input())
p_List = list(int(input()) for i in range(N))
Max = max(p_List)

Sum = sum(p_List) - Max / 2

print(int(Sum))






Verdicts: Wrong Answer

Accepted
Problem: 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?

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

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

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
from sys import stdin
N = int(input())
P = sorted([int(p) for p in stdin.read().splitlines()])

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



from sys import stdin
N = int(input())
P = sorted([int(p) for p in stdin.read().splitlines()])

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


from sys import stdin
N = int(input())
P = sorted([int(p) for p in stdin.read().splitlines()])
 
print(int(P[-1]/2)+sum(P[:-1]))

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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?

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

n = int(input())
l = [int(input()) for i in range(n)]
l.sort()
total = 0
for i in l:
    total += i
print(total - int(l[n-1] / 2))

Verdicts: Runtime Error

Accepted
Problem: 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?

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

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

Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
#!/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()

#!/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()


Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
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))

N = int(input())
items = []
for _ in range(N):
    item = int(input())
    items.append(item)

items.sort()

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

Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
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))

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

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

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
n=int(input())
l=list(map(int,input().split()))
l.sort(reverse=True)
print(l[0]//2+sum(l[1:]))

n=int(input())
l=[int(input()) for _ in range(n)]
l.sort(reverse=True)
print(l[0]//2+sum(l[1:]))


Verdicts: Wrong Answer

Accepted
Problem: 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?

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

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

Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
n = int(input())
p = list(int(input()) for i in range(n))
a = p.pop(p.index(max(p))) / 2
print(sum(p) + a)

n = int(input())
p = list(int(input()) for i in range(n))
a = p.pop(p.index(max(p))) / 2
print(int(sum(p) + a))

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
N=int(input())
p=sorted([int(input()) for i in range(N)])[::-1]

Sum=p[0]/2

for i in range(1,N):
  Sum=Sum+p[i]

print(Sum)

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

Sum=p[0]/2

for i in range(1,N):
  Sum=Sum+p[i]

print(int(Sum))

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
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)

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)

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

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
N=int(input())
p=list(map(int,input().split()))
p=sorted(p,reverse=True)
ans=int(p[0]/2)
for i in range(1,len(p)):
    ans+=p[i]
print(ans)

N=int(input())
p=list(map(int,input().split()))
print(sum(p)-max(p)//2)

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

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
N = int(input())
S = [int(input()) for _ in range(N)]

A = sorted(S, reverse=True)

S[0] = S[0]/2

print(int(sum(S)))


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

A = sorted(S, reverse=True)

S[0] = S[0]/2

print(sum(int(S))

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


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

A = sorted(S, reverse=True)

S[0] = S[0]/2

print(sum(S))

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

A = sorted(S, reverse=True)

A[0] = A[0]/2

print(int(sum(A)))

Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
l=int(input())
b=[int(i) for i in range(l)]
print(sum(b)-max(b)/2)

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

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

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

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

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

Verdicts: Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Accepted
Problem: 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?

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

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


Verdicts: Runtime Error

Accepted
Problem: 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?

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

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

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
S = input()
if S[0] != 'A':
    print('WA')
    exit()
if S[2:].count('C') != 1:
    print('WA')
    exit()
for i in range(len(S)):
    if i in [0, 2]:
        if S[i] != S[i].upper():
            print('WA')
            exit()
        continue
    if S[i] != S[i].lower():
        print('WA')
        exit()
print('AC')


S = input()
if S[0] != 'A':
    print('WA')
    exit()
if S[2:].count('C') != 1:
    print('WA')
    exit()
for i in range(len(S)):
    if i in [0, 2]:
        if S[i] != S[i].upper():
            print('WA')
            exit()
        continue
    if S[i] != S[i].lower():
        print('WA')
        exit()
print('AC')


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


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
p=[int(input()) for _ in range(int(input()))]
ans=0
for i in range(len(p)):
    ans+=p[i]
ans=ans-max(p)+max(p)/2
print(ans)

p=[int(input()) for _ in range(int(input()))]
ans=0
for i in range(len(p)):
    ans+=p[i]
ans=ans-max(p)+max(p)/2
print(int(ans))

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
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))

n=int(input())
A = [int(input()) for _ in range(n)]
A.sort(reverse=True)
A[0]=int(A[0]/2)
print(sum(A))

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
n,*p,=map(int,open(0).read().split())
p=sorted(p)
print(p(max)//2)


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


Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
3
4980
7980
6980

# coding: utf-8
# Your code here!

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

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

Verdicts: Wrong Answer

Accepted
Problem: 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?

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

import sys

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

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

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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?

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

p_max = max(p)

print(sum(p) - p_max / 2)


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

p_max = max(p)

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


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

p_max = max(p)

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


Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
n=int(input())
price=[]
for i in range(n):
  price.append(int(input()))
  
price=sorted(price)

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

print(sum(price))
  

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

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

print(int(sum(price)))
  


Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
# -*- coding: utf-8 -*-
N = int(input())
a = [input() for i in range(N)]
S = max(a) // 2
a.remove(max(a)) 
print(sum(a,S)) 

# -*- coding: utf-8 -*-
N = int(input())
a = [input() for i in range(N)]
s = int(max(a)) // 2
a.remove(max(a)) 
print(sum(a) + s) 

# -*- coding: utf-8 -*-
N = int(input())
a = [int(input()) for i in range(N)]
s = int(max(a)) // 2
a.remove(max(a)) 
print(sum(a) + s) 

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
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

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


Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
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) 
  


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)


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

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


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) 
  

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

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) 
  

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)

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

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)

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


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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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?

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

n = int(input())
l = list()
for i in range(n):
  a = int(input())
  l.append(a)

l.sort()
p = 0.5*l[-1] + sum(l[:-1])
print(int(p))


Verdicts: Runtime Error

Accepted
Problem: 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?

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

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

Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
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))


N = input()
N = int(N)

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


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


Verdicts: Wrong Answer

Accepted
Problem: 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?

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

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

Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
N=int(input())
list_p=[]
for i in range(N):
    list_p.append(int(input()))

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

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

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

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
N = input()
p = []
for i in range(N):
    p.append(input())

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



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

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



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

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



Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
N=int(input())
p=[int(input()) for i in range(N)]
p.sort(reverse=True)
p[0]=0.5*p[0]
s=sum(p)
print(s)

N=int(input())
p=[int(input()) for i in range(N)]
p.sort(reverse=True)
p[0]=0.5*p[0]
s=sum(p)
print(int(s))

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
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)

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

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

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

print(total_price)

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
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))

from sys import stdin
a = stdin.readline()
w=int(a)
j=1
sumvalue=0
maxvalue=0
w2=[]
while j<=w:
    z = stdin.readline().rstrip('\n')
    sumvalue+=int(z)
    maxvalue=max(maxvalue,int(z))
    j+=1
print(sumvalue-int(maxvalue/2))

Verdicts: Runtime Error

Accepted
Problem: 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?

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

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

Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
n=int(input())
l=[]
for _ in range(n):
    l.append(int(iｂnput()))
print(sum(l)-int(max(l)/2))


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


Verdicts: Runtime Error

Accepted
Problem: 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?

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

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

Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
n=int(input())
s=[list(map(int,list(input()))) for i in range(h)]

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

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

Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
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))

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

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

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

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
# 2019/02/02


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

# 2019/02/02


# 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]

sum -= int(max / 2)

# Output
print(sum)


Verdicts: Wrong Answer

Accepted
Problem: 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?

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

print(max - discount)


n = int(input())
ans = 0
d = 0
for _ in range(n):
    p = int(input())
    ans += p
    d = max(d, p // 2)

print(ans - d)


Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
N=int(input())
List = [int(input()) for i in range(N)]
print(sum(List)-(max(List)/2))

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

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
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)   

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)  

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

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: 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?

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

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

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
N = int(input())

p = [int(input()) for _ in range(N)]
mp = max(p)
print(mp+ p[i] for i in range(len(p)))

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

Verdicts: Wrong Answer

Accepted
Problem: In some other world, today is Christmas Eve.  There are N trees planted in Mr. Takaha's garden. The height of the i-th tree (1 \leq i \leq N) is h_i meters.  He decides to choose K trees from these trees and decorate them with electric lights. To make the scenery more beautiful, the heights of the decorated trees should be as close to each other as possible.  More specifically, let the height of the tallest decorated tree be h_{max} meters, and the height of the shortest decorated tree be h_{min} meters. The smaller the value h_{max} - h_{min} is, the better. What is the minimum possible value of h_{max} - h_{min}?

Submission attempts (in order):
N, K = map(int, input().split())
h_list = []
for _ in range(N):
    h_list.append(int(input()))
h_list.sort()

err_list = [h_list[i+K-1] - h_list[i] for i in range(N-K+1)]
print(max(err_list))


N, K = map(int, input().split())
h_list = []
for _ in range(N):
    h_list.append(int(input()))
h_list.sort()

err_list = [h_list[i+K-1] - h_list[i] for i in range(N-K+1)]
print(min(err_list))


Verdicts: Wrong Answer

Accepted
Problem: In some other world, today is Christmas Eve.  There are N trees planted in Mr. Takaha's garden. The height of the i-th tree (1 \leq i \leq N) is h_i meters.  He decides to choose K trees from these trees and decorate them with electric lights. To make the scenery more beautiful, the heights of the decorated trees should be as close to each other as possible.  More specifically, let the height of the tallest decorated tree be h_{max} meters, and the height of the shortest decorated tree be h_{min} meters. The smaller the value h_{max} - h_{min} is, the better. What is the minimum possible value of h_{max} - h_{min}?

Submission attempts (in order):
N,K = map(int, input().split())
hs = []
for _ in range(N):
    h = int(input())
    hs.append(h)
hs.sort()
print(hs)
ans = 1e9
for i in range(N-K+1):
    ans = min(ans, abs(hs[i]-hs[i+K-1]))
print(ans)

N,K = map(int, input().split())
hs = []
for _ in range(N):
    h = int(input())
    hs.append(h)
hs.sort()
# print(hs)
ans = 1e9
for i in range(N-K+1):
    ans = min(ans, abs(hs[i]-hs[i+K-1]))
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: In some other world, today is Christmas Eve.  There are N trees planted in Mr. Takaha's garden. The height of the i-th tree (1 \leq i \leq N) is h_i meters.  He decides to choose K trees from these trees and decorate them with electric lights. To make the scenery more beautiful, the heights of the decorated trees should be as close to each other as possible.  More specifically, let the height of the tallest decorated tree be h_{max} meters, and the height of the shortest decorated tree be h_{min} meters. The smaller the value h_{max} - h_{min} is, the better. What is the minimum possible value of h_{max} - h_{min}?

Submission attempts (in order):
n, k = [int(i) for i in input().split()]
hs = []
for i in range(n):
    hs.append(int(input()))

hs.sort()
print(hs)

min_diff = hs[k - 1] - hs[0]
for i in range(n - k + 1):
    diff = hs[i + k - 1] - hs[i]
    if diff == 0:
        min_diff = 0
        break

    if diff < min_diff:
        min_diff = diff

print(min_diff)


n, k = [int(i) for i in input().split()]
hs = []
for i in range(n):
    hs.append(int(input()))

hs.sort()
# print(hs)

min_diff = hs[k - 1] - hs[0]
for i in range(n - k + 1):
    diff = hs[i + k - 1] - hs[i]
    if diff == 0:
        min_diff = 0
        break

    if diff < min_diff:
        min_diff = diff

print(min_diff)


Verdicts: Wrong Answer

Accepted
Problem: In some other world, today is Christmas Eve.  There are N trees planted in Mr. Takaha's garden. The height of the i-th tree (1 \leq i \leq N) is h_i meters.  He decides to choose K trees from these trees and decorate them with electric lights. To make the scenery more beautiful, the heights of the decorated trees should be as close to each other as possible.  More specifically, let the height of the tallest decorated tree be h_{max} meters, and the height of the shortest decorated tree be h_{min} meters. The smaller the value h_{max} - h_{min} is, the better. What is the minimum possible value of h_{max} - h_{min}?

Submission attempts (in order):
def main():
	N, K = [int(v) for v in input().split()]
    
    H = sorted([-int(input() for _ in range(N)])
    
    print(-H[0] + H[K - 1])
    
main()



def main():
    N, K = [int(v) for v in input().split()]
    H = sorted([-int(input()) for _ in range(N)])

    min_diff = 10 ** 10
    for i in range(K - 1, N):
        min_diff = min(min_diff, -H[i - K + 1] + H[i])
    print(min_diff)

main()



Verdicts: Runtime Error

Accepted