Nice Trick
题号:NC52856
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 32 M,其他语言64 M
Special Judge, 64bit IO Format: %lld

题目描述

Given n integers , Bobo knows how to compute the *sum of triples*
It follows that

Bobo would like to compute the *sum of quadrangles*

输入描述:

The input contains zero or more test cases and is terminated by end-of-file. For each test case,
The first line contains an integer n.
The second line contains n integers .

*
*
* The number of tests cases does not exceed 10.

输出描述:

For each case, output an integer which denotes the result.
示例1

输入

复制
3
1 2 3
4
1 2 3 4
5
1 2 3 4 5

输出

复制
0
24
274