結果

問題 No.5 数字のブロック
ユーザー WatsonWatson
提出日時 2017-06-30 09:08:57
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 355 ms / 5,000 ms
コード長 127 bytes
コンパイル時間 224 ms
コンパイル使用メモリ 10,536 KB
実行使用メモリ 9,204 KB
最終ジャッジ日時 2023-08-11 17:34:04
合計ジャッジ時間 4,789 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,924 KB
testcase_01 AC 16 ms
7,812 KB
testcase_02 AC 15 ms
7,960 KB
testcase_03 AC 149 ms
8,876 KB
testcase_04 AC 101 ms
8,584 KB
testcase_05 AC 234 ms
8,928 KB
testcase_06 AC 108 ms
8,628 KB
testcase_07 AC 79 ms
8,576 KB
testcase_08 AC 135 ms
8,744 KB
testcase_09 AC 32 ms
8,288 KB
testcase_10 AC 265 ms
9,092 KB
testcase_11 AC 76 ms
8,616 KB
testcase_12 AC 160 ms
8,800 KB
testcase_13 AC 219 ms
8,924 KB
testcase_14 AC 15 ms
7,864 KB
testcase_15 AC 15 ms
7,900 KB
testcase_16 AC 243 ms
8,836 KB
testcase_17 AC 322 ms
9,172 KB
testcase_18 AC 281 ms
9,176 KB
testcase_19 AC 355 ms
9,204 KB
testcase_20 AC 15 ms
7,868 KB
testcase_21 AC 15 ms
7,868 KB
testcase_22 AC 15 ms
7,920 KB
testcase_23 AC 16 ms
7,944 KB
testcase_24 AC 16 ms
7,896 KB
testcase_25 AC 17 ms
7,920 KB
testcase_26 AC 15 ms
7,872 KB
testcase_27 AC 16 ms
7,872 KB
testcase_28 AC 15 ms
7,856 KB
testcase_29 AC 98 ms
8,560 KB
testcase_30 AC 38 ms
8,280 KB
testcase_31 AC 16 ms
7,868 KB
testcase_32 AC 15 ms
7,984 KB
testcase_33 AC 15 ms
7,812 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

L = int(input())
N = int(input())
W = [int(i) for i in input().split()]
W.sort()
while sum(W) > L:
    W.pop(-1)
print(len(W))
0