結果

問題 No.5 数字のブロック
ユーザー OhnumaOhnuma
提出日時 2020-04-08 23:23:08
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 152 ms / 5,000 ms
コード長 194 bytes
コンパイル時間 362 ms
コンパイル使用メモリ 10,536 KB
実行使用メモリ 30,708 KB
最終ジャッジ日時 2023-09-26 11:10:30
合計ジャッジ時間 10,355 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 148 ms
29,528 KB
testcase_01 AC 152 ms
29,556 KB
testcase_02 AC 140 ms
29,396 KB
testcase_03 AC 141 ms
30,332 KB
testcase_04 AC 137 ms
29,952 KB
testcase_05 AC 139 ms
30,368 KB
testcase_06 AC 138 ms
30,044 KB
testcase_07 AC 138 ms
29,980 KB
testcase_08 AC 139 ms
30,252 KB
testcase_09 AC 138 ms
29,752 KB
testcase_10 AC 139 ms
30,520 KB
testcase_11 AC 140 ms
29,988 KB
testcase_12 AC 140 ms
30,228 KB
testcase_13 AC 142 ms
30,408 KB
testcase_14 AC 136 ms
29,512 KB
testcase_15 AC 138 ms
29,548 KB
testcase_16 AC 138 ms
30,396 KB
testcase_17 AC 140 ms
30,648 KB
testcase_18 AC 137 ms
30,636 KB
testcase_19 AC 140 ms
30,708 KB
testcase_20 AC 136 ms
29,524 KB
testcase_21 AC 138 ms
29,496 KB
testcase_22 AC 139 ms
29,540 KB
testcase_23 AC 137 ms
29,596 KB
testcase_24 AC 137 ms
29,588 KB
testcase_25 AC 138 ms
29,580 KB
testcase_26 AC 140 ms
29,596 KB
testcase_27 AC 139 ms
29,428 KB
testcase_28 AC 135 ms
29,496 KB
testcase_29 AC 138 ms
29,996 KB
testcase_30 AC 137 ms
29,832 KB
testcase_31 AC 137 ms
29,496 KB
testcase_32 AC 139 ms
29,548 KB
testcase_33 AC 138 ms
29,444 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import numpy as np
l = int(input())
n = int(input())
w = sorted(list(map(int,input().split())))
cumsum = np.cumsum(w)
ret = 0
for c in cumsum:
    if c > l:
        break
    ret += 1
print(ret)
0