#include <bits/stdc++.h>
int Set(int N, int pos) { return N = N | (1 << pos); }
int reset(int N, int pos) { return N = N & ~(1 << pos); }
bool check(int N, int pos) { return (bool)(N & (1 << pos)); }
using namespace std;
const int maxx = 1e5 + 10;
long long ice[maxx + 5], dep[maxx + 5], sum[maxx + 5], dp[maxx + 5];
vector<long long> v;
vector<long long>::iterator lower, upper;
vector<int> saved[maxx + 5];
int main() {
  long long n, s = 0, past = 0;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    long long x;
    cin >> x;
    ice[i] = x;
  }
  for (int i = 1; i <= n; i++) {
    long long x;
    cin >> x;
    dep[i] = x;
    s += x;
    sum[i] = s;
    v.push_back(s);
  }
  for (int i = 1; i <= n; i++) {
    long long look = ice[i] + sum[i - 1];
    auto upper = lower_bound(v.begin(), v.end(), look);
    long long idx = (upper - v.begin());
    if (ice[i] != 0) {
      saved[idx + 1].push_back(i);
    } else {
      past++;
    }
    past += saved[i].size();
    dp[i] += (i - past) * dep[i];
    for (auto u : saved[i]) {
      if (u == i) {
        dp[i] += ice[i];
      } else {
        long long cost = sum[i - 1] - sum[u - 1];
        dp[i] += (ice[u] - cost);
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    if (i != 1) {
      cout << " ";
    }
    cout << dp[i];
  }
  cout << endl;
  return 0;
}
