結果

問題 No.118 門松列(2)
ユーザー JunOnuma
提出日時 2017-06-16 17:42:06
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 264 bytes
コンパイル時間 49 ms
コンパイル使用メモリ 6,944 KB
実行使用メモリ 12,476 KB
最終ジャッジ日時 2024-10-01 06:46:40
合計ジャッジ時間 1,963 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 4 WA * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import Counter

def comb(a,b):
    if b == 1:
        return a
    else:
        return a * comb(a-1,b-1) / b

n = int(raw_input())
c = Counter(map(int, raw_input().split()))
p = comb(len(c), 3)
for v in c.values():
    p *= v
print p % (10**9+7)
0