func_code_string: #include <bits/stdc++.h>   using namespace std;   int MOD;   struct Modint {     int val;     Modint(int nval = 0) { val = nval % MOD; }     Modint& operator+=(Modint r) {       val = (val + r.val) % MOD;       return *this;     }     Modint operator+(Modint r) { return Modint(*this) += r; }     Modint& operator-=(Modint r) {       val = (val + MOD - r.val) % MOD;       return *this;     }     Modint operator-(Modint r) { return Modint(*this) -= r; }     Modint& operator*=(Modint r) {       val = 1LL * val * r.val % MOD;       return *this;     }     Modint operator*(Modint r) { return Modint(*this) *= r; }   };   int main() {     int n, k;     cin >> n >> k >> MOD;     static Modint dp[1001][100];     static Modint from_end[1001];     from_end[0] = 1;     from_end[1] = 9;     for (int i = 2; i <= n; i++) {       from_end[i] = from_end[i - 1] * 10;     }     Modint result = 0;     for (int i = 1; i < 10; i++) {       dp[1][i % k] += 1;     }     int tpow = 10 % k;     for (int i = 1; i < n; i++) {       for (int s = 1; s < k; s++) {         for (int m = 0; m < 10; m++) {           dp[i + 1][(s + tpow * m) % k] += dp[i][s];         }       }       for (int m = 1; m < 10; m++) {         dp[i + 1][tpow * m % k] += 1;       }       tpow = (tpow * 10) % k;     }     for (int i = 1; i <= n; i++) {       result += dp[i][0] * from_end[n - i];     }     cout << result.val <<   n ;     return 0;   }   