結果

問題 No.118 門松列(2)
ユーザー HachimoriHachimori
提出日時 2015-01-06 23:33:37
言語 Python2
(2.7.18)
結果
AC  
実行時間 79 ms / 5,000 ms
コード長 443 bytes
コンパイル時間 491 ms
コンパイル使用メモリ 6,912 KB
実行使用メモリ 12,132 KB
最終ジャッジ日時 2024-04-17 12:48:28
合計ジャッジ時間 2,699 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
6,400 KB
testcase_01 AC 79 ms
12,132 KB
testcase_02 AC 79 ms
11,944 KB
testcase_03 AC 73 ms
11,784 KB
testcase_04 AC 76 ms
11,980 KB
testcase_05 AC 78 ms
11,968 KB
testcase_06 AC 33 ms
6,144 KB
testcase_07 AC 33 ms
6,272 KB
testcase_08 AC 33 ms
6,272 KB
testcase_09 AC 77 ms
11,648 KB
testcase_10 AC 41 ms
7,296 KB
testcase_11 AC 45 ms
7,680 KB
testcase_12 AC 38 ms
6,912 KB
testcase_13 AC 36 ms
6,656 KB
testcase_14 AC 73 ms
11,560 KB
testcase_15 AC 33 ms
6,400 KB
testcase_16 AC 55 ms
9,464 KB
testcase_17 AC 35 ms
6,528 KB
testcase_18 AC 43 ms
7,936 KB
testcase_19 AC 52 ms
8,960 KB
testcase_20 AC 53 ms
8,960 KB
testcase_21 AC 66 ms
10,624 KB
testcase_22 AC 41 ms
7,680 KB
testcase_23 AC 63 ms
10,240 KB
testcase_24 AC 47 ms
8,064 KB
testcase_25 AC 51 ms
8,704 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python


def read():
    raw_input()
    return map(int, raw_input().split())


def work(vList):
    v2cnt = [0 for i in range(101)]
    for v in vList:
        v2cnt[v] += 1

    ans = 0
    for i in range(101):
        for j in range(i + 1, 101):
            for k in range(j + 1, 101):
                ans = (ans + v2cnt[i] * v2cnt[j] * v2cnt[k]) % 1000000007
    
    print ans


if __name__ == "__main__":
    work(read())
0