結果
| 問題 | No.1046 Fruits Rush |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-01-23 11:46:46 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 196 bytes |
| 記録 | |
| コンパイル時間 | 707 ms |
| コンパイル使用メモリ | 82,304 KB |
| 実行使用メモリ | 64,896 KB |
| 最終ジャッジ日時 | 2024-11-29 09:40:12 |
| 合計ジャッジ時間 | 2,096 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 3 |
| other | RE * 14 |
ソースコード
n,k = list(map(int,input().split()))
an = list(sorted(map(int,input().split()),reversed=True))
result = an[0]
for i,v in enumerate(an):
if i+1<=k and v>0:
result+=v
print(result)