Submission #882796

#TimeUsernameProblemLanguageResultExecution timeMemory
882796unexpectedbroProsjek (COCI14_prosjek)C++14
50 / 50
1 ms436 KiB
#include<bits/stdc++.h>
using namespace std;
int main() {
	int n; cin >> n;
	vector<int>a(n);
	for (int &i : a) {
		cin >> i;
	}
	vector<int>ans;
	int x = 0;
	for (int i = 1; i <= n; i++) {
		ans.push_back(a[i - 1] * i - x);
		x += ans.back();
	}
	for (auto i : ans) {
		cout << i << " ";
	}
	cout << endl;
}
#Verdict Execution timeMemoryGrader output
Fetching results...