結果
| 問題 | No.5 数字のブロック |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-05-28 17:17:16 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 207 bytes |
| 記録 | |
| コンパイル時間 | 533 ms |
| コンパイル使用メモリ | 20,568 KB |
| 実行使用メモリ | 20,572 KB |
| 最終ジャッジ日時 | 2026-05-28 17:17:33 |
| 合計ジャッジ時間 | 12,307 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | RE * 34 |
ソースコード
L, N = map(int, input().split())
W = list(map(int, input().split()))
W.sorted()
total = 0
ans = 0
for w in W:
if total + w <= L:
total += w
ans += 1
else:
break
print(ans)