/*
 Sarthak Jain
*/
#include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define int long long
int mod=998244353;
int min(int a,int b){
    return (a<b)?a:b;
}
int max(int a,int b){
    return (a>b)?a:b;
}
int fp(int a,int b){
    if(b==0) return 1;
    int x=fp(a,b/2);
    x=(x*x)%mod;
    if(b&1) x=(x*a)%mod;
    return x;
}
/*
 ar[0 - 9]
 ar[10] pos
 ar[11] f
 ar[12] val

*/
int k;
vector<int> d;
vector<array<int,2>> mp(50000);
array<int,2> digit(array<int,12> ar)
{
    if(ar[10]==d.size())
    {
      //cout<<"H";
      int ct=0;
      for(int i=0;i<=9;i++)
      {
        if(ar[i]>0)
            ct++;
      }
      if(ct<=k)
      {
        return {1,0};
      }
      return {0,0};
    }
    int num=0,bit=1;
    for(int i=0;i<12;i++)
    {
      num+=ar[i]*bit;
      bit<<=1;
    }

    if(num>=50000)
    {
      cout<<num<<endl;
      return {0,0};
    }
    if(mp[num][0]!=-1)
    return mp[num];
    int lmt=9;
    if(ar[11]==0)
    {
      lmt=d[ar[10]];
    }
    int sum=0,ans=0;
    for(int i=0;i<=lmt;i++)
    {
        array<int,12> nar=ar;
        if(i<lmt)
        {
            nar[11]=1;
        }
        nar[i]=1;
        nar[10]++;
        int ct=0;
        for(int j=0;j<10;j++)
        {
            if(nar[j]>0)
                ct++;
        }
        if(ct==1&&nar[0]>0)
        {
           nar[0]=0;
        }
        int x=(fp(10,d.size()-ar[10]-1)*i)%mod;
        array<int,2> res=digit(nar);
        sum=(sum+res[0])%mod;
        ans=(ans+res[1])%mod;
        ans=(ans+x*res[0])%mod;
    }
  //  cout<<ar[10]<<" "<<sum<<endl;
    mp[num]={sum,ans};
    return {sum,ans};
}

int solve(int n)
{
    for(int i=0;i<50000;i++)
    {
      mp[i][0]=-1;
      mp[i][1]=-1;
    }
    if(n==0)
        return 0;
    d.clear();
    while(n>0)
    {
        d.push_back(n%10);
        n/=10;
    }
    reverse(d.begin(),d.end());
    array<int,12> ar;
    for(int i=0;i<12;i++)
      ar[i]=0;
   int x=digit(ar)[1];
//   cout<<n<<" "<<ans<<endl;
   return x;
}

signed main() {
 ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
 int l,r;

 cin>>l>>r>>k;
 int sum=solve(r)-solve(l-1);
 sum=(sum+mod)%mod;
 cout<<sum<<endl;
// sum=solve(l-1);
 //cout<<sum<<endl;
}


/*
 Sarthak Jain
*/
#include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define int long long
int mod=998244353;
int min(int a,int b){
    return (a<b)?a:b;
}
int max(int a,int b){
    return (a>b)?a:b;
}
int fp(int a,int b){
    if(b==0) return 1;
    int x=fp(a,b/2);
    x=(x*x)%mod;
    if(b&1) x=(x*a)%mod;
    return x;
}
/*
 ar[0 - 9]
 ar[10] pos
 ar[11] f
 ar[12] val

*/
int k;
vector<int> d;
map<array<int,12>,array<int,2>> mp;
array<int,2> digit(array<int,12> ar)
{
    if(ar[10]==d.size())
    {
      //cout<<"H";
      int ct=0;
      for(int i=0;i<=9;i++)
      {
        if(ar[i]>0)
            ct++;
      }
      if(ct<=k)
      {
        return {1,0};
      }
      // cout<<ar[11]<<"\n";
      // for (int i = 0; i <=9; ++i)
      // {
      //   cout<<ar[i]<<" ";
      //     /* code */
      // }
      // cout<<endl;
      return {0,0};
    }
    if(mp.find(ar)!=mp.end())
    return mp[ar];
    int lmt=9;
    if(ar[11]==0)
    {
      lmt=d[ar[10]];
    }
    int sum=0,ans=0;
    for(int i=0;i<=lmt;i++)
    {
        array<int,12> nar=ar;
        if(i<lmt)
        {
            nar[11]=1;
        }
        nar[i]++;
        nar[10]++;
        int ct=0;
        for(int j=0;j<10;j++)
        {
            if(nar[j]>0)
                ct++;
        }
        if(ct==1&&nar[0]>0)
        {
           nar[0]=0;
        }
        int x=(fp(10,d.size()-ar[10]-1)*i)%mod;
        array<int,2> res=digit(nar);
        sum+=res[0];
        ans=(ans+res[1])%mod;
        ans=(ans+x*res[0])%mod;
    }
  //  cout<<ar[10]<<" "<<sum<<endl;
    mp[ar]={sum,ans};
    return {sum,ans};
}

int solve(int n)
{
    mp.clear();
    if(n==0)
        return 0;
    d.clear();
    while(n>0)
    {
        d.push_back(n%10);
        n/=10;
    }
    reverse(d.begin(),d.end());
    array<int,12> ar;
    for(int i=0;i<12;i++)
      ar[i]=0;
    // for(auto i:d)
    // {
    //     cout<<i<<" ";
    // }
    // cout<<endl;

   int x=digit(ar)[1];
//   cout<<n<<" "<<ans<<endl;
   return x;
}

signed main() {
 ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
 int l,r;

 cin>>l>>r>>k;
 int sum=solve(r)-solve(l-1);
 cout<<sum<<endl;
// sum=solve(l-1);
 //cout<<sum<<endl;
}


/*
 Sarthak Jain
*/
#include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define int long long
int mod=998244353;
int min(int a,int b){
    return (a<b)?a:b;
}
int max(int a,int b){
    return (a>b)?a:b;
}
int fp(int a,int b){
    if(b==0) return 1;
    int x=fp(a,b/2);
    x=(x*x)%mod;
    if(b&1) x=(x*a)%mod;
    return x;
}
/*
 ar[0 - 9]
 ar[10] pos
 ar[11] f
 ar[12] val

*/
int k;
vector<int> d;
int mp[21][2][5000][2];
array<int,2> digit(int pos,int f,int mask)
{
      int tmpmask=mask;
      int ct=0;
      while(tmpmask>0)
      {
        if(tmpmask&1)
          ct++;
        tmpmask>>=1;
      }
      if(ct>k)
        return {0,0};

    if(pos==d.size())
    {
        return {1,0};
    }

    if(mp[pos][f][mask][0]!=-1)
    return {mp[pos][f][mask][0],mp[pos][f][mask][1]};
    int lmt=9;
    if(f==0)
    {
      lmt=d[pos];
    }
    int sum=0,ans=0;
    for(int i=0;i<=lmt;i++)
    {
        int nf=f;
        int nmask=mask;
        int npos=pos+1;
        if(i<lmt)
        {
            nf=1;
        }
        if(!(mask==0&&i==0))
        {
           nmask|=(1ll<<i);
        }

        int x=(fp(10,d.size()-pos-1)*i)%mod;
        array<int,2> res=digit(npos,nf,nmask);
        sum=(sum+res[0])%mod;
        ans=(ans+res[1])%mod;
        ans=(ans+(x*res[0]))%mod%mod;
    }

  //  cout<<ar[10]<<" "<<sum<<endl;
    mp[pos][f][mask][0]=sum;
    mp[pos][f][mask][1]=ans;
    return {sum,ans};
}

int solve(int n)
{
    memset(mp,-1,sizeof(mp));
    if(n==0)
        return 0;
    d.clear();
    while(n>0)
    {
        d.push_back(n%10);
        n/=10;
    }
    reverse(d.begin(),d.end());

   int x=digit(0,0,0)[1];

   return x;
}

signed main() {
 ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
 int l,r;

 cin>>l>>r>>k;
 int sum=solve(r)-solve(l-1);
 sum=(sum+mod)%mod;
 cout<<sum<<endl;
}


/*
 Sarthak Jain
*/
#include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define int long long
int mod=998244353;
int min(int a,int b){
    return (a<b)?a:b;
}
int max(int a,int b){
    return (a>b)?a:b;
}
int fp(int a,int b){
    if(b==0) return 1;
    int x=fp(a,b/2);
    x=(x*x)%mod;
    if(b&1) x=(x*a)%mod;
    return x;
}
/*
 ar[0 - 9]
 ar[10] pos
 ar[11] f
 ar[12] val

*/
int k;
vector<int> d;
int mp[21][2][5000][2];
array<int,2> digit(int pos,int f,int mask)
{
    if(pos==d.size())
    {
      int ct=0;
      while(mask>0)
      {
        if(mask&1)
          ct++;
        mask>>=1;
      }
      if(ct<=k)
      {
        return {1,0};
      }
      return {0,0};
    }

    if(mp[pos][f][mask][0]!=-1)
    return {mp[pos][f][mask][0],mp[pos][f][mask][1]};
    int lmt=9;
    if(f==0)
    {
      lmt=d[pos];
    }
    int sum=0,ans=0;
    for(int i=0;i<=lmt;i++)
    {
        int nf=f;
        int nmask=mask;
        int npos=pos+1;
        if(i<lmt)
        {
            nf=1;
        }
        nmask|=(1ll<<i);
        int x=(fp(10,d.size()-pos-1)*i)%mod;
        array<int,2> res=digit(npos,nf,nmask);
        sum=(sum+res[0])%mod;
        ans=(ans+res[1])%mod;
        ans=(ans+x*res[0])%mod;
    }
  //  cout<<ar[10]<<" "<<sum<<endl;
    mp[pos][f][mask][0]=sum;
    mp[pos][f][mask][1]=ans;
    return {sum,ans};
}

int solve(int n)
{
    memset(mp,-1,sizeof(mp));
    if(n==0)
        return 0;
    d.clear();
    while(n>0)
    {
        d.push_back(n%10);
        n/=10;
    }
    reverse(d.begin(),d.end());

   int x=digit(0,0,0)[1];

   return x;
}

signed main() {
 ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
 int l,r;

 cin>>l>>r>>k;
 int sum=solve(r)-solve(l-1);
 sum=(sum+mod)%mod;
 cout<<sum<<endl;
}


/*
 Sarthak Jain
*/
#include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define int long long
int mod=998244353;
int min(int a,int b){
    return (a<b)?a:b;
}
int max(int a,int b){
    return (a>b)?a:b;
}
int fp(int a,int b){
    if(b==0) return 1;
    int x=fp(a,b/2);
    x=(x*x)%mod;
    if(b&1) x=(x*a)%mod;
    return x;
}
/*
 ar[0 - 9]
 ar[10] pos
 ar[11] f
 ar[12] val

*/
int k;
vector<int> d;
vector<vector<array<int,2>>> mp(21,vector<array<int,2>>(50000));
array<int,2> digit(array<int,12> ar)
{
    if(ar[10]==d.size())
    {
      int ct=0;
      for(int i=0;i<=9;i++)
      {
        if(ar[i]>0)
            ct++;
      }
      if(ct<=k)
      {
        return {1,0};
      }
      return {0,0};
    }
    int num=0,bit=1;
    for(int i=0;i<10;i++)
    {
      num+=ar[i]*bit;
      bit<<=1;
    }
    num+=ar[11]*bit;
    if(mp[ar[10]][num][0]!=-1)
    return mp[ar[10]][num];
    int lmt=9;
    if(ar[11]==0)
    {
      lmt=d[ar[10]];
    }
    int sum=0,ans=0;
    for(int i=0;i<=lmt;i++)
    {
        array<int,12> nar=ar;
        if(i<lmt)
        {
            nar[11]=1;
        }
        nar[i]=1;
        nar[10]++;
        int ct=0;
        for(int j=0;j<10;j++)
        {
            if(nar[j]>0)
                ct++;
        }
        if(ct==1&&nar[0]>0)
        {
           nar[0]=0;
        }
        int x=(fp(10,d.size()-ar[10]-1)*i)%mod;
        array<int,2> res=digit(nar);
        sum=(sum+res[0])%mod;
        ans=(ans+res[1])%mod;
        ans=(ans+x*res[0])%mod;
    }
  //  cout<<ar[10]<<" "<<sum<<endl;
    mp[ar[10]][num]={sum,ans};
    return {sum,ans};
}

int solve(int n)
{
  for(int pos=0;pos<21;pos++)
    for(int i=0;i<50000;i++)
    {
      mp[pos][i][0]=-1;
      mp[pos][i][1]=-1;
    }
    if(n==0)
        return 0;
    d.clear();
    while(n>0)
    {
        d.push_back(n%10);
        n/=10;
    }
    reverse(d.begin(),d.end());
    // for(auto i:d)
    //   cout<<i<<" ";
    array<int,12> ar;
    for(int i=0;i<12;i++)
      ar[i]=0;
   int x=digit(ar)[1];
//   cout<<n<<" "<<ans<<endl;
   return x;
}

signed main() {
 ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
 int l,r;

 cin>>l>>r>>k;
 int sum=solve(r)-solve(l-1);
 sum=(sum+mod)%mod;
 cout<<sum<<endl;
// sum=solve(l-1);
 //cout<<sum<<endl;
}


