結果

問題 No.5 数字のブロック
ユーザー hkawa117
提出日時 2015-09-05 21:50:09
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 175 bytes
コンパイル時間 51 ms
コンパイル使用メモリ 6,912 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-19 04:15:01
合計ジャッジ時間 1,442 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 24 WA * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

L = int(raw_input())
N = int(raw_input())
W = tuple(sorted(map(int, raw_input().split())))

s = 0
for i in range(N):
    s += W[i]
    if s > L:
        print i
        break
0