#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline bool upmin(T &x, T y) {
  return y < x ? x = y, 1 : 0;
}
template <typename T>
inline bool upmax(T &x, T y) {
  return x < y ? x = y, 1 : 0;
}
const long double eps = 1e-11;
const long double pi = acos(-1);
const int oo = 1 << 30;
const long long loo = 1ll << 62;
const int mods = 998244353;
const int MAXN = 5000005;
const int INF = 0x3f3f3f3f;
inline long long read() {
  long long f = 1, x = 0;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = (x << 3) + (x << 1) + (c ^ 48);
    c = getchar();
  }
  return x * f;
}
int f[20][1024][2], g[20][1024][2];
int upd(int x, int y) { return x + y >= mods ? x + y - mods : x + y; }
void Upd(int &x, int y) { x = upd(x, y); }
int solve(long long x, long long k) {
  if (x < 1) return 0;
  memset(f, 0, sizeof f);
  memset(g, 0, sizeof g);
  int a[20], num = 0;
  while (x) a[++num] = x % 10, x /= 10;
  for (int i = 1; i <= a[num]; i++)
    f[num][1 << i][i == a[num]] = 1, g[num][1 << i][i == a[num]] = i;
  for (int i = num; i >= 2; i--) {
    for (int j = 0; j <= 9; j++)
      for (int t = 0; t < 1024; t++) {
        Upd(f[i - 1][t | (1 << j)][0], f[i][t][0]),
            Upd(g[i - 1][t | (1 << j)][0],
                (10ll * g[i][t][0] + 1ll * f[i][t][0] * j) % mods);
        if (j < a[i - 1])
          Upd(f[i - 1][t | (1 << j)][0], f[i][t][1]),
              Upd(g[i - 1][t | (1 << j)][0],
                  (10ll * g[i][t][1] + 1ll * f[i][t][1] * j) % mods);
        if (j == a[i - 1])
          Upd(f[i - 1][t | (1 << j)][1], f[i][t][1]),
              Upd(g[i - 1][t | (1 << j)][1],
                  (10ll * g[i][t][1] + 1ll * f[i][t][1] * j) % mods);
      }
    for (int j = 1; j <= 9; j++)
      Upd(f[i - 1][(1 << j)][0], 1), Upd(g[i - 1][(1 << j)][0], j);
  }
  int ans = 0;
  for (int i = 0; i < 1024; i++)
    if (__builtin_popcount(i) <= k) Upd(ans, upd(g[1][i][0], g[1][i][1]));
  return ans;
}
signed main() {
  long long l = read(), r = read(), k = read();
  printf("%d\n", upd(solve(r, k), mods - solve(l - 1, k)));
  return 0;
}
