#include <bits/stdc++.h>
using namespace std;
const long long MOD = (long long)998244353;
const long double PI = 3.141592653589793238462643383279502884197;
long long fac[1] = {1}, inv[1] = {1};
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long mp(long long a, long long b) {
  long long ret = 1;
  while (b) {
    if (b & 1) ret = ret * a % MOD;
    a = a * a % MOD;
    b >>= 1;
  }
  return ret;
}
long long cmb(long long r, long long c) {
  return fac[r] * inv[c] % MOD * inv[r - c] % MOD;
}
priority_queue<int, vector<int>, greater<int>> pq;
vector<int> v;
long long rotn[19][3][2][1024];
long long dp[19][3][2][1024];
long long two[19];
char s[19];
int n;
int k;
long long aa = 0;
long long ggo(int o, int ti, int ff, int bit) {
  if (o >= n) return 0;
  if (o == -1) {
    int cnt = __builtin_popcount(bit);
    return ti <= 1 && cnt <= k;
  }
  if (rotn[o][ti][ff][bit] != -1) return rotn[o][ti][ff][bit];
  long long ret = 0;
  for (int i = ff; i < 10; i++) {
    int ne = ti;
    if (ti == 1) {
      if (i > s[o])
        ne = 2;
      else if (i < s[o])
        ne = 0;
    }
    ret += ggo(o - 1, ne, 0, bit | (1 << i));
    aa %= MOD;
  }
  return rotn[o][ti][ff][bit] = ret % MOD;
}
long long cal(long long a) {
  n = 0;
  aa = 0;
  while (a) {
    s[n++] = a % 10;
    a /= 10;
  }
  memset(rotn, -1, sizeof(rotn));
  memset(dp, 0, sizeof(dp));
  long long ret = 0;
  for (int o = n - 1; o >= 0; o--) {
    dp[o][o == n - 1][1][0] = 1;
    for (int ti = 0; ti < 3; ti++) {
      for (int ff = 0; ff < 2; ff++) {
        for (int bit = 0; bit < 1024; bit++) {
          for (int i = ff; i < 10; i++) {
            int ne = ti;
            if (ti == 1) {
              if (i > s[o])
                ne = 2;
              else if (i < s[o])
                ne = 0;
            }
            if (o)
              dp[o - 1][ne][0][bit | (1 << i)] =
                  (dp[o][ti][ff][bit] + dp[o - 1][ne][0][bit | (1 << i)]) % MOD;
            ret += ggo(o - 1, ne, 0, bit | (1 << i)) * dp[o][ti][ff][bit] %
                   MOD * two[o] % MOD * i % MOD;
            ret %= MOD;
          }
        }
      }
    }
  }
  return ret;
}
int main() {
  two[0] = 1;
  for (int i = 1; i < 19; i++) two[i] = two[i - 1] * 10 % MOD;
  long long l, r;
  scanf("%lld %lld %d", &l, &r, &k);
  printf("%lld\n", (cal(r) - cal(l - 1) + MOD) % MOD);
}
