#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, v[100000], t[100000];
  long long pst[100001], res[100000];
  priority_queue<long long, vector<long long>, greater<long long> > heap;
  scanf("%I64d", &n);
  for (int i = 0; i < n; ++i) {
    scanf("%I64d", &v[i]);
  }
  pst[0] = (long long)0;
  for (int i = 0; i < n; ++i) {
    scanf("%I64d", &t[i]);
    pst[i + 1] = pst[i] + t[i];
  }
  for (int i = 0; i < n; ++i) {
    heap.push(pst[i] + v[i]);
    res[i] = (long long)0;
    while (heap.top() < pst[i + 1] && !heap.empty()) {
      res[i] += heap.top() - pst[i];
      heap.pop();
    }
    res[i] += heap.size() * t[i];
  }
  for (int i = 0; i < n; ++i) {
    printf("%I64d ", res[i]);
  }
  printf("\n");
  return 0;
}
