結果

問題 No.5 数字のブロック
ユーザー Kaito KoikeKaito Koike
提出日時 2018-03-23 01:22:08
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 314 bytes
コンパイル時間 324 ms
コンパイル使用メモリ 10,668 KB
実行使用メモリ 9,268 KB
最終ジャッジ日時 2023-09-07 01:56:31
合計ジャッジ時間 2,696 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,924 KB
testcase_01 AC 16 ms
7,816 KB
testcase_02 WA -
testcase_03 AC 35 ms
8,844 KB
testcase_04 AC 27 ms
8,652 KB
testcase_05 WA -
testcase_06 AC 31 ms
8,824 KB
testcase_07 AC 26 ms
8,688 KB
testcase_08 AC 32 ms
8,856 KB
testcase_09 AC 20 ms
8,256 KB
testcase_10 AC 43 ms
9,008 KB
testcase_11 AC 26 ms
8,516 KB
testcase_12 AC 36 ms
8,836 KB
testcase_13 AC 40 ms
9,120 KB
testcase_14 AC 16 ms
7,964 KB
testcase_15 WA -
testcase_16 AC 41 ms
8,948 KB
testcase_17 AC 51 ms
9,268 KB
testcase_18 AC 46 ms
9,084 KB
testcase_19 AC 55 ms
9,172 KB
testcase_20 AC 16 ms
7,788 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 16 ms
7,968 KB
testcase_24 AC 16 ms
7,860 KB
testcase_25 AC 16 ms
7,888 KB
testcase_26 AC 15 ms
7,808 KB
testcase_27 AC 16 ms
7,868 KB
testcase_28 AC 15 ms
7,836 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 15 ms
7,936 KB
testcase_32 AC 16 ms
8,028 KB
testcase_33 AC 16 ms
7,856 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

max = int(input())
n = int(input())
list_of_block = list(map(int,input().split()))
box_rest = max
counter = 0


for i in range(n):
    w = int(min(list_of_block))
    list_of_block.remove(w)
    box_rest = box_rest - w
    if box_rest <= 0:
        break
    else:
        counter += 1
        pass

print(counter)
0