#include <bits/stdc++.h>
using namespace std;
const long long mod = 998244353;
long long k, i, j, x, dp[21][1024][2], sum[21][1024][2];
long long f(long long x) { return (1LL << x); }
long long calc(long long x) {
  vector<long long> now;
  do {
    now.push_back(x % 10);
    x /= 10;
  } while (x > 0);
  reverse(now.begin(), now.end());
  long long ans = 0;
  for (long long SZ = 1; SZ <= now.size(); ++SZ) {
    for (i = 1; i <= SZ; ++i)
      for (j = 1; j < 1024; ++j)
        for (x = 0; x < 2; ++x) dp[i][j][x] = 0, sum[i][j][x] = 0;
    if (SZ == now.size()) {
      for (i = 1; i <= 9; ++i) {
        if (i < now[0]) dp[1][f(i)][0] = 1, sum[1][f(i)][0] = i;
        if (i == now[0]) dp[1][f(i)][1] = 1, sum[1][f(i)][1] = i;
      }
    } else {
      for (i = 1; i <= 9; ++i) {
        dp[1][f(i)][0] = 1;
        sum[1][f(i)][0] = i;
      }
    }
    for (i = 1; i < SZ; ++i) {
      for (j = 1; j < 1024; ++j) {
        for (x = 0; x <= 9; ++x) {
          long long mask = j | f(x);
          if (__builtin_popcount(mask) <= k) {
            dp[i + 1][mask][0] = (dp[i][j][0] + dp[i + 1][mask][0]) % mod;
            sum[i + 1][mask][0] =
                (sum[i][j][0] * 10LL + sum[i + 1][mask][0] + dp[i][j][0] * x) %
                mod;
            if (x < now[i]) {
              dp[i + 1][mask][0] = (dp[i][j][1] + dp[i + 1][mask][0]) % mod;
              sum[i + 1][mask][0] = (sum[i][j][1] * 10LL + sum[i + 1][mask][0] +
                                     dp[i][j][1] * x) %
                                    mod;
            }
            if (x == now[i]) {
              dp[i + 1][mask][1] = (dp[i][j][1] + dp[i + 1][mask][1]) % mod;
              sum[i + 1][mask][1] = (sum[i][j][1] * 10LL + sum[i + 1][mask][1] +
                                     dp[i][j][1] * x) %
                                    mod;
            }
          }
        }
      }
    }
    for (i = 1; i <= 1024; ++i)
      for (j = 0; j < 2; ++j) ans = (ans + sum[SZ][i][j]) % mod;
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0);
  long long l, r;
  cin >> l >> r >> k;
  long long ans = (calc(r) - calc(l - 1) + mod) % mod;
  long long real_ans = 0;
  cout << ans << endl;
}
