PAT乙级1056

题目链接

晚上挑了一道简单题,果然是截止目前为止最流畅的一道题`


#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;
}


猜你喜欢

转载自blog.csdn.net/DoctorLDQ/article/details/86587022
今日推荐