func_code_string: #include <bits/stdc++.h>   using namespace std;   int n, k, tot, arr[105], sum[100050][105], a[100050], s[105];   bool Solved(int x, int y) {     for (int i = 1; i <= tot; ++i)       if (sum[y][i] - sum[x - 1][i] < s[i]) return false;     return true;   }   int main() {     long long ans;     scanf( %d%d , &n, &k);     for (int i = 1; i <= n; ++i) scanf( %d , &a[i]);     int t = k;     for (int i = 2; i * i <= t; ++i)       if (t % i == 0) {         arr[++tot] = i;         for (; t % i == 0; t /= i) s[tot]++;       }     if (t > 1) arr[++tot] = t, s[tot] = 1;     for (int i = 1; i <= n; ++i)       for (int j = 1; j <= tot; ++j)         for (; a[i] % arr[j] == 0; a[i] /= arr[j]) sum[i][j]++;     for (int i = 1; i <= n; ++i)       for (int j = 1; j <= tot; ++j) sum[i][j] += sum[i - 1][j];     ans = 0;     for (int i = 1, L, R, mid; i <= n; ++i) {       L = i - 1;       R = n + 1;       while (L + 1 < R) {         mid = (L + R) / 2;         if (Solved(i, mid))           R = mid;         else           L = mid;       }       ans += n - R + 1;     }     cout << ans;     return 0;   }   