#include <bits/stdc++.h>
using namespace std;
long long st[100009], st2[100009];
int main() {
  ios_base::sync_with_stdio(NULL);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  vector<long long> vol(n + 1), temp(n + 1), sum(n + 1, 0), ans(n + 5, 0);
  for (int i = 1; i <= n; i++) cin >> vol[i];
  for (int i = 1; i <= n; i++) cin >> temp[i];
  for (int i = 1; i <= n; i++) sum[i] = sum[i - 1] + temp[i];
  for (int i = 1; i <= n; i++) {
    int s(i), e(n);
    if (temp[i] >= vol[i])
      ans[i] += vol[i];
    else {
      while (s <= e) {
        int mid = (s + e) / 2;
        if (sum[mid] - sum[i - 1] <= vol[i])
          s = mid + 1;
        else
          e = mid - 1;
      }
      ans[e + 1] += vol[i] - (sum[e] - sum[i - 1]);
      st[i]++;
      st2[e]++;
    }
  }
  long long t(0);
  for (int i = 1; i <= n; i++) {
    t += st[i];
    ans[i] += t * temp[i];
    t -= st2[i];
  }
  for (int i = 1; i <= n; i++) cout << ans[i] << " ";
  return 0;
}
