# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
865994 | mamion | Prosjek (COCI14_prosjek) | C++11 | 0 ms | 348 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
using namespace std;
const int N = 1e6;
int ans[N], n;
int main() {
cin >> n;
int sum = 0;
for (int i = 1; i <= n; i++) {
int a; cin >> a;
ans[i] = a*i-sum;
sum += ans[i];
}
cout << ans[1];
for (int i = 2; i <= n; i++) cout << ' ' << ans[i];
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |