/* -*- coding: utf-8 -*- * * 3027.cc: No.3027 f-蛻励→h-蛻・- yukicoder */ #include #include using namespace std; /* constant */ const int MAX_N = 25; /* typedef */ using ll = long long; /* global variables */ int fs[MAX_N + 1]; ll cs[MAX_N + 1][MAX_N + 1], hs[MAX_N + 1]; /* subroutines */ /* main */ int main() { int n; scanf("%d", &n); for (int i = n; i >= 0; i--) scanf("%d", fs + i); for (int i = 0; i <= n; i++) { cs[i][0] = cs[i][i] = 1; for (int j = 1; j < i; j++) cs[i][j] = cs[i - 1][j - 1] + cs[i - 1][j]; } for (int i = 0; i <= n; i++) for (int j = 0; j <= i; j++) hs[j] += cs[i][j] * fs[i] * (1 - ((i - j) & 1) * 2); for (int i = n; i >= 0; i--) printf("%lld%c", hs[i], (i > 0) ? ' ' : '\n'); return 0; }