#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 5;
int n, a[MAXN], b[MAXN], f[MAXN];
long long sum[MAXN], c[MAXN];
int bs(int x, int st) {
  int kq = n + 1, lo = st, hi = n;
  while (lo <= hi) {
    int mid = (lo + hi) >> 1;
    if (x - (sum[mid] - sum[st - 1]) <= 0) {
      kq = mid;
      hi = mid - 1;
    } else
      lo = mid + 1;
  }
  return kq;
}
int main() {
  scanf("%d", &n);
  for (int i = (1); i <= (n); i++) scanf("%d", &a[i]);
  for (int i = (1); i <= (n); i++)
    scanf("%d", &b[i]), sum[i] = sum[i - 1] + b[i];
  for (int i = (1); i <= (n); i++) {
    int p = bs(a[i], i);
    f[i]++, f[p]--;
    c[p] += a[i] - (sum[p - 1] - sum[i - 1]);
  }
  for (int i = (1); i <= (n); i++) f[i] += f[i - 1];
  for (int i = (1); i <= (n); i++) cout << 1LL * f[i] * b[i] + c[i] << " ";
  return 0;
}
