結果
| 問題 | No.5 数字のブロック |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-07-05 13:59:30 |
| 言語 | PyPy3 (7.3.23) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 238 bytes |
| 記録 | |
| コンパイル時間 | 261 ms |
| コンパイル使用メモリ | 95,848 KB |
| 実行使用メモリ | 116,992 KB |
| 最終ジャッジ日時 | 2026-08-18 07:28:49 |
| 合計ジャッジ時間 | 8,059 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 TLE * 1 -- * 30 |
ソースコード
L = int(input())
N = int(input())
W = list(map(int, input().split()))
from itertools import combinations
for i in reversed(range(1, N+1)):
for j in combinations(W, i):
if sum(j) <= L:
print(i)
exit()