#include <bits/stdc++.h>
using namespace std;
int n, l, r, id;
long long a[100005], b[100005] = {0}, f[100005] = {0}, g[100005] = {0};
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= n; i++) cin >> b[i], b[i] += b[i - 1];
  for (int i = 1; i <= n; i++) {
    l = i, r = n, id = -1;
    while (l <= r) {
      int mid = (l + r) / 2;
      if (b[mid] - b[i - 1] <= a[i])
        id = mid, l = mid + 1;
      else
        r = mid - 1;
    }
    if (id != -1) {
      f[i]++;
      f[id + 1]--;
      g[id + 1] += a[i] - (b[id] - b[i - 1]);
    } else {
      g[i] += a[i];
    }
  }
  for (int i = 1; i <= n; i++) f[i] += f[i - 1];
  for (int i = 1; i <= n; i++)
    f[i] = f[i] * (b[i] - b[i - 1]) + g[i], cout << f[i] << " ";
}
