#include #include #include using namespace std; typedef long long ll; typedef pair P; typedef pair P1; typedef pair P2; #define pu push #define pb push_back #define mp make_pair #define eps 1e-7 #define INF 1000000000 #define mod 1000000007 #define fi first #define sc second #define rep(i,x) for(int i=0;i> n; rep(i,n){ cin >> a[i]; sum += a[i]; } rep(i,n){ cout << sum-a[i]*(n-1) << " "; } cout<