結果

問題 No.2370 He ate many cakes
ユーザー とりゐ
提出日時 2023-07-04 00:15:02
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 233 ms / 2,000 ms
コード長 120 bytes
コンパイル時間 146 ms
コンパイル使用メモリ 82,604 KB
実行使用メモリ 239,388 KB
最終ジャッジ日時 2024-07-17 21:49:50
合計ジャッジ時間 2,695 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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