#pragma GCC optimize("O3")
#ifdef ONLINE_JUDGE
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#endif
#pragma GCC optimize("unroll-loops")
#pragma comment(linker, "/stack:200000000")
#include <bits/stdc++.h>
#include <deque>
#include <type_traits>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/detail/standard_policies.hpp>
template<typename Key=int,typename Mapped=__gnu_pbds::null_type,typename Cmp_Fn=std::less<Key>,typename Tag=__gnu_pbds::rb_tree_tag,template<typename Const_Node_Iterator,typename Node_Iterator,typename Cmp_Fn_,typename Allocator_>class Node_Update=__gnu_pbds::tree_order_statistics_node_update,typename Allocator=std::allocator<char>>class ordered_set_t:__gnu_pbds::tree<Key,Mapped,Cmp_Fn,Tag,Node_Update,Allocator>{};const int GRANDOM=std::chrono::high_resolution_clock::now().time_since_epoch().count();struct ghash{int operator()(int x){return std::hash<int>{}(x^GRANDOM);}};template<typename KeyType>class hash_table_t:__gnu_pbds::gp_hash_table<KeyType,int,ghash>{};namespace vh{template<class T>void _R(T&x){std::cin>>x;}inline void _R(int&x){scanf("%d",&x);}inline void _R(int64_t&x){scanf("%" SCNd64,&x);}inline void _R(double&x){scanf("%lf",&x);}inline void _R(char&x){scanf(" %c",&x);}inline void _R(char*x){scanf("%s",x);}inline void R(){}template<class T,class... U>inline void R(T&head,U&... tail){_R(head);R(tail...);}template<class T>void _W(const T&x){cout<<x;}inline void _W(const int&x){printf("%d",x);}inline void _W(const int64_t&x){printf("%" PRId64,x);}inline void _W(const double&x){printf("%.16f",x);}inline void _W(const char&x){putchar(x);}inline void _W(const char*x){printf("%s",x);}template<class T>inline void _W(const vector<T>&x){for(auto i=x.begin();i!=x.end();_W(*i++))if(i!=x.cbegin())putchar(' ');}inline void W(){}template<class T,class... U>inline void W(const T&head,const U&... tail){_W(head);if(sizeof...(tail))putchar(' '),W(tail...);}template<class T,class... U>inline void WL(const T&head,const U&... tail){_W(head);putchar(sizeof...(tail)? ' ':'\n');W(tail...);}};
#define prec setprecision
namespace vh{typedef long long ll;typedef unsigned long long llu;template<typename T>T gcd(T m,T n){while(n){T t=m%n;m=n;n=t;};return m;}template<typename T>T exgcd(T a,T b,T&sa,T&ta){T q,r,sb=0,tb=1,sc,tc;sa=1,ta=0;if(b)do q=a/b,r=a-q*b,a=b,b=r,sc=sa-q*sb,sa=sb,sb=sc,tc=ta-q*tb,ta=tb,tb=tc;while(b);return a;}template<typename T>T mul_inv(T a,T b){T t1=a,t2=b,t3;T v1=1,v2=0,v3;T x;while(t2!=1)x=t1/t2,t3=t1-x*t2,v3=v1-x*v2,t1=t2,t2=t3,v1=v2,v2=v3;return(v2+b)%b;}template<typename T>T powmod(T a,T b,T MOD){if(b<0)return 0;T rv=1;while(b)(b%2)&&(rv=(rv*a)%MOD),a=a*a%MOD,b/=2;return rv;}template<typename T>inline T isqrt(T k){T r=sqrt((double)k)+1;while(r*r>k)r--;return r;}template<typename T>inline T icbrt(T k){T r=cbrt((double)k)+1;while(r*r*r>k)r--;return r;}template<typename T>bool mul_overflow(T&r,T a,T b){return __builtin_mul_overflow(a,b,&r);}template<ll n>struct BitSize{enum{Size=BitSize<n/2>::Size+1};};template<>struct BitSize<0>{enum{Size=1};};template<>struct BitSize<1>{enum{Size=1};};
#define BITSIZE(n) (BitSize<n>::Size)
#define BITMAX(n) (BitSize<n>::Size - 1)
#define DEBUG !defined(ONLINE_JUDGE)
#define SZ(x) ((int)(x).size())
#define ALL(x) begin(x), end(x)
template<typename TH>void _dbg(const char*sdbg,TH h){cerr<<sdbg<<"="<<h<<"\n";}template<typename TH,typename... TA>void _dbg(const char*sdbg,TH h,TA... t){while(*sdbg!=',')cerr<<*sdbg++;cerr<<"="<<h<<",";_dbg(sdbg+1,t...);}
#ifdef DEBUG
#define debug(...) _dbg(#__VA_ARGS__, __VA_ARGS__)
#define debugv(x) {{cerr <<#x <<" = "; for(auto itt: x) cerr <<*itt <<", "; cerr <<"\n"; }}
#else
#define debug(...) (__VA_ARGS__)
#define debugv(x)
#define cerr if(0)cout
#endif
}namespace vh{template<typename T>int min_rotation(vector<T>s){int a=0,N=s.size();for(int b=0;b<N;b++)for(int i=0;i<N;i++){if(a+i==b||s[(a+i)%N]<s[(b+i)%N]){b+=max(0,i-1);break;}if(s[(a+i)%N]>s[(b+i)%N]){a=b;break;}}return a;}}namespace vh{};
namespace vh{
  ll MOD=998244353;
  ll p10[20];
  namespace DP
  {
    char s[22];
    int n;
    int k;
    pair<ll,ll>_r[20][2][2][1<<10];
    bool _c[20][2][2][1<<10];
    pair<ll,ll>solve(int idx,bool less,bool haszero,int st){
      if(idx==-1){
        if(less)return{0,0};
        return{__builtin_popcount(st)-(!haszero&&(st&1))<=k,0};
      }
      auto&r=_r[idx][less][haszero][st];
      if(_c[idx][less][haszero][st])return r;
      _c[idx][less][haszero][st]=1;
      if(__builtin_popcount(st)-(!haszero&&(st&1))>k){
        return r;
      }
      if(less){
        for(int i=0,ie=s[idx];i<ie;i++){
          auto [cnt,sum]=solve(idx-1,false,haszero||((i>0)&&(st&1)),st|(1<<i));
          if(!cnt)continue;
          r.first=(r.first+cnt)%MOD;
          sum=(sum+((p10[n-1-idx]*i%MOD)*cnt%MOD))%MOD;
          r.second=(r.second+sum)%MOD;
        }
        for(int i=0;i<10;i++){
          auto [cnt,sum]=solve(idx-1,true,haszero||((i>0)&&(st&1)),st|(1<<i));
          if(!cnt)continue;
          r.first=(r.first+cnt)%MOD;
          sum=(sum+((p10[n-1-idx]*i%MOD)*cnt%MOD))%MOD;
          r.second=(r.second+sum)%MOD;
        }
      }else{
        auto [cnt,sum]=solve(idx-1,false,haszero||(s[idx]>0&&(st&1)),st|(1<<s[idx]));
        r.first=(r.first+cnt)%MOD;
        sum=(sum+((p10[n-1-idx]*s[idx]%MOD)*cnt%MOD))%MOD;
        r.second=(r.second+sum)%MOD;
      }
      return r;
    }
    ll calc(ll x,ll _k){
      sprintf(s,"%lld",x);
      n=strlen(s);
      k=_k;
      int chk=0;
      map<int,int>m;
      for(int i=0;i<n;i++)s[i]-='0',!m[s[i]]++&&chk++;
      memset(_c,0,sizeof(_c));
      memset(_r,0,sizeof(_r));
      return(solve(n-1,true,false,0).second+(chk<=k?x:0))%MOD;
    }
  }
  using DP::calc;
  int main(){
    srand(GRANDOM);
    p10[0]=1;
    for(int i=1;i<20;i++)p10[i]=(p10[i-1]*10)%MOD;
    ll l,r;
    int k;
    cin>>l>>r>>k;
    ll res=(calc(r,k)-calc(l-1,k))%MOD;
    res=(res+MOD)%MOD;
    cout<<res<<endl;
    return 0;
  }
};
int main(int argc,char*argv[]){
  std::cin.sync_with_stdio(false);std::cin.tie(nullptr);
  return vh::main();
}


#pragma GCC optimize("O3")
#ifdef ONLINE_JUDGE
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#endif
#pragma GCC optimize("unroll-loops")
#pragma comment(linker, "/stack:200000000")
#include <bits/stdc++.h>
#include <deque>
#include <type_traits>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/detail/standard_policies.hpp>
template<typename Key=int,typename Mapped=__gnu_pbds::null_type,typename Cmp_Fn=std::less<Key>,typename Tag=__gnu_pbds::rb_tree_tag,template<typename Const_Node_Iterator,typename Node_Iterator,typename Cmp_Fn_,typename Allocator_>class Node_Update=__gnu_pbds::tree_order_statistics_node_update,typename Allocator=std::allocator<char>>class ordered_set_t:__gnu_pbds::tree<Key,Mapped,Cmp_Fn,Tag,Node_Update,Allocator>{};const int GRANDOM=std::chrono::high_resolution_clock::now().time_since_epoch().count();struct ghash{int operator()(int x){return std::hash<int>{}(x^GRANDOM);}};template<typename KeyType>class hash_table_t:__gnu_pbds::gp_hash_table<KeyType,int,ghash>{};namespace vh{template<class T>void _R(T&x){std::cin>>x;}inline void _R(int&x){scanf("%d",&x);}inline void _R(int64_t&x){scanf("%" SCNd64,&x);}inline void _R(double&x){scanf("%lf",&x);}inline void _R(char&x){scanf(" %c",&x);}inline void _R(char*x){scanf("%s",x);}inline void R(){}template<class T,class... U>inline void R(T&head,U&... tail){_R(head);R(tail...);}template<class T>void _W(const T&x){cout<<x;}inline void _W(const int&x){printf("%d",x);}inline void _W(const int64_t&x){printf("%" PRId64,x);}inline void _W(const double&x){printf("%.16f",x);}inline void _W(const char&x){putchar(x);}inline void _W(const char*x){printf("%s",x);}template<class T>inline void _W(const vector<T>&x){for(auto i=x.begin();i!=x.end();_W(*i++))if(i!=x.cbegin())putchar(' ');}inline void W(){}template<class T,class... U>inline void W(const T&head,const U&... tail){_W(head);if(sizeof...(tail))putchar(' '),W(tail...);}template<class T,class... U>inline void WL(const T&head,const U&... tail){_W(head);putchar(sizeof...(tail)? ' ':'\n');W(tail...);}};
#define prec setprecision
namespace vh{typedef long long ll;typedef unsigned long long llu;template<typename T>T gcd(T m,T n){while(n){T t=m%n;m=n;n=t;};return m;}template<typename T>T exgcd(T a,T b,T&sa,T&ta){T q,r,sb=0,tb=1,sc,tc;sa=1,ta=0;if(b)do q=a/b,r=a-q*b,a=b,b=r,sc=sa-q*sb,sa=sb,sb=sc,tc=ta-q*tb,ta=tb,tb=tc;while(b);return a;}template<typename T>T mul_inv(T a,T b){T t1=a,t2=b,t3;T v1=1,v2=0,v3;T x;while(t2!=1)x=t1/t2,t3=t1-x*t2,v3=v1-x*v2,t1=t2,t2=t3,v1=v2,v2=v3;return(v2+b)%b;}template<typename T>T powmod(T a,T b,T MOD){if(b<0)return 0;T rv=1;while(b)(b%2)&&(rv=(rv*a)%MOD),a=a*a%MOD,b/=2;return rv;}template<typename T>inline T isqrt(T k){T r=sqrt((double)k)+1;while(r*r>k)r--;return r;}template<typename T>inline T icbrt(T k){T r=cbrt((double)k)+1;while(r*r*r>k)r--;return r;}template<typename T>bool mul_overflow(T&r,T a,T b){return __builtin_mul_overflow(a,b,&r);}template<ll n>struct BitSize{enum{Size=BitSize<n/2>::Size+1};};template<>struct BitSize<0>{enum{Size=1};};template<>struct BitSize<1>{enum{Size=1};};
#define BITSIZE(n) (BitSize<n>::Size)
#define BITMAX(n) (BitSize<n>::Size - 1)
#define DEBUG !defined(ONLINE_JUDGE)
#define SZ(x) ((int)(x).size())
#define ALL(x) begin(x), end(x)
template<typename TH>void _dbg(const char*sdbg,TH h){cerr<<sdbg<<"="<<h<<"\n";}template<typename TH,typename... TA>void _dbg(const char*sdbg,TH h,TA... t){while(*sdbg!=',')cerr<<*sdbg++;cerr<<"="<<h<<",";_dbg(sdbg+1,t...);}
#ifdef DEBUG
#define debug(...) _dbg(#__VA_ARGS__, __VA_ARGS__)
#define debugv(x) {{cerr <<#x <<" = "; for(auto itt: x) cerr <<*itt <<", "; cerr <<"\n"; }}
#else
#define debug(...) (__VA_ARGS__)
#define debugv(x)
#define cerr if(0)cout
#endif
}namespace vh{template<typename T>int min_rotation(vector<T>s){int a=0,N=s.size();for(int b=0;b<N;b++)for(int i=0;i<N;i++){if(a+i==b||s[(a+i)%N]<s[(b+i)%N]){b+=max(0,i-1);break;}if(s[(a+i)%N]>s[(b+i)%N]){a=b;break;}}return a;}}namespace vh{};
namespace vh{
  ll MOD=998244353;
  ll p10[20];
  ll sto(ll x){
    if(x==-1)return 0;
    ll y=x+1;
    if(x%2==0){
      x/=2;
    }else{
      y/=2;
    }
    return(x%MOD)*(y%MOD)%MOD;
  }
  ll dpc[20][1<<10];
  ll dps[20][1<<10];
  ll calc2(int n,int k,int initials=0,ll basesum=0,bool allow0=false){
    if(__builtin_popcount(initials)>k)return 0;
    if(!n){
      return basesum;
    }
    memset(dpc,0,sizeof(dpc));
    memset(dps,0,sizeof(dps));
    dpc[0][initials]=1;
    dps[0][initials]=basesum;
    for(int i=1;i<=n;i++){
      for(int s=0;s<(1<<10);s++){
        if(__builtin_popcount(s)>k)continue;
        for(int j=((i==1&&!allow0)?1:0);j<10;j++){
          if(s&(1<<j)){
            dpc[i][s]=(dpc[i][s]+dpc[i-1][s])%MOD;
            dps[i][s]=(dps[i][s]+dps[i-1][s])%MOD;
            dps[i][s]=(dps[i][s]+((p10[n-i]*j%MOD)*dpc[i-1][s]%MOD))%MOD;
            dpc[i][s]=(dpc[i][s]+dpc[i-1][s-(1<<j)])%MOD;
            dps[i][s]=(dps[i][s]+dps[i-1][s-(1<<j)])%MOD;
            dps[i][s]=(dps[i][s]+((p10[n-i]*j%MOD)*dpc[i-1][s-(1<<j)]%MOD))%MOD;
          }
        }
      }
    }
    ll r=0;
    for(int s=0;s<(1<<10);s++){
      r=(r+dps[n][s])%MOD;
    }
    return r;
  }
  ll solve(int n,char*s,int k,int sm,ll bs,int si){
    if(si==n){
      return(__builtin_popcount(sm)<=k)? bs:0;
    }
    ll r=0;
    int fr=(si==0)?1:0;
    int to=s[si]-'0';
    for(int x=fr;x<to;x++){
      ll newbs=(bs+(p10[n-si-1]*x%MOD))%MOD;
      ll rr=calc2(n-si-1,k,sm|(1<<x),newbs,true);
      r=(r+rr)%MOD;
    }
    r=(r+solve(n,s,k,sm|(1<<to),(bs+(p10[n-si-1]*to%MOD))%MOD,si+1))%MOD;
    return r;
  }
  ll calc(ll x,int k){
    char s[20];
    sprintf(s,"%lld",x);
    int n=strlen(s);
    ll r=0;
    for(int i=1;i<n;i++){
      r=(r+calc2(i,k))%MOD;
    }
    ll rs=solve(n,s,k,0,0,0);
    r=(r+rs)%MOD;
    return r;
  }
  int main(){
    srand(GRANDOM);
    p10[0]=1;
    for(int i=1;i<20;i++)p10[i]=(p10[i-1]*10)%MOD;
    ll l,r;
    int k;
    cin>>l>>r>>k;
    ll res=(calc(r,k)-calc(l-1,k))%MOD;
    res=(res+MOD)%MOD;
    cout<<res<<endl;
    return 0;
  }
};
int main(int argc,char*argv[]){
  std::cin.sync_with_stdio(false);std::cin.tie(nullptr);
  return vh::main();
}


