#include <bits/stdc++.h>
#define add emplace_back
#define fi first
#define se second
using namespace std;
using ll = long long;
using pll = pair<ll,ll>;
using pii = pair<int,int>;
const int maxn = 105;
int n;
ll a[maxn], b[maxn];
int main () {
ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
cin >> n;
for (int i = 1;i <= n; i++) {
cin >> b[i];
}
for (int i = 1;i <= n; i++) {
a[i] = 1LL*b[i] * i - 1LL*b[i-1] * (i-1);
cout << a[i] << " ";
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |