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

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

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


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

n = int(input())
num = 1
list = []

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

m = max(list)
num2 = 0
aa = True
for i in list:
    if i == m and aa:
        list[num2] = int(m / 2)
        num2 += 1
        aa = False
    else:
       i
       num2 += 1

print(sum(list))

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):
import sys
import os


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    N = int(sys.stdin.readline().rstrip())
    P = [int(sys.stdin.readline().rstrip()) for i in range(N)]

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


if __name__ == '__main__':
    main()


import sys

sys.setrecursionlimit(10000000)
import os
import math
import bisect
import collections
import itertools
import heapq
import re
import queue

# import fractions

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: (x * y) // math.gcd(x, y)
# lcm = lambda x, y: (x * y) // fractions.gcd(x, y)

MOD = 10 ** 9 + 7
MAX = float('inf')


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    N = ii()
    P = [ii() for _ in range(N)]
    mx = max(P)
    P.remove(mx)
    P.append(mx // 2)
    print(sum(P))


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())
p=[input() for _ in range(n)]
p.sort()
s=0
for i in range(n-1):
  s+=p[i]
ans=s+(p[n-1]//2)
print(ans)


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


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


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):
#!/usr/bin/env python3
# Christmas Eve Eve

N = int(input().strip())
i = 0
p = []
while i < N:
  pi = int(input().strip())
  p.append(pi)
  i += 1
