結果

問題 No.5 数字のブロック
ユーザー misa2001space
提出日時 2016-09-25 12:28:32
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 191 bytes
コンパイル時間 209 ms
コンパイル使用メモリ 7,040 KB
実行使用メモリ 7,168 KB
最終ジャッジ日時 2024-11-18 11:40:10
合計ジャッジ時間 1,682 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 27 WA * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

# -*- coding: utf-8 -*- 

L = input()
N = input()
W = map(int, raw_input().split())
C = 0

W.sort()

for i in xrange(len(W)):
    if L - W[i] > 0:
        L = L - W[i]
        C += 1

print C
0