結果
| 問題 | No.1463 Hungry Kanten | 
| コンテスト | |
| ユーザー |  mono_0812 | 
| 提出日時 | 2021-04-02 22:09:19 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 349 ms / 2,000 ms | 
| コード長 | 811 bytes | 
| コンパイル時間 | 197 ms | 
| コンパイル使用メモリ | 82,052 KB | 
| 実行使用メモリ | 126,344 KB | 
| 最終ジャッジ日時 | 2025-06-20 01:33:32 | 
| 合計ジャッジ時間 | 3,574 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 24 | 
ソースコード
def I(): return input()
def IS(): return input().split()
def II(): return int(input())
def IIS(): return map(int, input().split())
def LIIS(): return list(map(int, input().split()))
def ZER(N): return [False for _ in range(N)]
INF = 10**30
MOD = 10**9+7
#         V
#    / ̄ψ ̄\
#   | 合格祈願 |
#   |_____|
##############################################################################
n,k=IIS()
A=LIIS()
ans=set()
def solve(num,li):
    if num==n:
        if len(li)>=k:
            seki=1
            wa=0
            for i in li:
                seki*=i
                wa+=i
            global ans
            ans.add(seki)
            ans.add(wa)
        return
    solve(num+1,li)
    li.append(A[num])
    solve(num+1,li)
    li.pop()
    return
solve(0,[])
print(len(ans))
            
            
            
        