結果
| 問題 | No.1046 Fruits Rush |
| コンテスト | |
| ユーザー |
osrgy01
|
| 提出日時 | 2021-01-18 13:48:09 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 143 bytes |
| 記録 | |
| コンパイル時間 | 426 ms |
| コンパイル使用メモリ | 12,800 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-12-14 03:23:47 |
| 合計ジャッジ時間 | 1,519 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 11 WA * 3 |
ソースコード
n,k=map(int,input().split())
a=sorted([i for i in map(int,input().split()) if i>0])
if len(a)<k:
print(sum(a))
else:
print(sum(a[-k:]))
osrgy01