結果

問題 No.118 門松列(2)
ユーザー yuki2006yuki2006
提出日時 2015-01-06 20:06:45
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 115 ms / 5,000 ms
コード長 440 bytes
コンパイル時間 1,167 ms
コンパイル使用メモリ 76,836 KB
実行使用メモリ 86,288 KB
最終ジャッジ日時 2024-04-17 12:14:26
合計ジャッジ時間 4,549 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 106 ms
78,208 KB
testcase_01 AC 113 ms
86,144 KB
testcase_02 AC 112 ms
85,888 KB
testcase_03 AC 115 ms
85,788 KB
testcase_04 AC 113 ms
86,048 KB
testcase_05 AC 112 ms
86,288 KB
testcase_06 AC 93 ms
77,048 KB
testcase_07 AC 93 ms
76,928 KB
testcase_08 AC 97 ms
77,612 KB
testcase_09 AC 111 ms
85,248 KB
testcase_10 AC 102 ms
78,868 KB
testcase_11 AC 104 ms
79,880 KB
testcase_12 AC 100 ms
78,336 KB
testcase_13 AC 100 ms
78,124 KB
testcase_14 AC 112 ms
84,864 KB
testcase_15 AC 101 ms
78,080 KB
testcase_16 AC 105 ms
81,408 KB
testcase_17 AC 98 ms
78,336 KB
testcase_18 AC 104 ms
79,660 KB
testcase_19 AC 105 ms
80,768 KB
testcase_20 AC 106 ms
81,280 KB
testcase_21 AC 111 ms
84,352 KB
testcase_22 AC 101 ms
79,232 KB
testcase_23 AC 107 ms
83,200 KB
testcase_24 AC 103 ms
80,000 KB
testcase_25 AC 104 ms
80,768 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# -*- coding: utf-8 -*-
MX = 100 + 1

N = int(raw_input())
A = map(int, raw_input().split())

assert 3 <= N <= 10 ** 5
assert all([1 <= A[i] <= MX - 1 for i in xrange(N)])
assert len(A) == N
MOD = 10 ** 9 + 7

tup = [0] * MX
for v in A:
    tup[v] += 1

count = 0
for i in xrange(1, MX):
    for j in xrange(i + 1, MX):
        for k in xrange(j + 1, MX):
            count += tup[i] * tup[j] * tup[k]
            count %= MOD

print count
0