#pragma GCC optimize("O3")
#ifdef ONLINE_JUDGE
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#endif
#pragma GCC optimize("unroll-loops")
#pragma comment(linker, "/stack:200000000")
#include <bits/stdc++.h>
#include <deque>
#include <type_traits>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/detail/standard_policies.hpp>
template<typename Key=int,typename Mapped=__gnu_pbds::null_type,typename Cmp_Fn=std::less<Key>,typename Tag=__gnu_pbds::rb_tree_tag,template<typename Const_Node_Iterator,typename Node_Iterator,typename Cmp_Fn_,typename Allocator_>class Node_Update=__gnu_pbds::tree_order_statistics_node_update,typename Allocator=std::allocator<char>>class ordered_set_t:__gnu_pbds::tree<Key,Mapped,Cmp_Fn,Tag,Node_Update,Allocator>{};const int GRANDOM=std::chrono::high_resolution_clock::now().time_since_epoch().count();struct ghash{int operator()(int x){return std::hash<int>{}(x^GRANDOM);}};template<typename KeyType>class hash_table_t:__gnu_pbds::gp_hash_table<KeyType,int,ghash>{};namespace vh{template<class T>void _R(T&x){std::cin>>x;}inline void _R(int&x){scanf("%d",&x);}inline void _R(int64_t&x){scanf("%" SCNd64,&x);}inline void _R(double&x){scanf("%lf",&x);}inline void _R(char&x){scanf(" %c",&x);}inline void _R(char*x){scanf("%s",x);}inline void R(){}template<class T,class... U>inline void R(T&head,U&... tail){_R(head);R(tail...);}template<class T>void _W(const T&x){cout<<x;}inline void _W(const int&x){printf("%d",x);}inline void _W(const int64_t&x){printf("%" PRId64,x);}inline void _W(const double&x){printf("%.16f",x);}inline void _W(const char&x){putchar(x);}inline void _W(const char*x){printf("%s",x);}template<class T>inline void _W(const vector<T>&x){for(auto i=x.begin();i!=x.end();_W(*i++))if(i!=x.cbegin())putchar(' ');}inline void W(){}template<class T,class... U>inline void W(const T&head,const U&... tail){_W(head);if(sizeof...(tail))putchar(' '),W(tail...);}template<class T,class... U>inline void WL(const T&head,const U&... tail){_W(head);putchar(sizeof...(tail)? ' ':'\n');W(tail...);}};
#define prec setprecision
namespace vh{typedef long long ll;typedef unsigned long long llu;template<typename T>T gcd(T m,T n){while(n){T t=m%n;m=n;n=t;};return m;}template<typename T>T exgcd(T a,T b,T&sa,T&ta){T q,r,sb=0,tb=1,sc,tc;sa=1,ta=0;if(b)do q=a/b,r=a-q*b,a=b,b=r,sc=sa-q*sb,sa=sb,sb=sc,tc=ta-q*tb,ta=tb,tb=tc;while(b);return a;}template<typename T>T mul_inv(T a,T b){T t1=a,t2=b,t3;T v1=1,v2=0,v3;T x;while(t2!=1)x=t1/t2,t3=t1-x*t2,v3=v1-x*v2,t1=t2,t2=t3,v1=v2,v2=v3;return(v2+b)%b;}template<typename T>T powmod(T a,T b,T MOD){if(b<0)return 0;T rv=1;while(b)(b%2)&&(rv=(rv*a)%MOD),a=a*a%MOD,b/=2;return rv;}template<typename T>inline T isqrt(T k){T r=sqrt((double)k)+1;while(r*r>k)r--;return r;}template<typename T>inline T icbrt(T k){T r=cbrt((double)k)+1;while(r*r*r>k)r--;return r;}template<typename T>bool mul_overflow(T&r,T a,T b){return __builtin_mul_overflow(a,b,&r);}template<ll n>struct BitSize{enum{Size=BitSize<n/2>::Size+1};};template<>struct BitSize<0>{enum{Size=1};};template<>struct BitSize<1>{enum{Size=1};};
#define BITSIZE(n) (BitSize<n>::Size)
#define BITMAX(n) (BitSize<n>::Size - 1)
#define DEBUG !defined(ONLINE_JUDGE)
#define SZ(x) ((int)(x).size())
#define ALL(x) begin(x), end(x)
template<typename TH>void _dbg(const char*sdbg,TH h){cerr<<sdbg<<"="<<h<<"\n";}template<typename TH,typename... TA>void _dbg(const char*sdbg,TH h,TA... t){while(*sdbg!=',')cerr<<*sdbg++;cerr<<"="<<h<<",";_dbg(sdbg+1,t...);}
#ifdef DEBUG
#define debug(...) _dbg(#__VA_ARGS__, __VA_ARGS__)
#define debugv(x) {{cerr <<#x <<" = "; for(auto itt: x) cerr <<*itt <<", "; cerr <<"\n"; }}
#else
#define debug(...) (__VA_ARGS__)
#define debugv(x)
#define cerr if(0)cout
#endif
}namespace vh{template<typename T>int min_rotation(vector<T>s){int a=0,N=s.size();for(int b=0;b<N;b++)for(int i=0;i<N;i++){if(a+i==b||s[(a+i)%N]<s[(b+i)%N]){b+=max(0,i-1);break;}if(s[(a+i)%N]>s[(b+i)%N]){a=b;break;}}return a;}}namespace vh{template<ll MOD,typename T=ll>class FiniteField{typedef FiniteField<MOD,T>self;public:ll val;FiniteField(ll x=0):val(normalize(x)){}inline T normalize(T x){x%=MOD;return normalize2(x);}inline T normalize2(T x){if(x<0)x+=MOD;if(x>=MOD)x-=MOD;return x;}self&operator=(const self&o){val=o.val;return*this;}template<typename NT>self&operator=(const NT o){val=normalize(o);return*this;}self&operator+=(const self&o){val=normalize2(val+o.val);return*this;}template<typename NT>self&operator+=(const NT o){val=normalize(val+(o));return*this;}self&operator-=(const self&o){val=normalize2(val-o.val);return*this;}template<typename NT>self&operator-=(const NT o){val=normalize(val-(o));return*this;}self&operator*=(const self&o){return*this*=o.val;}template<typename NT>self&operator*=(const NT o){val=normalize(val*o);return*this;}self operator+(const self&o){return self(normalize2(val+o.val));}template<typename NT>self operator+(const NT o){return self(normalize2(val+(o)));}self operator-(const self&o){return self(normalize2(val-o.val));}template<typename NT>self operator-(const NT o){return self(normalize2(val-(o)));}self operator-(){return self(normalize(-val));}self operator*(const self&o){return self(normalize(val*o.val));}template<typename NT>self operator*(const NT o){return self(normalize(val*(o)));}operator T()const{return val;}};};namespace vh{};
namespace vh{
  const ll MOD=998244353;
  namespace DP
  {
    char s[22];
    int n;
    int k;
    FiniteField<MOD>cnt[22][2][1<<10];
    FiniteField<MOD>S[22][2][1<<10];
    FiniteField<MOD>p10[22];
    ll calc(ll x,ll k){
      p10[0]=1;
      for(int i=1;i<22;i++)p10[i]=p10[i-1]*10;
      sprintf(s+1,"%lld",x);
      n=strlen(s+1);
      s[0]=0;
      for(int i=1;i<=n;i++)s[i]-='0';
      memset(S,0,sizeof(S));
      memset(cnt,0,sizeof(cnt));
      cnt[0][1][0]=1;
      for(int i=1;i<=n;i++){
        for(int eq=0;eq<2;eq++){
          for(int st=0;st<(1<<10);st++){
            for(int z=0;z<10;z++){
              if(eq&&z>s[i])break;
              int new_eq=eq&&z==s[i];
              int new_st=st|(1<<z);
              if(!st&&!z)new_st=0;
              if(__builtin_popcount(new_st)>k)continue;
              cnt[i][new_eq][new_st]=cnt[i][new_eq][new_st]+cnt[i-1][eq][st];
              S[i][new_eq][new_st]=S[i][new_eq][new_st]+S[i-1][eq][st]+cnt[i-1][eq][st]*z*p10[n-i];
            }
          }
        }
      }
      FiniteField<MOD>r=0;
      for(int st=0;st<(1<<10);st++){
        if(__builtin_popcount(st)<=k){
          r+=S[n][0][st];
          r+=S[n][1][st];
        }
      }
      return r.val;
    }
  }
  using DP::calc;
  int main(){
    srand(GRANDOM);
    ll l,r;
    int k;
    cin>>l>>r>>k;
    ll res=(calc(r,k)-calc(l-1,k))%MOD;
    res=(res+MOD)%MOD;
    cout<<res<<endl;
    return 0;
  }
};
int main(int argc,char*argv[]){
  std::cin.sync_with_stdio(false);std::cin.tie(nullptr);
  return vh::main();
}


#pragma GCC optimize("O3")
#ifdef ONLINE_JUDGE
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#endif
#pragma GCC optimize("unroll-loops")
#pragma comment(linker, "/stack:200000000")
#include <bits/stdc++.h>
#include <deque>
#include <type_traits>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/detail/standard_policies.hpp>
template<typename Key=int,typename Mapped=__gnu_pbds::null_type,typename Cmp_Fn=std::less<Key>,typename Tag=__gnu_pbds::rb_tree_tag,template<typename Const_Node_Iterator,typename Node_Iterator,typename Cmp_Fn_,typename Allocator_>class Node_Update=__gnu_pbds::tree_order_statistics_node_update,typename Allocator=std::allocator<char>>class ordered_set_t:__gnu_pbds::tree<Key,Mapped,Cmp_Fn,Tag,Node_Update,Allocator>{};const int GRANDOM=std::chrono::high_resolution_clock::now().time_since_epoch().count();struct ghash{int operator()(int x){return std::hash<int>{}(x^GRANDOM);}};template<typename KeyType>class hash_table_t:__gnu_pbds::gp_hash_table<KeyType,int,ghash>{};namespace vh{template<class T>void _R(T&x){std::cin>>x;}inline void _R(int&x){scanf("%d",&x);}inline void _R(int64_t&x){scanf("%" SCNd64,&x);}inline void _R(double&x){scanf("%lf",&x);}inline void _R(char&x){scanf(" %c",&x);}inline void _R(char*x){scanf("%s",x);}inline void R(){}template<class T,class... U>inline void R(T&head,U&... tail){_R(head);R(tail...);}template<class T>void _W(const T&x){cout<<x;}inline void _W(const int&x){printf("%d",x);}inline void _W(const int64_t&x){printf("%" PRId64,x);}inline void _W(const double&x){printf("%.16f",x);}inline void _W(const char&x){putchar(x);}inline void _W(const char*x){printf("%s",x);}template<class T>inline void _W(const vector<T>&x){for(auto i=x.begin();i!=x.end();_W(*i++))if(i!=x.cbegin())putchar(' ');}inline void W(){}template<class T,class... U>inline void W(const T&head,const U&... tail){_W(head);if(sizeof...(tail))putchar(' '),W(tail...);}template<class T,class... U>inline void WL(const T&head,const U&... tail){_W(head);putchar(sizeof...(tail)? ' ':'\n');W(tail...);}};
#define prec setprecision
namespace vh{typedef long long ll;typedef unsigned long long llu;template<typename T>T gcd(T m,T n){while(n){T t=m%n;m=n;n=t;};return m;}template<typename T>T exgcd(T a,T b,T&sa,T&ta){T q,r,sb=0,tb=1,sc,tc;sa=1,ta=0;if(b)do q=a/b,r=a-q*b,a=b,b=r,sc=sa-q*sb,sa=sb,sb=sc,tc=ta-q*tb,ta=tb,tb=tc;while(b);return a;}template<typename T>T mul_inv(T a,T b){T t1=a,t2=b,t3;T v1=1,v2=0,v3;T x;while(t2!=1)x=t1/t2,t3=t1-x*t2,v3=v1-x*v2,t1=t2,t2=t3,v1=v2,v2=v3;return(v2+b)%b;}template<typename T>T powmod(T a,T b,T MOD){if(b<0)return 0;T rv=1;while(b)(b%2)&&(rv=(rv*a)%MOD),a=a*a%MOD,b/=2;return rv;}template<typename T>inline T isqrt(T k){T r=sqrt((double)k)+1;while(r*r>k)r--;return r;}template<typename T>inline T icbrt(T k){T r=cbrt((double)k)+1;while(r*r*r>k)r--;return r;}template<typename T>bool mul_overflow(T&r,T a,T b){return __builtin_mul_overflow(a,b,&r);}template<ll n>struct BitSize{enum{Size=BitSize<n/2>::Size+1};};template<>struct BitSize<0>{enum{Size=1};};template<>struct BitSize<1>{enum{Size=1};};
#define BITSIZE(n) (BitSize<n>::Size)
#define BITMAX(n) (BitSize<n>::Size - 1)
#define DEBUG !defined(ONLINE_JUDGE)
#define SZ(x) ((int)(x).size())
#define ALL(x) begin(x), end(x)
template<typename TH>void _dbg(const char*sdbg,TH h){cerr<<sdbg<<"="<<h<<"\n";}template<typename TH,typename... TA>void _dbg(const char*sdbg,TH h,TA... t){while(*sdbg!=',')cerr<<*sdbg++;cerr<<"="<<h<<",";_dbg(sdbg+1,t...);}
#ifdef DEBUG
#define debug(...) _dbg(#__VA_ARGS__, __VA_ARGS__)
#define debugv(x) {{cerr <<#x <<" = "; for(auto itt: x) cerr <<*itt <<", "; cerr <<"\n"; }}
#else
#define debug(...) (__VA_ARGS__)
#define debugv(x)
#define cerr if(0)cout
#endif
}namespace vh{template<typename T>int min_rotation(vector<T>s){int a=0,N=s.size();for(int b=0;b<N;b++)for(int i=0;i<N;i++){if(a+i==b||s[(a+i)%N]<s[(b+i)%N]){b+=max(0,i-1);break;}if(s[(a+i)%N]>s[(b+i)%N]){a=b;break;}}return a;}}namespace vh{};
namespace vh{
  ll MOD=998244353;
  ll p10[20];
  ll dpc[20][1<<10];
  ll dps[20][1<<10];
  ll calc2(int n,int k,int initials=0,ll basesum=0,bool allow0=false){
    if(__builtin_popcount(initials)>k)return 0;
    if(!n){
      return basesum;
    }
    memset(dpc,0,sizeof(dpc));
    memset(dps,0,sizeof(dps));
    dpc[0][initials]=1;
    dps[0][initials]=basesum;
    for(int i=1;i<=n;i++){
      for(int s=0;s<(1<<10);s++){
        if(__builtin_popcount(s)>k)continue;
        for(int j=((i==1&&!allow0)?1:0);j<10;j++){
          if(s&(1<<j)){
            dpc[i][s]=(dpc[i][s]+dpc[i-1][s])%MOD;
            dps[i][s]=(dps[i][s]+dps[i-1][s])%MOD;
            dps[i][s]=(dps[i][s]+((p10[n-i]*j%MOD)*dpc[i-1][s]%MOD))%MOD;
            dpc[i][s]=(dpc[i][s]+dpc[i-1][s-(1<<j)])%MOD;
            dps[i][s]=(dps[i][s]+dps[i-1][s-(1<<j)])%MOD;
            dps[i][s]=(dps[i][s]+((p10[n-i]*j%MOD)*dpc[i-1][s-(1<<j)]%MOD))%MOD;
          }
        }
      }
    }
    ll r=0;
    for(int s=0;s<(1<<10);s++){
      r=(r+dps[n][s])%MOD;
    }
    return r;
  }
  ll solve(int n,char*s,int k,int sm,ll bs,int si){
    if(si==n){
      return(__builtin_popcount(sm)<=k)? bs:0;
    }
    ll r=0;
    int fr=(si==0)?1:0;
    int to=s[si]-'0';
    for(int x=fr;x<to;x++){
      ll newbs=(bs+(p10[n-si-1]*x%MOD))%MOD;
      ll rr=calc2(n-si-1,k,sm|(1<<x),newbs,true);
      r=(r+rr)%MOD;
    }
    r=(r+solve(n,s,k,sm|(1<<to),(bs+(p10[n-si-1]*to%MOD))%MOD,si+1))%MOD;
    return r;
  }
  ll cto(ll x){
    ll y=x+1;
    if(x%2==0)x/=2;
    else y/=2;
    return(x%MOD)*(y%MOD)%MOD;
  }
  ll calc(ll x,int k){
    char s[20];
    sprintf(s,"%lld",x);
    int n=strlen(s);
    ll r=0;
    for(int i=1;i<n;i++){
      if(i<=k){
        r=(r+cto(p10[i]-1)-(i==1?0:cto(p10[i-1]-1))+MOD)%MOD;
      }else{
        r=(r+calc2(i,k))%MOD;
      }
    }
    ll rs=solve(n,s,k,0,0,0);
    r=(r+rs)%MOD;
    return r;
  }
  int main(){
    srand(GRANDOM);
    p10[0]=1;
    for(int i=1;i<20;i++)p10[i]=(p10[i-1]*10)%MOD;
    ll l,r;
    int k;
    cin>>l>>r>>k;
    ll res=(calc(r,k)-calc(l-1,k))%MOD;
    res=(res+MOD)%MOD;
    cout<<res<<endl;
    return 0;
  }
};
int main(int argc,char*argv[]){
  std::cin.sync_with_stdio(false);std::cin.tie(nullptr);
  return vh::main();
}


