結果

問題 No.118 門松列(2)
ユーザー mlihua09mlihua09
提出日時 2020-09-17 17:08:57
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 97 ms / 5,000 ms
コード長 303 bytes
コンパイル時間 444 ms
コンパイル使用メモリ 86,940 KB
実行使用メモリ 83,680 KB
最終ジャッジ日時 2023-09-04 07:22:48
合計ジャッジ時間 4,127 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 86 ms
76,760 KB
testcase_01 AC 97 ms
83,680 KB
testcase_02 AC 93 ms
83,472 KB
testcase_03 AC 93 ms
83,488 KB
testcase_04 AC 95 ms
83,580 KB
testcase_05 AC 93 ms
83,468 KB
testcase_06 AC 83 ms
76,740 KB
testcase_07 AC 82 ms
76,580 KB
testcase_08 AC 85 ms
76,560 KB
testcase_09 AC 93 ms
82,564 KB
testcase_10 AC 85 ms
77,056 KB
testcase_11 AC 86 ms
77,732 KB
testcase_12 AC 85 ms
76,692 KB
testcase_13 AC 86 ms
76,528 KB
testcase_14 AC 94 ms
82,576 KB
testcase_15 AC 86 ms
76,828 KB
testcase_16 AC 92 ms
79,424 KB
testcase_17 AC 86 ms
76,704 KB
testcase_18 AC 87 ms
77,540 KB
testcase_19 AC 89 ms
78,628 KB
testcase_20 AC 91 ms
78,892 KB
testcase_21 AC 91 ms
81,660 KB
testcase_22 AC 86 ms
77,068 KB
testcase_23 AC 92 ms
80,808 KB
testcase_24 AC 86 ms
77,760 KB
testcase_25 AC 87 ms
78,628 KB
権限があれば一括ダウンロードができます

ソースコード

diff #


N = int(input())

A = [0] * 100

for a in map(int, input().split()):
    A[a - 1] += 1
    
ans = 0
mod = 10 ** 9 + 7

for i in range(100):
    
    for j in range(i):
        
        for k in range(j):
            
            ans += A[i] * A[j] * A[k]
            ans %= mod
            
print(ans)
0