Accepted
[Hydro](https://hydro.ac)提供评测服务
代码
#define method_1
#ifdef method_1
/*
*/
#include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
const int maxn=10000+5;
typedef long long ll;
int a[maxn];
ll ans=0;
int main() {
//  freopen("我咽下一枚铁做的月亮.in","r",stdin);
    int n;
    cin>>n;
    for(int i=1; i<=n; i++) {
        cin>>a[i];
    }
    sort(a+1,a+n+1);
    for(int i=1; i<=n; i++) {
        ans+=a[i]*(n-i+1);
    }
    cout<<ans;
    return 0;
}
#endif
#ifdef method_2
/*
*/
#endif
#ifdef method_3
/*
*/
#endif
      信息
- 递交者
 - 类型
 - 递交
 - 题目
 - P1016 我咽下一枚铁做的月亮
 - 语言
 - C++
 - 递交时间
 - 2021-12-30 16:05:29
 - 评测时间
 - 2021-12-30 16:05:29
 - 评测机
 
- 分数
 - 100
 - 总耗时
 - 36ms
 - 峰值内存
 - 512.0 KiB