func_code_string: #include <bits/stdc++.h>   using namespace std;   constexpr long long INF = 2e18;   constexpr long long MOD = 1e9 + 7;   constexpr long long MAXN = 2e5 + 3;   struct Matrix {     static constexpr long long MOD = 1e9 + 7;     static constexpr long long MAXN = 200, MAXM = 200;     array<array<long long, MAXM>, MAXN> mat = {};     long long n, m;     Matrix(const long long n, const long long m) : n(n), m(m) {}     static long long mod(long long n) {       n %= MOD;       if (n < 0) n += MOD;       return n;     }     Matrix identity() {       assert(n == m);       Matrix mat_identity(n, m);       for (long long i = 0; i < n; ++i) mat_identity.mat[i][i] = 1;       return mat_identity;     }     Matrix operator*(const Matrix &other) const {       assert(m == other.n);       Matrix ans(n, other.m);       for (long long i = 0; i < n; ++i)         for (long long j = 0; j < m; ++j)           for (long long k = 0; k < m; ++k)             ans.mat[i][j] = mod(ans.mat[i][j] + mat[i][k] * other.mat[k][j]);       return ans;     }     Matrix expo(long long p) {       assert(p >= 0);       Matrix ans = identity(), cur_power(n, m);       cur_power.mat = mat;       while (p) {         if (p & 1) ans = ans * cur_power;         cur_power = cur_power * cur_power;         p >>= 1;       }       return ans;     }   };   void solve() {     long long n;     cin >> n;     long long b, k, x;     cin >> b >> k >> x;     vector<long long> fq(10);     for (long long i = 0; i < n; ++i) {       long long x;       cin >> x;       ++fq[x];     }     Matrix mat(x, x);     for (long long j = 0; j < x; ++j)       for (long long d = 0; d <= 9; ++d) mat.mat[(10 * j + d) % x][j] += fq[d];     mat = mat.expo(b);     Matrix ini(x, 1);     ini.mat[0][0] = 1;     mat = mat * ini;     cout << mat.mat[k].front() <<   n ;   }   signed main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     long long t = 1;     while (t--) solve();   }   