QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#564460 | #8586. Party | iyedoo | 0 | 12ms | 10704kb | Python3 | 189b | 2024-09-15 01:36:13 | 2024-09-15 01:36:13 |
Judging History
answer
n = int(input())
a = list(map(int, input().split(" ")))
a.sort(reverse=True)
happiness = 0
for i in range(n):
if i + 1 <= n // 2 + 1:
happiness += a[i]
print(happiness)
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 49
Accepted
time: 12ms
memory: 10612kb
input:
5 3 2 -1 4 5
output:
12
result:
ok single line: '12'
Test #2:
score: 49
Accepted
time: 10ms
memory: 10704kb
input:
1 10
output:
10
result:
ok single line: '10'
Test #3:
score: 0
Wrong Answer
time: 10ms
memory: 10648kb
input:
6 1 -3 2 10 -4 9
output:
22
result:
wrong answer 1st lines differ - expected: '21', found: '22'
Subtask #2:
score: 0
Skipped
Dependency #1:
0%
Subtask #3:
score: 0
Skipped
Dependency #1:
0%