#include <cstdio>
#include <vector>
#include <cstring>
#include <iostream>
#include <algorithm>

using namespace std;

const int N = 20;
const int S = 10;
const int MOD = 998244353;

typedef long long LL;

LL l, r;
int k;
int a[N];
int p10[N];
int gn, gx;
LL dp[N][2][2][1 << S];

LL calc(int n, int is_lower, int nonz, int mask)
{
    if (n < 0) {
        return is_lower && nonz && __builtin_popcount(mask) <= k;
    }
    LL &ans = dp[n][is_lower][nonz][mask];
    if (ans >= 0) return ans;
    ans = 0;
    for (int x = 0; x < 10; x++) {
        if (!is_lower && x > a[n]) break;
        if (n == gn && x != gx) continue;
        int nnonz = nonz || x > 0;
        int nmask = mask | (nnonz << x);
        ans += calc(n - 1, is_lower || x < a[n], nnonz, nmask);
    }
    ans %= MOD;
    return ans;
}

LL get(LL x)
{
    p10[0] = 1;
    for (int i = 1; i < N; i++) {
        p10[i] = p10[i - 1] * 10ll % MOD;
    }
    for (int i = 0; i < N; i++) {
        a[i] = x % 10;
        x /= 10;
    }

    LL res = 0;
    for (int i = 0; i < N; i++) {
        for (int x = 1; x < 10; x++) {
            gn = i;
            gx = x;
            memset(dp, -1, sizeof dp);
            res += calc(N - 1, 0, 0, 0) * x * p10[i];
        }
    }
    return res % MOD;
}

void solve()
{
    cin >> l >> r >> k;
    cout << get(r + 1) - get(l) << endl;
}

int main()
{
    solve();
    return 0;
}


#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>

using namespace std;

const int N = 20;
const int S = 10;
const int MOD = 998244353;

typedef long long LL;

LL l, r;
int k;
int a[N];
int p10[N];
int gn, gx;
LL dp[N][2][2][1 << S];

LL calc(int n, int is_lower, int nonz, int mask)
{
    if (n < 0) {
        return is_lower && nonz && __builtin_popcount(mask) <= k;
    }
    LL &ans = dp[n][is_lower][nonz][mask];
    if (ans >= 0) return ans;
    ans = 0;
    for (int x = 0; x < 10; x++) {
        if (!is_lower && x > a[n]) break;
        if (n == gn && x != gx) continue;
        int nnonz = nonz || x > 0;
        int nmask = mask | (nnonz << x);
        ans += calc(n - 1, is_lower || x < a[n], nnonz, nmask);
    }
    ans %= MOD;
    return ans;
}

LL get(LL x)
{
    p10[0] = 1;
    for (int i = 1; i < N; i++) {
        p10[i] = p10[i - 1] * 10ll % MOD;
    }
    for (int i = 0; i < N; i++) {
        a[i] = x % 10;
        x /= 10;
    }

    LL res = 0;
    for (int i = 0; i < N; i++) {
        for (int x = 1; x < 10; x++) {
            gn = i;
            gx = x;
            memset(dp, -1, sizeof dp);
            res += calc(N - 1, 0, 0, 0) * x * p10[i];
        }
    }
    return res % MOD;
}

void solve()
{
    cin >> l >> r >> k;
    cout << get(r + 1) - get(l) << endl;
}

int main()
{
    solve();
    return 0;
}


#include <cstdio>
#include <vector>
#include <cstring>
#include <iostream>
#include <algorithm>

using namespace std;

const int N = 20;
const int S = 10;
const int MOD = 998244353;

typedef long long LL;

LL l, r;
int k;
int a[N];
int p10[N];
int gn, gx;
LL dp[N][2][2][1 << S];

LL calc(int n, int is_lower, int nonz, int mask)
{
    if (n < 0) {
        return is_lower && nonz && __builtin_popcount(mask) <= k;
    }
    LL &ans = dp[n][is_lower][nonz][mask];
    if (ans >= 0) return ans;
    ans = 0;
    for (int x = 0; x < 10; x++) {
        if (!is_lower && x > a[n]) break;
        if (n == gn && x != gx) continue;
        int nnonz = nonz || x > 0;
        int nmask = mask | (nnonz << x);
        ans += calc(n - 1, is_lower || x < a[n], nnonz, nmask);
    }
    ans %= MOD;
    return ans;
}

LL get(LL x)
{
    p10[0] = 1;
    for (int i = 1; i < N; i++) {
        p10[i] = p10[i - 1] * 10ll % MOD;
    }
    for (int i = 0; i < N; i++) {
        a[i] = x % 10;
        x /= 10;
    }

    LL res = 0;
    for (int i = 0; i < N; i++) {
        for (int x = 1; x < 10; x++) {
            gn = i;
            gx = x;
            memset(dp, -1, sizeof dp);
            res += calc(N - 1, 0, 0, 0) * x % MOD * p10[i] % MOD;
        }
    }
    return res % MOD;
}

void solve()
{
    cin >> l >> r >> k;
    cout << (get(r + 1) - get(l) + MOD) % MOD << endl;
}

int main()
{
    solve();
    return 0;
}


#include <cstdio>
#include <vector>
#include <cstring>
#include <iostream>
#include <algorithm>

using namespace std;

const int N = 20;
const int S = 10;
const int MOD = 998244353;

typedef long long LL;

LL l, r;
int k;
int a[N];
int p10[N];
int gn, gx;
LL dp[N][2][2][1 << S];

LL calc(int n, int is_lower, int nonz, int mask)
{
    if (n < 0) {
        return is_lower && nonz && __builtin_popcount(mask) <= k;
    }
    LL &ans = dp[n][is_lower][nonz][mask];
    if (ans >= 0) return ans;
    ans = 0;
    for (int x = 0; x < 10; x++) {
        if (!is_lower && x > a[n]) break;
        if (n == gn && x != gx) continue;
        int nnonz = nonz || x > 0;
        int nmask = mask | (nnonz << x);
        ans += calc(n - 1, is_lower || x < a[n], nnonz, nmask);
    }
    ans %= MOD;
    return ans;
}

LL get(LL x)
{
    p10[0] = 1;
    for (int i = 1; i < N; i++) {
        p10[i] = p10[i - 1] * 10ll % MOD;
    }
    for (int i = 0; i < N; i++) {
        a[i] = x % 10;
        x /= 10;
    }

    LL res = 0;
    for (int i = 0; i < N; i++) {
        for (int x = 1; x < 10; x++) {
            gn = i;
            gx = x;
            memset(dp, -1, sizeof dp);
            res += calc(N - 1, 0, 0, 0) * x * p10[i];
        }
    }
    return res % MOD;
}

void solve()
{
    cin >> l >> r >> k;
    cout << (get(r + 1) - get(l) + MOD) % MOD << endl;
}

int main()
{
    solve();
    return 0;
}


#include<bits/stdc++.h>
#define ll long long
using namespace std;
const ll MOD=998244353;
ll ans,x,y;
int a[20];
ll fac[20];
int k;
struct node{
    ll num,sum;
}dp[20][1<<12];
bool pd(int x){
    int num=0;
    while(x){
        if(x&1) num++;
        x/=2;
    }
    return num<=k;
}
node dfs(int pos,int state,bool limit,bool zero){
    if(pos==0) return node{pd(state),0};
    else if(!limit && ~dp[pos][state].num)
        return dp[pos][state];
    int up=limit?a[pos]:9;
    node ans,tem;
    ans.num=ans.sum=0;
    for(int i=0;i<=up;++i){
        if(!pd(state|(1<<i))) continue;
        tem=dfs(pos-1 , state|(1<<i) , limit&&i==up, i||zero);
        ans.num=(ans.num+tem.num)%MOD;
        ans.sum=(tem.num*fac[pos]*i%MOD+ans.sum+tem.sum)%MOD;
    }
    if(!limit) return dp[pos][state]=ans;
    else return ans;
}
ll solve(ll x){
    int pos=0;
    while(x){
        a[++pos]=x%10;
        x/=10;
    }
    memset(dp,-1,sizeof(dp));
    return dfs(pos,0,1,0).sum%MOD;
}
void init(){
    fac[1]=1LL;
    for(int i=2;i<20;++i)
        fac[i]=(fac[i-1]*10)%MOD;
    for(int i=0;i<20;++i)
    for(int j=0;j<(1<<12);++j)
        dp[i][j].num=dp[i][j].sum=-1;
}
int main(){
    init();
    scanf("%lld%lld%d",&x,&y,&k);
    ans=(solve(y)-solve(x-1)+MOD)%MOD;
    printf("%lld\n",ans);
    return 0;
}


#include<bits/stdc++.h>
#define ll long long
using namespace std;
const ll MOD=998244353;
ll ans,x,y;
int a[20];
ll fac[20];
int k;
struct node{
    ll num,sum;
}dp[20][1<<20];
bool pd(int x){
    int num=0;
    while(x){
        if(x&1) num++;
        x/=2;
    }
    return num<=k;
}
node dfs(int pos,int state,bool limit,bool zero){
    if(pos==0) return node{pd(state),0};
    else if(!limit && ~dp[pos][state].num)
        return dp[pos][state];
    int up=limit?a[pos]:9;
    node ans,tem;
    ans.num=ans.sum=0;
    for(int i=0;i<=up;++i){
        int new_state=((zero&&i==0)?state:(state|(1<<i)));
        if(!pd(new_state)) continue;
        tem=dfs(pos-1 , new_state , limit&&i==up, i==0 && zero);
        ans.num=(ans.num+tem.num)%MOD;
        ans.sum=(tem.num*fac[pos]*i%MOD+ans.sum+tem.sum)%MOD;
    }
    if(!limit) return dp[pos][state]=ans;
    else return ans;
}
ll solve(ll x){
    int pos=0;
    while(x){
        a[++pos]=x%10;
        x/=10;
    }
    memset(dp,-1,sizeof(dp));
    return dfs(pos,0,1,1).sum%MOD;
}
void init(){
    fac[1]=1LL;
    for(int i=2;i<20;++i)
        fac[i]=(fac[i-1]*10)%MOD;
    for(int i=0;i<20;++i)
    for(int j=0;j<(1<<20);++j)
        dp[i][j].num=dp[i][j].sum=-1;
}
int main(){
    init();
    scanf("%lld%lld%d",&x,&y,&k);
    ans=(solve(y)-solve(x-1)+MOD)%MOD;
    printf("%lld\n",ans);
    return 0;
}


#include<bits/stdc++.h>
#define ll long long
using namespace std;
const ll MOD=998244353;
ll ans,x,y;
int a[20];
ll fac[20];
int k;
struct node{
    ll num,sum;
}dp[20][1<<12];
bool pd(int x){
    int num=0;
    while(x){
        if(x&1) num++;
        x/=2;
    }
    return num<=k;
}
node dfs(int pos,int state,bool limit,bool zero){
    if(pos==0) return node{pd(state),0};
    else if(!limit && ~dp[pos][state].num)
        return dp[pos][state];
    int up=limit?a[pos]:9;
    node ans,tem;
    ans.num=ans.sum=0;
    for(int i=0;i<=up;++i){
        int new_state=((zero&&i==0)?state:(state|(1<<i)));
        if(!pd(new_state)) continue;
        tem=dfs(pos-1 , new_state , limit&&i==up, i==0 && zero);
        ans.num=(ans.num+tem.num)%MOD;
        ans.sum=(tem.num*fac[pos]*i%MOD+ans.sum+tem.sum)%MOD;
    }
    if(!limit) return dp[pos][state]=ans;
    else return ans;
}
ll solve(ll x){
    int pos=0;
    while(x){
        a[++pos]=x%10;
        x/=10;
    }
    memset(dp,-1,sizeof(dp));
    return dfs(pos,0,1,1).sum%MOD;
}
void init(){
    fac[1]=1LL;
    for(int i=2;i<20;++i)
        fac[i]=(fac[i-1]*10)%MOD;
    for(int i=0;i<20;++i)
    for(int j=0;j<(1<<12);++j)
        dp[i][j].num=dp[i][j].sum=-1;
}
int main(){
    init();
    scanf("%lld%lld%d",&x,&y,&k);
    ans=(solve(y)-solve(x-1)+MOD)%MOD;
    printf("%lld\n",ans);
    return 0;
}


#include<bits/stdc++.h>
#define ll long long
using namespace std;
const ll MOD=998244353;
ll ans,x,y;
ll a[20];
ll fac[20];
ll k;
struct node{
    ll num,sum;
}dp[20][1<<20];
bool pd(ll x){
    ll num=0;
    while(x){
        if(x&1) num++;
        x/=2;
    }
    return num<=k;
}
node dfs(ll pos,ll state,bool limit,bool zero){
    if(pos==0) return node{pd(state),0};
    else if(!limit && ~dp[pos][state].num)
        return dp[pos][state];
    ll up=limit?a[pos]:9;
    node ans,tem;
    ans.num=ans.sum=0;

    for(ll i=0;i<=up;++i){
        ll new_state=((zero&&i==0)?state:(state|(1<<i)));
        if(!pd(new_state)) continue;
        tem=dfs(pos-1 , new_state , limit&&i==up, i==0 && zero);
        ans.num=(ans.num+tem.num)%MOD;
        ans.sum=(tem.num*fac[pos]*i%MOD+ans.sum+tem.sum)%MOD;
    }
    if(!limit) return dp[pos][state]=ans;
    else return ans;
}
ll solve(ll x){
    ll pos=0;
    while(x){
        a[++pos]=x%10;
        x/=10;
    }
    memset(dp,-1,sizeof(dp));
    return dfs(pos,0,1,1).sum%MOD;
}
void init(){
    fac[1]=1LL;
    for(ll i=2;i<20;++i)
        fac[i]=(fac[i-1]*10)%MOD;
    for(ll i=0;i<20;++i)
    for(ll j=0;j<(1<<20);++j)
        dp[i][j].num=dp[i][j].sum=-1;
}
int main(){
    init();
    scanf("%lld%lld%lld",&x,&y,&k);
    ans=(solve(y)-solve(x-1)+MOD)%MOD;
    printf("%lld\n",ans);
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<vector<int> > vvi;
typedef pair<int, int> pii;

#define erep(i, x, n) for (auto i = x; i<=(ll)(n); i++)
#define rep(i, x, n) for(auto i = x; i<(ll)(n); i++)
#define all(v) ((v).begin()), ((v).end())
#define sz(v) ((int)((v).size()))
#define mod(n, m) (((n%m) + m)%m)
#define reset(n, m) memset(n, m, sizeof n)
#define endl '\n'

const int mod = 998244353;
int n, k;
int dig[20];
ll pw[20];
pair<ll, ll> memo[20][(1 << 10) + 100];

void process(ll x)
{
	n = 0;
	while (x)
		dig[n++] = x % 10, x /= 10;
}

pair<ll, ll> solve(int idx, int mask, bool lim)
{
	if (__builtin_popcount(mask) > k)
		return
		{	0, 0};
	if (idx == -1)
		return
		{	0, 1};

	pair<ll, ll> &ret = memo[idx][mask];
	if (!lim && ret != make_pair(-1ll, -1ll))
		return ret;
	ret =
	{	0, 0};
	int mx = 9;
	if (lim)
		mx = dig[idx];

	erep(i, 0, mx)
	{
		auto temp = solve(idx - 1, mask | (1 << i), lim & (i == dig[idx]));
		ret.second += temp.second;
		ll val = (i * pw[idx]) % mod;
		val = mod(val * temp.second, mod);
		val += temp.first;
		val %= mod;
		ret.first += val;
		ret.first %= mod;
	}
	if (!lim)
		return memo[idx][mask] = ret;
	return ret;
}

ll query(ll x)
{
	process(x);
//	cout << n << endl;
//	id++;
	return solve(n - 1, 0, 1).first;
}

int main()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);

	ll l, r;
	cin >> l >> r >> k;

	pw[0] = 1;
	rep(i, 1, 20)
		pw[i] = (pw[i - 1] * 10ll) % mod;

	reset(memo, -1);
	ll res = query(r) - query(l - 1);
	res = mod(res, mod);
	cout << res << endl;
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<vector<int> > vvi;
typedef pair<int, int> pii;

