結果
問題 |
No.118 門松列(2)
|
ユーザー |
![]() |
提出日時 | 2017-01-21 21:29:56 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 381 bytes |
コンパイル時間 | 308 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 16,960 KB |
最終ジャッジ日時 | 2024-12-23 04:30:17 |
合計ジャッジ時間 | 3,222 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 3 WA * 23 |
ソースコード
N = int(input()) A = sorted(map(int, input().split(" "))) mod = int(10e9 + 7) A_s = set(A) A_count = len(A_s) A_dict = {i:0 for i in A_s} for i in A: A_dict[i] += 1 if A_count < 3: print(0) else: total = (A_count * (A_count - 1) * (A_count - 2)) // 2 // 3 total %= mod for v in A_dict.values(): total *= (v % mod) total %= mod print(total)