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

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)


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


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) - max(p)/2)


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

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

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

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


Verdicts: Runtime Error

Runtime Error

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())
p=[int(i) for i in input()]
p.sort(reverse=True)
ans=sum(p)-p[0]//2
print(ans)

n=int(input())
p=[int(input()) for i in range(n)]
p.sort(reverse=True)
ans=sum(p)-p[0]//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):
n, *a = map(int, open(0).read().split())
print(sum(a) - sorted(a)[-1])

n, *a = map(int, open(0).read().split())
print(sum(a) - sorted(a)[-1] // 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())
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)

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


n = int(input())
maximum = 0
li = list(map(int,input().split()))
print(sum(li)-max(li)/2)

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

n = int(input())
l = [int(input()) for _ in [0]*n]

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


Verdicts: Runtime Error

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

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)

import sys

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

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

print(pay-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 in range(n)]
print(sum(p) - max(p)//2)
 

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



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


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())
l = [int(i) for i in range(n)]
print(sum(l)-0.5*max(l))

n = int(input())
l = [int(input(i)) for i in range(n)]
print(sum(l)-0.5*max(l))


n = int(input())
l = [int(input(i)) for i in range(n)]
print(sum(l)-int(0.5*max(l)))

n = int(input())
l = [int(input(i)) for i in range(n)]
print(sum(l)-int(0.5*max(l)))


n=int(input())
l=[int(input()) for _ in range(n)]
print(sum(l)-int(0.5*max(l)))

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):
n = int(input())
ls = [int(input()) for i in range(n)]
list.sort(ls,reverse=True)
ls[0] = ls[0]/2
a = 0
for i in range(n):
    a += ls[i]
print(a)

n = int(input())
ls = [int(input()) for i in range(n)]
list.sort(ls,reverse=True)
ls[0] = ls[0]//2
a = 0
for i in range(n):
    a += ls[i]
print(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())
x = list(map(int, input().split()))

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

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

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


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

print(sum(x)-max(x)//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):
def bChristmas(n, pl):

    return sum(pl) - (max(pl)/ 2)

def main():
    n = int(input())
    pl = [int(input()) for i in range(n)]
    print(bChristmas(n, pl))

if __name__ == '__main__':
    main()


def bChristmas(n, pl):

    return int(sum(pl) - (max(pl)/ 2))

def main():
    n = int(input())
    pl = [int(input()) for i in range(n)]
    print(bChristmas(n, pl))

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())
list = [int(input()) for i in range(N)]
print(sum(list)-list[-1]//2)

N =int(input())
list = [int(input()) for i in range(N)]
list.sort()
print(sum(list)-list[-1]//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)]

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

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

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

max_index = 0
max_price = 0
price_list = []

for i in range(0, n):
    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)


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)


n = int(input())

max_index = 0
max_price = 0
price_list = []

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

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

print(int(p_sum))


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())
a=[]
b=0
for i in range(n):
    a.append(i)
for u in a:
    b+=u