#define erep(i, x, n) for (auto i = x; i<=(ll)(n); i++)
#define rep(i, x, n) for(auto i = x; i<(ll)(n); i++)
#define all(v) ((v).begin()), ((v).end())
#define sz(v) ((int)((v).size()))
#define mod(n, m) (((n%m) + m)%m)
#define reset(n, m) memset(n, m, sizeof n)
#define endl '\n'

const ll mod = 998244353;
int n, k;
int dig[20];
ll pw[20];
pair<ll, ll> memo[20][(1 << 10) + 100];

void process(ll x)
{
	n = 0;
	while (x)
		dig[n++] = x % 10, x /= 10;
}

pair<ll, ll> solve(int idx, int mask, bool lim)
{
	if (__builtin_popcount(mask) > k)
		return
		{	0, 0};
	if (idx == -1)
		return
		{	0, 1};

	pair<ll, ll> &ret = memo[idx][mask];
	if (!lim && ret != make_pair(-1ll, -1ll))
		return ret;
	ret =
	{	0, 0};
	int mx = 9;
	if (lim)
		mx = dig[idx];

	erep(i, 0, mx)
	{
		int nmask = mask | (1 << i);
		if (!i && __builtin_popcount(mask) == 0)
			nmask = mask;
		auto temp = solve(idx - 1, nmask, lim & (i == dig[idx]));
		ret.second += temp.second;
		ret.first += ((i * 1ll * pw[idx]) % mod * 1ll * (temp.second % mod)
				% mod) % mod + temp.first;
		ret.first %= mod;
	}
	if (!lim)
		return memo[idx][mask] = ret;
	return ret;
}

ll query(ll x)
{
	process(x);
//	cout << n << endl;
//	id++;
	return solve(n - 1, 0, 1).first;
}

int main()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);

	ll l, r;
	cin >> l >> r >> k;
	reset(memo, -1);

	pw[0] = 1;
	rep(i, 1, 20)
		pw[i] = (pw[i - 1] * 10ll) % mod;

	ll res = query(r) - query(l - 1);
	res = mod(res, mod);
	cout << res << endl;
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<vector<int> > vvi;
typedef pair<int, int> pii;

#define erep(i, x, n) for (auto i = x; i<=(ll)(n); i++)
#define rep(i, x, n) for(auto i = x; i<(ll)(n); i++)
#define all(v) ((v).begin()), ((v).end())
#define sz(v) ((int)((v).size()))
#define mod(n, m) (((n%m) + m)%m)
#define reset(n, m) memset(n, m, sizeof n)
#define endl '\n'

const ll mod = 998244353;
int n, k;
int dig[20];
ll pw[20];
pair<ll, ll> memo[20][(1 << 10) + 100];

void process(ll x)
{
	n = 0;
	while (x)
		dig[n++] = x % 10, x /= 10;
}

pair<ll, ll> solve(int idx, int mask, bool lim)
{
	if (__builtin_popcount(mask) > k)
		return
		{	0, 0};
	if (idx == -1)
		return
		{	0, 1};

	pair<ll, ll> &ret = memo[idx][mask];
	if (!lim && ret != make_pair(-1ll, -1ll))
		return ret;
	ret =
	{	0, 0};
	int mx = 9;
	if (lim)
		mx = dig[idx];

	erep(i, 0, mx)
	{
		int nmask = mask | (1 << i);
		if (!i && __builtin_popcount(mask) == 0)
			nmask = mask;
		auto temp = solve(idx - 1, nmask, lim & (i == dig[idx]));
		ret.second += temp.second;
		ret.first += ((i * 1ll * pw[idx]) % mod * 1ll * (temp.second % mod)
				% mod) % mod + temp.first;
		ret.first %= mod;
	}
	if (!lim)
		return memo[idx][mask] = ret;
	return ret;
}

ll query(ll x)
{
	process(x);
//	cout << n << endl;
//	id++;
	reset(memo, -1);
	return solve(n - 1, 0, 1).first;
}

int main()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);

	ll l, r;
	cin >> l >> r >> k;

	pw[0] = 1;
	rep(i, 1, 20)
		pw[i] = (pw[i - 1] * 10ll) % mod;

	ll res = query(r) - query(l - 1);
	res = mod(res, mod);
	cout << res << endl;
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<vector<int> > vvi;
typedef pair<int, int> pii;

#define erep(i, x, n) for (auto i = x; i<=(ll)(n); i++)
#define rep(i, x, n) for(auto i = x; i<(ll)(n); i++)
#define all(v) ((v).begin()), ((v).end())
#define sz(v) ((int)((v).size()))
#define mod(n, m) (((n%m) + m)%m)
#define reset(n, m) memset(n, m, sizeof n)
#define endl '\n'

const ll mod = 998244353;
int n, k;
int dig[20];
ll pw[20];
pair<ll, ll> memo[20][(1 << 10) + 100];

void process(ll x)
{
	n = 0;
	while (x)
		dig[n++] = x % 10, x /= 10;
}

pair<ll, ll> solve(int idx, int mask, bool lim)
{
	if (__builtin_popcount(mask) > k)
		return
		{	0, 0};
	if (idx == -1)
		return
		{	0, 1};

	pair<ll, ll> &ret = memo[idx][mask];
	if (!lim && ret != make_pair(-1ll, -1ll))
		return ret;
	ret =
	{	0, 0};
	int mx = 9;
	if (lim)
		mx = dig[idx];

	erep(i, 0, mx)
	{
		int nmask = mask | (1 << i);
		if (!i && __builtin_popcount(mask) == 0)
			nmask = mask;
		auto temp = solve(idx - 1, nmask, lim & (i == dig[idx]));
		ret.second += temp.second;
		ll val = (i * pw[idx]) % mod;
		val = mod(val * temp.second, mod);
		val += temp.first;
		val %= mod;
		ret.first += val;
		ret.first %= mod;
	}
	if (!lim)
		return memo[idx][mask] = ret;
	return ret;
}

ll query(ll x)
{
	process(x);
//	cout << n << endl;
//	id++;
	reset(memo, -1);
	return solve(n - 1, 0, 1).first;
}

int main()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);

	ll l, r;
	cin >> l >> r >> k;

	pw[0] = 1;
	rep(i, 1, 20)
		pw[i] = (pw[i - 1] * 10ll) % mod;

	ll res = query(r) - query(l - 1);
	res = mod(res, mod);
	cout << res << endl;
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef __int128_t i128;
typedef long long i64;
#ifdef DEBUG
#define FPEN freopen("in.txt", "r", stdin);
#define FPEN2 freopen("out.txt", "w", stdout);
#else
#define FPEN
#define FPEN2
#endif
#define Sz(a) ((int)(a).size())
const int maxn = 200009;
const int MOD = 998244353 ;
pair<i64,i64> dp[20][1<<11];
int num[20],k;
int ccount[1<<11];
i64 deg10[20];
i64 cal2(int state,int len,i64 cur){
  if(ccount[state]>k)return 0;
  //cout<<state<<" "<<len<<" "<<cur<<" ";
  if(len==0){return cur;}
  i64 res=0;
  for(int i=0;i<(1<<10);++i){
    if(ccount[state|i]<=k)(res+=dp[len][i].first+cur*deg10[len]%MOD*dp[len][i].second%MOD)%=MOD;
  }
  //cout<<cur<<"\n";
  return res;
}
i64 dfs(int pos,int state,i64 cur){
  if(ccount[state]>k)return 0;
  if(pos==-1){
    if(ccount[state]<=k)return cur;
    return 0;
  }
  i64 res=0;
  for(int i=0;i<num[pos];++i){
    if(state==0&&i==0)res+=dfs(pos-1,0,cur);
    res+=cal2(state|(1<<i),pos,(cur*10+i)%MOD);
    if(res>=MOD)res-=MOD;
  }
  res+=dfs(pos-1,state|(1<<num[pos]),(cur*10+num[pos])%MOD);
  if(res>=MOD)res-=MOD;
  return res;

}
i64 cal(i64 n){
  int len=0;
  vector<int> a;
  while(n){
    num[len++]=n%10;
    n/=10;
  }
  if(len==0)return 0;
  return dfs(len-1,0,0);
}
int main(){
  FPEN;
  ios_base::sync_with_stdio(false);cout.tie(0);cin.tie(0);
  ccount[0]=0;
  for(int i=1;i<(1<<11);++i)ccount[i]=ccount[i&(i-1)]+1;
  deg10[0]=1;
  for(int i=1;i<20;++i)deg10[i]=deg10[i-1]*10%MOD;
  for(int i=0;i<=9;++i)dp[1][1<<i]={i,1};

  for(int i=2;i<=19;++i){
    for(int j=0;j<(1<<10);++j){
      for(int jj=0;jj<10;++jj){
        if(j>>jj&1){
          (dp[i][j].first+=dp[i-1][j].first*10+dp[i-1][j].second*jj)%=MOD;
          (dp[i][j].second+=dp[i-1][j].second)%=MOD;
          (dp[i][j].first+=dp[i-1][j^(1<<jj)].first*10+dp[i-1][j^(1<<jj)].second*jj)%=MOD;
          (dp[i][j].second+=dp[i-1][j^(1<<jj)].second)%=MOD;
        }
      }
    }
  }
  i64 l,r;cin>>l>>r>>k;
  cout<<((cal(r)-cal(l-1))%MOD+MOD)%MOD<<'\n';
  //cout<<cal(r)<<endl;
  return 0;
}
//2020.05.31 16:19:18


#include <bits/stdc++.h>
using namespace std;
typedef __int128_t i128;
typedef long long i64;
#ifdef DEBUG
#define FPEN freopen("in.txt", "r", stdin);
#define FPEN2 freopen("out.txt", "w", stdout);
#else
#define FPEN
#define FPEN2
#endif
#define Sz(a) ((int)(a).size())
const int maxn = 200009;
const int MOD = 998244353 ;
pair<i64,i64> dp[20][1<<11];
int num[20],k;
int ccount[1<<11];
i64 deg10[20];
i64 cal2(int state,int len,i64 cur){
  if(ccount[state]>k)return 0;
  if(len==0)return cur;
  i64 res=0;
  for(int i=0;i<(1<<10);++i){
    if(ccount[state|i]<=k)(res+=dp[len][i].first+cur*deg10[len]%MOD*dp[len][i].second%MOD)%=MOD;
  }
  return res;
}
i64 dfs(int pos,int state,i64 cur){
  if(ccount[state]>k)return 0;
  if(pos==-1){
    if(ccount[state]<=k)return cur;
    return 0;
  }
  i64 res=0;
  for(int i=0;i<num[pos];++i){
    res+=cal2(state|(1<<i),pos,(cur*10+i)%MOD);
    if(res>=MOD)res-=MOD;
  }
  res+=dfs(pos-1,state|(1<<num[pos]),(cur*10+num[pos])%MOD);
  if(res>=MOD)res-=MOD;
  return res;

}
i64 cal(i64 n){
  int len=0;
  vector<int> a;
  while(n){
    num[len++]=n%10;
    n/=10;
  }
  if(len==0)return 0;
  return dfs(len-1,0,0);
}
int main(){
  FPEN;
  ios_base::sync_with_stdio(false);cout.tie(0);cin.tie(0);
  ccount[0]=0;
  for(int i=1;i<(1<<11);++i)ccount[i]=ccount[i&(i-1)]+1;
  deg10[0]=1;
  for(int i=1;i<20;++i)deg10[i]=deg10[i-1]*10%MOD;
  for(int i=0;i<=9;++i)dp[1][1<<i]={i,1};

  for(int i=2;i<=19;++i){
    for(int j=0;j<(1<<10);++j){
      for(int jj=0;jj<10;++jj){
        if(j>>jj&1){
          (dp[i][j].first+=dp[i-1][j].first*10+dp[i-1][j].second*jj)%=MOD;
          (dp[i][j].second+=dp[i-1][j].second)%=MOD;
          (dp[i][j].first+=dp[i-1][j^(1<<jj)].first*10+dp[i-1][j^(1<<jj)].second*jj)%=MOD;
          (dp[i][j].second+=dp[i-1][j^(1<<jj)].second)%=MOD;
        }
      }
    }
  }
  i64 l,r;cin>>l>>r>>k;
  cout<<((cal(r)-cal(l-1))%MOD+MOD)%MOD<<'\n';
  //cout<<cal(r)<<endl;
  return 0;
}
//2020.05.31 16:19:18


#include <bits/stdc++.h>
using namespace std;
typedef __int128_t i128;
typedef long long i64;
#ifdef DEBUG
#define FPEN freopen("in.txt", "r", stdin);
#define FPEN2 freopen("out.txt", "w", stdout);
#else
#define FPEN
#define FPEN2
#endif
#define Sz(a) ((int)(a).size())
const int maxn = 200009;
const int MOD = 998244353 ;
pair<i64,i64> dp[20][1<<11];
int num[20],k;
int ccount[1<<11];
i64 deg10[20];
i64 cal2(int state,int len,i64 cur){
  if(ccount[state]>k)return 0;
  if(len==0){return cur;}
  i64 res=0;
  for(int i=0;i<(1<<10);++i){
    if(ccount[state|i]<=k)(res+=dp[len][i].first+cur*deg10[len]%MOD*dp[len][i].second%MOD)%=MOD;
  }
  return res;
}
i64 dfs(int pos,int state,i64 cur){
  if(ccount[state]>k)return 0;
  if(pos==-1){
    if(ccount[state]<=k)return cur;
    return 0;
  }
  i64 res=0;
  for(int i=0;i<num[pos];++i){
    if(state==0&&i==0)continue;
    res+=cal2(state|(1<<i),pos,(cur*10+i)%MOD);
    if(res>=MOD)res-=MOD;
  }
  res+=dfs(pos-1,state|(1<<num[pos]),(cur*10+num[pos])%MOD);
  if(res>=MOD)res-=MOD;
  return res;

}
i64 cal(i64 n){
  int len=0;
  while(n){
    num[len++]=n%10;
    n/=10;
  }
  if(len==0)return 0;
  i64 res=0;
  for(int i=len-2;i>=0;--i){
    for(int a=1;a<=9;++a){
      res+=cal2(1<<a,i,a);
      if(res>=MOD)res-=MOD;
    }
  }
  return (dfs(len-1,0,0)+res)%MOD;
}
int main(){
  FPEN;
  ios_base::sync_with_stdio(false);cout.tie(0);cin.tie(0);
  ccount[0]=0;
  for(int i=1;i<(1<<11);++i)ccount[i]=ccount[i&(i-1)]+1;
  deg10[0]=1;
  for(int i=1;i<20;++i)deg10[i]=deg10[i-1]*10%MOD;
  for(int i=0;i<=9;++i)dp[1][1<<i]={i,1};

  for(int i=2;i<=19;++i){
    for(int j=0;j<(1<<10);++j){
      for(int jj=0;jj<10;++jj){
        if(j>>jj&1){
          (dp[i][j].first+=dp[i-1][j].first*10+dp[i-1][j].second*jj)%=MOD;
          (dp[i][j].second+=dp[i-1][j].second)%=MOD;
          (dp[i][j].first+=dp[i-1][j^(1<<jj)].first*10+dp[i-1][j^(1<<jj)].second*jj)%=MOD;
          (dp[i][j].second+=dp[i-1][j^(1<<jj)].second)%=MOD;
        }
      }
    }
  }
  i64 l,r;cin>>l>>r>>k;
  cout<<((cal(r)-cal(l-1))%MOD+MOD)%MOD<<'\n';
  //cout<<cal(r)<<endl;
  return 0;
}
//2020.05.31 16:19:18


