結果
| 問題 | No.1463 Hungry Kanten | 
| コンテスト | |
| ユーザー |  yuusanlondon | 
| 提出日時 | 2021-04-02 21:41:58 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 394 ms / 2,000 ms | 
| コード長 | 238 bytes | 
| コンパイル時間 | 237 ms | 
| コンパイル使用メモリ | 82,600 KB | 
| 実行使用メモリ | 124,452 KB | 
| 最終ジャッジ日時 | 2025-06-20 01:32:08 | 
| 合計ジャッジ時間 | 3,971 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 24 | 
ソースコード
n,k=map(int,input().split())
a=list(map(int,input().split()))
p=set()
for i in range(1<<n):
  q=[]
  l=1
  for j in range(n):
    if i&(1<<j):
      q.append(a[j])
      l*=a[j]
  if len(q)>=k:
    p.add(sum(q))
    p.add(l)
print(len(p))
            
            
            
        