#include <bits/stdc++.h>
using namespace std;
long long snow[100010];
long long temp[100010];
long long ans[100010];
long long ans2[100010];
int bin(long long lo, long long hi, long long x) {
  long long in = lo;
  in--;
  int ans = 0;
  while (lo <= hi) {
    long long mid = (lo + hi) >> 1;
    if (temp[mid] - temp[in] >= x) {
      ans = mid;
      hi = mid - 1;
    } else {
      lo = mid + 1;
    }
  }
  return ans;
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%lld", snow + i);
  }
  for (int i = 1; i <= n; i++) {
    scanf("%lld", temp + i);
  }
  for (int i = 2; i <= n; i++) {
    temp[i] += temp[i - 1];
  }
  for (int i = 1; i <= n; i++) {
    long long x = snow[i];
    int in = bin(i, n, x);
    if (in == i) {
      ans2[i] += x;
      continue;
    }
    ans[i] += 1;
    long long y = temp[in - 1] - temp[i - 1];
    ans2[in] += x - y;
    ans[in] += -1;
  }
  for (int i = 2; i <= n; i++) {
    ans[i] += ans[i - 1];
  }
  for (int i = 1; i <= n; i++) {
    ans2[i] += (ans[i] * (temp[i] - temp[i - 1]));
    printf("%lld\n", ans2[i]);
  }
}
