func_code_string: #include <bits/stdc++.h>   using namespace std;   int n, m, a[101];   void read(int &x) {     char ch;     x = 0;     while (!isdigit(ch = getchar()))       ;     while (isdigit(ch)) {       x = x * 10 + ch -  0 ;       ch = getchar();     }   }   void init() {     read(n), read(m);     for (int i = 1; i <= n; ++i) read(a[i]);   }   void work() {     int ans = 1, now = 0;     for (int i = 1; i <= n; ++i) {       now += a[i];       if (now > m) {         ans++;         now = a[i];       }     }     printf( %d n , ans);   }   int main() {     init();     work();     return 0;   }   