#include <bits/stdc++.h>
using namespace std;
bool isprime(int x) {
  for (int i = 2; i * i <= x; i++)
    if (!(x % i)) return false;
  return true;
}
bool compare(pair<int, int> a, pair<int, int> b) {
  if (abs(a.first) < abs(b.first)) return true;
  return false;
}
int main() {
  int n;
  cin >> n;
  vector<long long int> v(n), t(n), v1(n);
  for (int i = 0; i < n; i++) cin >> v[i];
  for (int i = 0; i < n; i++) cin >> t[i];
  vector<long long int> t1(n);
  t1[0] = t[0];
  for (int i = 1; i < n; i++) t1[i] = t[i] + t1[i - 1];
  for (int i = 0; i < n; i++) {
    long long int temp = 0;
    if (i > 0) temp = t1[i - 1];
    if (t1[n - 1] - temp >= v[i]) {
      long long int l = i, r = n;
      while (r - l > 0) {
        int m = l + (r - l) / 2;
        if (t1[m] - temp > v[i])
          r = m;
        else
          l = m + 1;
      }
      v1[i] = l;
    } else
      v1[i] = 1000000000;
  }
  vector<pair<int, int>> p;
  for (int i = 0; i < n; i++) p.push_back({i + 1, i});
  for (int i = 0; i < n; i++) p.push_back({-1 * (v1[i] + 1), i});
  sort(p.begin(), p.end(), compare);
  long long int cnt = 0, cnt1 = 0, cnt2 = 0;
  for (int i = 0; i < p.size(); i++) {
    if (abs(p[i].first) > n) break;
    if (p[i].first >= 0)
      cnt += 1;
    else {
      if (p[i].second > 0)
        cnt1 +=
            v[p[i].second] - (t1[abs(p[i].first) - 2] - t1[p[i].second - 1]);
      else {
        long long int temp1;
        if (abs(p[i].first) > 1)
          temp1 = t1[abs(p[i].first) - 2];
        else
          temp1 = 0;
        cnt1 += v[p[i].second] - temp1;
      }
      cnt--;
    }
    int temp = abs(p[i].first);
    if (i < p.size() - 1)
      if (abs(p[i + 1].first) == abs(p[i].first)) continue;
    cout << cnt * t[temp - 1] + cnt1 << ' ';
    cnt1 = 0;
  }
}
