結果

問題 No.5 数字のブロック
ユーザー ashash
提出日時 2022-07-28 00:31:00
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 182 bytes
コンパイル時間 1,074 ms
コンパイル使用メモリ 10,604 KB
実行使用メモリ 9,300 KB
最終ジャッジ日時 2023-09-24 13:20:21
合計ジャッジ時間 1,895 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 13 ms
7,908 KB
testcase_01 AC 15 ms
7,864 KB
testcase_02 WA -
testcase_03 AC 17 ms
8,788 KB
testcase_04 AC 16 ms
8,592 KB
testcase_05 AC 18 ms
8,988 KB
testcase_06 AC 17 ms
8,644 KB
testcase_07 AC 16 ms
8,572 KB
testcase_08 AC 17 ms
8,808 KB
testcase_09 AC 15 ms
8,276 KB
testcase_10 AC 18 ms
9,076 KB
testcase_11 AC 16 ms
8,596 KB
testcase_12 AC 17 ms
8,788 KB
testcase_13 AC 18 ms
8,992 KB
testcase_14 AC 14 ms
7,764 KB
testcase_15 AC 14 ms
7,804 KB
testcase_16 AC 18 ms
8,996 KB
testcase_17 AC 19 ms
9,260 KB
testcase_18 AC 18 ms
9,168 KB
testcase_19 AC 18 ms
9,300 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 14 ms
7,956 KB
testcase_24 AC 15 ms
7,780 KB
testcase_25 AC 15 ms
7,828 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 17 ms
8,468 KB
testcase_30 AC 15 ms
8,400 KB
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

L = int(input())
N = int(input())
w = list(map(int, input().split()))
w = sorted(w)

cnt = 0


for j in w:
    L = L - j
    cnt += 1
    if L < 0:
        break
cnt -= 1
print(cnt)
0