p = sorted(p)
p[-1] = p[-1]/2
print(int(sum(p))

#!/usr/bin/env python3
# Christmas Eve Eve

N = int(input().strip())
i = 0
p = []
while i < N:
  pi = int(input().strip())
  p.append(pi)
  i += 1
p = sorted(p)
p[-1] = p[-1]/2
print(int(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 = int(input())
s = []
for i in range(n):
  s.append(int(input())
m = max(s)
print(sum(s)-m)


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


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


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

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


Verdicts: 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())
a=[]*n
kei=0
for i in range(0,n,1):
    a[i]=int(input())
    kei=kei+a[i]

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

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

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

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

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

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

#include <cstdio>
#include <cmath>

#include <list>
#include <set>
#include <map>
#include <stack>

#include <string>
#include <cstring>
#include <utility>
#include <algorithm>
#include <functional>
#include <deque>
#include <cctype>
#include <ctime>
#include <cstdlib>
#include <iomanip>
using namespace std;

int main(){
    int n;
    cin >> n;
    int a[n];
    for(int i = 0; i < n; ++i){
        int p;
        cin >>p;
        a[i] = p;
    }
    int sum = 0;
    int yasui = 100000;
    for(int i = 0; i < n; ++i){
        sum += a[i];
        if(yasui > a[i]) yasui = a[i];
    }
    cout << sum - yasui/2 << endl;
}


N = int(input())
p = [int(input()) for x in range(N)]
print(int(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())
sum = 0
max = -1
while N:
    price = int(input())
    sum += price
    if price > max:
        max = price
    N = N - 1
print(sum-max/2)


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


N = int(input())
sum = 0
max = -1
for i in range(N):
    price = int(input())
    sum += price
    if price > max:
        max = price
print(int(sum-max/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):
pr = int(input())
li =[]

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

disc = max(li)

print(sum(li) - disc)

pr = int(input())
li =[]

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

disc = max(li) // 2

print(sum(li) - disc)

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

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

N=int(input())
P=[int(input()) for i 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())
p = sorted([int(input()) for _ in range(n)])
print(p[:-1] + p[-1]//2)

n = int(input())
p = sorted([int(input()) for _ in range(n)])
print(sum(p[:-1]) + p[-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())
p = [0]*N
for i in range(N):
    p[i] = int(inout())

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

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

ans = sum(p)-0.5*max(p)
print(int(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 = []
for n in range(N):
    p.append(n)

p_max = max(p)
p_sum = sum(p) - p_max
p_max *= 0.5

print(p_sum + p_max)

N = int(input())

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

p_max = max(p)
p_sum = sum(p) - p_max
p_max *= 0.5

print(int(p_sum + p_max))

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

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

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


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

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

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

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

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())
p_list=[int(input()) for i in range(N)]
s=sorted(p_list)
print(sum(s[:N-1])+s[N-1])

N=int(input())
p_list=[int(input()) for i in range(N)]
s=sorted(p_list)
print(sum(s[:N-1])+s[N-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())
gifts = []
price = 0

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


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

for i in range(N):
  gifts.append(int(input()))
  
price = sum(gifts) - max(gifts) // 2
print(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 -*-
a = int(input())
c = [int(input()) for i in range(a)]
min_c = min(c)
print(int(sum(c)-min_c/2))


# -*- coding: utf-8 -*-
a = int(input())
c = [int(input()) for i in range(a)]
max_c = max(c)
print(int(sum(c)-max_c/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())
a=[]
for i in range(n):
  p=int(input())
  a.append(p)

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

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

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

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

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

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

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)
biggest = 0
j = 0
for i in range(N):
    if(p[i]>biggest):
        j = i
        biggest=p[i]
p[j] = p[j] / 2
print(sum(p))

N = int(input())
p = []
for i in range(N):
    _p = int(input())
    p.append(_p)
biggest = 0
j = 0
for i in range(N):
    if(p[i]>=biggest):
        j = i
        biggest=p[i]
p[j] = p[j] / 2
print(int(sum(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())
sum =0
max =0
index=0
while index < n:
    p = int(input())
    sum+=p
    if p > max:
        max = p
    else:
        pass
    index+=1
print(max)    
print(sum - max//2)

n = int(input())
sum =0
max =0
index=0
while index < n:
    p = int(input())
    sum+=p
    if p > max:
        max = p
    else:
        pass
    index+=1
  
print(sum - max//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(imput())
l=[int(input()) for i in range(n)]
print(sum(l)-max(l)//2)

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


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

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

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

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

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

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())
li = [int(input()) for _ in range(n)]

print(sum(li) - min(li) // 2)

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

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

b.sort()

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

print(sum(b))

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

b.sort()

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

print(int(sum(b)))

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

p.sort(reverse=True)

max = p[0]
els = p[1:]

print(sum(els) + (max/2))

n = int(input())

p=[]

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


p.sort(reverse=True)

max = p[0]
els = p[1:]


print(sum(els) + int((max/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()))
p1=int(max(p)//2)

print(sum(p)-max(p)+p1)

n = int(input())
p=list(map(int,input().split()))
p1=int(max(p)/2)

print(sum(p)-max(p)+p1)

n = int(input())
p=list(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())

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

max_price = max(prices)

ans = sum(prices) - max_price/2

print(ans)

N = int(input())
 
prices = [int(input()) for _ in range(N)]
 
max_price = max(prices)
 
ans = int(sum(prices) - max_price/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())
i = 0
goods = []
while i < N:
    goods.append(int(input()))
    i += 1
print(sum(goods))
print(max(goods))
print(max(goods) // 2)
ans = sum(goods) - max(goods) + (max(goods) // 2)
print(ans)

N = int(input())
i = 0
goods = []
while i < N:
    goods.append(int(input()))
    i += 1

ans = sum(goods) - max(goods) + (max(goods) // 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())
p = [int(input()) for _ in N]
print(sum(p) - max(p) // 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())
price=[]
for i in range(N):
    price.append(int(input()))
price.sort(Reverse=True)
price[0]=price[0]//2
sum(price)
           
           

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

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


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

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


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

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

Verdicts: Runtime Error

Wrong Answer

Wrong Answer

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())
a = [int(input()) for i in range(N)]
MAX_PRICE = max(a)

SUM = sum(a) - MAX_PRICE/2

print(SUM)

N = int(input())
a = [int(input()) for i in range(N)]
MAX_PRICE = max(a)

SUM = sum(a) - MAX_PRICE/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 = list(sorted(map(int,input().split())))
res = sum(p[1:-1]) + p[-1]//2
print(res)


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


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,=map(int, open(0))
print(sum(a)-max(a)//2-4)

_,*a=map(int,open(0))
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()) 
t = [int(input()) for i in range(n)] 
kk = max(t)
print(sum(t)-kk/2)

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

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

N = int(input())
A = [int(i) for i in rnage(N)]

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

N = int(input())

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

print(sum(A) - max(A) // 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):
s=int(input())

def func(n):
    if n%2==0:
        return n/2
    else:
        return 3*n+1

a=[]
a.append(s)
for i in range(1,1000000):
    p=func(a[i-1])
    if not p in a:
        a.append(p)
    else:
        print(i+1)
        break


N = int(input())
k = [int(input()) for _ in range(N)]
p = int(sum(k) - max(k)/2)
print(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):
a,*n=map(int,open(0));print(sum(n)-max(n)/2)

a,*n=map(int,open(0));print(sum(n)-max(n)//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())
lists =[int(input()) for i in range(n)]
sums = sum(lists)
maxs = max(lists)
print(sums-max//2)


n = int(input())
lists =[int(input()) for i in range(n)]
sums = sum(lists)
maxs = max(lists)
print(sums-maxs//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):
max = 0
s = 0
n = int(input())
for i in range(1, n + 1):
    p = int(input())
    if max < p:
        max = p
        s = s + max
print(s + max // 2)


max = 0
s = 0
n = int(input())
for i in range(1, n + 1):
    p = int(input())
    if max <= p:
        max = p
    s = s + p
print(s - max//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())
price_list=[int(input()) for i in range(n)]
print(sum(price_list)-min(price_list)//2)

n=int(input())
price_list=[int(input()) for i in range(n)]
print(sum(price_list)-max(price_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,K = map(int,input().split())
h =[]
dif = []
for n in range(0,N):
    h.append(int(input()))

h.sort()

m = 10**10

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

print(m)



N = int(input())
pLs=[]
for n in range(0,N):
    pLs.append(int(input()))

pLs.sort(reverse = True)

sm = 0
pLs[0] = int(pLs[0]/2)
for n in range(0,N):
    sm += pLs[n]

print(sm)


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

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

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

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

N = int(input())
p = []
[p.append(int(input())) for _ in range(N)]
print(sum(p) - int(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 = [0] * N
max_value = 0

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

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

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

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

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

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 = [0] * N
for i in range(N):
  p[i]=int(input())
  
p = sorted(p,reverse=True)
ans = p.pop(0) / 2 +sum(p)
print(ans)

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

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

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

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

print(ans)


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

ans = sum(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):
import sys;t = [int(l) for l in sys.stdin];print(int(sum([i for n,i in enumerate(t) if n != t.index(max(t))]) + max(t) /2))


import sys;t = [int(l) for l in sys.stdin];t=t[1:t[0]+1];print(int(sum([i for c,i in enumerate(t) if c != t.index(max(t))]) + max(t) /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())
sum  = 0
max_value = max(p)
p.remove(max_value)

sum += max_value/2

for i in p:
        sum += i

print(sum)

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

sum += max_value/2

for i in p:
        sum += i

print(int(sum))

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 _ in range(n)]
ex = l.pop(l.index(max(l)))
print(int(ex / 1) + sum(l))

n = int(input())
p = [int(input()) for _ in range(n)]
ex = p.pop(p.index(max(p)))
print(int(ex / 2) + 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):
p=sorted([int(input()) for _ in range(int(input()))])
print(sum(p[0:-1]+p[-1]/2)

p=sorted([int(input()) for _ in range(int(input()))])
print(sum(p[0:-1])+p[-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())
p = []
for i in range(N):
  	p_i = int(input())
  	p.append(p_i)
  
p[p.index(max(p))] *= 1/2
print(sum(p))


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

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


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

price_list = []

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

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

n = int(input())

price_list = []

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

print(int(sum(price_list)-max(price_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())
arr = []
for i in range(n):
  arr[i]=int(input())
arr.sort()
ans = arr[-1]//2+sum(arr[:-1])
print(ans)

n = int(input())
arr = [0]*n
for i in range(n):
    arr[i]=int(input())
arr.sort()
ans = arr[-1]//2+sum(arr[:-1])
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())
l = []
for i in range(n):
    l.append(int(input()))
m = 0
s = 0
for i in l:
    if m<i:
        m = i
        s = l.index(i)

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

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

print(sum(l)-m/2)

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

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

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

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

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

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

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

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

Verdicts: 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):
4
4320
4320
4320
4320

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

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

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

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

Verdicts: Runtime Error

Accepted