結果

問題 No.5 数字のブロック
ユーザー splash9494splash9494
提出日時 2020-05-03 21:14:49
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 198 bytes
コンパイル時間 1,397 ms
コンパイル使用メモリ 86,636 KB
実行使用メモリ 79,072 KB
最終ジャッジ日時 2023-09-05 04:28:16
合計ジャッジ時間 4,918 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,228 KB
testcase_01 AC 72 ms
71,236 KB
testcase_02 WA -
testcase_03 AC 77 ms
75,440 KB
testcase_04 AC 74 ms
75,456 KB
testcase_05 WA -
testcase_06 AC 74 ms
75,504 KB
testcase_07 AC 73 ms
75,516 KB
testcase_08 AC 75 ms
75,412 KB
testcase_09 AC 75 ms
75,480 KB
testcase_10 AC 75 ms
75,356 KB
testcase_11 AC 74 ms
75,384 KB
testcase_12 AC 73 ms
75,516 KB
testcase_13 AC 74 ms
75,504 KB
testcase_14 AC 71 ms
70,984 KB
testcase_15 WA -
testcase_16 AC 76 ms
75,356 KB
testcase_17 AC 75 ms
75,440 KB
testcase_18 AC 73 ms
75,484 KB
testcase_19 AC 76 ms
75,388 KB
testcase_20 RE -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 70 ms
71,020 KB
testcase_24 AC 72 ms
71,072 KB
testcase_25 AC 71 ms
71,076 KB
testcase_26 RE -
testcase_27 RE -
testcase_28 RE -
testcase_29 WA -
testcase_30 WA -
testcase_31 RE -
testcase_32 RE -
testcase_33 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.buffer.readline

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

s = 0
cnt = 0
while s < L:
    s += Ws[cnt]
    cnt += 1
print(cnt - 1)
0