#include<iostream>
#include<cstdio>
#include<cmath>
#include<queue>
#include<vector>
#include<string.h>
#include<cstring>
#include<algorithm>
#include<set>
#include<stack>
#include<map>
#include<fstream>
#include<cstdlib>
#include<ctime>
#include<list>
#include<climits>
#include<bitset>
#include<random>
#include <ctime>
#include <cassert>
#include <complex>
#include <cstring>
#include <chrono>
using namespace std;
#define fio ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define fopen freopen("input.in", "r", stdin);freopen("output.in", "w", stdout);
#define left asfdasdasdfasdfsdfasfsdfasfdas1
#define right asfdasdasdfasdfsdfasfsdfasfdas2
#define y1 asfdasdasdfasdfsdfasfsdfasfdas3
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
typedef long long ll;
typedef long double ld;
typedef unsigned int un;
const int dell[8][2]={{1,2},{1,-2},{2,1},{2,-1},{-1,2},{-1,-2},{-2,1},{-2,-1}};
const ll mod=998244353;
const int inf=((ll)1<<31)-1;
const int maxn=2e3+1;
const int maxm=1e2+7;
const double eps=1e-12;
const double pi=acos(-1.0);
const int csize=22;
int n,k,m,ar[maxn];

ll c[30][30],f[30];
ll ff[maxn][30];
ll vv[maxn][30];

ll func1(ll x,ll& sz,int now=0){
    //cout<<"x= "<<x<<endl;
    if(x==0){
        if(now<=1)sz=1;
        else sz=0;
        return vv[now|1][0];
    }
    int ins=0;
    ll mid=x;
    while(mid){
        mid/=10;
        ins++;
    }
    ll szmid=0,szmy=0,ans=0;
    //cout<<"be = "<<x<<" "<<now<<endl;
    for(int i=ins-1;i>=0;i--){
        int val;
        if(i==0)val=x%10;
        else val=x/f[i]%10;
        if(val>0){
            if(now==0){
                ans = (ans + vv[now][i])%mod;
                szmid = (szmid + ff[now][i])%mod;
                //cout<<"now== "<<ans<<" "<<szmid<<endl;
            }
            else {
                ans = (ans + vv[now|1][i])%mod;
                szmid = (szmid + ff[now|1][i])%mod;
            }
        }
        //cout<<"val = "<<val<<" "<<i<<endl;
        for(int j=1;j<val;j++){
            ans = (ans + vv[now|(1<<j)][i])%mod;
            ans = (ans + ff[now|(1<<j)][i]*j%mod*(f[i]%mod)%mod)%mod;
            szmid = (szmid + ff[now|(1<<j)][i])%mod;
            //cout<<j<<" "<<ans<<endl;
        }
        now |= (1<<val);
        if(i>0){
            ans += func1(x%f[i],szmy,now);
            ans %= mod;
            //ans = (ans + sz*val%mod*(f[i]%mod))%mod;
        }
        else{
            int ins=0,nn=now;
            while(nn){
                if(nn&1){
                    ins++;
                }
                nn >>= 1;
            }
            if(ins<=k)szmy++;
            //cout<<"i = "<<ins<<" "<<now<<endl;
        }
        ans = (ans + szmy*val*(f[i]%mod))%mod;
        break;
    }
    sz = (szmy+szmid)%mod;
    //cout<<"ans = "<<x<<" "<<now<<" "<<ans<<" "<<szmy<<" "<<szmid<<endl;
    return ans;
}
int main()
{
#ifndef ONLINE_JUDGE
    //fopen
    //freopen("input.in","r",stdin);
#endif
    ll a,b;
    scanf("%lld%lld%d",&a,&b,&k);
    memset(c,0,sizeof(c));
    c[0][0]=1;
    f[0]=1;
    for(int i=1;i<=20;i++){
        for(int j=0;j<=i;j++){
            c[i][j]=j==0?1:c[i-1][j-1]+c[i-1][j];
        }
        f[i]=f[i-1]*10;
    }
    memset(ff,0,sizeof(ff));
    memset(vv,0,sizeof(vv));
    for(int i=0;i<maxn;i++){
        int x=i,ins=0;
        while(x){
            if(x&1)ins++;
            x >>= 1;
        }
        if(ins<=k)ff[i][0]=1;
    }
    for(int j=1;j<30;j++){
        for(int i=0;i<maxn;i++){
            for(int r=0;r<10;r++){
                ff[i][j] = (ff[i][j]+ff[i|(1<<r)][j-1])%mod;
                vv[i][j] = (vv[i][j]+
                        ff[i|(1<<r)][j-1]*r%mod*(f[j-1]%mod)%mod+vv[i|(1<<r)][j-1])%mod;
                //if(i==0 && j==1)cout<<r<<" "<<vv[i][j]<<endl;
            }
        }
    }

    ll sz;
    ll ans=(func1(b,sz)-func1(a-1,sz)+mod)%mod;
    //cout<<func1(a-1,sz)<<" "<<func1(b,sz)<<endl;
    printf("%lld\n",ans);
    return 0;
}


#include<iostream>
#include<cstdio>
#include<cmath>
#include<queue>
#include<vector>
#include<string.h>
#include<cstring>
#include<algorithm>
#include<set>
#include<stack>
#include<map>
#include<fstream>
#include<cstdlib>
#include<ctime>
#include<list>
#include<climits>
#include<bitset>
#include<random>
#include <ctime>
#include <cassert>
#include <complex>
#include <cstring>
#include <chrono>
using namespace std;
#define fio ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define fopen freopen("input.in", "r", stdin);freopen("output.in", "w", stdout);
#define left asfdasdasdfasdfsdfasfsdfasfdas1
#define right asfdasdasdfasdfsdfasfsdfasfdas2
#define y1 asfdasdasdfasdfsdfasfsdfasfdas3
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
typedef long long ll;
typedef long double ld;
typedef unsigned int un;
const int dell[8][2]={{1,2},{1,-2},{2,1},{2,-1},{-1,2},{-1,-2},{-2,1},{-2,-1}};
const ll mod=998244353;
const int inf=((ll)1<<31)-1;
const int maxn=2e3+1;
const int maxm=1e2+7;
const double eps=1e-12;
const double pi=acos(-1.0);
const int csize=22;
int n,k,m,ar[maxn];

ll c[30][30],f[30];
ll ff[maxn][30];
ll vv[maxn][30];

ll func1(ll x,ll& sz,int now=0){
    //cout<<"x= "<<x<<endl;
    if(x==0){
        sz=ff[now][0];
        return vv[now][0];
    }
    int ins=0;
    ll mid=x;
    while(mid){
        mid/=10;
        ins++;
    }
    ll szmid=0,szmy=0,ans=0;
    //cout<<"be = "<<x<<" "<<now<<endl;
    for(int i=ins-1;i>=0;i--){
        int val;
        if(i==0)val=x%10;
        else val=x/f[i]%10;
        if(val>0){
            if(now==0){
                ans = (ans + vv[now][i])%mod;
                szmid = (szmid + ff[now][i])%mod;
            }
            else {
                ans = (ans + vv[now|1][i])%mod;
                szmid = (szmid + ff[now|1][i])%mod;
            }
        }
        //cout<<"val = "<<val<<" "<<i<<endl;
        for(int j=1;j<val;j++){
            ans = (ans + vv[now|(1<<j)][i])%mod;
            ans = (ans + ff[now|(1<<j)][i]*j%mod*(f[i]%mod)%mod)%mod;
            szmid = (szmid + ff[now|(1<<j)][i])%mod;
            //cout<<j<<" "<<ans<<endl;
        }
        now |= (1<<val);
        if(i>0){
            ans += func1(x%f[i],szmy,now);
            ans %= mod;
            //ans = (ans + sz*val%mod*(f[i]%mod))%mod;
        }
        else{
            int ins=0,nn=now;
            while(nn){
                if(nn&1){
                    ins++;
                }
                nn >>= 1;
            }
            if(ins<=k)szmy++;
            //cout<<"i = "<<ins<<" "<<now<<endl;
        }
        ans = (ans + szmy*val*(f[i]%mod))%mod;
        break;
    }
    sz = (szmy+szmid)%mod;
    //cout<<"ans = "<<x<<" "<<now<<" "<<ans<<" "<<szmy<<" "<<szmid<<endl;
    return ans;
}
int main()
{
#ifndef ONLINE_JUDGE
    //fopen
    //freopen("input.in","r",stdin);
#endif
    ll a,b;
    scanf("%lld%lld%d",&a,&b,&k);
    memset(c,0,sizeof(c));
    c[0][0]=1;
    f[0]=1;
    for(int i=1;i<=20;i++){
        for(int j=0;j<=i;j++){
            c[i][j]=j==0?1:c[i-1][j-1]+c[i-1][j];
        }
        f[i]=f[i-1]*10;
    }
    memset(ff,0,sizeof(ff));
    memset(vv,0,sizeof(vv));
    for(int i=0;i<maxn;i++){
        int x=i,ins=0;
        while(x){
            if(x&1)ins++;
            x >>= 1;
        }
        if(ins<=k)ff[i][0]=1;
    }
    for(int j=1;j<30;j++){
        for(int i=0;i<maxn;i++){
            for(int r=0;r<10;r++){
                ff[i][j] = (ff[i][j]+ff[i|(1<<r)][j-1])%mod;
                vv[i][j] = (vv[i][j]+
                        ff[i|(1<<r)][j-1]*r%mod*(f[j-1]%mod)%mod+vv[i|(1<<r)][j-1])%mod;
            }
        }
    }

    ll sz;
    ll ans=(func1(b,sz)-func1(a-1,sz)+mod)%mod;
    //cout<<func1(a-1,sz)<<" "<<func1(b,sz)<<endl;
    printf("%lld\n",ans);
    return 0;
}


#include<iostream>
#include<cstdio>
#include<cmath>
#include<queue>
#include<vector>
#include<string.h>
#include<cstring>
#include<algorithm>
#include<set>
#include<stack>
#include<map>
#include<fstream>
#include<cstdlib>
#include<ctime>
#include<list>
#include<climits>
#include<bitset>
#include<random>
#include <ctime>
#include <cassert>
#include <complex>
#include <cstring>
#include <chrono>
using namespace std;
#define fio ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define fopen freopen("input.in", "r", stdin);freopen("output.in", "w", stdout);
#define left asfdasdasdfasdfsdfasfsdfasfdas1
#define right asfdasdasdfasdfsdfasfsdfasfdas2
#define y1 asfdasdasdfasdfsdfasfsdfasfdas3
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
typedef long long ll;
typedef long double ld;
typedef unsigned int un;
const int dell[8][2]={{1,2},{1,-2},{2,1},{2,-1},{-1,2},{-1,-2},{-2,1},{-2,-1}};
const ll mod=998244353;
const int inf=((ll)1<<31)-1;
const int maxn=2e3+1;
const int maxm=1e2+7;
const double eps=1e-12;
const double pi=acos(-1.0);
const int csize=22;
int n,k,m,ar[maxn];

ll c[30][30],f[30];
ll ff[maxn][30];
ll vv[maxn][30];

ll func1(ll x,ll& sz,int now=0){
    //cout<<"x= "<<x<<endl;
    if(x==0){
        sz=ff[now|1][0];
        return vv[now|1][0];
    }
    int ins=0;
    ll mid=x;
    while(mid){
        mid/=10;
        ins++;
    }
    ll szmid=0,szmy=0,ans=0;
    //cout<<"be = "<<x<<" "<<now<<endl;
    for(int i=ins-1;i>=0;i--){
        int val;
        if(i==0)val=x%10;
        else val=x/f[i]%10;
        if(val>0){
            if(now==0){
                ans = (ans + vv[now][i])%mod;
                szmid = (szmid + ff[now][i])%mod;
                //cout<<"now== "<<ans<<" "<<szmid<<endl;
            }
            else {
                ans = (ans + vv[now|1][i])%mod;
                szmid = (szmid + ff[now|1][i])%mod;
            }
        }
        //cout<<"val = "<<val<<" "<<i<<endl;
        for(int j=1;j<val;j++){
            ans = (ans + vv[now|(1<<j)][i])%mod;
            ans = (ans + ff[now|(1<<j)][i]*j%mod*(f[i]%mod)%mod)%mod;
            szmid = (szmid + ff[now|(1<<j)][i])%mod;
            //cout<<j<<" "<<ans<<endl;
        }
        now |= (1<<val);
        if(i>0){
            ans += func1(x%f[i],szmy,now);
            ans %= mod;
            //ans = (ans + sz*val%mod*(f[i]%mod))%mod;
        }
        else{
            int ins=0,nn=now;
            while(nn){
                if(nn&1){
                    ins++;
                }
                nn >>= 1;
            }
            if(ins<=k)szmy++;
            //cout<<"i = "<<ins<<" "<<now<<endl;
        }
        ans = (ans + szmy*val*(f[i]%mod))%mod;
        break;
    }
    sz = (szmy+szmid)%mod;
    //cout<<"ans = "<<x<<" "<<now<<" "<<ans<<" "<<szmy<<" "<<szmid<<endl;
    return ans;
}
int main()
{
#ifndef ONLINE_JUDGE
    fopen
    //freopen("input.in","r",stdin);
#endif
    ll a,b;
    scanf("%lld%lld%d",&a,&b,&k);
    memset(c,0,sizeof(c));
    c[0][0]=1;
    f[0]=1;
    for(int i=1;i<=20;i++){
        for(int j=0;j<=i;j++){
            c[i][j]=j==0?1:c[i-1][j-1]+c[i-1][j];
        }
        f[i]=f[i-1]*10;
    }
    memset(ff,0,sizeof(ff));
    memset(vv,0,sizeof(vv));
    for(int i=0;i<maxn;i++){
        int x=i,ins=0;
        while(x){
            if(x&1)ins++;
            x >>= 1;
        }
        if(ins<=k)ff[i][0]=1;
    }
    for(int j=1;j<30;j++){
        for(int i=0;i<maxn;i++){
            for(int r=0;r<10;r++){
                ff[i][j] = (ff[i][j]+ff[i|(1<<r)][j-1])%mod;
                vv[i][j] = (vv[i][j]+
                        ff[i|(1<<r)][j-1]*r%mod*(f[j-1]%mod)%mod+vv[i|(1<<r)][j-1])%mod;
                //if(i==0 && j==1)cout<<r<<" "<<vv[i][j]<<endl;
            }
        }
    }

    ll sz;
    ll ans=(func1(b,sz)-func1(a-1,sz)+mod)%mod;
    //cout<<func1(a-1,sz)<<" "<<func1(b,sz)<<endl;
    printf("%lld\n",ans);
    return 0;
}


