func_code_string: #include <bits/stdc++.h>   using namespace std;   const double EPS = 1e-8;   const int mod = 1e9 + 7;   const int N = 1e6 + 10;   const long long INF = 1e18;   long long power(long long x, long long y) {     long long t = 1;     while (y > 0) {       if (y % 2)         y -= 1, t = t * x % mod;       else         y /= 2, x = x * x % mod;     }     return t;   }   long long I[100][100], temp[100][100], M[100][100], store[100][100];   void copyM(long long M1[][100], long long M2[][100], int m) {     for (int i = 0; i < m; ++i) {       for (int j = 0; j < m; ++j) {         M2[i][j] = M1[i][j];       }     }   }   void matmul(long long M1[][100], long long M2[][100], int m) {     for (int i = 0; i < m; ++i) {       for (int j = 0; j < m; ++j) {         temp[i][j] = 0;         for (int k = 0; k < m; ++k)           temp[i][j] = (temp[i][j] + (M2[i][k] * M1[k][j]) % mod) % mod;       }     }   }   void setI(int m) {     for (int i = 0; i < m; ++i) {       for (int j = 0; j < m; ++j) {         if (i != j)           I[i][j] = 0;         else           I[i][j] = 1;       }     }   }   void powerM(long long M1[][100], int m, long long n) {     setI(m);     while (n > 0) {       if (n % 2 == 0) {         matmul(M1, M1, m);         copyM(temp, M1, m);         n /= 2;       } else {         matmul(M1, I, m);         copyM(temp, I, m);         n -= 1;       }     }   }   long long t[105];   int main() {     int n, b, k, x;     scanf( %d%d%d%d , &n, &b, &k, &x);     memset(M, 0, sizeof(M));     for (int i = 0; i < n; ++i) {       int p;       scanf( %d , &p);       p %= x;       t[p]++;     }     for (int i = 0; i < x; ++i)       for (int j = 0; j < x; ++j) {         M[i][(i * 10 + j) % x] += t[j];       }     powerM(M, x, b);     printf( %lld n , I[0][k]);     return 0;   }   