結果

問題 No.118 門松列(2)
ユーザー roarisroaris
提出日時 2019-12-22 12:17:11
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 104 ms / 5,000 ms
コード長 281 bytes
コンパイル時間 1,121 ms
コンパイル使用メモリ 87,256 KB
実行使用メモリ 89,772 KB
最終ジャッジ日時 2023-10-12 03:16:49
合計ジャッジ時間 4,583 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
77,076 KB
testcase_01 AC 94 ms
89,656 KB
testcase_02 AC 95 ms
89,492 KB
testcase_03 AC 96 ms
89,772 KB
testcase_04 AC 101 ms
89,552 KB
testcase_05 AC 104 ms
89,516 KB
testcase_06 AC 83 ms
76,680 KB
testcase_07 AC 83 ms
76,716 KB
testcase_08 AC 86 ms
76,340 KB
testcase_09 AC 99 ms
88,020 KB
testcase_10 AC 87 ms
77,420 KB
testcase_11 AC 92 ms
78,444 KB
testcase_12 AC 88 ms
76,732 KB
testcase_13 AC 91 ms
76,744 KB
testcase_14 AC 103 ms
87,924 KB
testcase_15 AC 90 ms
76,772 KB
testcase_16 AC 96 ms
81,988 KB
testcase_17 AC 89 ms
76,884 KB
testcase_18 AC 94 ms
78,624 KB
testcase_19 AC 97 ms
80,896 KB
testcase_20 AC 97 ms
81,568 KB
testcase_21 AC 100 ms
86,204 KB
testcase_22 AC 90 ms
77,604 KB
testcase_23 AC 101 ms
85,000 KB
testcase_24 AC 88 ms
79,092 KB
testcase_25 AC 93 ms
80,952 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(map(int, input().split()))
cnt = [0]*101

for Ai in A:
    cnt[Ai] += 1

ans = 0
MOD = 10**9+7

for i in range(101):
    for j in range(i+1, 101):
        for k in range(j+1, 101):
            ans += cnt[i]*cnt[j]*cnt[k]
            ans %= MOD

print(ans)
0