#include <bits/stdc++.h>
using namespace std;
int a[500005], cnt[500005];
long long b[500005];
long long tag[500005], ans, tmp;
vector<long long> v;
int n, m;
bool f = 0;
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  v.push_back(0);
  for (int i = 1; i <= n; i++) {
    scanf("%lld", &b[i]);
    v.push_back(b[i]);
    v[i] += v[i - 1];
  }
  for (int i = 1; i <= n; i++) {
    int k = lower_bound(v.begin(), v.end(), a[i] + v[i - 1]) - v.begin();
    cnt[k + 1]++;
    tag[k] += v[k] - a[i] - v[i - 1];
  }
  for (int i = 1; i <= n; i++) {
    cnt[i] += cnt[i - 1];
  }
  tmp = 0;
  for (int i = 1; i <= n; i++) {
    tmp += a[i];
    ans += a[i];
    ans -= b[i] * (i - cnt[i]);
    ans += tag[i];
    printf("%lld ", tmp - ans);
    tmp = ans;
  }
  puts("");
}
