#include #include using namespace atcoder; using namespace std; using ll=long long; using ld=long double; ld pie=3.141592653589793; ll mod=998244353; ll inf=1009999999999999990; int main(){ ll n; cin >> n; vectora(n),b(n); for (ll i = 0; i < n; i++) { cin >>a[i]; } for (ll i = 0; i < n; i++) { cin >> b[i]; } vectorc(n*2); c[0]=0; c[1]=a[0]+b[0]; ll sum=a[0]+b[0]; for (ll i = 2; i <= n; i++) { c[i]=c[i-1]+sum+a[i-1]+b[i-1]; sum+=a[i-1]+b[i-1]; } for (ll i = n+1; i < 2*n; i++) { sum-=a[i-n-1]+b[i-n-1]; c[i]=c[i-1]+sum-a[i-n-1]*n-b[i-n-1]*n; } for (ll i = 0; i < c.size(); i++) { cout << c[i] << endl; } }