結果

問題 No.5 数字のブロック
ユーザー aaaaaaaaaaaa
提出日時 2016-03-27 03:29:29
言語 Python2
(2.7.18)
結果
RE  
実行時間 -
コード長 172 bytes
コンパイル時間 53 ms
コンパイル使用メモリ 7,040 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-10-02 03:45:30
合計ジャッジ時間 1,431 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other RE * 34
権限があれば一括ダウンロードができます

ソースコード

diff #

L = int(input())
N = int(input())
W = sorted(map(int, input().split()))
count = 0
sum = 0
for w in W:
    sum += w
    if sum > L:
        break
    count += 1
print(count)
0