結果

問題 No.118 門松列(2)
ユーザー rlangevinrlangevin
提出日時 2023-01-08 18:16:53
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 100 ms / 5,000 ms
コード長 264 bytes
コンパイル時間 340 ms
コンパイル使用メモリ 87,208 KB
実行使用メモリ 89,500 KB
最終ジャッジ日時 2023-08-22 03:58:55
合計ジャッジ時間 4,334 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
76,616 KB
testcase_01 AC 98 ms
89,164 KB
testcase_02 AC 99 ms
89,400 KB
testcase_03 AC 98 ms
89,500 KB
testcase_04 AC 97 ms
89,368 KB
testcase_05 AC 100 ms
89,452 KB
testcase_06 AC 83 ms
76,284 KB
testcase_07 AC 82 ms
76,516 KB
testcase_08 AC 81 ms
76,368 KB
testcase_09 AC 99 ms
87,492 KB
testcase_10 AC 87 ms
77,096 KB
testcase_11 AC 88 ms
78,368 KB
testcase_12 AC 86 ms
76,816 KB
testcase_13 AC 85 ms
76,488 KB
testcase_14 AC 100 ms
87,664 KB
testcase_15 AC 85 ms
76,516 KB
testcase_16 AC 91 ms
81,912 KB
testcase_17 AC 84 ms
76,588 KB
testcase_18 AC 87 ms
78,360 KB
testcase_19 AC 88 ms
80,728 KB
testcase_20 AC 89 ms
81,384 KB
testcase_21 AC 96 ms
86,300 KB
testcase_22 AC 86 ms
77,208 KB
testcase_23 AC 92 ms
84,896 KB
testcase_24 AC 87 ms
78,756 KB
testcase_25 AC 89 ms
80,592 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(map(int, input().split()))
D = [0] * 100
mod = 10 ** 9 + 7
for a in A:
    D[a - 1] += 1
ans = 0
for i in range(100):
    for j in range(i + 1, 100):
        for k in range(j + 1, 100):
            ans += D[i] * D[j] * D[k]
print(ans%mod)
0