結果

問題 No.5 数字のブロック
ユーザー かいかい
提出日時 2023-07-05 14:03:14
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 143 ms / 5,000 ms
コード長 194 bytes
コンパイル時間 287 ms
コンパイル使用メモリ 86,840 KB
実行使用メモリ 75,972 KB
最終ジャッジ日時 2023-09-26 13:53:44
合計ジャッジ時間 4,432 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,208 KB
testcase_01 AC 72 ms
71,340 KB
testcase_02 AC 70 ms
71,064 KB
testcase_03 AC 143 ms
75,572 KB
testcase_04 AC 75 ms
75,852 KB
testcase_05 AC 76 ms
75,688 KB
testcase_06 AC 76 ms
75,656 KB
testcase_07 AC 77 ms
75,492 KB
testcase_08 AC 76 ms
75,516 KB
testcase_09 AC 76 ms
75,584 KB
testcase_10 AC 78 ms
75,536 KB
testcase_11 AC 77 ms
75,548 KB
testcase_12 AC 76 ms
75,492 KB
testcase_13 AC 77 ms
75,768 KB
testcase_14 AC 73 ms
71,412 KB
testcase_15 AC 72 ms
71,316 KB
testcase_16 AC 77 ms
75,972 KB
testcase_17 AC 76 ms
75,464 KB
testcase_18 AC 77 ms
75,680 KB
testcase_19 AC 78 ms
75,640 KB
testcase_20 AC 72 ms
71,160 KB
testcase_21 AC 71 ms
71,448 KB
testcase_22 AC 72 ms
71,056 KB
testcase_23 AC 71 ms
71,320 KB
testcase_24 AC 71 ms
71,284 KB
testcase_25 AC 71 ms
71,240 KB
testcase_26 AC 71 ms
71,412 KB
testcase_27 AC 72 ms
71,352 KB
testcase_28 AC 72 ms
71,216 KB
testcase_29 AC 75 ms
75,580 KB
testcase_30 AC 76 ms
75,552 KB
testcase_31 AC 71 ms
71,332 KB
testcase_32 AC 71 ms
71,248 KB
testcase_33 AC 72 ms
71,448 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

L = int(input())
N = int(input())
W = list(map(int, input().split()))
W.sort()

from bisect import bisect
from itertools import accumulate

W = list(accumulate(W))
# print(W)
print(bisect(W, L))
0