結果

問題 No.5 数字のブロック
ユーザー ohanaohana
提出日時 2023-09-26 17:30:48
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 112 ms / 5,000 ms
コード長 162 bytes
コンパイル時間 660 ms
コンパイル使用メモリ 86,944 KB
実行使用メモリ 75,788 KB
最終ジャッジ日時 2023-09-26 17:30:55
合計ジャッジ時間 4,460 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,260 KB
testcase_01 AC 75 ms
71,272 KB
testcase_02 AC 79 ms
71,512 KB
testcase_03 AC 112 ms
75,460 KB
testcase_04 AC 79 ms
75,508 KB
testcase_05 AC 80 ms
75,472 KB
testcase_06 AC 90 ms
75,472 KB
testcase_07 AC 79 ms
75,532 KB
testcase_08 AC 90 ms
75,528 KB
testcase_09 AC 79 ms
75,616 KB
testcase_10 AC 81 ms
75,564 KB
testcase_11 AC 80 ms
75,592 KB
testcase_12 AC 79 ms
75,492 KB
testcase_13 AC 79 ms
75,492 KB
testcase_14 AC 74 ms
71,480 KB
testcase_15 AC 75 ms
71,224 KB
testcase_16 AC 87 ms
75,788 KB
testcase_17 AC 81 ms
75,524 KB
testcase_18 AC 79 ms
75,612 KB
testcase_19 AC 79 ms
75,492 KB
testcase_20 AC 77 ms
71,320 KB
testcase_21 AC 74 ms
71,240 KB
testcase_22 AC 75 ms
71,188 KB
testcase_23 AC 75 ms
71,268 KB
testcase_24 AC 76 ms
71,192 KB
testcase_25 AC 76 ms
71,180 KB
testcase_26 AC 75 ms
71,092 KB
testcase_27 AC 78 ms
71,276 KB
testcase_28 AC 75 ms
71,040 KB
testcase_29 AC 79 ms
75,600 KB
testcase_30 AC 79 ms
75,508 KB
testcase_31 AC 89 ms
71,028 KB
testcase_32 AC 75 ms
71,452 KB
testcase_33 AC 75 ms
71,284 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

l = int(input())
n = int(input())
A = list(map(int, input().split()))

ans = 0
for a in sorted(A):
    if l < a:
        break
    l -= a
    ans += 1
print(ans)
0