# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1000804 | fryingduc | Prosjek (COCI14_prosjek) | C++17 | 1 ms | 604 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 maxn = 105;
int n, b[maxn];
long long a[maxn];
void solve() {
cin >> n;
for(int i = 1; i <= n; ++i) {
cin >> b[i];
a[i] = (1ll * b[i] * i - 1ll * b[i - 1] * (i - 1));
}
for(int i = 1; i <= n; ++i) {
cout << a[i] << " ";
}
}
signed main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
solve();
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |