結果

問題 No.118 門松列(2)
ユーザー yaoshimax
提出日時 2015-03-28 21:18:48
言語 Python2
(2.7.18)
結果
AC  
実行時間 110 ms / 5,000 ms
コード長 272 bytes
コンパイル時間 556 ms
コンパイル使用メモリ 6,912 KB
実行使用メモリ 12,004 KB
最終ジャッジ日時 2024-10-09 06:56:27
合計ジャッジ時間 3,454 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 26
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(raw_input())
a=map(int,raw_input().split())
cnt=[0 for i in range(101)]
for i in a:
    cnt[i]+=1
ans=0
for i in range(1,101):
    for j in range(i+1, 101):
        for k in range(j+1,101):
            ans+=cnt[i]*cnt[j]*cnt[k]
            ans%=1000000007
print ans
0