結果

問題 No.118 門松列(2)
ユーザー JunOnumaJunOnuma
提出日時 2017-06-16 18:06:57
言語 Python2
(2.7.18)
結果
AC  
実行時間 160 ms / 5,000 ms
コード長 274 bytes
コンパイル時間 216 ms
コンパイル使用メモリ 7,076 KB
実行使用メモリ 12,476 KB
最終ジャッジ日時 2024-10-01 06:49:15
合計ジャッジ時間 3,866 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 14 ms
6,820 KB
testcase_01 AC 160 ms
12,248 KB
testcase_02 AC 160 ms
12,316 KB
testcase_03 AC 157 ms
12,408 KB
testcase_04 AC 157 ms
12,476 KB
testcase_05 AC 159 ms
12,340 KB
testcase_06 AC 11 ms
6,816 KB
testcase_07 AC 11 ms
6,816 KB
testcase_08 AC 10 ms
6,816 KB
testcase_09 AC 153 ms
11,892 KB
testcase_10 AC 113 ms
7,936 KB
testcase_11 AC 116 ms
8,064 KB
testcase_12 AC 109 ms
7,552 KB
testcase_13 AC 107 ms
6,912 KB
testcase_14 AC 157 ms
11,928 KB
testcase_15 AC 103 ms
6,824 KB
testcase_16 AC 133 ms
9,472 KB
testcase_17 AC 106 ms
7,040 KB
testcase_18 AC 117 ms
8,192 KB
testcase_19 AC 128 ms
9,216 KB
testcase_20 AC 129 ms
9,472 KB
testcase_21 AC 146 ms
11,136 KB
testcase_22 AC 115 ms
7,808 KB
testcase_23 AC 141 ms
10,624 KB
testcase_24 AC 117 ms
8,448 KB
testcase_25 AC 125 ms
8,960 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