xay loves count
题号:NC225177
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 512 M,其他语言1024 M
64bit IO Format: %lld

题目描述

xay has an array a of length n, he wants to know how many triples (i, j, k) satisfy

输入描述:

The first line of input contains an integer n().

The second line of input contains n integers ).

输出描述:

Print a single integer, indicates the number of triples.
示例1

输入

复制
3
1 1 1

输出

复制
27
示例2

输入

复制
5
1 2 4 8 16

输出

复制
15