QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#555621#8586. Partymohamed_ioi0 8ms10580kbPython3198b2024-09-10 06:50:132024-09-10 06:50:14

Judging History

你现在查看的是最新测评结果

  • [2024-09-10 06:50:14]
  • 评测
  • 测评结果:0
  • 用时:8ms
  • 内存:10580kb
  • [2024-09-10 06:50:13]
  • 提交

answer

n= int(input())
a = list(map(int, input().split(' ')))

a.sort()
a = a[::-1]

hapiness = 0
for i in range(n // 2):
    if a[i] >= 0:
        hapiness += a[i]
    else:
        break

print(hapiness)

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 0
Wrong Answer
time: 8ms
memory: 10580kb

input:

5
3 2 -1 4 5

output:

9

result:

wrong answer 1st lines differ - expected: '12', found: '9'

Subtask #2:

score: 0
Skipped

Dependency #1:

0%

Subtask #3:

score: 0
Skipped

Dependency #1:

0%