結果

提出番号 1084
提出者 lglover
言語 C++
提出日時 2017-12-10 09:24:24
問題名 (12)玉ねぎの収穫 ~Easy~
結果 AC
点数 100%

テストケース

テストケース 結果 得点 実行時間 メモリ使用量
1 AC 100% 1ms 8736KB
2 AC 100% 2ms 7520KB
3 AC 100% 1ms 8112KB
4 AC 100% 7ms 8736KB
5 AC 100% 8ms 8736KB
6 AC 100% 5ms 7952KB

ソースコード

#include <iomanip>
#include <random>
#include <time.h>
#include <vector>
#include <queue>
#include <functional>
#include <map>
#include <string>
#include <cstdlib>
#include <typeinfo>
#include <math.h>
#include <algorithm>
#include <iostream>
#include <list>
#include <stack>
#include <set>
using namespace std;
typedef long long int ll;
typedef pair<ll, ll> P;

int main() {
	cin.tie(0);
	ios_base::sync_with_stdio(false);
	ll n, m, s, ans = 0;
	cin >> n >> m;
	for (int i = 0; i < n; i++) {
		cin >> s;
		ans += s;
	}
	cout << ans * m << endl;
	return 0;
}