func_code_string: #include <bits/stdc++.h>   using namespace std;   long long MOD = 1000000007;   const int MAXN = 107;   int A[50007];   int F[107][107];   unsigned long long b[107][107];   struct matrix {     int n, m;     int arr[MAXN][MAXN];     matrix() {}     matrix(int x, int y, int V = 0) {       n = x;       m = y;       for (int j = 0; j < n; j++)         for (int i = 0; i < m; i++) arr[j][i] = V;     }     matrix(int x, int y, int A[MAXN][MAXN]) {       n = x;       m = y;       for (int j = 0; j < n; j++)         for (int i = 0; i < m; i++) arr[j][i] = A[j][i];     }     matrix operator*(matrix &mat) {       matrix res(n, mat.m, 0);       long long theta;       for (int j = 0; j < n; j++) {         for (int i = 0; i < mat.m; i++) {           theta = 0;           for (int k = 0; k < m; k++) {             theta += 1ll * arr[j][k] * mat.arr[k][i];             theta %= MOD;           }           res.arr[j][i] = theta;         }       }       return res;     }     matrix power(long long K) {       matrix res(n, m, 0), b(n, m, 0);       for (int j = 0; j < n; j++) res.arr[j][j] = 1;       b = (*this);       while (K > 0) {         if ((K & 1)) res = res * b;         K /= 2;         b = b * b;       }       return res;     }   };   int main() {     int n, k, x;     unsigned long long b;     cin >> n >> b >> k >> x;     for (int i = 0; i < n; i++) cin >> A[i];     for (int j = 0; j < x; j++)       for (int i = 0; i < n; i++) F[j][(j * 10 + A[i]) % x]++;     matrix M(x, x, F);     matrix B(x, x, 0);     B = M.power(b);     cout << B.arr[0][k] << endl;     return 0;   }   