#pragma comment (linker, "/STACK:256000000") #define _CRT_SECURE_NO_WARNINGS #include "bits/stdc++.h" using namespace std; typedef string::const_iterator State; #define eps 1e-11L #define MAX_MOD 1000000007LL #define GYAKU 500000004LL #define MOD 998244353LL #define seg_size 262144 #define pb push_back #define mp make_pair typedef long long ll; #define REP(a,b) for(long long (a) = 0;(a) < (b);++(a)) #define ALL(x) (x).begin(),(x).end() void init() { iostream::sync_with_stdio(false); cout << fixed << setprecision(100); } #define int ll void solve() { int n; cin >> n; vector inputs; REP(i, n) { int a; cin >> a; inputs.push_back(a); } vector ans; int now = 0; for (int i = 1; i < inputs.size(); ++i) { now += inputs[i] * (n-1LL); } now -= (n - 2LL) * (inputs[0]*(n-1LL)); ans.push_back(now / (n - 1LL)); for (int i = 1; i < inputs.size(); ++i) { ll geko = (n - 1LL) * (inputs[i-1] - inputs[i]); ans.push_back(geko + ans.back()); } REP(i, ans.size()) { if (i != 0) cout << " "; cout << ans[i]; } cout << endl; return; } #undef int int main() { init(); solve(); }