#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 1;
long long ans[N];
int v[N], t[N];
long long cum[N];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> v[i];
  }
  for (int i = 1; i <= n; i++) {
    cin >> t[i];
    cum[i] = cum[i - 1] + t[i];
  }
  std::priority_queue<int, std::vector<int>, std::greater<int> > pq;
  for (int i = 1; i <= n; i++) {
    cout << 1LL * (int)pq.size() * t[i] + min(v[i], t[i]) + ans[i] << " ";
    if (v[i] > t[i]) {
      v[i] -= t[i];
      int s = i + 1, e = n, idx = i;
      while (s <= e) {
        int mid = (s + e) / 2;
        if (cum[mid] - cum[i] <= v[i]) {
          idx = mid;
          s = mid + 1;
        } else {
          e = mid - 1;
        }
      }
      if (idx != i) {
        pq.push(idx);
      }
      ans[idx + 1] += v[i] - (cum[idx] - cum[i]);
    }
    while (!pq.empty() && pq.top() == i) pq.pop();
  }
  return 0;
}
