結果
| 問題 | No.5 数字のブロック |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-02-11 19:03:44 |
| 言語 | PyPy2 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 84 ms / 5,000 ms |
| コード長 | 207 bytes |
| コンパイル時間 | 182 ms |
| コンパイル使用メモリ | 77,712 KB |
| 最終ジャッジ日時 | 2025-12-03 19:17:56 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 34 |
ソースコード
#coding: utf-8 ##yuki_5 l=int(raw_input()) n=int(raw_input()) w=map(int,raw_input().split()) w.sort() res=0 count=0 for i in xrange(n): if res+w[i]<=l: res+=w[i] count+=1 else: break print count