提交时间:2024-08-20 09:04:37
运行 ID: 168262
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; long long sum = 0; for (int i = 1; i <= n; i++) { int q; cin >> q; sum += q * (n - 1); } cout << sum << endl; return 0; }