結果

問題 No.118 門松列(2)
ユーザー matsu7874
提出日時 2015-03-20 07:16:05
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 320 bytes
コンパイル時間 257 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 16,540 KB
最終ジャッジ日時 2024-06-28 23:41:41
合計ジャッジ時間 2,384 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 4 WA * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = [int(x) for x in input().split()]
B = [0 for _ in range(100)]
for a in A:
    B[a-1] += 1

def combination(n,r):
    if r==0:
        return 1
    else:
        return (n-r+1)*combination(n,r-1)//r
ans = combination(100-B.count(0), 3)
for b in B:
    if b >1:
        ans *= b
print(ans % (10**9+7))
0