#include <bits/stdc++.h>
inline long long read() {
  long long x = 0;
  char ch = getchar(), w = 1;
  while (ch < '0' || ch > '9') {
    if (ch == '-') w = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * w;
}
void write(long long x) {
  if (x < 0) putchar('-'), x = -x;
  if (x > 9) write(x / 10);
  putchar(x % 10 + '0');
}
inline void writeln(long long x) {
  write(x);
  puts("");
}
using namespace std;
const long long mo = 998244353;
pair<long long, long long> f[20][1 << 10];
int K;
int cnt[1 << 11];
int num[20], tot;
long long bin[1 << 20];
pair<long long, long long> dfs(int len, int s, bool limit, bool zero) {
  if (!zero && !limit && ~f[len][s].first) return f[len][s];
  pair<long long, long long> res;
  if (len == 1) {
    int mx = limit ? num[len] : 9;
    for (int i = 0; i <= mx; ++i) {
      int t = s;
      if (!zero || zero && i) t |= (1 << i);
      if (cnt[t] > K) continue;
      ++res.second;
      res.first += i;
    }
    if (!zero && !limit) f[len][s] = res;
    return res;
  }
  int mx = limit ? num[len] : 9;
  for (int i = 0; i <= mx; ++i) {
    int t = s;
    if (!zero || zero && i) t |= (1 << i);
    if (cnt[t] > K) continue;
    pair<long long, long long> now =
        dfs(len - 1, t, limit && i == mx, zero && i == 0);
    res.first += now.second * bin[len] % mo * i % mo + now.first;
    res.first %= mo;
    res.second += now.second;
    res.second %= mo;
  }
  if (!zero && !limit) f[len][s] = res;
  return res;
}
long long cal(long long x) {
  tot = 0;
  memset(f, -1, sizeof f);
  while (x > 0) {
    num[++tot] = x % 10;
    x /= 10;
  }
  num[tot + 1] = 0;
  return dfs(tot + 1, 0, 1, 1).first;
}
int main() {
  for (int i = 1; i <= 1024; ++i) cnt[i] = cnt[i >> 1] + (i & 1);
  bin[0] = 0;
  bin[1] = 1;
  for (int i = 2; i <= 18; ++i) bin[i] = bin[i - 1] * 10 % mo;
  long long l = read(), r = read();
  K = read();
  writeln((cal(r) - cal(l - 1) + mo) % mo);
  return 0;
}
