結果

問題 No.5 数字のブロック
ユーザー goto_isyukugoto_isyuku
提出日時 2017-05-25 21:57:52
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 172 bytes
コンパイル時間 101 ms
コンパイル使用メモリ 11,812 KB
実行使用メモリ 11,208 KB
最終ジャッジ日時 2023-10-19 23:21:32
合計ジャッジ時間 2,287 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
10,152 KB
testcase_01 AC 34 ms
10,152 KB
testcase_02 RE -
testcase_03 AC 34 ms
10,832 KB
testcase_04 AC 37 ms
10,560 KB
testcase_05 AC 35 ms
10,980 KB
testcase_06 AC 34 ms
10,724 KB
testcase_07 AC 34 ms
10,628 KB
testcase_08 AC 34 ms
10,772 KB
testcase_09 AC 35 ms
10,380 KB
testcase_10 AC 36 ms
11,052 KB
testcase_11 AC 32 ms
10,588 KB
testcase_12 AC 35 ms
10,848 KB
testcase_13 AC 36 ms
10,952 KB
testcase_14 AC 33 ms
10,156 KB
testcase_15 AC 31 ms
10,164 KB
testcase_16 AC 34 ms
11,000 KB
testcase_17 AC 35 ms
11,152 KB
testcase_18 AC 35 ms
11,128 KB
testcase_19 AC 35 ms
11,208 KB
testcase_20 RE -
testcase_21 RE -
testcase_22 RE -
testcase_23 AC 30 ms
10,152 KB
testcase_24 AC 30 ms
10,172 KB
testcase_25 AC 30 ms
10,200 KB
testcase_26 RE -
testcase_27 RE -
testcase_28 RE -
testcase_29 AC 32 ms
10,556 KB
testcase_30 AC 32 ms
10,400 KB
testcase_31 RE -
testcase_32 RE -
testcase_33 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

width = int(input())
x = input()
blocks = [int(x) for x in input().split()]

blocks.sort()

sum = 0
i = 0

while sum <= width:
    sum += blocks[i]
    i += 1

print(i - 1)
0