結果

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

ソースコード

diff #

L,N = input(),input()
W = map(int,raw_input().split())
W.sort()
nowWidth = 0
count = 0
for width in W:
	nowWidth += width
	if nowWidth > L:
		print count
		break
	count += 1
0