結果

問題 No.5 数字のブロック
ユーザー KudeKude
提出日時 2020-09-03 07:04:44
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 81 ms / 5,000 ms
コード長 165 bytes
コンパイル時間 303 ms
コンパイル使用メモリ 86,976 KB
実行使用メモリ 75,840 KB
最終ジャッジ日時 2023-08-14 17:30:25
合計ジャッジ時間 4,206 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,412 KB
testcase_01 AC 72 ms
71,428 KB
testcase_02 AC 73 ms
71,380 KB
testcase_03 AC 81 ms
75,692 KB
testcase_04 AC 75 ms
75,580 KB
testcase_05 AC 77 ms
75,564 KB
testcase_06 AC 75 ms
75,716 KB
testcase_07 AC 76 ms
75,692 KB
testcase_08 AC 77 ms
75,672 KB
testcase_09 AC 74 ms
75,604 KB
testcase_10 AC 76 ms
75,668 KB
testcase_11 AC 76 ms
75,564 KB
testcase_12 AC 76 ms
75,840 KB
testcase_13 AC 78 ms
75,712 KB
testcase_14 AC 71 ms
71,272 KB
testcase_15 AC 72 ms
71,308 KB
testcase_16 AC 76 ms
75,672 KB
testcase_17 AC 78 ms
75,656 KB
testcase_18 AC 76 ms
75,652 KB
testcase_19 AC 77 ms
75,636 KB
testcase_20 AC 72 ms
71,396 KB
testcase_21 AC 71 ms
71,292 KB
testcase_22 AC 70 ms
71,256 KB
testcase_23 AC 72 ms
71,228 KB
testcase_24 AC 72 ms
71,432 KB
testcase_25 AC 73 ms
71,368 KB
testcase_26 AC 74 ms
71,268 KB
testcase_27 AC 72 ms
71,172 KB
testcase_28 AC 72 ms
71,272 KB
testcase_29 AC 75 ms
75,672 KB
testcase_30 AC 75 ms
75,596 KB
testcase_31 AC 74 ms
71,056 KB
testcase_32 AC 72 ms
71,232 KB
testcase_33 AC 72 ms
71,316 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

l = int(input())
input()
ans = 0
now = 0
for w in sorted(map(int, input().split())):
    now += w
    if now > l:
        break
    else:
        ans += 1
print(ans)
0