func_code_string: #include <bits/stdc++.h>   using namespace std;   int n, k, pos;   long long a[200005], sum[200005], ans;   vector<long long> vec;   int main() {     cin.tie(0), ios::sync_with_stdio(0);     cin >> n >> k;     for (int i = 1; i <= n; i++) {       cin >> a[i];       sum[i] = a[i];       sum[i] += sum[i - 1];       if (a[i] > 1) vec.push_back(i);     }     a[n + 1] = 1;     vec.push_back(n + 1);     for (int i = 1; i <= n; i++) {       pos = i;       long long tich = a[i];       while (1) {         int it = lower_bound(vec.begin(), vec.end(), pos + 1) - vec.begin();         int l = pos, r = vec[it] - 1, mid;         if (tich % k == 0) {           long long val = tich / k;           while (l < r) {             mid = (l + r) / 2;             if (sum[mid] - sum[i - 1] >= val)               r = mid;             else               l = mid + 1;           }           if (l >= pos && sum[l] - sum[i - 1] == val) {             ans++;           }         }         long long amount = LLONG_MAX / a[vec[it]];         if (tich >= amount) break;         tich *= a[vec[it]];         pos = vec[it];         if (pos == n + 1) break;       }     }     cout << ans;   }   