func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     long long n, h, k, i, j, a[100100], pkp = 0, tmp, p, ans = 0;     double d;     scanf( %lld %lld %lld , &n, &h, &k);     for (i = 0; i < n; i++) scanf( %lld , &a[i]);     for (i = 0; i < n; i++) {       if (pkp + a[i] <= h) {         pkp += a[i];       } else {         tmp = h - a[i];         p = pkp - tmp;         d = ceil((double)p / (double)k);         ans += (long long)d;         pkp -= d * k;         if (pkp < 0) pkp = 0;         pkp += a[i];       }     }     d = ceil((double)pkp / (double)k);     ans += (long long)d;     printf( %lld n , ans);     return 0;   }   