#include <bits/stdc++.h>
using namespace std;
long long tpow[22], gsum[22][1111], gnum[22][1111];
long long l, r, k, Count[1111], sum[22][1111], num[22][1111];
const long long mod = 998244353;
void Init() {
  for (int i = 0; i < 1024; ++i) {
    int x = i;
    while (x) Count[i] += (x & 1), x >>= 1;
  }
  for (int i = 0; i <= 9; ++i) gsum[1][1 << i] += i, ++gnum[1][1 << i];
  for (int i = 2; i <= 19; ++i) {
    for (int d = 0; d <= 9; ++d)
      for (int st = 0; st < 1024; ++st) {
        gnum[i][st | (1 << d)] =
            (gnum[i][st | (1 << d)] + gnum[i - 1][st]) % mod;
        gsum[i][st | (1 << d)] =
            (gsum[i][st | (1 << d)] + gsum[i - 1][st] * 10 % mod +
             gnum[i - 1][st] * d % mod) %
            mod;
      }
  }
  for (int i = 1; i <= 9; ++i) sum[1][1 << i] += i, ++num[1][1 << i];
  for (int i = 2; i <= 19; ++i) {
    for (int d = 0; d <= 9; ++d)
      for (int st = 0; st < 1024; ++st) {
        num[i][st | (1 << d)] = (num[i][st | (1 << d)] + num[i - 1][st]) % mod;
        sum[i][st | (1 << d)] =
            (sum[i][st | (1 << d)] + sum[i - 1][st] * 10 % mod +
             num[i - 1][st] * d % mod) %
            mod;
      }
  }
  tpow[0] = 1;
  for (int i = 1; i <= 19; ++i) tpow[i] = tpow[i - 1] * 10 % mod;
  num[0][0] = 1;
  gnum[0][0] = 1;
}
long long str[22];
long long solve(long long x) {
  if (!x) return 0;
  long long st = 0, len = 0, ans = 0, pre = 0, xx = x;
  while (x) str[++len] = x % 10, x /= 10;
  for (int i = len; i; --i) {
    for (int j = 0; j < 1024; ++j)
      for (int d = 0; d < str[i]; ++d)
        if (i != len || d != 0)
          if (Count[st | j | (1 << d)] <= k)
            ans = (ans +
                   (pre * 10 % mod + d) % mod * tpow[i - 1] % mod *
                       gnum[i - 1][j] % mod +
                   gsum[i - 1][j]) %
                  mod;
    st |= (1 << str[i]);
    pre = (pre * 10 % mod + str[i]) % mod;
  }
  if (Count[st] <= k) ans = (ans + xx) % mod;
  for (int i = len - 1; i; --i)
    for (int j = 0; j < 1024; ++j)
      if (Count[j] <= k) ans = (ans + sum[i][j]) % mod;
  return ans;
}
int main() {
  Init();
  cin >> l >> r >> k;
  cout << ((solve(r) - solve(l - 1)) % mod + mod) % mod << endl;
  return 0;
}
