序列计算
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
限制
- 时间限制:
- 空间限制:
题目描述
给你一个数列 。
我们定义他们的魅力值为,现在要求你求这个数列的魅力值
输入格式
第一行一个整数 。 第二行 个整数 。
输出格式
一行一个整数表示答案。
样例1
输入
3
4 2 3
输出
26
样例2
输入
2
9 45
输出
405
样例解释
$\sum\limits_{1\le i<j\le N} A_iA_j=A_1A_2+A_1A_3+A_2A_3=4\times 2+4\times 3+2\times 3=26$。
数据分布
的样例,。 。
的样例,。 。
[柳泉中学,龙凤苑中学,科技苑中学]拔高班第十一次训练
- Status
- Done
- Rule
- IOI
- Problem
- 6
- Start at
- 2025-5-20 11:00
- End at
- 2025-5-20 23:00
- Duration
- 12 hour(s)
- Host
- Partic.
- 38