結果

問題 No.5 数字のブロック
ユーザー Fullmoon85072Fullmoon85072
提出日時 2020-08-01 20:46:27
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 89 ms / 5,000 ms
コード長 225 bytes
コンパイル時間 1,203 ms
コンパイル使用メモリ 86,764 KB
実行使用メモリ 75,888 KB
最終ジャッジ日時 2023-09-22 15:35:35
合計ジャッジ時間 5,240 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,160 KB
testcase_01 AC 72 ms
71,308 KB
testcase_02 AC 71 ms
70,980 KB
testcase_03 AC 89 ms
75,464 KB
testcase_04 AC 75 ms
75,588 KB
testcase_05 AC 89 ms
75,692 KB
testcase_06 AC 76 ms
75,520 KB
testcase_07 AC 76 ms
75,692 KB
testcase_08 AC 76 ms
75,592 KB
testcase_09 AC 76 ms
75,688 KB
testcase_10 AC 78 ms
75,592 KB
testcase_11 AC 75 ms
75,576 KB
testcase_12 AC 78 ms
75,564 KB
testcase_13 AC 78 ms
75,384 KB
testcase_14 AC 70 ms
71,164 KB
testcase_15 AC 72 ms
71,176 KB
testcase_16 AC 77 ms
75,888 KB
testcase_17 AC 76 ms
75,568 KB
testcase_18 AC 76 ms
75,596 KB
testcase_19 AC 80 ms
75,592 KB
testcase_20 AC 73 ms
71,176 KB
testcase_21 AC 71 ms
71,296 KB
testcase_22 AC 73 ms
70,832 KB
testcase_23 AC 73 ms
71,304 KB
testcase_24 AC 70 ms
71,336 KB
testcase_25 AC 74 ms
71,140 KB
testcase_26 AC 72 ms
71,188 KB
testcase_27 AC 73 ms
71,136 KB
testcase_28 AC 71 ms
71,168 KB
testcase_29 AC 75 ms
75,528 KB
testcase_30 AC 76 ms
75,632 KB
testcase_31 AC 72 ms
71,208 KB
testcase_32 AC 73 ms
71,252 KB
testcase_33 AC 73 ms
71,244 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

L = int(input())
N = int(input())
block_list = [int(x) for x in input().split(" ")]
block_list.sort()

count = 0
for length in block_list:
    L -= length
    if L >= 0:
        count += 1
    else:
        break
print(count)
0