結果
| 問題 |
No.118 門松列(2)
|
| ユーザー |
|
| 提出日時 | 2017-03-24 06:55:27 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 394 bytes |
| コンパイル時間 | 82 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 23,472 KB |
| 最終ジャッジ日時 | 2024-07-05 21:34:31 |
| 合計ジャッジ時間 | 2,780 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 4 WA * 22 |
ソースコード
from collections import defaultdict
from itertools import combinations
N = int(input())
take = defaultdict(lambda: 0)
devider = 1000000007
for i in [i for i in input().split()]:
take[i] += 1
# len(take)が3未満でも0になる
res = len(list(combinations(range(len(take)), 3)))
res %= devider
for i in [i for i in take.values() if 1 < i]:
res *= i
res %= devider
print(res)