print(b-(max(a)//2))

n=int(input())
a=[]
b=0
for i in range(n):
    c=int(input())
    a.append(c)
for u in a:
    b+=u
print(b-(max(a)//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())
l=[]
p=0
for I in range(1,n+1):
 l.append(int(input())
l.sort()
for I in l:
 p+=I
print(p+max(l))

n=int(input())
l=[]
s=0
for i in range(1,n+1):
 l.append(int(input()))
l.sort()
for i in l:
 s+=i
print(int(s-0.5*max(l)))

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


n = int(input())
a = [ int(input()) for i in range(n)]
ans = 0
for i in range(n):
 ans += a[i]
ans -= max(a)//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):
n=int(input())
l=[]
for i in range(n):
    a =input()
    l.append(int(a))
lm=sorted(l)
lm2=l[0:n]
b=l[-1]
print(sum(lm2)+int(b//2)-int(b))

n=int(input())
l=[]
for i in range(n):
    a =input()
    l.append(int(a))
lm=sorted(l)
lm2=l[0:n-1]
b=l[-1]
print(sum(lm2)+int(b//2))

n=int(input())
l=[]
for i in range(n):
    a =input()
    l.append(int(a))
print(sum((l)))

n=int(input())
l=[]
for i in range(n):
    a =input()
    l.append(int(a))
lm=sorted(l)
lm2=lm[0:n-1]
b=lm[-1]
print(sum(lm2)+int(b)//2)

Verdicts: 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):
L, H = map(int, input().split())
N = int(input())
worked_time = [int(input()) for _ in range(N)]

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




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

print(sum(prices) - max(prices) // 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 = int(input())
    P.append(p)
    
price = sum(P) - max(P) / 2
print(price)

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


N = int(input())
p_list = [int(input()) for i in range(N)] 
sum = 0
for i in range(N):
  if i == p_list.index(max(p_list)):
   sum += int(p_list[i]/2)
  else:
    sum += p_list[i]
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):
d = int(input())
x = "Christmas"
y = "Eve"
if d == 25:
    print(x)
elif d == 24:
    print("{} {}".format(x, y))
elif d == 23:
    print("{} {} {}".format(x, y, y))
else:
    print("{} {} {} {}".format(x, y, y, y))

n = int(input())
price=[int(input()) for i in range(n)]
sort_price = sorted(price)
discount = sort_price[len(sort_price)-1] // 2
sort_price[len(sort_price)-1] = discount
print(sum(sort_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):
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)


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)


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


a = int(input())
b = []
for i in range(a):
    b.append(int(input()))
b = sorted(b, reverse=True)
print(sum(b) + b[0] // 2 - b[0])


Verdicts: Runtime Error

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


n = int(input())
p = [int(input()) for _ 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):
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))


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

print(int(sum(a) - (max(a) / 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())
sum = 0
high = 0
for i in range(n):
	x = int(input())
	sum += x
	if high<x:
		high = x
sum -= x//2
print(sum)

n = int(input())
sum = 0
high = 0
for i in range(n):
	x = int(input())
	sum += x
	if high<x:
		high = x
sum -= high//2
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())
p = [int(input()) for _ in range(N)]
max_p = max(p)
max_index = p.index(max_p)

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

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

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

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

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



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

N = list(map(int,input().split()))
p = []
for i in range(N[0]):
  p.append(int(input()))
max = 0
sum = 0
for i in range(N[0]):
    sum += p[i]
    a = p[i]
    if max < a :
        max = a
print(int(sum-(int(max/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 = [0 for i in range(N)]
for i in range(N):
    p[i] = int(input())
p.sort()
print(sum(p)-(p[0]//2))

N = int(input())
p = [0 for i in range(N)]
for i in range(N):
    p[i] = int(input())
p.sort()
print(sum(p)-(p[-1]//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())
lst = []
for i in range(N):
    lst.append(int(input()))
lst.sort()
lst[-1] = lst[-1]/2
print(sum(lst))

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

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(a/2+p)

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

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

Verdicts: 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):
N = int(input())
p = []
for i in range(N):
  pi = [int(input())]
  p = p + pi
  
M = max(p)

print(sum(p)-M/2)

N = int(input())
p = []
for i in range(N):
  pi = [int(input())]
  p = p + pi
  
M = max(p)

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

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



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


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


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



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


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


Verdicts: Runtime Error

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

sum = 0
big = max(banig)
banig.remove(big)
summation = 0
for e in banig:
  summation += e
print(summation + big/2)

banig = []
for x in range(int(input())):
  banig.append(int(input()))

sum = 0
big = max(banig)
banig.remove(big)
summation = 0
for e in banig:
  summation += e
print(summation + int(big/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):
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)

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

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


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

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

answer = 0
big = 0

for i in range(N):
	a = int(input())
	answer += a
	if big < a:
		big = a

print(int(answer-(big/2))

N = int(input())

answer = 0
big = 0

for i in range(N):
	a = int(input())
	answer += a
	if big < a:
		big = a

print(int(answer-(big/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 numpy as np
n = int(input())
arr = [int(input()) for _ in range(n)]
arg_m = np.argmax(arr)
total = (arr[arg_m]//2) + sum(arr[arg_m+1:])
print(total)


N = int(input())
A = sorted([int(input()) for _ in range(N)])
ans = A[-1]//2 + sum(A[:-1])
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):
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))

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

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

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

n = int(input())

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

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

n = int(input())
max = 0
sum = 0

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

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):
total_item = int(input())
item_cost = []
for i in range(total_item):
    item_cost.append(int(input()))
print(sum(item_cost) - max(item_cost) // 2)v

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

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)]
print(sum(a)-max(a)/2)

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

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

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(sum(list)-(list[-1]/2))

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

Verdicts: Runtime Error

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

n =int(input())
p =[]
for i in range(n):
    a =int(input())
    p.append(a)
p.sort()
new_p =p[n-1]/2
ans =sum(p[:n-1])+new_p
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())
sum=0
mins=999999999999
for i in range(n):
    t=int(input())
    sum+=t
    mins=min(mins,t)
print(sum-mins//2)

n=int(input())
sum=0
maxs=0
for i in range(n):
    t=int(input())
    sum+=t
    maxs=max(maxs,t)
print(sum-maxs//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())
l = []
for i in range(n):
    l.append(int(input()))
print(sum(l)-max(l)/2)

n = int(input())
l = [int(input()) for _ in range(n)]
print(sum(l)-max(l)//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(p) for p in input().split()]
P.sort(reverse=True)
print(int(sum(P)-(P[0]/2)))

N = int(input())
P = [int(input()) for p in range(N)]
P.sort(reverse=True)
print(int(sum(P)-(P[0]/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 = []

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


new_p = sorted(p, reverse=True)

p_max = (new_p[0]/2)

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

NEWP_SUM = sum(NEW_p)

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

N = int(input())

p = []

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


new_p = sorted(p, reverse=True)

p_max = (new_p[0]/2)

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

NEWP_SUM = sum(NEW_p)

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

import sys
input = sys.stdin.readline
import numpy as np


N = int(input())

p = []

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


new_p = sorted(p, reverse=True)

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

print(sum(new_p))

N = int(input())

p = []

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


new_p = sorted(p, reverse=True)

p_max = (new_p[0]/2)

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

NEWP_SUM = sum(NEW_p)

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

N = int(input())

p = []

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


new_p = sorted(p, reverse=True)

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

print(sum(new_p))


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

Verdicts: 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())
p_list = [0]*10
i = 0
for i in range(N):
    x = int(input())
    p_list[i] = x
    x = 0


print(p_list)
p_list.sort()
print(p_list)
kari = sum(p_list)
print(int(kari - (p_list[-1]/2)))


N = int(input())
p_list = [0]*10
i = 0
for i in range(N):
    x = int(input())
    p_list[i] = x
    x = 0

p_list.sort()
kari = sum(p_list)
print(int(kari - (p_list[-1]/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 = list(map(int,input().split()))
print(sorted(p)[-1]//2 + sum(sorted(p)[:N-1]))

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

n = int(input())
p = [int(input()) for i in range(n)]
print(sum(p)-max(p)//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())
al = [int(input()) for _ in range(n)]
m = max(al)
s, f = 0, True
for i in range(n):
  if al[i] == m and flag:
    s += al[i] // 2
    f = False
  else:
    s += al[i]
print(s)


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

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


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


#coding:utf-8

N = int(input())
p = []
max_val = -1
for i in range(N):
    p_i = int(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))
        


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


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


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


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


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

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


Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Wrong Answer

Wrong Answer

Accepted