結果

問題 No.118 門松列(2)
ユーザー brthyyjpbrthyyjp
提出日時 2021-05-29 20:35:21
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 66 ms / 5,000 ms
コード長 236 bytes
コンパイル時間 153 ms
コンパイル使用メモリ 82,448 KB
実行使用メモリ 89,036 KB
最終ジャッジ日時 2024-04-25 15:45:14
合計ジャッジ時間 2,428 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 48 ms
71,732 KB
testcase_01 AC 66 ms
88,620 KB
testcase_02 AC 64 ms
88,632 KB
testcase_03 AC 64 ms
88,632 KB
testcase_04 AC 65 ms
89,036 KB
testcase_05 AC 64 ms
88,708 KB
testcase_06 AC 45 ms
68,024 KB
testcase_07 AC 46 ms
68,116 KB
testcase_08 AC 46 ms
69,796 KB
testcase_09 AC 64 ms
87,128 KB
testcase_10 AC 51 ms
73,512 KB
testcase_11 AC 49 ms
74,708 KB
testcase_12 AC 49 ms
72,368 KB
testcase_13 AC 50 ms
71,552 KB
testcase_14 AC 64 ms
87,048 KB
testcase_15 AC 47 ms
70,512 KB
testcase_16 AC 56 ms
78,848 KB
testcase_17 AC 49 ms
71,796 KB
testcase_18 AC 52 ms
75,684 KB
testcase_19 AC 55 ms
77,768 KB
testcase_20 AC 55 ms
79,124 KB
testcase_21 AC 63 ms
85,392 KB
testcase_22 AC 51 ms
74,124 KB
testcase_23 AC 59 ms
82,764 KB
testcase_24 AC 53 ms
76,428 KB
testcase_25 AC 55 ms
78,468 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())

mod = 10**9+7
A = list(map(int, input().split()))
C = [0]*101
for i, a in enumerate(A):
    C[a] += 1
ans = 0
import itertools
for c in itertools.combinations(C, 3):
    ans += c[0]*c[1]*c[2]
    ans %= mod
print(ans)
0