結果

問題 No.5 数字のブロック
ユーザー gim
提出日時 2017-06-15 17:33:51
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 153 bytes
コンパイル時間 267 ms
コンパイル使用メモリ 6,940 KB
実行使用メモリ 7,168 KB
最終ジャッジ日時 2024-09-25 02:21:57
合計ジャッジ時間 1,585 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 27 WA * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

L=raw_input()
N=raw_input()
w=raw_input()
W=map(int, w.split())
c=0
mx=0
W.sort()
for a in W:
    c+=a
    if c<int(L):
        mx+=1

print mx
        
0