#include <bits/stdc++.h>
using namespace std;
long long n, t[100005], v[100005], c[100005], dd[100005];
long long s[100005], res[100005];
void Nhap() {
  cin >> n;
  for (int i = 1; i <= n; ++i) cin >> v[i];
  for (int i = 1; i <= n; ++i) cin >> t[i], s[i] = (long long)s[i - 1] + t[i];
}
long long bs(long long le, long long ri, long long x) {
  long long l = le, r = ri, mid, kq = 0;
  while (l <= r) {
    mid = (l + r) / 2;
    if (s[mid] - s[le - 1] >= x) {
      kq = mid;
      r = mid - 1;
    } else
      l = mid + 1;
  }
  return (kq);
}
void process() {
  long long x;
  for (long long i = 1; i <= n; i++) {
    --dd[i - 1];
    if (v[i] > s[n] - s[i - 1])
      ++dd[n];
    else {
      x = bs(i, n, v[i]);
      ++dd[x];
      ++c[x];
      if (x == i)
        res[x] += (long long)v[i];
      else if (x == i + 1)
        res[x] += (long long)v[i] - t[i];
      else
        res[x] += (long long)v[i] - (s[x - 1] - s[i - 1]);
    }
  }
  for (long long i = n; i >= 0; i--) {
    dd[i] += dd[i + 1];
    res[i] += (dd[i] - c[i]) * t[i];
  }
  for (long long i = 1; i <= n; ++i) cout << res[i] << " ";
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  Nhap();
  process();
  return 0;
}
