#include <bits/stdc++.h>
using namespace std;
string s;
long long int k;
long long int dp[20][(1 << 10) + 5][2][2];
long long int cnt[2][20][(1 << 10) + 5][2][2];
long long int p[22];
long long int go(long long int pos, long long int mask, bool flg, bool prefix,
                 bool type) {
  if (pos == s.length()) {
    return dp[pos][mask][flg][prefix] = 0;
  }
  if (dp[pos][mask][flg][prefix] != -1) {
    return dp[pos][mask][flg][prefix];
  }
  long long int c_ans = 0;
  for (long long int d = 0; d <= 9; d++) {
    long long int c_mask = mask;
    if (!(d == 0 && prefix)) {
      c_mask |= (1ll << d);
    }
    long long int z = __builtin_popcount(c_mask);
    if (z <= k) {
      if (flg && d > (s[pos] - '0')) {
        continue;
      }
      long long int val = (d * p[s.length() - 1 - pos]) % 998244353ll;
      long long int val2 = cnt[type][pos + 1][c_mask]
                              [flg && (d == s[pos] - '0')][prefix && (d == 0)];
      val = (val * val2) % 998244353ll;
      c_ans = (c_ans + val) % 998244353ll;
      c_ans = (c_ans + go(pos + 1, c_mask, flg && (d == s[pos] - '0'),
                          prefix && (d == 0), type)) %
              998244353ll;
    }
  }
  return dp[pos][mask][flg][prefix] = c_ans;
}
long long int solve(long long int pos, long long int mask, bool flg,
                    bool prefix, bool type) {
  if (pos == s.length()) {
    return cnt[type][pos][mask][flg][prefix] = 1;
  }
  if (cnt[type][pos][mask][flg][prefix] != -1) {
    return cnt[type][pos][mask][flg][prefix];
  }
  long long int c_ans = 0;
  for (long long int d = 0; d <= 9; d++) {
    long long int c_mask = mask;
    if (!(d == 0 && prefix)) {
      c_mask |= (1ll << d);
    }
    long long int z = __builtin_popcount(c_mask);
    if (z <= k) {
      if (flg && d > (s[pos] - '0')) {
        continue;
      }
      c_ans = (c_ans + solve(pos + 1, c_mask, flg && (d == s[pos] - '0'),
                             prefix && (d == 0), type)) %
              998244353ll;
    }
  }
  return cnt[type][pos][mask][flg][prefix] = c_ans;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  p[0] = 1;
  for (long long int i = 1; i <= 20; i++) {
    p[i] = (p[i - 1] * 10ll) % 998244353ll;
  }
  long long int l, r;
  cin >> l >> r >> k;
  l--;
  memset(cnt, -1, sizeof(cnt));
  s = to_string(r);
  solve(0, 0, 1, 1, 0);
  s = to_string(l);
  solve(0, 0, 1, 1, 1);
  s = to_string(r);
  memset(dp, -1, sizeof(dp));
  long long int ans1 = go(0, 0, 1, 1, 0);
  s = to_string(l);
  memset(dp, -1, sizeof(dp));
  long long int ans2 = go(0, 0, 1, 1, 1);
  cout << (ans1 - ans2 + 998244353ll) % 998244353ll << "\n";
}
