結果
| 問題 |
No.1463 Hungry Kanten
|
| コンテスト | |
| ユーザー |
wolgnik
|
| 提出日時 | 2021-04-02 21:25:50 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 339 ms / 2,000 ms |
| コード長 | 324 bytes |
| コンパイル時間 | 199 ms |
| コンパイル使用メモリ | 82,380 KB |
| 実行使用メモリ | 124,788 KB |
| 最終ジャッジ日時 | 2025-06-20 01:30:29 |
| 合計ジャッジ時間 | 3,344 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 24 |
ソースコード
import sys
from itertools import combinations as combi
input = sys.stdin.readline
N, K = map(int, input().split())
a = list(map(int, input().split()))
res = set()
for t in range(K, N + 1):
for c in combi([x for x in a], t):
sm = sum(c)
pr = 1
for x in c: pr *= x
res.add(sm)
res.add(pr)
print(len(res))
wolgnik