結果
| 問題 | No.5 数字のブロック |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-05-26 02:31:40 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 284 bytes |
| 記録 | |
| コンパイル時間 | 512 ms |
| コンパイル使用メモリ | 20,648 KB |
| 実行使用メモリ | 73,808 KB |
| 最終ジャッジ日時 | 2026-04-30 08:54:57 |
| 合計ジャッジ時間 | 9,554 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 TLE * 1 -- * 30 |
ソースコード
import itertools
L = int(input())
N = int(input())
W = list(map(int,input().split()))
result = []
for n in range(1,N+1) :
for conb in itertools.combinations(W, n):
A = list(conb)
if sum(A) <= L :
result.append(len(A))
print(max(result))