結果

問題 No.5 数字のブロック
ユーザー 猫吉
提出日時 2018-09-18 23:13:08
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 200 bytes
コンパイル時間 131 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 11,776 KB
最終ジャッジ日時 2024-07-18 08:09:00
合計ジャッジ時間 1,812 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 27 WA * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

l = int(input())
n = int(input())
w = list(map(int,input().split()))
w.sort()
count = 0
for i in range(n):
    if l-w[i] <= 0:
        break
    else:
        count += 1
        l -= w[i]
print(count)
0