#include <bits/stdc++.h>
using namespace std;
const int maxn = 1024;
using ll = long long;
int sum[maxn];
ll pow_of_ten[25];
const ll mod = 998244353;
ll digit[20];
pair<ll, ll> dp[25][maxn][15];
int get_digit_number(int now) {
  int res = 0;
  while (now) {
    if (now & 1) {
      res += 1;
    }
    now >>= 1;
  }
  return res;
}
pair<ll, ll> dfs(int now, bool flag, int ds, int k, bool zero) {
  if (!flag && dp[now][ds][k].first != -1 && dp[now][ds][k].second != -1) {
    return dp[now][ds][k];
  }
  if (!now) {
    pair<ll, ll> pa;
    if (sum[ds] <= k) {
      pa.first = 1;
      pa.second = 0;
      return pa;
    }
    pa.first = pa.second = 0;
    return pa;
  }
  int up;
  if (flag) {
    up = digit[now];
  } else
    up = 9;
  ll number = 0, sum = 0;
  for (int i = 0; i <= up; i++) {
    int nz = zero;
    if (i) {
      nz = 1;
    }
    int nds = ds;
    if (nz) {
      nds |= (1 << i);
    }
    pair<ll, ll> next_digit = dfs(now - 1, flag && (i == up), nds, k, nz);
    number = (number + next_digit.first) % mod;
    sum = (sum + (i * pow_of_ten[now - 1] % mod * next_digit.first % mod) +
           next_digit.second) %
          mod;
  }
  if (!flag) {
    dp[now][ds][k].first = number;
    dp[now][ds][k].second = sum;
  }
  return make_pair(number, sum);
}
ll getans(ll num, ll k) {
  if (num == 0) {
    return 0;
  }
  int cnt = 0;
  while (num) {
    digit[++cnt] = num % 10;
    num /= 10;
  }
  return dfs(cnt, 1, 0, k, 0).second;
}
void init() {
  for (int i = 0; i < maxn; i++) {
    sum[i] = get_digit_number(i);
  }
  pow_of_ten[0] = 1;
  for (int i = 1; i < 25; i++) {
    pow_of_ten[i] = pow_of_ten[i - 1] * 10 % mod;
  }
  for (int i = 0; i < 25; i++) {
    for (int j = 0; j < maxn; j++) {
      for (int k = 0; k <= 10; k++) {
        dp[i][j][k].first = dp[i][j][k].second = -1;
      }
    }
  }
}
int main() {
  ll l, r, k;
  init();
  scanf("%lld%lld%lld", &l, &r, &k);
  printf("%lld\n", (getans(r, k) - getans(l - 1, k) + mod) % mod);
}
