#include <bits/stdc++.h>
using namespace std;
void read(long long &number) {
  bool negative = false;
  long long c;
  number = 0;
  c = getchar();
  while (c == ' ' || c == '\n') c = getchar();
  if (c == '-') {
    negative = true;
    c = getchar();
  }
  for (; (c > 47 && c < 58); c = getchar()) number = number * 10 + c - 48;
  if (negative) number = -number;
}
template <class T1, class T2>
ostream &operator<<(ostream &os, const pair<T1, T2> &a) {
  return os << '(' << a.first << ", " << a.second << ')';
}
template <class T>
ostream &operator<<(ostream &os, const vector<T> &a) {
  os << '[';
  for (unsigned long long i = 0; i < a.size(); i++)
    os << a[i] << (i < a.size() - 1 ? ", " : "");
  os << ']';
  return os;
}
template <class T>
ostream &operator<<(ostream &os, const set<T> &a) {
  os << '{';
  for (typename set<T>::iterator it = a.begin(); it != a.end(); it++) {
    typename set<T>::iterator jt = it;
    os << *it << (++jt != a.end() ? ", " : "");
  }
  os << '}';
  return os;
}
template <class T1, class T2>
ostream &operator<<(ostream &os, map<T1, T2> &a) {
  os << "{\n";
  for (typename map<T1, T2>::iterator it = a.begin(); it != a.end(); it++) {
    typename map<T1, T2>::iterator jt = it;
    os << "  " << it->first << ": " << it->second
       << (++jt != a.end() ? ",\n" : "\n");
  }
  os << '}';
  return os;
}
const long long mod = 998244353;
long long binPow(long long a, long long q) {
  long long ret = 1;
  while (q) {
    if (q & 1) ret = ret * a % mod;
    a = a * a % mod;
    q >>= 1LL;
  }
  return ret;
}
long long l, r, diff;
string L, R;
pair<long long, long long> dp[20][2][2][2][1024];
long long ans = 0;
pair<long long, long long> cal(long long pos, bool Lx, bool Rx, bool zer,
                               long long mask) {
  if (__builtin_popcountll(mask) > diff) return make_pair(0, 0);
  if (pos == R.size()) return make_pair(0, 1);
  auto &ret = dp[pos][Lx][Rx][zer][mask];
  if (ret.second != -1) return ret;
  ret = make_pair(0LL, 0LL);
  long long lo = 0, hi = 9;
  if (Lx) lo = L[pos] - '0';
  if (Rx) hi = R[pos] - '0';
  for (long long i = (long long)(lo); i <= (long long)(hi); i++) {
    long long nmask = mask;
    if (zer == 0 || (zer == 1 && i)) {
      nmask |= (1 << i);
    }
    auto rec = cal(pos + 1, min(Lx, i == lo), min(Rx, i == hi),
                   min(zer, (i == 0)), nmask);
    ret.second = (ret.second + rec.second) % mod;
    ret.first = (ret.first + rec.first +
                 binPow(10, R.size() - pos - 1) * i % mod * rec.second % mod) %
                mod;
  }
  return ret;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> l >> r >> diff;
  while (l) {
    L += char(l % 10 + '0');
    l /= 10;
  }
  while (r) {
    R += char(r % 10 + '0');
    r /= 10;
  }
  reverse(L.begin(), L.end());
  reverse(R.begin(), R.end());
  while (L.size() < R.size()) L = "0" + L;
  memset(dp, -1, sizeof(dp));
  cout << cal(0, 1, 1, 1, 0).first << '\n';
}
