結果

問題 No.118 門松列(2)
ユーザー takakin
提出日時 2020-05-22 00:21:36
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 163 ms / 5,000 ms
コード長 226 bytes
コンパイル時間 261 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 16,676 KB
最終ジャッジ日時 2024-10-02 10:55:30
合計ジャッジ時間 4,285 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 26
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
A=[int(i) for i in input().split()]
mod=10**9+7
import collections
C=collections.Counter(A)
ans=0
import itertools
for c1,c2,c3 in itertools.combinations(C.keys(),3):
  ans=(ans+C[c1]*C[c2]*C[c3])%mod
print(ans)
0