結果
問題 |
No.1046 Fruits Rush
|
ユーザー |
|
提出日時 | 2022-10-06 08:13:26 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 34 ms / 2,000 ms |
コード長 | 187 bytes |
コンパイル時間 | 351 ms |
コンパイル使用メモリ | 12,032 KB |
実行使用メモリ | 10,496 KB |
最終ジャッジ日時 | 2025-01-02 16:34:21 |
合計ジャッジ時間 | 1,710 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 14 |
ソースコード
_, k = [int(x) for x in input().split()] _n = sorted([int(x) for x in input().split()], reverse=True) n = [x for x in _n if x >= 0] n = n if len(n) != 0 else [max(_n)] print(sum(n[:k]))