結果

問題 No.118 門松列(2)
ユーザー nebukuro09
提出日時 2016-10-19 11:24:33
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 211 bytes
コンパイル時間 698 ms
コンパイル使用メモリ 6,912 KB
実行使用メモリ 12,456 KB
最終ジャッジ日時 2024-11-22 15:07:13
合計ジャッジ時間 2,919 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 4 WA * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import Counter
N = input()
A = map(int, raw_input().split())
C = Counter(A)
M = len(C.keys())
MOD = 10**9+7

ans = M * (M-1) * (M-2) / 6 % MOD
for v in C.values():
    ans = ans*v%MOD
print ans
0