結果
問題 | No.1463 Hungry Kanten |
ユーザー |
![]() |
提出日時 | 2021-04-02 22:22:32 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 1,813 ms / 2,000 ms |
コード長 | 289 bytes |
コンパイル時間 | 202 ms |
コンパイル使用メモリ | 11,904 KB |
実行使用メモリ | 30,612 KB |
最終ジャッジ日時 | 2025-06-20 01:33:47 |
合計ジャッジ時間 | 11,939 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 24 |
ソースコード
n, k=map(int, input().split()) a=list(map(int, input().split())) st=set() for i in range(1<<n): c=0 s=0 p=1 for j in range(n): if (i&(1<<j))>0: s+=a[j] p*=a[j] c+=1 if c>=k: st.add(s) st.add(p) print(len(st))