結果
問題 |
No.1046 Fruits Rush
|
ユーザー |
![]() |
提出日時 | 2023-11-25 20:23:59 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 158 bytes |
コンパイル時間 | 271 ms |
コンパイル使用メモリ | 82,560 KB |
実行使用メモリ | 51,968 KB |
最終ジャッジ日時 | 2024-09-26 11:12:40 |
合計ジャッジ時間 | 1,820 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 WA * 3 |
ソースコード
N,K = map(int,input().split()) A = list(map(int,input().split())) A.sort(reverse=True) ans=0 for i in range(K): if A[i]>=0: ans+=A[i] print(ans)