結果

問題 No.1463 Hungry Kanten
ユーザー aram14aram14
提出日時 2021-04-02 21:56:08
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 297 bytes
コンパイル時間 520 ms
コンパイル使用メモリ 10,728 KB
実行使用メモリ 62,816 KB
最終ジャッジ日時 2023-08-25 14:58:09
合計ジャッジ時間 12,040 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 105 ms
29,612 KB
testcase_01 AC 107 ms
29,528 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 TLE -
testcase_06 AC 115 ms
29,652 KB
testcase_07 AC 111 ms
29,648 KB
testcase_08 AC 106 ms
29,640 KB
testcase_09 AC 104 ms
29,584 KB
testcase_10 AC 111 ms
29,744 KB
testcase_11 AC 110 ms
29,680 KB
testcase_12 AC 110 ms
29,848 KB
testcase_13 AC 106 ms
29,688 KB
testcase_14 AC 128 ms
30,040 KB
testcase_15 AC 107 ms
29,804 KB
testcase_16 AC 171 ms
30,804 KB
testcase_17 AC 329 ms
35,184 KB
testcase_18 AC 155 ms
30,652 KB
testcase_19 AC 969 ms
46,024 KB
testcase_20 AC 1,203 ms
54,216 KB
testcase_21 AC 110 ms
29,616 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools
import numpy as np
n, k = map(int, input().split())
a = list(map(int, input().split()))

l = list()
for i in range(k, n+1):
    for j in itertools.combinations(a, i):
        x = sum(j)
        y = np.prod(list(j))
        l.append(x)
        l.append(y)

l = set(l)
print(len(l))
0