結果

問題 No.118 門松列(2)
ユーザー nbisconbisco
提出日時 2017-01-21 22:20:48
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 126 ms / 5,000 ms
コード長 293 bytes
コンパイル時間 149 ms
コンパイル使用メモリ 10,640 KB
実行使用メモリ 14,944 KB
最終ジャッジ日時 2023-08-24 19:24:53
合計ジャッジ時間 3,955 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 85 ms
8,276 KB
testcase_01 AC 125 ms
14,892 KB
testcase_02 AC 122 ms
14,484 KB
testcase_03 AC 126 ms
14,880 KB
testcase_04 AC 123 ms
14,944 KB
testcase_05 AC 121 ms
14,836 KB
testcase_06 AC 74 ms
7,872 KB
testcase_07 AC 65 ms
7,820 KB
testcase_08 AC 67 ms
7,764 KB
testcase_09 AC 122 ms
14,584 KB
testcase_10 AC 87 ms
9,616 KB
testcase_11 AC 90 ms
10,044 KB
testcase_12 AC 84 ms
9,028 KB
testcase_13 AC 87 ms
8,580 KB
testcase_14 AC 123 ms
14,288 KB
testcase_15 AC 80 ms
7,740 KB
testcase_16 AC 103 ms
11,584 KB
testcase_17 AC 83 ms
8,532 KB
testcase_18 AC 96 ms
9,896 KB
testcase_19 AC 94 ms
11,312 KB
testcase_20 AC 100 ms
11,172 KB
testcase_21 AC 110 ms
13,184 KB
testcase_22 AC 87 ms
9,516 KB
testcase_23 AC 109 ms
12,912 KB
testcase_24 AC 92 ms
10,096 KB
testcase_25 AC 94 ms
10,828 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
a = [0 for i in range(100)]
for i in input().strip().split(" "):
    a[int(i)-1] += 1

mod = 10**9 + 7
total = 0
for i in range(100):
    for j in range(i+1, 100):
        for k in range(j+1, 100):
            total += a[i] * a[j] * a[k]
            total %= mod
print(total)
0