結果
| 問題 |
No.1046 Fruits Rush
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-06-18 22:44:47 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 172 bytes |
| コンパイル時間 | 416 ms |
| コンパイル使用メモリ | 82,504 KB |
| 実行使用メモリ | 52,568 KB |
| 最終ジャッジ日時 | 2024-06-18 22:44:50 |
| 合計ジャッジ時間 | 2,311 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 11 WA * 3 |
ソースコード
n, k = map(int, input().split())
a = list(map(int, input().split()))
a = sorted(a, reverse=True)
ma = 0
s = 0
for i in range(k):
s += a[i]
ma = max(ma, s)
print(ma)