#include <bits/stdc++.h>
using namespace std;
const int mod = 998244353;
long long pot[20];
int x;
pair<long long, long long> memo[20][2][1024][2];
bool seen[20][2][1024][2];
int get_pot_idx(int cur, string& a) {
  int la = a.size();
  return la - 1 - cur;
}
pair<long long, long long> solve(string& a, int idx, int top, int mask, int z) {
  if (idx == a.size()) return {__builtin_popcount(mask) <= x, 0};
  if (seen[idx][top][mask][z]) return memo[idx][top][mask][z];
  long long ans = 0, ways = 0;
  int lim = (top) ? (a[idx] - '0') : 9;
  for (int i = 0; i <= lim; ++i) {
    int nz = z | i != 0;
    int tmask = nz ? (mask | (1 << i)) : mask;
    pair<long long, long long> anst =
        solve(a, idx + 1, top && i == lim, tmask, nz);
    long long wayst = anst.first;
    long long accu = anst.second % mod;
    long long newans =
        (((wayst * i) % mod) * (pot[get_pot_idx(idx, a)] % mod)) % mod;
    ans = ((ans + newans) % mod + accu) % mod;
    ways += wayst;
  }
  seen[idx][top][mask][z] = true;
  return memo[idx][top][mask][z] = {ways, ans};
}
int main() {
  pot[0] = 1;
  for (int i = 1; i < 19; ++i) {
    pot[i] = pot[i - 1] * 10;
  }
  long long a, b;
  while (cin >> a >> b >> x) {
    a--;
    stringstream ss;
    ss << a << " " << b;
    string aa, bb;
    ss >> aa >> bb;
    memset(seen, 0, sizeof seen);
    long long at = solve(aa, 0, 1, 0, 0).second;
    memset(seen, 0, sizeof seen);
    long long bt = solve(bb, 0, 1, 0, 0).second;
    cout << (bt - at + mod) % mod << endl;
  }
  return 0;
}
