結果
問題 | No.5 数字のブロック |
ユーザー | Pregina |
提出日時 | 2023-12-03 18:23:31 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 50 ms / 5,000 ms |
コード長 | 179 bytes |
コンパイル時間 | 259 ms |
コンパイル使用メモリ | 82,176 KB |
実行使用メモリ | 59,776 KB |
最終ジャッジ日時 | 2024-09-26 22:13:27 |
合計ジャッジ時間 | 3,274 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 34 |
ソースコード
L = int(input()) N = int(input()) W = sorted(map(int, input().split())) ans = 0 for w in W: if L - w >= 0: L -= w ans += 1 else: break print(ans)