結果
| 問題 |
No.1463 Hungry Kanten
|
| コンテスト | |
| ユーザー |
H20
|
| 提出日時 | 2021-04-02 21:42:25 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 367 ms / 2,000 ms |
| コード長 | 335 bytes |
| コンパイル時間 | 191 ms |
| コンパイル使用メモリ | 82,416 KB |
| 実行使用メモリ | 221,736 KB |
| 最終ジャッジ日時 | 2025-06-20 01:32:10 |
| 合計ジャッジ時間 | 3,353 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 24 |
ソースコード
import itertools
def mul(L):
ret = 1
for l in L:
ret*=l
return ret
N,K = map(int,input().split())
A = list(map(int,input().split()))
pattern = []
for i in range(K,N+1):
for l in list(itertools.combinations(A, i)):
pattern.append(sum(l))
pattern.append(mul(l))
print(len(list(set(pattern))))
H20