結果

問題 No.1463 Hungry Kanten
ユーザー ntuda
提出日時 2025-01-30 21:40:15
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 358 ms / 2,000 ms
コード長 257 bytes
コンパイル時間 282 ms
コンパイル使用メモリ 82,572 KB
実行使用メモリ 126,600 KB
最終ジャッジ日時 2025-06-20 02:20:42
合計ジャッジ時間 3,519 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import combinations
from math import prod
N,K  = map(int,input().split())
A = list(map(int,input().split()))

ans = set()
for i in range(K,N+1):
    for C in combinations(A,i):
        ans.add(sum(C))
        ans.add(prod(C))
print(len(ans))
0