#include<iostream>#include<cstdio> #include<cmath>#include<queue>#include<vector>#include<string.h>#include<cstring>#include<algorithm>#include<set>#include<stack>#include<map>#include<fstream>#include<cstdlib>#include<ctime>#include<list>#include<climits>#include<bitset>#include<random>#include <ctime>#include <cassert>#include <complex>#include <cstring>#include <chrono>using namespace std;#define fio ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);#define fopen freopen("input.in", "r", stdin);freopen("output.in", "w", stdout);#define left asfdasdasdfasdfsdfasfsdfasfdas1#define right asfdasdasdfasdfsdfasfsdfasfdas2#define y1 asfdasdasdfasdfsdfasfsdfasfdas3mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());typedef long long ll;typedef long double ld;typedef unsigned int un;const int dell[8][2]={{1,2},{1,-2},{2,1},{2,-1},{-1,2},{-1,-2},{-2,1},{-2,-1}};const ll mod=998244353;const int inf=((ll)1<<31)-1;const int maxn=2e3+1;const int maxm=1e2+7;const double eps=1e-12;const double pi=acos(-1.0);const int csize=22;int n,k,m,ar[maxn];ll c[30][30],f[30];ll ff[maxn][30];ll vv[maxn][30];ll func1(ll x,ll& sz,int now=0){    //cout<<"x= "<<x<<endl;    if(x==0){        if(now<=1)sz=1;        else sz=0;        return vv[now|1][0];    }    int ins=0;    ll mid=x;    while(mid){        mid/=10;        ins++;    }    ll szmid=0,szmy=0,ans=0;    //cout<<"be = "<<x<<" "<<now<<endl;    for(int i=ins-1;i>=0;i--){        int val;        if(i==0)val=x%10;        else val=x/f[i]%10;        if(val>0){            if(now==0){                ans = (ans + vv[now][i])%mod;                szmid = (szmid + ff[now][i])%mod;                //cout<<"now== "<<ans<<" "<<szmid<<endl;            }            else {                ans = (ans + vv[now|1][i])%mod;                szmid = (szmid + ff[now|1][i])%mod;            }        }        //cout<<"val = "<<val<<" "<<i<<endl;        for(int j=1;j<val;j++){            ans = (ans + vv[now|(1<<j)][i])%mod;            ans = (ans + ff[now|(1<<j)][i]*j%mod*(f[i]%mod)%mod)%mod;            szmid = (szmid + ff[now|(1<<j)][i])%mod;            //cout<<j<<" "<<ans<<endl;        }        now |= (1<<val);        if(i>0){            ans += func1(x%f[i],szmy,now);            ans %= mod;            //ans = (ans + sz*val%mod*(f[i]%mod))%mod;        }        else{            int ins=0,nn=now;            while(nn){                if(nn&1){                    ins++;                }                nn >>= 1;            }            if(ins<=k)szmy++;            //cout<<"i = "<<ins<<" "<<now<<endl;        }        ans = (ans + szmy*val*(f[i]%mod))%mod;        break;    }    sz = (szmy+szmid)%mod;    //cout<<"ans = "<<x<<" "<<now<<" "<<ans<<" "<<szmy<<" "<<szmid<<endl;    return ans;}int main(){#ifndef ONLINE_JUDGE    //fopen    //freopen("input.in","r",stdin);#endif    ll a,b;    scanf("%lld%lld%d",&a,&b,&k);    memset(c,0,sizeof(c));    c[0][0]=1;    f[0]=1;    for(int i=1;i<=20;i++){        for(int j=0;j<=i;j++){            c[i][j]=j==0?1:c[i-1][j-1]+c[i-1][j];        }        f[i]=f[i-1]*10;    }    memset(ff,0,sizeof(ff));    memset(vv,0,sizeof(vv));    for(int i=0;i<maxn;i++){        int x=i,ins=0;        while(x){            if(x&1)ins++;            x >>= 1;        }        if(ins<=k)ff[i][0]=1;    }    for(int j=1;j<30;j++){        for(int i=0;i<maxn;i++){            for(int r=0;r<10;r++){                ff[i][j] = (ff[i][j]+ff[i|(1<<r)][j-1])%mod;                vv[i][j] = (vv[i][j]+                        ff[i|(1<<r)][j-1]*r%mod*(f[j-1]%mod)%mod+vv[i|(1<<r)][j-1])%mod;                //if(i==0 && j==1)cout<<r<<" "<<vv[i][j]<<endl;            }        }    }        ll sz;    ll ans=(func1(b,sz)-func1(a-1,sz)+mod)%mod;    //cout<<func1(a-1,sz)<<" "<<func1(b,sz)<<endl;    printf("%lld\n",ans);    return 0;}


#include<iostream>
#include<cstdio>
#include<cmath>
#include<queue>
#include<vector>
#include<string.h>
#include<cstring>
#include<algorithm>
#include<set>
#include<stack>
#include<map>
#include<fstream>
#include<cstdlib>
#include<ctime>
#include<list>
#include<climits>
#include<bitset>
#include<random>
#include <ctime>
#include <cassert>
#include <complex>
#include <cstring>
#include <chrono>
using namespace std;
#define fio ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define fopen freopen("input.in", "r", stdin);freopen("output.in", "w", stdout);
#define left asfdasdasdfasdfsdfasfsdfasfdas1
#define right asfdasdasdfasdfsdfasfsdfasfdas2
#define y1 asfdasdasdfasdfsdfasfsdfasfdas3
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
typedef long long ll;
typedef long double ld;
typedef unsigned int un;
const int dell[8][2]={{1,2},{1,-2},{2,1},{2,-1},{-1,2},{-1,-2},{-2,1},{-2,-1}};
const ll mod=998244353;
const int inf=((ll)1<<31)-1;
const int maxn=2e3+1;
const int maxm=1e2+7;
const double eps=1e-12;
const double pi=acos(-1.0);
const int csize=22;
int n,k,m,ar[maxn];

ll c[30][30],f[30];
ll ff[maxn][30];
ll vv[maxn][30];

ll func1(ll x,ll& sz,int now=0){
    //cout<<"x= "<<x<<endl;
    int nnow=now;
    if(x==0){
        sz=ff[now|1][0];
        return vv[now|1][0];
    }
    int ins=0;
    ll mid=x;
    while(mid){
        mid/=10;
        ins++;
    }
    ll szmid=0,szmy=0,ans=0;
    //cout<<"be = "<<x<<" "<<now<<endl;
    for(int i=ins-1;i>=0;i--){
        int val;
        if(i==0)val=x%10;
        else val=x/f[i]%10;
        if(val>0){
            if(now==0){
                ll sss;
                ans = (ans + func1(f[i]-1,sss,0))%mod;
                //szmid = (szmid + sss)%mod;
                //cout<<"now== "<<ans<<" "<<szmid<<endl;
            }
            else {
                ans = (ans + vv[now|1][i])%mod;
                szmid = (szmid + ff[now|1][i])%mod;
            }
        }
        //cout<<"val = "<<val<<" "<<i<<endl;
        for(int j=1;j<val;j++){
            ans = (ans + vv[now|(1<<j)][i])%mod;
            ans = (ans + ff[now|(1<<j)][i]*j%mod*(f[i]%mod)%mod)%mod;
            szmid = (szmid + ff[now|(1<<j)][i])%mod;
            //cout<<j<<" "<<ans<<endl;
        }
        now |= (1<<val);
        if(i>0){
            ll old=ans;
            if(i>=1 && x%f[i]<f[i-1])now |= 1;
            ans += func1(x%f[i],szmy,now);
            //cout<<"i>0 "<<ans<<" "<<ans-old<<" "<<szmy<<endl;
            ans %= mod;
            ans = (ans + szmy*val%mod*(f[i]%mod))%mod;
        }
        else{
            int ins=0,nn=now;
            while(nn){
                if(nn&1){
                    ins++;
                }
                nn >>= 1;
            }
            if(ins<=k){
                szmy++;
                ans = (ans + x)%mod;
            }
            //cout<<"i = "<<ins<<" "<<now<<endl;
        }
        //ans = (ans + szmy*val*(f[i]%mod))%mod;
        break;
    }
    sz = (szmy+szmid)%mod;
    //cout<<"ans = "<<x<<" "<<nnow<<" "<<ans<<" "<<szmy<<" "<<szmid<<endl;
    return ans;
}
int main()
{
#ifndef ONLINE_JUDGE
    fopen
    //freopen("input.in","r",stdin);
#endif

    ll a=1,b;k=2;
    scanf("%lld%lld%d",&a,&b,&k);
    memset(c,0,sizeof(c));
    c[0][0]=1;
    f[0]=1;
    for(int i=1;i<=20;i++){
        for(int j=0;j<=i;j++){
            c[i][j]=j==0?1:c[i-1][j-1]+c[i-1][j];
        }
        f[i]=f[i-1]*10;
    }
    memset(ff,0,sizeof(ff));
    memset(vv,0,sizeof(vv));
    for(int i=0;i<maxn;i++){
        int x=i,ins=0;
        while(x){
            if(x&1)ins++;
            x >>= 1;
        }
        if(ins<=k)ff[i][0]=1;
    }
    for(int j=1;j<30;j++){
        for(int i=0;i<maxn;i++){
            //if(j>1)ff[i][j]+=ff[i][j-1],vv[i][j]+=vv[i][j-1];;
            for(int r=0;r<10;r++){
                ff[i][j] = (ff[i][j]+ff[i|(1<<r)][j-1])%mod;
                vv[i][j] = (vv[i][j]+
                        ff[i|(1<<r)][j-1]*r%mod*(f[j-1]%mod)%mod+vv[i|(1<<r)][j-1])%mod;
                //if(i==0 && j==1)cout<<r<<" "<<vv[i][j]<<endl;
            }
        }
    }

    ll sz;
    ll ans=(func1(b,sz)-func1(a-1,sz)+mod)%mod;
    //cout<<func1(a-1,sz)<<" "<<func1(b,sz)<<endl;
    printf("%lld\n",ans);
    return 0;
}


#include<iostream>
#include<cstdio>
#include<cmath>
#include<queue>
#include<vector>
#include<string.h>
#include<cstring>
#include<algorithm>
#include<set>
#include<stack>
#include<map>
#include<fstream>
#include<cstdlib>
#include<ctime>
#include<list>
#include<climits>
#include<bitset>
#include<random>
#include <ctime>
#include <cassert>
#include <complex>
#include <cstring>
#include <chrono>
using namespace std;
#define fio ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define fopen freopen("input.in", "r", stdin);freopen("output.in", "w", stdout);
#define left asfdasdasdfasdfsdfasfsdfasfdas1
#define right asfdasdasdfasdfsdfasfsdfasfdas2
#define y1 asfdasdasdfasdfsdfasfsdfasfdas3
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
typedef long long ll;
typedef long double ld;
typedef unsigned int un;
const int dell[8][2]={{1,2},{1,-2},{2,1},{2,-1},{-1,2},{-1,-2},{-2,1},{-2,-1}};
const ll mod=998244353;
const int inf=((ll)1<<31)-1;
const int maxn=2e3+1;
const int maxm=1e2+7;
const double eps=1e-12;
const double pi=acos(-1.0);
const int csize=22;
int n,k,m,ar[maxn];

ll c[30][30],f[30];
ll ff[maxn][30];
ll vv[maxn][30];

ll func1(ll x,ll& sz,int now=0){
    //cout<<"x= "<<x<<endl;
    if(x==0){
        sz=ff[now|1][0];
        return vv[now|1][0];
    }
    int ins=0;
    ll mid=x;
    while(mid){
        mid/=10;
        ins++;
    }
    ll szmid=0,szmy=0,ans=0;
    //cout<<"be = "<<x<<" "<<now<<endl;
    for(int i=ins-1;i>=0;i--){
        int val;
        if(i==0)val=x%10;
        else val=x/f[i]%10;
        if(val>0){
            if(now==0){
                ll sss;
                ans = (ans + func1(f[i]-1,sss,0))%mod;
                szmid = (szmid + sss)%mod;
                //cout<<"now== "<<ans<<" "<<szmid<<endl;
            }
            else {
                ans = (ans + vv[now|1][i])%mod;
                szmid = (szmid + ff[now|1][i])%mod;
            }
        }
        //cout<<"val = "<<val<<" "<<i<<endl;
        for(int j=1;j<val;j++){
            ans = (ans + vv[now|(1<<j)][i])%mod;
            ans = (ans + ff[now|(1<<j)][i]*j%mod*(f[i]%mod)%mod)%mod;
            szmid = (szmid + ff[now|(1<<j)][i])%mod;
           // cout<<j<<" "<<ans<<endl;
        }
        now |= (1<<val);
        if(i>0){
            ans += func1(x%f[i],szmy,now);
            ans %= mod;
            ans = (ans + szmy*val%mod*(f[i]%mod))%mod;
        }
        else{
            int ins=0,nn=now;
            while(nn){
                if(nn&1){
                    ins++;
                }
                nn >>= 1;
            }
            if(ins<=k){
                szmy++;
                ans = (ans + x)%mod;
            }
            //cout<<"i = "<<ins<<" "<<now<<endl;
        }
        //ans = (ans + szmy*val*(f[i]%mod))%mod;
        break;
    }
    sz = (szmy+szmid)%mod;
    //cout<<"ans = "<<x<<" "<<now<<" "<<ans<<" "<<szmy<<" "<<szmid<<endl;
    return ans;
}
int main()
{
#ifndef ONLINE_JUDGE
    fopen
    //freopen("input.in","r",stdin);
#endif
    ll a,b;
    scanf("%lld%lld%d",&a,&b,&k);
    memset(c,0,sizeof(c));
    c[0][0]=1;
    f[0]=1;
    for(int i=1;i<=20;i++){
        for(int j=0;j<=i;j++){
            c[i][j]=j==0?1:c[i-1][j-1]+c[i-1][j];
        }
        f[i]=f[i-1]*10;
    }
    memset(ff,0,sizeof(ff));
    memset(vv,0,sizeof(vv));
    for(int i=0;i<maxn;i++){
        int x=i,ins=0;
        while(x){
            if(x&1)ins++;
            x >>= 1;
        }
        if(ins<=k)ff[i][0]=1;
    }
    for(int j=1;j<30;j++){
        for(int i=0;i<maxn;i++){
            //if(j>1)ff[i][j]+=ff[i][j-1],vv[i][j]+=vv[i][j-1];;
            for(int r=0;r<10;r++){
                ff[i][j] = (ff[i][j]+ff[i|(1<<r)][j-1])%mod;
                vv[i][j] = (vv[i][j]+
                        ff[i|(1<<r)][j-1]*r%mod*(f[j-1]%mod)%mod+vv[i|(1<<r)][j-1])%mod;
                //if(i==0 && j==1)cout<<r<<" "<<vv[i][j]<<endl;
            }
        }
    }

    ll sz;
    ll ans=(func1(b,sz)-func1(a-1,sz)+mod)%mod;
    //cout<<func1(a-1,sz)<<" "<<func1(b,sz)<<endl;
    printf("%lld\n",ans);
    return 0;
}


