提交时间:2023-10-10 13:16:55
运行 ID: 106178
#include <bits/stdc++.h> using namespace std; #define int long long signed main() { int n; int kk; int ans = 0; cin >> n; for(int i = 1; i <= n; i++) { cin >> kk; ans += kk*(n-1); } cout << ans << endl; return 0; }