結果

問題 No.5 数字のブロック
ユーザー shrimp334shrimp334
提出日時 2019-08-08 15:57:48
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 316 bytes
コンパイル時間 104 ms
コンパイル使用メモリ 10,780 KB
実行使用メモリ 9,216 KB
最終ジャッジ日時 2023-09-26 00:33:05
合計ジャッジ時間 2,444 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,816 KB
testcase_01 AC 16 ms
7,840 KB
testcase_02 WA -
testcase_03 AC 51 ms
8,740 KB
testcase_04 AC 34 ms
8,528 KB
testcase_05 WA -
testcase_06 AC 41 ms
8,772 KB
testcase_07 AC 33 ms
8,540 KB
testcase_08 AC 42 ms
8,700 KB
testcase_09 AC 21 ms
8,256 KB
testcase_10 AC 62 ms
9,004 KB
testcase_11 AC 32 ms
8,520 KB
testcase_12 AC 48 ms
8,804 KB
testcase_13 AC 56 ms
8,900 KB
testcase_14 AC 16 ms
7,756 KB
testcase_15 WA -
testcase_16 AC 59 ms
9,056 KB
testcase_17 AC 74 ms
9,068 KB
testcase_18 AC 66 ms
9,148 KB
testcase_19 AC 79 ms
9,216 KB
testcase_20 AC 15 ms
7,856 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 15 ms
7,844 KB
testcase_24 AC 16 ms
7,776 KB
testcase_25 AC 16 ms
7,820 KB
testcase_26 AC 15 ms
7,760 KB
testcase_27 AC 16 ms
7,888 KB
testcase_28 AC 15 ms
7,884 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 16 ms
7,780 KB
testcase_32 AC 14 ms
7,784 KB
testcase_33 AC 16 ms
7,852 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def test():
    L = int(input())
    N = int(input())
    w = list(map(int,input().split()))

    count = 0

    while L > 0 and len(w) != 0:
        L -= min(w)
        w.remove(min(w))
        if L > 0:
            count += 1
        else:
            break

    print(count)

if __name__ == "__main__":
    test()
0