func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     int n;     while (cin >> n) {       int arr[100005];       for (int i = 1; i <= n; i++) {         cin >> arr[i];       }       long long cnt = 0;       for (int i = 1; i < n; i++) {         long long x = log2(n - i);         arr[i + (1 << x)] += arr[i];         cnt += arr[i];         arr[i] = 0;         cout << cnt << endl;       }     }     return 0;   }   