結果

問題 No.5 数字のブロック
ユーザー rserse
提出日時 2023-04-08 21:29:34
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 182 bytes
コンパイル時間 236 ms
コンパイル使用メモリ 82,592 KB
実行使用メモリ 61,304 KB
最終ジャッジ日時 2024-04-14 17:47:00
合計ジャッジ時間 2,680 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
52,392 KB
testcase_01 AC 36 ms
52,660 KB
testcase_02 WA -
testcase_03 AC 40 ms
59,540 KB
testcase_04 AC 41 ms
60,744 KB
testcase_05 AC 40 ms
59,344 KB
testcase_06 AC 41 ms
60,516 KB
testcase_07 AC 40 ms
59,524 KB
testcase_08 AC 41 ms
59,320 KB
testcase_09 AC 39 ms
59,556 KB
testcase_10 AC 41 ms
60,176 KB
testcase_11 AC 40 ms
58,676 KB
testcase_12 AC 40 ms
60,880 KB
testcase_13 AC 42 ms
59,276 KB
testcase_14 AC 36 ms
53,212 KB
testcase_15 AC 37 ms
52,680 KB
testcase_16 AC 41 ms
59,524 KB
testcase_17 AC 42 ms
59,920 KB
testcase_18 AC 42 ms
60,416 KB
testcase_19 AC 41 ms
61,304 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 36 ms
51,828 KB
testcase_24 AC 36 ms
52,320 KB
testcase_25 AC 36 ms
52,772 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 40 ms
58,956 KB
testcase_30 AC 39 ms
58,448 KB
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

l = int(input())
n = int(input())
w = list(map(int, input().split()))
w.sort()
ans = 0
count = 0
for i in range(n):
    count += w[i]
    if count > l:
        print(i)
        break
0