結果

問題 No.2370 He ate many cakes
ユーザー とりゐとりゐ
提出日時 2023-07-04 00:15:02
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 274 ms / 2,000 ms
コード長 120 bytes
コンパイル時間 365 ms
コンパイル使用メモリ 87,288 KB
実行使用メモリ 252,632 KB
最終ジャッジ日時 2023-09-24 21:24:32
合計ジャッジ時間 4,102 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,304 KB
testcase_01 AC 73 ms
71,240 KB
testcase_02 AC 71 ms
71,392 KB
testcase_03 AC 176 ms
172,216 KB
testcase_04 AC 72 ms
71,120 KB
testcase_05 AC 72 ms
71,432 KB
testcase_06 AC 71 ms
71,124 KB
testcase_07 AC 71 ms
71,156 KB
testcase_08 AC 72 ms
71,156 KB
testcase_09 AC 73 ms
71,308 KB
testcase_10 AC 83 ms
80,720 KB
testcase_11 AC 115 ms
116,228 KB
testcase_12 AC 188 ms
195,260 KB
testcase_13 AC 228 ms
243,532 KB
testcase_14 AC 132 ms
131,648 KB
testcase_15 AC 273 ms
251,108 KB
testcase_16 AC 233 ms
252,632 KB
testcase_17 AC 274 ms
251,808 KB
testcase_18 AC 93 ms
92,452 KB
testcase_19 AC 71 ms
71,304 KB
権限があれば一括ダウンロードができます

ソースコード

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