結果

問題 No.2370 He ate many cakes
ユーザー とりゐ
提出日時 2023-07-04 00:19:39
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 223 ms / 2,000 ms
コード長 123 bytes
コンパイル時間 162 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 238,208 KB
最終ジャッジ日時 2024-07-17 21:53:26
合計ジャッジ時間 2,503 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

n,k=map(int,input().split())
A=[0]
for i in list(map(int,input().split())):
  A=sorted(A+[j+i for j in A])[-k:]
print(A[0])
0