题目链接
#include <iostream> using namespace std; int main() { int N, sum = 0,temp; cin >> N; for(int i=0;i<N;i++) { cin >> temp; sum =sum+ (N - 1)*temp * 10 + (N - 1)*temp; } cout << sum; return 0; }