#include <iostream>
#include <bits\stdc++.h>
#define fi first
#define se second
using namespace std;
long long l, r;
const long long md = 998244353;
long long k;
vector<int> modify1(long long v)
{
    vector<int> dg;
    long long c = v;
    while(c){dg.push_back(c % 10); c /= 10;}
    reverse(dg.begin(), dg.end());
    return dg;
}
vector<int> modify2(long long v)
{
    vector<int> dg = modify1(v);
    vector<int> z(dg.size() + 1);
    z[0] = 0;
    for(int i = 0; i < dg.size(); i++)
    {
        z[i + 1] = z[i] | (1 << dg[i]);
    }
    return z;
}
long long solve(long long v)
{
    pair<long long,long long> dp[25][1100];
    vector<int> dg = modify1(v);
    vector<int> z = modify2(v);
    z = modify2(v);
    long long cur = 0;
    int di = dg.size();
    for(int i = 0; i < di; i++)
    {
        for(int l = 0; l < dg[i]; l++)
        {
            int z0 = z[i] | (1 << l);
            if(__builtin_popcount(z0) <= k)
            {
                dp[i + 1][z0].fi += cur * 10 + l;
                dp[i + 1][z0].fi %= md;
                dp[i + 1][z0].se++;
            }
        }
        cur *= 10;
        cur += dg[i];
        for(int t = 1; t < 1 << 10; t++)
        {
            for(int v = 0; v <= 9; v++)
            {
                if(__builtin_popcount(t | (1 << v)) <= k)
                {
                long long u = dp[i][t].se % md;
                u *= v;
                u %= md;
                dp[i + 1][t | (1 << v)].fi += ((10 * dp[i][t].fi + u) % md);
                dp[i + 1][t | (1 << v)].fi %= md;
                dp[i + 1][t | (1 << v)].se += dp[i][t].se;
                }
            }
        }
    }
    long long res = 0;
    for(int i = 1; i < 1 << 10; i++)
    {
        res += dp[di][i].fi;
        res %= md;
    }
    return res;
}

int main()
{
    scanf("%lld%lld%lld", &l, &r, &k);
    vector<int> z = modify2(r);
    long long res;
    res = solve(r) - solve(l);
    res %= md;
    if(res < 0) res += md;
    if (__builtin_popcount(z.back()) <= k){res += r; res %= md;}
    printf("%lld", res);

    return 0;
}


#include <iostream>
#include <bits\stdc++.h>
#define fi first
#define se second
using namespace std;
long long l, r;
const long long md = 998244353;
long long k;
vector<int> modify1(long long v)
{
    vector<int> dg;
    long long c = v;
    while(c){dg.push_back(c % 10); c /= 10;}
    reverse(dg.begin(), dg.end());
    return dg;
}
vector<int> modify2(long long v)
{
    vector<int> dg = modify1(v);
    vector<int> z(dg.size() + 1);
    z[0] = 0;
    for(int i = 0; i < dg.size(); i++)
    {
        z[i + 1] = z[i] | (1 << dg[i]);
    }
    return z;
}
long long solve(long long v)
{
    pair<long long,long long> dp[25][1100];
    vector<int> dg = modify1(v);
    vector<int> z = modify2(v);
    z = modify2(v);
    int cur = 0;
    int di = dg.size();
    for(int i = 0; i < di; i++)
    {
        for(int l = 0; l < dg[i]; l++)
        {
            int z0 = z[i] | (1 << l);
            if(__builtin_popcount(z0) <= k)
            {
                dp[i + 1][z0].fi += cur * 10 + l;
                dp[i + 1][z0].fi %= md;
                dp[i + 1][z0].se++;
            }
        }
        cur *= 10;
        cur += dg[i];
        for(int t = 1; t < 1 << 10; t++)
        {
            for(int v = 0; v <= 9; v++)
            {
                if(__builtin_popcount(t | (1 << v)) <= k)
                {
                long long u = dp[i][t].se % md;
                u *= v;
                u %= md;
                dp[i + 1][t | (1 << v)].fi += ((10 * dp[i][t].fi + u) % md);
                dp[i + 1][t | (1 << v)].fi %= md;
                dp[i + 1][t | (1 << v)].se += dp[i][t].se;
                }
            }
        }
    }
    long long res = 0;
    for(int i = 1; i < 1 << 10; i++)
    {
        res += dp[di][i].fi;
        res %= md;
    }
    return res;
}

int main()
{
    scanf("%lld%lld%lld", &l, &r, &k);
    vector<int> z = modify2(r);
    long long res;
    res = solve(r) - solve(l);
    res %= md;
    if(res < md) res += md;
    if (__builtin_popcount(z.back()) <= k){res += r; res %= md;}
    printf("%lld", res);

    return 0;
}


#include <iostream>
#include <bits\stdc++.h>
#define fi first
#define se second
using namespace std;
long long l, r;
const long long md = 998244353;
long long k;
vector<long long> modify1(long long v)
{
    vector<long long> dg;
    long long c = v;
    long long dex = 10;
    while(c){dg.push_back(c % dex); c /= dex;}
    reverse(dg.begin(), dg.end());
    return dg;
}
vector<long long> modify2(long long v)
{
    vector<long long> dg = modify1(v);
    vector<long long> z(dg.size() + 1);
    z[0] = 0;
    for(long long i = 0; i < dg.size(); i++)
    {
        z[i + 1] = z[i] | (1 << dg[i]);
    }
    return z;
}
long long solve(long long v)
{
    pair<long long,long long> dp[25][1100];
    vector<long long> dg = modify1(v);
    vector<long long> z = modify2(v);
    z = modify2(v);
    long long cur = 0;
    long long di = dg.size();
    for(long long i = 0; i < di; i++)
    {
        for(long long l = 0; l < dg[i]; l++)
        {
            long long z0 = z[i] | (1 << l);
            if(__builtin_popcount(z0) <= k)
            {
                dp[i + 1][z0].fi += cur * 10 + l;
                dp[i + 1][z0].fi %= md;
                dp[i + 1][z0].se++;
            }
        }
        cur *= 10;
        cur += dg[i];
        for(long long t = 1; t < 1 << 10; t++)
        {
            for(long long v = 0; v <= 9; v++)
            {
                if(__builtin_popcount((t | (1 << v)) ^ ( t == 1 && v != 0)) <= k)
                {
                long long u = dp[i][t].se % md;
                u *= v;
                u %= md;
                dp[i + 1][(t | (1 << v)) ^ ( t == 1 && v != 0)].fi += ((10 * dp[i][t].fi + u) % md);
                dp[i + 1][(t | (1 << v)) ^ ( t == 1 && v != 0)].fi %= md;
                dp[i + 1][(t | (1 << v)) ^ ( t == 1 && v != 0)].se += dp[i][t].se;
                }
            }
        }
    }
    long long res = 0;
    for(long long i = 1; i < 1 << 10; i++)
    {
        res += dp[di][i].fi;
        res %= md;
    }
    return res;
}

int main()
{
    cin >> l >> r >> k;
    long long res;
    res = solve(r + 1) - solve(l);
    res %= md;
    if(res < 0) res += md;
    cout << res;

    return 0;
}


#include <iostream>
#include <bits\stdc++.h>
#define fi first
#define se second
using namespace std;
long long l, r;
const long long md = 998244353;
long long k;
vector<long long> modify1(long long v)
{
    vector<long long> dg;
    long long c = v;
    long long dex = 10;
    while(c){dg.push_back(c % dex); c /= dex;}
    reverse(dg.begin(), dg.end());
    return dg;
}
vector<long long> modify2(long long v)
{
    vector<long long> dg = modify1(v);
    vector<long long> z(dg.size() + 1);
    z[0] = 0;
    for(long long i = 0; i < dg.size(); i++)
    {
        z[i + 1] = z[i] | (1 << dg[i]);
    }
    return z;
}
long long solve(long long v)
{
    pair<long long,long long> dp[25][1100];
    vector<long long> dg = modify1(v);
    vector<long long> z = modify2(v);
    z = modify2(v);
    long long cur = 0;
    long long di = dg.size();
    for(long long i = 0; i < di; i++)
    {
        for(long long l = 0; l < dg[i]; l++)
        {
            long long z0 = z[i] | (1 << l);
            {
                dp[i + 1][z0].fi += cur * 10 + l;
                dp[i + 1][z0].fi %= md;
                dp[i + 1][z0].se++;
            }
        }
        cur *= 10;
        cur += dg[i];
        for(long long t = 1; t < 1 << 10; t++)
        {
            for(long long v = 0; v <= 9; v++)
            {
                {
                long long u = dp[i][t].se % md;
                u *= v;
                u %= md;
                dp[i + 1][(t | (1 << v)) ^ (t == 1 && v != 0)].fi += ((10 * dp[i][t].fi + u) % md);
                dp[i + 1][(t | (1 << v)) ^ (t == 1 && v != 0)].fi %= md;
                dp[i + 1][(t | (1 << v)) ^ (t == 1 && v != 0)].se += dp[i][t].se;
                }
            }
        }
    }
    long long res = 0;
    for(long long i = 1; i < 1 << 10; i++)
    {
        if(__builtin_popcount(i) > k) continue;
        res += dp[di][i].fi;
        res %= md;
    }
    return res;
}

int main()
{
    cin >> l >> r >> k;
    vector<long long> z = modify2(r);
    long long res;
    res = solve(r + 1) - solve(l);
    res %= md;
    if(res < 0) res += md;
    cout << res << endl;

    return 0;
}


#include <iostream>
#include <bits\stdc++.h>
#define fi first
#define se second
using namespace std;
long long l, r;
const long long md = 998244353;
long long k;
vector<long long> modify1(long long v)
{
    vector<long long> dg;
    long long c = v;
    long long dex = 10;
    while(c){dg.push_back(c % dex); c /= dex;}
    reverse(dg.begin(), dg.end());
    return dg;
}
vector<long long> modify2(long long v)
{
    vector<long long> dg = modify1(v);
    vector<long long> z(dg.size() + 1);
    z[0] = 0;
    for(long long i = 0; i < dg.size(); i++)
    {
        z[i + 1] = z[i] | (1 << dg[i]);
    }
    return z;
}
long long solve(long long v)
{
    pair<long long,long long> dp[25][1100];
    vector<long long> dg = modify1(v);
    vector<long long> z = modify2(v);
    z = modify2(v);
    long long cur = 0;
    long long di = dg.size();
    for(long long i = 0; i < di; i++)
    {
        for(long long l = 0; l < dg[i]; l++)
        {
            long long z0 = z[i] | (1 << l);
            if(__builtin_popcount(z0) <= k)
            {
                dp[i + 1][z0].fi += cur * 10 + l;
                dp[i + 1][z0].fi %= md;
                dp[i + 1][z0].se++;
            }
        }
        cur *= 10;
        cur += dg[i];
        for(long long t = 1; t < 1 << 10; t++)
        {
            for(long long v = 0; v <= 9; v++)
            {
                if(__builtin_popcount(t | (1 << v)) <= k)
                {
                long long u = dp[i][t].se % md;
                u *= v;
                u %= md;
                dp[i + 1][t | (1 << v)].fi += ((10 * dp[i][t].fi + u) % md);
                dp[i + 1][t | (1 << v)].fi %= md;
                dp[i + 1][t | (1 << v)].se += dp[i][t].se;
                }
            }
        }
    }
    long long res = 0;
    for(long long i = 1; i < 1 << 10; i++)
    {
        res += dp[di][i].fi;
        res %= md;
    }
    return res;
}

int main()
{
    cin >> l >> r >> k;
    vector<long long> z = modify2(r);
    long long res;
    res = solve(r) - solve(l);
    res %= md;
    if(res < 0) res += md;
    if (__builtin_popcount(z.back()) <= k){res += r; res %= md;}
    cout << res;

    return 0;
}


#include <iostream>
#include <bits\stdc++.h>
#define fi first
#define se second
using namespace std;
long long l, r;
const long long md = 998244353;
long long k;
vector<long long> modify1(long long v)
{
    vector<long long> dg;
    long long c = v;
    long long dex = 10;
    while(c){dg.push_back(c % dex); c /= dex;}
    reverse(dg.begin(), dg.end());
    return dg;
}
vector<long long> modify2(long long v)
{
    vector<long long> dg = modify1(v);
    vector<long long> z(dg.size() + 1);
    z[0] = 0;
    for(long long i = 0; i < dg.size(); i++)
    {
        z[i + 1] = z[i] | (1 << dg[i]);
    }
    return z;
}
long long solve(long long v)
{
    pair<long long,long long> dp[25][1100];
    vector<long long> dg = modify1(v);
    vector<long long> z = modify2(v);
    z = modify2(v);
    long long cur = 0;
    long long di = dg.size();
    for(int i = 0; i <= 24; i++) dp[i][0].se = 1;
    for(long long i = 0; i < di; i++)
    {
        for(long long l = 0; l < dg[i]; l++)
        {
            long long z0 = z[i] | (1 << l);
            if(__builtin_popcount(z0) <= k)
            {
                dp[i + 1][z0].fi += cur * 10 + l;
                dp[i + 1][z0].fi %= md;
                dp[i + 1][z0].se++;
            }
        }
        cur *= 10;
        cur += dg[i];
        cur %= md;
        for(long long t = 0; t < 1 << 10; t++)
        {
            for(long long v = 0; v <= 9; v++)
            {
                if(__builtin_popcount(t | (1 << v)) <= k)
                {
                long long u = dp[i][t].se % md;
                u *= v;
                u %= md;
                dp[i + 1][(t | (1 << v)) ^ (t == 1)].fi += ((10 * dp[i][t].fi + u) % md);
                dp[i + 1][(t | (1 << v)) ^ (t == 1)].fi %= md;
                dp[i + 1][(t | (1 << v)) ^ (t == 1)].se += dp[i][t].se;
                }
            }
        }
    }
    long long res = 0;
    for(long long i = 1; i < 1 << 10; i++)
    {
        res += dp[di][i].fi;
        res %= md;
    }
    cout << dp[2][4].fi << endl;
    return res;
}

int main()
{
    cin >> l >> r >> k;
    vector<long long> z = modify2(r);
    long long res;
    res = solve(r) - solve(l);
    res %= md;
    if(res < 0) res += md;
    if (__builtin_popcount(z.back()) <= k){res += r; res %= md;}
    cout << res << endl;
    k = 1;
    cout << solve(999);
    return 0;
}


#include <iostream>
#include <bits\stdc++.h>
#define fi first
#define se second
using namespace std;
long long l, r;
const long long md = 998244353;
long long k;
vector<int> modify1(long long v)
{
    vector<int> dg;
    long long c = v;
    while(c){dg.push_back(c % 10); c /= 10;}
    reverse(dg.begin(), dg.end());
    return dg;
}
vector<int> modify2(long long v)
{
    vector<int> dg = modify1(v);
    vector<int> z(dg.size() + 1);
    z[0] = 0;
    for(int i = 0; i < dg.size(); i++)
    {
        z[i + 1] = z[i] | (1 << dg[i]);
    }
    return z;
}
long long solve(long long v)
{
    pair<long long,long long> dp[25][1100];
    vector<int> dg = modify1(v);
    vector<int> z = modify2(v);
    z = modify2(v);
    int cur = 0;
    int di = dg.size();
    for(int i = 0; i < di; i++)
    {
        for(int l = 0; l < dg[i]; l++)
        {
            int z0 = z[i] | (1 << l);
            if(__builtin_popcount(z0) <= k)
            {
                dp[i + 1][z0].fi += cur * 10 + l;
                dp[i + 1][z0].fi %= md;
                dp[i + 1][z0].se++;
            }
        }
        cur *= 10;
        cur += dg[i];
        for(int t = 1; t < 1 << 10; t++)
        {
            for(int v = 0; v <= 9; v++)
            {
                if(__builtin_popcount(t | (1 << v)) <= k)
                {
                long long u = dp[i][t].se % md;
                u *= v;
                u %= md;
                dp[i + 1][t | (1 << v)].fi += ((10 * dp[i][t].fi + u) % md);
                dp[i + 1][t | (1 << v)].fi %= md;
                dp[i + 1][t | (1 << v)].se += dp[i][t].se;
                }
            }
        }
    }
    long long res = 0;
    for(int i = 1; i < 1 << 10; i++)
    {
        res += dp[di][i].fi;
        res %= md;
    }
    return res;
}

int main()
{
    scanf("%lld%lld%lld", &l, &r, &k);
    vector<int> z = modify2(r);
    long long res;
    res = solve(r) - solve(l);
    res %= md;
    if (__builtin_popcount(z.back()) <= k){res += r; res %= md;}
    printf("%lld", res);

    return 0;
}