結果
| 問題 | No.5 数字のブロック |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-10-13 12:46:09 |
| 言語 | PyPy2 (7.3.20) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 397 bytes |
| 記録 | |
| コンパイル時間 | 66 ms |
| コンパイル使用メモリ | 80,384 KB |
| 実行使用メモリ | 1,343,240 KB |
| 最終ジャッジ日時 | 2026-07-18 16:35:54 |
| 合計ジャッジ時間 | 7,292 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 MLE * 2 -- * 29 |
ソースコード
#coding:utf-8
import itertools
L = int(raw_input())
N = int(raw_input())
W = raw_input()
listW=W.split(" ")
for i in range(1,N+1):
result = list(itertools.combinations(listW,i))
len_res = len(result)
for k in range(len_res):
int_res = map(int,result[k])
blocks = sum(int_res)
if L>=blocks:
ans = i
else:
continue
print ans