結果
問題 |
No.1463 Hungry Kanten
|
ユーザー |
![]() |
提出日時 | 2021-04-02 23:48:35 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 955 ms / 2,000 ms |
コード長 | 314 bytes |
コンパイル時間 | 140 ms |
コンパイル使用メモリ | 11,904 KB |
実行使用メモリ | 30,440 KB |
最終ジャッジ日時 | 2025-06-20 01:34:38 |
合計ジャッジ時間 | 5,659 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 24 |
ソースコード
from itertools import combinations n, k = map(int, input().split()) A = list(map(int, input().split())) ans = set() for i in range(k, n+1): for P in combinations(A, i): x = 0 y = 1 for p in P: x += p y *= p ans.add(x) ans.add(y) print(len(ans))