排序后依次加上当前数,输出最后结果。
第一行输入一个整数 nnn。 第二行输入 nnn 个整数。
输出最终答案。
1≤n≤100,整数绝对值不超过106^66
3 3 1 2
6
使用您的 www.mathcoding.online 通用账户