結果
| 問題 | No.1046 Fruits Rush |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-05-30 19:05:20 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 20 ms / 2,000 ms |
| + 627µs | |
| コード長 | 156 bytes |
| 記録 | |
| コンパイル時間 | 53 ms |
| コンパイル使用メモリ | 15,104 KB |
| 実行使用メモリ | 11,008 KB |
| 最終ジャッジ日時 | 2026-09-21 12:24:57 |
| 合計ジャッジ時間 | 1,534 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 14 |
ソースコード
n,k=map(int,input().split())
A=list(map(int,input().split()))
A.sort(reverse=True)
ans=A[0]
for i in range(1,k):
if A[i]>0:
ans+=A[i]
print(ans)