結果

問題 No.118 門松列(2)
ユーザー JunOnumaJunOnuma
提出日時 2017-06-16 18:06:57
言語 Python2
(2.7.18)
結果
AC  
実行時間 184 ms / 5,000 ms
コード長 274 bytes
コンパイル時間 88 ms
コンパイル使用メモリ 6,912 KB
実行使用メモリ 12,416 KB
最終ジャッジ日時 2024-04-08 13:44:19
合計ジャッジ時間 4,495 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
6,784 KB
testcase_01 AC 181 ms
12,372 KB
testcase_02 AC 182 ms
12,248 KB
testcase_03 AC 183 ms
12,352 KB
testcase_04 AC 182 ms
12,348 KB
testcase_05 AC 184 ms
12,416 KB
testcase_06 AC 13 ms
6,676 KB
testcase_07 AC 13 ms
6,676 KB
testcase_08 AC 13 ms
6,676 KB
testcase_09 AC 181 ms
12,020 KB
testcase_10 AC 132 ms
7,808 KB
testcase_11 AC 136 ms
8,192 KB
testcase_12 AC 126 ms
7,424 KB
testcase_13 AC 124 ms
7,168 KB
testcase_14 AC 174 ms
11,980 KB
testcase_15 AC 118 ms
6,784 KB
testcase_16 AC 151 ms
9,600 KB
testcase_17 AC 122 ms
7,168 KB
testcase_18 AC 136 ms
8,192 KB
testcase_19 AC 145 ms
9,216 KB
testcase_20 AC 148 ms
9,344 KB
testcase_21 AC 168 ms
11,008 KB
testcase_22 AC 133 ms
7,808 KB
testcase_23 AC 163 ms
10,624 KB
testcase_24 AC 138 ms
8,448 KB
testcase_25 AC 145 ms
9,088 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import Counter
n = int(raw_input())
c = Counter(map(int, raw_input().split()))
l = c.keys()
p = 0
for i in range(len(l)):
    for j in range(i+1,len(l)):
        for k in range(j+1,len(l)):
            p += c[l[i]] * c[l[j]] * c[l[k]]
print p % (10**9 + 7)
0