結果

問題 No.5 数字のブロック
ユーザー HiroHeroHiroHero
提出日時 2016-09-05 15:00:54
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 1,257 ms / 5,000 ms
コード長 139 bytes
コンパイル時間 170 ms
コンパイル使用メモリ 10,496 KB
実行使用メモリ 9,216 KB
最終ジャッジ日時 2023-08-11 15:55:14
合計ジャッジ時間 11,719 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,852 KB
testcase_01 AC 16 ms
7,864 KB
testcase_02 AC 16 ms
7,784 KB
testcase_03 AC 476 ms
8,792 KB
testcase_04 AC 222 ms
8,452 KB
testcase_05 AC 788 ms
8,924 KB
testcase_06 AC 356 ms
8,732 KB
testcase_07 AC 216 ms
8,484 KB
testcase_08 AC 445 ms
8,732 KB
testcase_09 AC 64 ms
8,180 KB
testcase_10 AC 919 ms
9,012 KB
testcase_11 AC 227 ms
8,564 KB
testcase_12 AC 511 ms
8,792 KB
testcase_13 AC 790 ms
8,952 KB
testcase_14 AC 17 ms
7,772 KB
testcase_15 AC 17 ms
7,776 KB
testcase_16 AC 864 ms
8,940 KB
testcase_17 AC 1,151 ms
9,124 KB
testcase_18 AC 1,032 ms
9,088 KB
testcase_19 AC 1,257 ms
9,216 KB
testcase_20 AC 16 ms
7,856 KB
testcase_21 AC 16 ms
7,944 KB
testcase_22 AC 16 ms
7,824 KB
testcase_23 AC 15 ms
7,880 KB
testcase_24 AC 17 ms
7,824 KB
testcase_25 AC 19 ms
7,860 KB
testcase_26 AC 16 ms
7,852 KB
testcase_27 AC 16 ms
7,824 KB
testcase_28 AC 16 ms
7,908 KB
testcase_29 AC 216 ms
8,456 KB
testcase_30 AC 85 ms
8,312 KB
testcase_31 AC 16 ms
7,772 KB
testcase_32 AC 15 ms
7,904 KB
testcase_33 AC 15 ms
7,784 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

L=int(input())
input()
W=sorted(list(map(int,input().split())))
sum_W=sum(W)

while sum_W>L:
    sum_W-=max(W)
    del W[-1]
print(len(W))
0