結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,300 KB
testcase_01 AC 72 ms
71,312 KB
testcase_02 AC 76 ms
71,612 KB
testcase_03 AC 181 ms
172,112 KB
testcase_04 AC 75 ms
71,384 KB
testcase_05 AC 75 ms
71,388 KB
testcase_06 AC 76 ms
71,260 KB
testcase_07 AC 80 ms
71,560 KB
testcase_08 AC 81 ms
71,588 KB
testcase_09 AC 74 ms
71,380 KB
testcase_10 AC 85 ms
80,892 KB
testcase_11 AC 121 ms
116,440 KB
testcase_12 AC 198 ms
195,644 KB
testcase_13 AC 234 ms
243,996 KB
testcase_14 AC 139 ms
131,832 KB
testcase_15 AC 281 ms
251,304 KB
testcase_16 AC 246 ms
251,776 KB
testcase_17 AC 285 ms
252,336 KB
testcase_18 AC 96 ms
92,548 KB
testcase_19 AC 76 ms
71,236 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