結果
問題 |
No.5 数字のブロック
|
ユーザー |
|
提出日時 | 2019-12-17 15:18:58 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 50 ms / 5,000 ms |
コード長 | 188 bytes |
コンパイル時間 | 207 ms |
コンパイル使用メモリ | 82,048 KB |
実行使用メモリ | 59,648 KB |
最終ジャッジ日時 | 2024-07-02 21:26:56 |
合計ジャッジ時間 | 2,804 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 34 |
ソースコード
l = int(input()) n = int(input()) w = list(map(int, input().split())) w.sort() max = 0 ww = 0 for a in w: ww += a if ww <= l: max += 1 else: break print(max)