結果

問題 No.5 数字のブロック
ユーザー otsunekootsuneko
提出日時 2021-04-25 02:00:09
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 177 bytes
コンパイル時間 294 ms
コンパイル使用メモリ 87,308 KB
実行使用メモリ 75,860 KB
最終ジャッジ日時 2023-09-17 13:58:28
合計ジャッジ時間 4,226 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,240 KB
testcase_01 AC 71 ms
71,272 KB
testcase_02 WA -
testcase_03 AC 78 ms
75,840 KB
testcase_04 AC 79 ms
75,816 KB
testcase_05 AC 81 ms
75,832 KB
testcase_06 AC 75 ms
75,804 KB
testcase_07 AC 75 ms
75,860 KB
testcase_08 AC 77 ms
75,676 KB
testcase_09 AC 76 ms
75,784 KB
testcase_10 AC 76 ms
75,744 KB
testcase_11 AC 78 ms
75,772 KB
testcase_12 AC 76 ms
75,740 KB
testcase_13 AC 77 ms
75,500 KB
testcase_14 AC 74 ms
71,480 KB
testcase_15 AC 73 ms
71,044 KB
testcase_16 AC 78 ms
75,744 KB
testcase_17 AC 78 ms
75,580 KB
testcase_18 AC 77 ms
75,836 KB
testcase_19 AC 81 ms
75,580 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 74 ms
71,448 KB
testcase_24 AC 75 ms
71,264 KB
testcase_25 AC 78 ms
71,184 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 78 ms
75,784 KB
testcase_30 AC 76 ms
75,576 KB
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

L = int(input())
N = int(input())
W = list(map(int,input().split()))

W.sort()

s = 0
for i,w in enumerate(W):
    s += w
    if s > L:
        print(i)
        break
0