結果

問題 No.5 数字のブロック
ユーザー ns6251ns6251
提出日時 2019-12-02 10:59:33
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 211 bytes
コンパイル時間 160 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 60,408 KB
最終ジャッジ日時 2024-05-03 02:54:48
合計ジャッジ時間 2,284 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
53,700 KB
testcase_01 AC 33 ms
52,036 KB
testcase_02 WA -
testcase_03 AC 39 ms
59,548 KB
testcase_04 AC 37 ms
58,716 KB
testcase_05 AC 37 ms
59,156 KB
testcase_06 AC 37 ms
59,088 KB
testcase_07 AC 36 ms
59,036 KB
testcase_08 AC 37 ms
60,004 KB
testcase_09 AC 36 ms
59,776 KB
testcase_10 AC 40 ms
60,408 KB
testcase_11 AC 37 ms
59,036 KB
testcase_12 AC 43 ms
59,560 KB
testcase_13 AC 40 ms
59,008 KB
testcase_14 AC 37 ms
52,696 KB
testcase_15 AC 34 ms
52,200 KB
testcase_16 AC 37 ms
59,944 KB
testcase_17 AC 39 ms
59,924 KB
testcase_18 AC 37 ms
60,180 KB
testcase_19 AC 38 ms
60,168 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 32 ms
52,572 KB
testcase_24 AC 32 ms
52,312 KB
testcase_25 AC 32 ms
53,408 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 37 ms
59,472 KB
testcase_30 AC 35 ms
60,000 KB
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

L = int(input())
N = int(input())
W = [int(_) for _ in input().split()]
W.sort()
s: int = 0
cnt :int = 0
for n in W:
    if L >= s + n:
        s += n
        cnt += 1
    else:
        print(cnt)
        break
0