結果

問題 No.118 門松列(2)
ユーザー H3PO4H3PO4
提出日時 2020-04-28 00:52:48
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 214 ms / 5,000 ms
コード長 259 bytes
コンパイル時間 233 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 16,420 KB
最終ジャッジ日時 2024-05-02 06:28:27
合計ジャッジ時間 5,724 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 214 ms
10,752 KB
testcase_01 AC 171 ms
16,420 KB
testcase_02 AC 167 ms
15,880 KB
testcase_03 AC 169 ms
16,140 KB
testcase_04 AC 169 ms
16,412 KB
testcase_05 AC 169 ms
16,148 KB
testcase_06 AC 192 ms
10,624 KB
testcase_07 AC 197 ms
10,624 KB
testcase_08 AC 187 ms
10,624 KB
testcase_09 AC 168 ms
15,872 KB
testcase_10 AC 146 ms
11,776 KB
testcase_11 AC 143 ms
12,032 KB
testcase_12 AC 144 ms
11,392 KB
testcase_13 AC 144 ms
11,264 KB
testcase_14 AC 169 ms
15,596 KB
testcase_15 AC 134 ms
10,752 KB
testcase_16 AC 153 ms
13,568 KB
testcase_17 AC 142 ms
11,008 KB
testcase_18 AC 145 ms
12,160 KB
testcase_19 AC 153 ms
13,056 KB
testcase_20 AC 147 ms
13,180 KB
testcase_21 AC 163 ms
14,796 KB
testcase_22 AC 151 ms
11,904 KB
testcase_23 AC 159 ms
14,704 KB
testcase_24 AC 149 ms
12,288 KB
testcase_25 AC 143 ms
13,056 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools
from collections import Counter

N = int(input())
A = Counter(map(int, input().split()))
lA = len(A)

MOD = 10 ** 9 + 7
ans = 0
for t in itertools.combinations(range(1, 101), 3):
    ans = (ans + A[t[0]] * A[t[1]] * A[t[2]]) % MOD
print(ans)
0