#include <bits/stdc++.h>
using namespace std;
long long int sum = 0;
long long int si[100010], te[100010];
long long int n;
multiset<long long int> h;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) scanf("%lld", &(si[i]));
  for (int i = 0; i < n; i++) scanf("%lld", &(te[i]));
  long long int t = 0;
  for (int i = 0; i < n; i++) {
    h.insert(si[i] + t);
    t += te[i];
    multiset<long long int>::iterator iter = h.begin();
    sum = 0;
    while (iter != h.end()) {
      if (*iter > t) {
        sum += te[i] * h.size();
        break;
      } else {
        sum += (*iter - (t - te[i]));
        multiset<long long int>::iterator iter2 = iter;
        iter++;
        h.erase(iter2);
      }
    }
    cout << sum << ' ';
  }
  return 0;
}
