結果
| 問題 | No.5 数字のブロック |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-04-07 09:58:42 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 94 ms / 5,000 ms |
| + 697µs | |
| コード長 | 209 bytes |
| 記録 | |
| コンパイル時間 | 285 ms |
| コンパイル使用メモリ | 21,532 KB |
| 実行使用メモリ | 15,868 KB |
| 最終ジャッジ日時 | 2026-08-30 19:06:59 |
| 合計ジャッジ時間 | 5,313 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 34 |
ソースコード
L = int(input())
N = int(input())
W = sorted(list(map(int, input().split())))
total = 0
count = 0
for w in W:
if total + w <= L:
total += w
count += 1
else:
break
print(count)