結果

問題 No.5 数字のブロック
ユーザー pypypymipypypymi
提出日時 2022-02-17 15:09:50
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 103 ms / 5,000 ms
コード長 164 bytes
コンパイル時間 359 ms
コンパイル使用メモリ 86,964 KB
実行使用メモリ 75,824 KB
最終ジャッジ日時 2023-09-11 17:42:59
合計ジャッジ時間 4,541 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
71,024 KB
testcase_01 AC 75 ms
71,292 KB
testcase_02 AC 74 ms
70,912 KB
testcase_03 AC 103 ms
75,584 KB
testcase_04 AC 78 ms
75,664 KB
testcase_05 AC 80 ms
75,684 KB
testcase_06 AC 78 ms
75,512 KB
testcase_07 AC 79 ms
75,548 KB
testcase_08 AC 79 ms
75,620 KB
testcase_09 AC 77 ms
75,564 KB
testcase_10 AC 80 ms
75,580 KB
testcase_11 AC 78 ms
75,636 KB
testcase_12 AC 79 ms
75,824 KB
testcase_13 AC 79 ms
75,796 KB
testcase_14 AC 75 ms
71,076 KB
testcase_15 AC 75 ms
70,988 KB
testcase_16 AC 78 ms
75,580 KB
testcase_17 AC 79 ms
75,480 KB
testcase_18 AC 81 ms
75,564 KB
testcase_19 AC 79 ms
75,480 KB
testcase_20 AC 73 ms
71,140 KB
testcase_21 AC 73 ms
71,136 KB
testcase_22 AC 73 ms
71,140 KB
testcase_23 AC 75 ms
71,208 KB
testcase_24 AC 75 ms
71,364 KB
testcase_25 AC 73 ms
71,312 KB
testcase_26 AC 75 ms
71,368 KB
testcase_27 AC 75 ms
71,328 KB
testcase_28 AC 76 ms
71,384 KB
testcase_29 AC 77 ms
75,568 KB
testcase_30 AC 78 ms
75,500 KB
testcase_31 AC 73 ms
71,124 KB
testcase_32 AC 73 ms
71,316 KB
testcase_33 AC 74 ms
71,332 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

l = int(input())
n = int(input())
wn = sorted(map(int,input().split()))
count=0
v = 0
for wi in wn:
    if count+wi>l:
        break
    count+=wi
    v+=1
print(v)
0