結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
53,016 KB
testcase_01 AC 37 ms
52,584 KB
testcase_02 WA -
testcase_03 AC 43 ms
60,540 KB
testcase_04 AC 41 ms
58,716 KB
testcase_05 WA -
testcase_06 AC 42 ms
60,280 KB
testcase_07 AC 41 ms
59,208 KB
testcase_08 AC 43 ms
59,840 KB
testcase_09 AC 40 ms
59,352 KB
testcase_10 AC 42 ms
60,744 KB
testcase_11 AC 41 ms
58,928 KB
testcase_12 AC 42 ms
59,888 KB
testcase_13 AC 43 ms
60,456 KB
testcase_14 AC 37 ms
52,124 KB
testcase_15 WA -
testcase_16 AC 42 ms
60,500 KB
testcase_17 AC 42 ms
61,540 KB
testcase_18 AC 42 ms
60,560 KB
testcase_19 AC 42 ms
60,176 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 37 ms
52,532 KB
testcase_24 AC 38 ms
53,560 KB
testcase_25 AC 37 ms
52,632 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
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