結果

問題 No.118 門松列(2)
ユーザー gorugo30gorugo30
提出日時 2021-02-27 14:42:09
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 58 ms / 5,000 ms
コード長 292 bytes
コンパイル時間 341 ms
コンパイル使用メモリ 82,524 KB
実行使用メモリ 81,288 KB
最終ジャッジ日時 2024-04-10 15:37:38
合計ジャッジ時間 2,523 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
63,588 KB
testcase_01 AC 58 ms
80,388 KB
testcase_02 AC 58 ms
80,548 KB
testcase_03 AC 54 ms
80,808 KB
testcase_04 AC 55 ms
80,008 KB
testcase_05 AC 58 ms
81,288 KB
testcase_06 AC 42 ms
60,456 KB
testcase_07 AC 37 ms
59,864 KB
testcase_08 AC 38 ms
60,584 KB
testcase_09 AC 51 ms
78,212 KB
testcase_10 AC 42 ms
64,260 KB
testcase_11 AC 42 ms
67,736 KB
testcase_12 AC 40 ms
63,508 KB
testcase_13 AC 41 ms
62,308 KB
testcase_14 AC 52 ms
79,172 KB
testcase_15 AC 40 ms
62,068 KB
testcase_16 AC 46 ms
70,524 KB
testcase_17 AC 39 ms
62,280 KB
testcase_18 AC 43 ms
66,984 KB
testcase_19 AC 45 ms
68,992 KB
testcase_20 AC 47 ms
70,716 KB
testcase_21 AC 50 ms
76,356 KB
testcase_22 AC 41 ms
65,152 KB
testcase_23 AC 49 ms
74,656 KB
testcase_24 AC 42 ms
66,732 KB
testcase_25 AC 46 ms
69,340 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

cnt = [0] * 101
N = int(input())
A = list(map(int, input().split()))
MOD = 10 ** 9 + 7
for i in range(N):
    cnt[A[i]] += 1
ans = 0
for i in range(1, 101):
    for j in range(i + 1, 101):
        for k in range(j + 1, 101):
            ans = (ans + cnt[i] * cnt[j] * cnt[k]) % MOD
print(ans)
0