#pragma GCC optimize("O3")
#include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
using namespace std;
// using namespace __gnu_pbds;
// typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> indexed_set;
#define all(x) x.begin(), x.end()
#define pii pair<int, int>
#define mpr make_pair
#define fi first
#define se second
#define Local
#define int long long
const int sz = 5005;
const long long inf = 1e9 + 7;
const int mod = 1e9 + 7;
template<typename Iterator>
void read(Iterator b, Iterator e) {
    while (b != e) {
        cin >> *b++;
    }
}
int bin_pow(int x, int b) {
    int res = 1;
    while (b > 0) {
        if (b & 1) {
            res = (res * x) % mod;
        }
        x = (x * x) % mod;
        b >>= 1;
    }
    return res;
}
signed main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    #ifdef Local
        // freopen("main.in", "r", stdin);
        // freopen("main.out", "w", stdout);
    #endif
    int n;
    cin >> n;
    vector<int> a(n);
    for(int i = 0; i < n; i++){
        cin >> a[i];
        a[i] *= (i+1);
    }int s = 0;
    int ans = 0;
    cout << a[0] << " ";
    if(n==1){
        return 0;
    }
    for(int i = 1; i < n; i++){
        cout << a[i]-a[i-1] << " ";
    }
    
}
| # | Verdict | Execution time | Memory | Grader output | 
|---|
| Fetching results... |