結果

問題 No.118 門松列(2)
ユーザー rpy3cpprpy3cpp
提出日時 2015-07-12 22:25:39
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 131 ms / 5,000 ms
コード長 337 bytes
コンパイル時間 303 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 16,776 KB
最終ジャッジ日時 2024-04-17 13:00:03
合計ジャッジ時間 3,798 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 82 ms
10,752 KB
testcase_01 AC 127 ms
16,552 KB
testcase_02 AC 127 ms
16,496 KB
testcase_03 AC 126 ms
16,588 KB
testcase_04 AC 131 ms
16,660 KB
testcase_05 AC 126 ms
16,776 KB
testcase_06 AC 76 ms
10,880 KB
testcase_07 AC 73 ms
10,752 KB
testcase_08 AC 74 ms
10,752 KB
testcase_09 AC 126 ms
16,336 KB
testcase_10 AC 98 ms
11,904 KB
testcase_11 AC 103 ms
12,288 KB
testcase_12 AC 98 ms
11,776 KB
testcase_13 AC 94 ms
11,264 KB
testcase_14 AC 125 ms
16,240 KB
testcase_15 AC 90 ms
10,880 KB
testcase_16 AC 111 ms
13,900 KB
testcase_17 AC 91 ms
11,136 KB
testcase_18 AC 105 ms
12,288 KB
testcase_19 AC 112 ms
13,312 KB
testcase_20 AC 106 ms
13,568 KB
testcase_21 AC 117 ms
15,460 KB
testcase_22 AC 98 ms
12,032 KB
testcase_23 AC 116 ms
14,928 KB
testcase_24 AC 101 ms
12,416 KB
testcase_25 AC 106 ms
13,312 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
As = list(map(int, input().split()))
freq = [0] * 101
for a in As:
    freq[a] += 1
count = 0
mod = 10**9 + 7
for i in range(99):
    fi = freq[i]
    for j in range(i+1, 100):
        fifj = (fi * freq[j]) % mod
        for k in range(j+1, 101):
            count += fifj * freq[k]
            count %= mod
print(count)
0