func_code_string: #include <bits/stdc++.h>   using namespace std;   using namespace std;   const long long MOD = 1000000007;   vector<vector<long long> > matrix_mul(vector<vector<long long> > a,                                         vector<vector<long long> > b) {     vector<vector<long long> > c(a.size(), vector<long long>(b[0].size()));     for (int i = 0; i < a.size(); i++)       for (int j = 0; j < b[0].size(); j++)         for (int k = 0; k < b.size(); k++) {           c[i][j] += (a[i][k] * b[k][j]) % MOD;           c[i][j] %= MOD;         }     return c;   }   vector<vector<long long> > matrix_pow(vector<vector<long long> > a,                                         long long p) {     if (p == 1) return a;     if (p % 2 == 1) return matrix_mul(a, matrix_pow(a, p - 1));     vector<vector<long long> > c = matrix_pow(a, p / 2);     return matrix_mul(c, c);   }   int N, B, K, X;   long long occ[10];   int main() {     cin >> N >> B >> K >> X;     for (int i = 0; i < N; i++) {       int d;       cin >> d;       occ[d]++;     }     vector<long long> f(X);     f[0] = 1;     vector<vector<long long> > T(X);     for (int i = 0; i < X; i++) {       T[i] = vector<long long>(X);     }     for (int i = 0; i < X; i++) {       for (int d = 1; d <= 9; d++)         if (occ[d]) {           int a = (i * 10 + d) % X;           T[a][i] += occ[d];         }     }     T = matrix_pow(T, B);     long long res = 0;     res = (T[K][0] * f[0] % MOD) % MOD;     cout << res << endl;   }   