結果
問題 |
No.5 数字のブロック
|
ユーザー |
![]() |
提出日時 | 2016-03-13 14:36:36 |
言語 | Python2 (2.7.18) |
結果 |
AC
|
実行時間 | 18 ms / 5,000 ms |
コード長 | 319 bytes |
コンパイル時間 | 52 ms |
コンパイル使用メモリ | 6,948 KB |
実行使用メモリ | 7,168 KB |
最終ジャッジ日時 | 2024-11-18 08:19:26 |
合計ジャッジ時間 | 1,318 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 34 |
ソースコード
#fileencoding: utf-8 from __future__ import print_function def main(): L = int(raw_input()) N = int(raw_input()) W = sorted([int(i) for i in raw_input().split()]) count = 0 for i in W: L -= i if L >= 0: count += 1 print(count) if __name__ == "__main__": main()