結果

問題 No.118 門松列(2)
ユーザー matsu7874matsu7874
提出日時 2015-03-20 07:29:52
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 130 ms / 5,000 ms
コード長 265 bytes
コンパイル時間 328 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 16,984 KB
最終ジャッジ日時 2024-04-17 12:53:55
合計ジャッジ時間 3,818 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
11,008 KB
testcase_01 AC 127 ms
16,984 KB
testcase_02 AC 130 ms
16,480 KB
testcase_03 AC 123 ms
16,576 KB
testcase_04 AC 126 ms
16,964 KB
testcase_05 AC 130 ms
16,764 KB
testcase_06 AC 71 ms
10,752 KB
testcase_07 AC 71 ms
10,880 KB
testcase_08 AC 70 ms
10,752 KB
testcase_09 AC 121 ms
16,320 KB
testcase_10 AC 89 ms
11,904 KB
testcase_11 AC 97 ms
12,288 KB
testcase_12 AC 86 ms
11,648 KB
testcase_13 AC 84 ms
11,136 KB
testcase_14 AC 124 ms
16,136 KB
testcase_15 AC 77 ms
10,752 KB
testcase_16 AC 105 ms
14,080 KB
testcase_17 AC 83 ms
11,264 KB
testcase_18 AC 92 ms
12,416 KB
testcase_19 AC 101 ms
13,312 KB
testcase_20 AC 100 ms
13,440 KB
testcase_21 AC 115 ms
15,332 KB
testcase_22 AC 88 ms
12,032 KB
testcase_23 AC 112 ms
15,100 KB
testcase_24 AC 96 ms
12,544 KB
testcase_25 AC 100 ms
13,184 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

MOD = 10**9+7
N = int(input())
A = [int(x) for x in input().split()]
B = [0 for _ in range(100)]
for a in A:
    B[a-1] += 1
ans = 0
for i in range(98):
    for j in range(i+1,99):
        for k in range(j+1,100):
            ans += B[i]*B[j]*B[k]

print(ans % MOD)
0