#include<bits/stdc++.h>
#define reg register
using namespace std;
typedef long long ll;
const int mod=998244353;
const int U=1<<10;
int f[20][U],g[20][U],d[20],len;
ll L,R,K;
__attribute__((always_inline)) void add(int& a,int b){(a+=b)>=mod?a-=mod:0;}
inline int query(ll k){
	if(k<=9)return k*(k+1)>>1;
	memset(f,len=0,sizeof(f));memset(g,0,sizeof(g));
	while(k)d[++len]=k%10,k/=10;
	for(reg int i=1;i<d[len];i++)f[len][1<<i]=1,g[len][1<<i]=i;
	reg int S=1<<d[len],res=0;reg ll Sum=d[len];
	for(reg int i=len-1;i;i--){
		for(reg int s=0;s<U;s++)
			for(reg int j=0;j<10;j++)
				add(f[i][s|(1<<j)],f[i+1][s]),
				add(g[i][s|(1<<j)],(g[i+1][s]*10ll%mod+1ll*f[i+1][s]*j%mod)%mod);
		for(reg int j=0;j<d[i];j++)
			add(f[i][S|(1<<j)],1ll),
			add(g[i][S|(1<<j)],(Sum*10ll%mod+j)%mod);
		for(reg int j=1;j<10;j++)
			add(f[i][1<<j],1ll),
			add(g[i][1<<j],j);
		S|=(1<<d[i]);Sum=(Sum*10%mod+d[i])%mod;
	}
	for(reg int s=0;s<U;s++)if(__builtin_popcount(s)<=K)add(res,g[1][s]);
	return (res+(__builtin_popcount(S)<=K?Sum:0))%mod;
}
int main(){
	scanf("%I64d%I64d%I64d",&L,&R,&K);
	printf("%d\n",(query(R)-query(L-1)+mod)%mod);
	return 0;
}
//I love cwh forever


#include<bits/stdc++.h>
#define reg register
using namespace std;
typedef long long ll;
const int mod=998244353;
const int U=1<<10;
ll f[20][U],g[20][U],d[20],len;
ll L,R,K;
__attribute__((always_inline)) void add(ll& a,ll b){(a+=b)>=mod?a-=b:0;}
inline ll query(ll k){
	if(k<=9)return k*(k+1)>>1;
	memset(f,len=0,sizeof(f));memset(g,0,sizeof(g));
	while(k)d[++len]=k%10,k/=10;
	for(reg int i=1;i<d[len];i++)f[len][1<<i]=1,g[len][1<<i]=i;
	reg int S=1<<d[len];reg ll Sum=d[len],res=0;
	for(reg int i=len-1;i;i--){
		for(reg int s=0;s<U;s++)
			for(reg int j=0;j<10;j++)
				add(f[i][s|(1<<j)],f[i+1][s]),
				add(g[i][s|(1<<j)],(g[i+1][s]*10ll%mod+1ll*f[i+1][s]*j%mod)%mod);
		for(reg int j=0;j<d[i];j++)
			add(f[i][S|(1<<j)],1ll),
			add(g[i][S|(1<<j)],(Sum*10ll%mod+j)%mod);
		for(reg int j=1;j<10;j++)
			add(f[i][1<<j],1ll),
			add(g[i][1<<j],j);
		S|=(1<<d[i]);Sum=(Sum*10ll%mod+d[i])%mod;
	}
	for(reg int s=0;s<U;s++)if(__builtin_popcount(s)<=K)add(res,g[1][s]);
	return (res+(__builtin_popcount(S)<=K?Sum:0))%mod;
}
int main(){
	cin>>L>>R>>K;
	cout<<(query(R)-query(L-1)+mod)%mod<<endl;
	return 0;
}


#include<bits/stdc++.h>
#define reg register
using namespace std;
typedef long long ll;
const int mod=998244353;
const int U=1<<10;
int f[20][U],g[20][U],d[20],len;
ll L,R,K;
__attribute__((always_inline)) void add(int& a,int b){(a+=b)>=mod?a-=mod:0;}
inline int query(ll k){
	if(k<=9)return k*(k+1)>>1;
	memset(f,len=0,sizeof(f));memset(g,0,sizeof(g));
	while(k)d[++len]=k%10,k/=10;
	for(reg int i=1;i<d[len];i++)f[len][1<<i]=1,g[len][1<<i]=i;
	reg int S=1<<d[len],res=0;reg ll Sum=d[len];
	for(reg int i=len-1;i;i--){
		for(reg int s=0;s<U;s++)
			for(reg int j=0;j<10;j++)
				add(f[i][s|(1<<j)],f[i+1][s]),
				add(g[i][s|(1<<j)],(g[i+1][s]*10ll%mod+1ll*f[i+1][s]*j%mod)%mod);
		for(reg int j=0;j<d[i];j++)
			add(f[i][S|(1<<j)],1ll),
			add(g[i][S|(1<<j)],(Sum*10ll%mod+j)%mod);
		for(reg int j=1;j<10;j++)
			add(f[i][1<<j],1ll),
			add(g[i][1<<j],j);
		S|=(1<<d[i]);Sum=(Sum*10%mod+d[i])%mod;
	}
	for(reg int s=0;s<U;s++)if(__builtin_popcount(s)<=K)add(res,g[1][s]);
	return (res+(__builtin_popcount(S)<=K?Sum:0))%mod;
}
int main(){
	scanf("%I64d%I64d%I64d",&L,&R,&K);
	printf("%d\n",(query(R)-query(L-1)+mod)%mod);
	return 0;
}


#include <bits/stdc++.h>
#define ll long long
#define inf 0x3f3f3f3f
#define re register
#define N 3100
#define pii pair<int,int>
#define mp make_pair
#define pb push_back
#define mod 998244353
using namespace std;
struct node{
	int x,y;
	friend node operator +(node a,node b){
		return (node){(a.x+b.x)%mod,(a.y+b.y)%mod};
	}
}f[30][1030][2][2];
inline int read(){
    int x=0,w=0;char ch=getchar();
    while (!isdigit(ch))w|=ch=='-',ch=getchar();
    while (isdigit(ch))x=(x<<1)+(x<<3)+ch-'0',ch=getchar();
    return w?-x:x;
}
int cnt[3010],a[30],K,L,R,po[30];
inline void add(int &x,int y){
	x+=y;if (x>=mod)x-=mod;
}
node dfs(int len,int s,int zero,int lim){
	if (cnt[s]>K)return (node){0,0};
	if (!len)return (node){0,1};
	if (f[len][s][zero][lim].x!=-1)return f[len][s][zero][lim];
	int up=lim?a[len]:9,res=0,res1=0;
	for (int i=0;i<=up;++i){
		node t=dfs(len-1,zero&&!i?s:s|(1<<i),zero&&!i,lim&&i==up);
		res=(res+t.x+t.y*po[len-1]%mod*i%mod)%mod;
		res1=(res1+t.y)%mod;
	}
	return lim?(node){res,res1}:f[len][s][zero][lim]=(node){res,res1};
}
int work(int k){
	int len=0,res=0;
	memset(f,-1,sizeof(f));
	while (k)a[++len]=k%10,k/=10;
	return dfs(len,0,1,1).x;
}
signed main(){
	L=read(),R=read(),K=read();
	po[0]=1;
	for (int i=1;i<=20;++i)po[i]=po[i-1]*10%mod;
	for (int i=1;i<(1<<10);++i)
		cnt[i]=cnt[i^(i&(-i))]+1;
	printf("%lld\n",(work(R)-work(L-1)+mod)%mod);
    return 0;
}


#include <bits/stdc++.h>
#define ll long long
#define inf 0x3f3f3f3f
#define re register
#define N 3100
#define pii pair<int,int>
#define mp make_pair
#define pb push_back
#define mod 998244353
using namespace std;
struct node{
	int x,y;
	friend node operator +(node a,node b){
		return (node){(a.x+b.x)%mod,(a.y+b.y)%mod};
	}
}f[30][1030][2][2];
inline int read(){
    int x=0,w=0;char ch=getchar();
    while (!isdigit(ch))w|=ch=='-',ch=getchar();
    while (isdigit(ch))x=(x<<1)+(x<<3)+ch-'0',ch=getchar();
    return w?-x:x;
}
int cnt[3010],a[30],K,L,R,po[30];
inline void add(int &x,int y){
	x+=y;if (x>=mod)x-=mod;
}
node dfs(int len,int s,int zero,int lim){
	if (cnt[s]>K)return (node){0,0};
	if (!len)return (node){0,1};
	if (f[len][s][zero][lim].x!=-1)return f[len][s][zero][lim];
	int up=lim?a[len]:9,res=0,res1=0;
	for (int i=0;i<=up;++i){
		node t=dfs(len-1,zero&&!i?s:s|(1<<i),zero&&!i,lim&&i==up);
		res=(res+t.x+t.y*po[len-1]%mod*i%mod)%mod;
		res1=(res1+t.y)%mod;
	}
	return lim?(node){res,res1}:f[len][s][zero][lim]=(node){res,res1};
}
int work(int k){
	int len=0,res=0;
	memset(f,-1,sizeof(f));
	while (k)a[++len]=k%10,k/=10;
	return dfs(len,0,1,1).x;
}
signed main(){
	L=read(),R=read(),K=read();
	po[0]=1;
	for (int i=1;i<=20;++i)po[i]=po[i-1]*10%mod;
	for (int i=1;i<(1<<10);++i)
		cnt[i]=cnt[i^(i&(-i))]+1;
	printf("%lld\n",(work(R)-work(L-1)+mod)%mod);
    return 0;
}
//orzlxy


#include <bits/stdc++.h>
#define int long long
#define inf 0x3f3f3f3f
#define re register
#define N 3100
#define pii pair<int,int>
#define mp make_pair
#define pb push_back
#define mod 998244353
using namespace std;
struct node{
	int x,y;
	friend node operator +(node a,node b){
		return (node){(a.x+b.x)%mod,(a.y+b.y)%mod};
	}
}f[30][1030][2][2];
inline int read(){
    int x=0,w=0;char ch=getchar();
    while (!isdigit(ch))w|=ch=='-',ch=getchar();
    while (isdigit(ch))x=(x<<1)+(x<<3)+ch-'0',ch=getchar();
    return w?-x:x;
}
int cnt[3010],a[30],K,L,R,po[30];
inline void add(int &x,int y){
	x+=y;if (x>=mod)x-=mod;
}
node dfs(int len,int s,int zero,int lim){
	if (cnt[s]>K)return (node){0,0};
	if (!len)return (node){0,1};
	if (f[len][s][zero][lim].x!=-1)return f[len][s][zero][lim];
	int up=lim?a[len]:9,res=0,res1=0;
	for (int i=0;i<=up;++i){
		node t=dfs(len-1,zero&&!i?s:s|(1<<i),zero&&!i,lim&&i==up);
		res=(res+t.x+t.y*po[len-1]%mod*i%mod)%mod;
		res1=(res1+t.y)%mod;
	}
	return lim?(node){res,res1}:f[len][s][zero][lim]=(node){res,res1};
}
int work(int k){
	int len=0,res=0;
	memset(f,-1,sizeof(f));
	while (k)a[++len]=k%10,k/=10;
	return dfs(len,0,1,1).x;
}
signed main(){
	L=read(),R=read(),K=read();
	po[0]=1;
	for (int i=1;i<=20;++i)po[i]=po[i-1]*10%mod;
	for (int i=1;i<(1<<10);++i)
		cnt[i]=cnt[i^(i&(-i))]+1;
	printf("%lld\n",(work(R)-work(L-1)+mod)%mod);
    return 0;
}
//orzlxy


#include <bits/stdc++.h>
#define int long long
#define inf 0x3f3f3f3f
#define re register
#define N 3100
#define pii pair<int,int>
#define mp make_pair
#define pb push_back
#define mod 998244353
using namespace std;
struct node{
	int x,y;
	friend node operator +(node a,node b){
		return (node){(a.x+b.x)%mod,(a.y+b.y)%mod};
	}
}f[30][1030][2][2];
inline int read(){
    int x=0,w=0;char ch=getchar();
    while (!isdigit(ch))w|=ch=='-',ch=getchar();
    while (isdigit(ch))x=(x<<1)+(x<<3)+ch-'0',ch=getchar();
    return w?-x:x;
}
int cnt[3010],a[30],K,L,R,po[30];
inline void add(int &x,int y){
	x+=y;if (x>=mod)x-=mod;
}
node dfs(int len,int s,int zero,int lim){
	if (cnt[s]>K)return (node){0,0};
	if (!len)return (node){0,1};
	if (f[len][s][zero][lim].x!=-1)return f[len][s][zero][lim];
	int up=lim?a[len]:9,res=0,res1=0;
	for (int i=0;i<=up;++i){
		node t=dfs(len-1,zero&&!i?s:s|(1<<i),zero&&!i,lim&&i==up);
		res=(res+t.x+t.y*po[len-1]%mod*i%mod)%mod;
		res1=(res1+t.y)%mod;
	}
	return lim?(node){res,res1}:f[len][s][zero][lim]=(node){res,res1};
}
int work(int k){
	int len=0,res=0;
	memset(f,-1,sizeof(f));
	while (k)a[++len]=k%10,k/=10;
	return dfs(len,0,1,1).x;
}
signed main(){
	L=read(),R=read(),K=read();
	po[0]=1;
	for (int i=1;i<=20;++i)po[i]=po[i-1]*10%mod;
	for (int i=1;i<(1<<10);++i)
		cnt[i]=cnt[i^(i&(-i))]+1;
	printf("%lld\n",(work(R)-work(L-1)+mod)%mod);
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define int long long
const int mod=998244353;
inline int ksm(int a,int b)
{
	int res=1;
	for(;b;b>>=1,a=a*a%mod) if(b&1) res=res*a%mod;
	return res;
}
inline int lowbit(int x){return x&(-x);}
inline void Add(int &a,int b){a=a+b>=mod?a+b-mod:a+b;}
int bitcnt[1<<11];int k;
int f[20][1<<11][2][2],g[20][1<<11][2][2];bool vis[20][1<<11][2][2];
int p[20],ttt;
inline pair<int,int> DP(int cur,int mask,bool pre0,bool kup)
{
	if(pre0) mask=0;
	if(bitcnt[mask]>k) return make_pair(0,0);
	if(cur==0) return make_pair(1,0);
	if(vis[cur][mask][pre0][kup]) return make_pair(f[cur][mask][pre0][kup],g[cur][mask][pre0][kup]);
	vis[cur][mask][pre0][kup]=1;f[cur][mask][pre0][kup]=g[cur][mask][pre0][kup]=0;
	if(pre0)
	{
		int l=kup?p[cur]:9;
		for(int i=0;i<=l;i++)
		{
			pair<int,int> PPP=DP(cur-1,mask|(1<<i),!i,kup&&i==l);
			Add(f[cur][mask][pre0][kup],PPP.first);
			Add(g[cur][mask][pre0][kup],PPP.second);
			Add(g[cur][mask][pre0][kup],1ll*PPP.first*i%mod*ksm(10,cur-1)%mod);
		}
		return make_pair(f[cur][mask][pre0][kup],g[cur][mask][pre0][kup]);
	}
	int l=kup?p[cur]:9;
	for(int i=0;i<=l;i++)
	{
		pair<int,int> PPP=DP(cur-1,mask|(1<<i),0,kup&&i==l);
		Add(f[cur][mask][pre0][kup],PPP.first);
		Add(g[cur][mask][pre0][kup],PPP.second);
		Add(g[cur][mask][pre0][kup],1ll*PPP.first*i%mod*ksm(10,cur-1)%mod);
	}
	return make_pair(f[cur][mask][pre0][kup],g[cur][mask][pre0][kup]);
}
inline int solve(int lim)
{
	ttt=0;while(lim) p[++ttt]=lim%10,lim/=10;p[++ttt]=0;
	memset(vis,0,sizeof(vis));
	return DP(ttt,0,1,1).second;
}
signed main()
{
	bitcnt[0]=0;for(int i=1;i<(1<<10);i++) bitcnt[i]=bitcnt[i^lowbit(i)]+1;
	int l,r;scanf("%lld%lld%lld",&l,&r,&k);
	printf("%lld",(solve(r)-solve(l-1)+mod)%mod);
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define int long long
const int mod=998244353;
inline int ksm(int a,int b)
{
	int res=1;
	for(;b;b>>=1,a=a*a%mod) if(b&1) res=res*a%mod;
	return res;
}
inline int lowbit(int x){return x&(-x);}
inline void Add(int &a,int b){a=a+b>=mod?a+b-mod:a+b;}
int bitcnt[1<<11];int k;
int f[20][1<<11][2][2],g[20][1<<11][2][2];bool vis[20][1<<11][2][2];
int p[20],ttt;//f->cnt of num,g->value of the num
inline pair<int,int> DP(int cur,int mask,bool pre0,bool kup)
{
	if(pre0) mask=0;
	if(bitcnt[mask]>k) return make_pair(0,0);
	if(cur==0) return make_pair(1,0);
	if(vis[cur][mask][pre0][kup]) return make_pair(f[cur][mask][pre0][kup],g[cur][mask][pre0][kup]);
	vis[cur][mask][pre0][kup]=1;f[cur][mask][pre0][kup]=g[cur][mask][pre0][kup]=0;
	if(pre0)
	{
		int l=kup?p[cur]:9;
		for(int i=0;i<=l;i++)
		{
			pair<int,int> PPP=DP(cur-1,mask|(1<<i),!i,kup&&i==l);
			Add(f[cur][mask][pre0][kup],PPP.first);
			Add(g[cur][mask][pre0][kup],PPP.second);
			Add(g[cur][mask][pre0][kup],1ll*PPP.first*i%mod*ksm(10,cur-1)%mod);
		}
		return make_pair(f[cur][mask][pre0][kup],g[cur][mask][pre0][kup]);
	}
	int l=kup?p[cur]:9;
	for(int i=0;i<=l;i++)
	{
		pair<int,int> PPP=DP(cur-1,mask|(1<<i),0,kup&&i==l);
		Add(f[cur][mask][pre0][kup],PPP.first);
		Add(g[cur][mask][pre0][kup],PPP.second);
		Add(g[cur][mask][pre0][kup],1ll*PPP.first*i%mod*ksm(10,cur-1)%mod);
	}
	return make_pair(f[cur][mask][pre0][kup],g[cur][mask][pre0][kup]);
}
inline int solve(int lim)
{
	ttt=0;while(lim) p[++ttt]=lim%10,lim/=10;p[++ttt]=0;
	memset(vis,0,sizeof(vis));
	return DP(ttt,0,1,1).second;
}
signed main()
{
	bitcnt[0]=0;for(int i=1;i<(1<<10);i++) bitcnt[i]=bitcnt[i^lowbit(i)]+1;
	int l,r;scanf("%lld%lld%lld",&l,&r,&k);
	printf("%lld",(solve(r)-solve(l-1)+mod)%mod);
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define int long long
const int mod=998244353;
inline int ksm(int a,int b)
{
	int res=1;
	for(;b;b>>=1,a=a*a%mod) if(b&1) res=res*a%mod;
	return res;
}
inline int lowbit(int x){return x&(-x);}
inline void Add(int &a,int b){a=a+b>=mod?a+b-mod:a+b;}
int bitcnt[1<<11];int k;
int f[20][1<<11][2][2],g[20][1<<11][2][2];bool vis[20][1<<11][2][2];
int p[20],ttt;//f->cnt of num,g->value of the num
inline pair<int,int> DP(int cur,int mask,bool pre0,bool kup)
{
	if(pre0) mask=0;
	if(bitcnt[mask]>k) return make_pair(0,0);
	if(cur==0) return make_pair(1,0);
	if(vis[cur][mask][pre0][kup]) return make_pair(f[cur][mask][pre0][kup],g[cur][mask][pre0][kup]);
	vis[cur][mask][pre0][kup]=1;f[cur][mask][pre0][kup]=g[cur][mask][pre0][kup]=0;
	if(pre0)
	{
		int l=kup?p[cur]:9;
		for(int i=0;i<=l;i++)
		{
			pair<int,int> PPP=DP(cur-1,mask|(1<<i),!i,kup&&i==l);
			Add(f[cur][mask][pre0][kup],PPP.first);
			Add(g[cur][mask][pre0][kup],PPP.second);
			Add(g[cur][mask][pre0][kup],1ll*PPP.first*i*ksm(10,cur-1));
		}
		return make_pair(f[cur][mask][pre0][kup],g[cur][mask][pre0][kup]);
	}
	int l=kup?p[cur]:9;
	for(int i=0;i<=l;i++)
	{
		pair<int,int> PPP=DP(cur-1,mask|(1<<i),0,kup&&i==l);
		Add(f[cur][mask][pre0][kup],PPP.first);
		Add(g[cur][mask][pre0][kup],PPP.second);
		Add(g[cur][mask][pre0][kup],1ll*PPP.first*i*ksm(10,cur-1));
	}
	return make_pair(f[cur][mask][pre0][kup],g[cur][mask][pre0][kup]);
}
inline int solve(int lim)
{
	ttt=0;while(lim) p[++ttt]=lim%10,lim/=10;p[++ttt]=0;
	memset(vis,0,sizeof(vis));
	return DP(ttt,0,1,1).second;
}
signed main()
{
	bitcnt[0]=0;for(int i=1;i<(1<<10);i++) bitcnt[i]=bitcnt[i^lowbit(i)]+1;
	int l,r;scanf("%lld%lld%lld",&l,&r,&k);
	printf("%lld",(solve(r)-solve(l-1)+mod)%mod);
	return 0;
}


#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <cassert>
#include <string.h>
//#include <unordered_set>
//#include <unordered_map>
//#include <bits/stdc++.h>

#define MP(A,B) make_pair(A,B)
#define PB(A) push_back(A)
#define SIZE(A) ((int)A.size())
#define LEN(A) ((int)A.length())
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define fi first
#define se second

using namespace std;

template<typename T>inline bool upmin(T &x,T y) { return y<x?x=y,1:0; }
template<typename T>inline bool upmax(T &x,T y) { return x<y?x=y,1:0; }

typedef long long ll;
typedef unsigned long long ull;
typedef long double lod;
typedef pair<int,int> PR;
typedef vector<int> VI;

const lod eps=1e-11;
const lod pi=acos(-1);
const int oo=1<<30;
const ll loo=1ll<<62;
const int mods=998244353;
const int MAXN=5000005;
const int INF=0x3f3f3f3f;//1061109567
/*--------------------------------------------------------------------*/
inline ll read()
{
	ll f=1,x=0; char c=getchar();
	while (c<'0'||c>'9') { if (c=='-') f=-1; c=getchar(); }
	while (c>='0'&&c<='9') { x=(x<<3)+(x<<1)+(c^48); c=getchar(); }
	return x*f;
}
int f[20][1024][2],g[20][1024][2];
int upd(int x,int y) { return x+y>=mods?x+y-mods:x+y; }
void Upd(int &x,int y) { x=upd(x,y); }
int solve(ll x,ll k)
{
	memset(f,0,sizeof f);
	memset(g,0,sizeof g);
	int a[20],num=0;
	while (x) a[++num]=x%10,x/=10;
	for (int i=1;i<=a[num];i++) f[num][1<<i][i==a[num]]=1,g[num][1<<i][i==a[num]]=i;
	for (int i=num;i>=2;i--)
	{
		for (int j=0;j<=9;j++)
			for (int t=0;t<1024;t++)
			{
				Upd(f[i-1][t|(1<<j)][0],f[i][t][0]),Upd(g[i-1][t|(1<<j)][0],(10ll*g[i][t][0]+1ll*f[i][t][0]*j)%mods);
				if (j<a[i-1]) Upd(f[i-1][t|(1<<j)][0],f[i][t][1]),Upd(g[i-1][t|(1<<j)][0],(10ll*g[i][t][1]+1ll*f[i][t][1]*j)%mods);
				if (j==a[i-1]) Upd(f[i-1][t|(1<<j)][1],f[i][t][1]),Upd(g[i-1][t|(1<<j)][1],(10ll*g[i][t][1]+1ll*f[i][t][1]*j)%mods);
			}
		for (int j=1;j<=9;j++) Upd(f[i-1][(1<<j)][0],1),Upd(g[i-1][(1<<j)][0],j);
	}
	int ans=0;
	for (int i=0;i<1024;i++)
		if (__builtin_popcount(i)<=k) Upd(ans,upd(g[1][i][0],g[1][i][1]));
	return ans;
}
signed main()
{
	ll l=read(),r=read(),k=read();
	printf("%d\n",upd(solve(r,k),mods-solve(l-1,k)));
	return 0;
}


#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <cassert>
#include <string.h>
//#include <unordered_set>
//#include <unordered_map>
//#include <bits/stdc++.h>

#define MP(A,B) make_pair(A,B)
#define PB(A) push_back(A)
#define SIZE(A) ((int)A.size())
#define LEN(A) ((int)A.length())
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define fi first
#define se second

using namespace std;

template<typename T>inline bool upmin(T &x,T y) { return y<x?x=y,1:0; }
template<typename T>inline bool upmax(T &x,T y) { return x<y?x=y,1:0; }

typedef long long ll;
typedef unsigned long long ull;
typedef long double lod;
typedef pair<int,int> PR;
typedef vector<int> VI;

const lod eps=1e-11;
const lod pi=acos(-1);
const int oo=1<<30;
const ll loo=1ll<<62;
const int mods=998244353;
const int MAXN=5000005;
const int INF=0x3f3f3f3f;//1061109567
/*--------------------------------------------------------------------*/
inline ll read()
{
	ll f=1,x=0; char c=getchar();
	while (c<'0'||c>'9') { if (c=='-') f=-1; c=getchar(); }
	while (c>='0'&&c<='9') { x=(x<<3)+(x<<1)+(c^48); c=getchar(); }
	return x*f;
}
int f[20][1024][2],g[20][1024][2];
int upd(int x,int y) { return x+y>=mods?x+y-mods:x+y; }
void Upd(int &x,int y) { x=upd(x,y); }
int solve(ll x,ll k)
{
	if (x<1) return 0;
	memset(f,0,sizeof f);
	memset(g,0,sizeof g);
	int a[20],num=0;
	while (x) a[++num]=x%10,x/=10;
	for (int i=1;i<=a[num];i++) f[num][1<<i][i==a[num]]=1,g[num][1<<i][i==a[num]]=i;
	for (int i=num;i>=2;i--)
	{
		for (int j=0;j<=9;j++)
			for (int t=0;t<1024;t++)
			{
				Upd(f[i-1][t|(1<<j)][0],f[i][t][0]),Upd(g[i-1][t|(1<<j)][0],(10ll*g[i][t][0]+1ll*f[i][t][0]*j)%mods);
				if (j<a[i-1]) Upd(f[i-1][t|(1<<j)][0],f[i][t][1]),Upd(g[i-1][t|(1<<j)][0],(10ll*g[i][t][1]+1ll*f[i][t][1]*j)%mods);
				if (j==a[i-1]) Upd(f[i-1][t|(1<<j)][1],f[i][t][1]),Upd(g[i-1][t|(1<<j)][1],(10ll*g[i][t][1]+1ll*f[i][t][1]*j)%mods);
			}
		for (int j=1;j<=9;j++) Upd(f[i-1][(1<<j)][0],1),Upd(g[i-1][(1<<j)][0],j);
	}
	int ans=0;
	for (int i=0;i<1024;i++)
		if (__builtin_popcount(i)<=k) Upd(ans,upd(g[1][i][0],g[1][i][1]));
	return ans;
}
signed main()
{
	ll l=read(),r=read(),k=read();
	printf("%d\n",upd(solve(r,k),mods-solve(l-1,k)));
	return 0;
}


#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <cassert>
#include <string.h>
//#include <unordered_set>
//#include <unordered_map>
//#include <bits/stdc++.h>

#define MP(A,B) make_pair(A,B)
#define PB(A) push_back(A)
#define SIZE(A) ((int)A.size())
#define LEN(A) ((int)A.length())
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define fi first
#define se second
#define int ll

using namespace std;

template<typename T>inline bool upmin(T &x,T y) { return y<x?x=y,1:0; }
template<typename T>inline bool upmax(T &x,T y) { return x<y?x=y,1:0; }

typedef long long ll;
typedef unsigned long long ull;
typedef long double lod;
typedef pair<int,int> PR;
typedef vector<int> VI;

const lod eps=1e-11;
const lod pi=acos(-1);
const int oo=1<<30;
const ll loo=1ll<<62;
const int mods=998244353;
const int MAXN=5000005;
const int INF=0x3f3f3f3f;//1061109567
/*--------------------------------------------------------------------*/
inline ll read()
{
	ll f=1,x=0; char c=getchar();
	while (c<'0'||c>'9') { if (c=='-') f=-1; c=getchar(); }
	while (c>='0'&&c<='9') { x=(x<<3)+(x<<1)+(c^48); c=getchar(); }
	return x*f;
}
int f[20][1024][2],g[20][1024][2];
int upd(int x,int y) { return x+y>=mods?x+y-mods:x+y; }
void Upd(int &x,int y) { x=upd(x,y); }
int solve(ll x,ll k)
{
	memset(f,0,sizeof f);
	memset(g,0,sizeof g);
	int a[20],num=0;
	while (x) a[++num]=x%10,x/=10;
	for (int i=1;i<=a[num];i++) f[num][1<<i][i==a[num]]=1,g[num][1<<i][i==a[num]]=i;
	for (int i=num;i>=2;i--)
	{
		for (int j=0;j<=9;j++)
			for (int t=0;t<1024;t++)
			{
				Upd(f[i-1][t|(1<<j)][0],f[i][t][0]),Upd(g[i-1][t|(1<<j)][0],(10ll*g[i][t][0]+1ll*f[i][t][0]*j)%mods);
				if (j<a[i-1]) Upd(f[i-1][t|(1<<j)][0],f[i][t][1]),Upd(g[i-1][t|(1<<j)][0],(10ll*g[i][t][1]+1ll*f[i][t][1]*j)%mods);
				if (j==a[i-1]) Upd(f[i-1][t|(1<<j)][1],f[i][t][1]),Upd(g[i-1][t|(1<<j)][1],(10ll*g[i][t][1]+1ll*f[i][t][1]*j)%mods);
			}
		for (int j=1;j<=9;j++) Upd(f[i-1][(1<<j)][0],1),Upd(g[i-1][(1<<j)][0],j);
	}
	int ans=0;
	for (int i=0;i<1024;i++)
		if (__builtin_popcount(i)<=k) Upd(ans,upd(g[1][i][0],g[1][i][1]));
	return ans;
}
signed main()
{
	ll l=read(),r=read(),k=read();
	printf("%d\n",upd(solve(r,k),mods-solve(l-1,k)));
	return 0;
}


#include<cstdio>
#include<cstring>
#include<algorithm>
#include<stack>
#define ll long long
#define ull unsigned long long
using namespace std;
ll dp[20][1024][12],sum[20][1024][12];
int a[20];
ll pw10[19];
ll dfsnum(int pos,int zero,int sta,int limit,int rnum)
{//printf("==%d %d %d %d %d\n",pos,zero,sta,limit,rnum);
    if(rnum<0)return 0;
    if(pos==-1)return 1;
    if(!limit&&dp[pos][sta][rnum]!=-1)
        return dp[pos][sta][rnum];
    int up=limit?a[pos]:9;
    ll ans=0;
    for(int i=0;i<=up;i++)
    {
        if(i==0&&!zero)
            ans+=dfsnum(pos-1,zero,sta,limit&&i==a[pos],rnum);
        else
        if(((1<<i)&sta)==0)
            ans+=dfsnum(pos-1,zero|1,sta|(1<<i),limit&&i==a[pos],rnum-1);
        else
            ans+=dfsnum(pos-1,zero|1,sta,limit&&i==a[pos],rnum);
    }
    if(!limit)
        dp[pos][sta][rnum]=ans;
    return ans;
}
ll dfssum(int pos,int zero,int sta,int limit,int rnum)
{//printf("%d %d %d %d %d\n",pos,zero,sta,limit,rnum);
    if(rnum<0)return 0;
    if(pos==-1)return 0;
    if(!limit&&sum[pos][sta][rnum]!=-1)
        return sum[pos][sta][rnum];
    int up=limit?a[pos]:9;//printf("%d\n",up);
    ll ans=0,tmp;
    for(int i=0;i<=up;i++)
    {
        if(i==0&&!zero)
            ans+=dfssum(pos-1,zero,sta,limit&&i==a[pos],rnum);
        else
        if(((1<<i)&sta)==0)
        {
            tmp=dfsnum(pos-1,zero|1,sta|(1<<i),limit&&i==a[pos],rnum-1);
            ans+=tmp*i*pw10[pos]+dfssum(pos-1,zero|1,sta|(1<<i),limit&&i==a[pos],rnum-1);
        }else
        {
            tmp=dfsnum(pos-1,zero|1,sta,limit&&i==a[pos],rnum);
            ans+=tmp*i*pw10[pos]+dfssum(pos-1,zero|1,sta,limit&&i==a[pos],rnum);
        }
    }
    if(!limit)
        sum[pos][sta][rnum]=ans;
    return ans;
}
ll solve(ll x,int rnum)
{
    int pos=0;
    while(x)
    {
        a[pos++]=x%10;
        x/=10;
    }
    //printf("(%I64d %I64d)\n",dfsnum(pos-1,0,0,1,rnum),dfssum(pos-1,0,0,1,rnum));
    return dfssum(pos-1,0,0,1,rnum);
}
int main()
{
    ll tt,n,m,i,j,k,s,t,l,r;
    int rnum;
    memset(dp,255,sizeof(dp));
    memset(sum,255,sizeof(sum));
    pw10[0]=1;
    for(i=1;i<=18;i++)pw10[i]=pw10[i-1]*10;
    scanf("%I64d%I64d%d",&l,&r,&rnum);
    printf("%I64d\n",solve(r,rnum)-solve(l-1,rnum));
    return 0;
}


#include<cstdio>
#include<cstring>
#include<algorithm>
#include<stack>
#define ll long long
#define ull unsigned long long
using namespace std;
const ll mod=998244353;
ll dp[20][1024][12],sum[20][1024][12];
int a[20];
ll pw10[19];
ll dfsnum(int pos,int zero,int sta,int limit,int rnum)
{//printf("==%d %d %d %d %d\n",pos,zero,sta,limit,rnum);
    if(rnum<0)return 0;
    if(pos==-1)return 1;
    if(!limit&&dp[pos][sta][rnum]!=-1)
        return dp[pos][sta][rnum];
    int up=limit?a[pos]:9;
    ll ans=0;
    for(int i=0;i<=up;i++)
    {
        if(i==0&&!zero)
            ans+=dfsnum(pos-1,zero,sta,limit&&i==a[pos],rnum);
        else
        if(((1<<i)&sta)==0)
            ans+=dfsnum(pos-1,zero|1,sta|(1<<i),limit&&i==a[pos],rnum-1);
        else
            ans+=dfsnum(pos-1,zero|1,sta,limit&&i==a[pos],rnum);
    }
    ans%=mod;
    if(!limit)
        dp[pos][sta][rnum]=ans;
    return ans;
}
ll dfssum(int pos,int zero,int sta,int limit,int rnum)
{//printf("%d %d %d %d %d\n",pos,zero,sta,limit,rnum);
    if(rnum<0)return 0;
    if(pos==-1)return 0;
    if(!limit&&sum[pos][sta][rnum]!=-1)
        return sum[pos][sta][rnum];
    int up=limit?a[pos]:9;//printf("%d\n",up);
    ll ans=0,tmp;
    for(int i=0;i<=up;i++)
    {
        if(i==0&&!zero)
            ans+=dfssum(pos-1,zero,sta,limit&&i==a[pos],rnum);
        else
        if(((1<<i)&sta)==0)
        {
            tmp=dfsnum(pos-1,zero|1,sta|(1<<i),limit&&i==a[pos],rnum-1);
            ans+=tmp*i*pw10[pos]+dfssum(pos-1,zero|1,sta|(1<<i),limit&&i==a[pos],rnum-1);
        }else
        {
            tmp=dfsnum(pos-1,zero|1,sta,limit&&i==a[pos],rnum);
            ans+=tmp*i*pw10[pos]+dfssum(pos-1,zero|1,sta,limit&&i==a[pos],rnum);
        }
    }
    ans%=mod;
    if(!limit)
        sum[pos][sta][rnum]=ans;
    return ans;
}
ll solve(ll x,int rnum)
{
    int pos=0;
    while(x)
    {
        a[pos++]=x%10;
        x/=10;
    }
    //printf("(%I64d %I64d)\n",dfsnum(pos-1,0,0,1,rnum),dfssum(pos-1,0,0,1,rnum));
    return dfssum(pos-1,0,0,1,rnum);
}
int main()
{
    ll tt,n,m,i,j,k,s,t,l,r;
    int rnum;
    memset(dp,255,sizeof(dp));
    memset(sum,255,sizeof(sum));
    pw10[0]=1;
    for(i=1;i<=18;i++)pw10[i]=pw10[i-1]*10;
    scanf("%I64d%I64d%d",&l,&r,&rnum);
    printf("%I64d\n",solve(r,rnum)-solve(l-1,rnum));
    return 0;
}


#include<cstdio>
#include<cstring>
#include<algorithm>
#include<stack>
#define ll long long
#define ull unsigned long long
using namespace std;
const ll mod=998244353;
ll dp[20][1024][12],sum[20][1024][12];
int a[20];
ll pw10[19];
ll dfsnum(int pos,int zero,int sta,int limit,int rnum)
{//printf("==%d %d %d %d %d\n",pos,zero,sta,limit,rnum);
    if(rnum<0)return 0;
    if(pos==-1)return 1;
    if(!limit&&dp[pos][sta][rnum]!=-1)
        return dp[pos][sta][rnum];
    int up=limit?a[pos]:9;
    ll ans=0;
    for(int i=0;i<=up;i++)
    {
        if(i==0&&!zero)
            ans+=dfsnum(pos-1,zero,sta,limit&&i==a[pos],rnum);
        else
        if(((1<<i)&sta)==0)
            ans+=dfsnum(pos-1,zero|1,sta|(1<<i),limit&&i==a[pos],rnum-1);
        else
            ans+=dfsnum(pos-1,zero|1,sta,limit&&i==a[pos],rnum);
        ans%=mod;
    }
    ans%=mod;
    if(!limit)
        dp[pos][sta][rnum]=ans;
    return ans;
}
ll dfssum(int pos,int zero,int sta,int limit,int rnum)
{//printf("%d %d %d %d %d\n",pos,zero,sta,limit,rnum);
    if(rnum<0)return 0;
    if(pos==-1)return 0;
    if(!limit&&sum[pos][sta][rnum]!=-1)
        return sum[pos][sta][rnum];
    int up=limit?a[pos]:9;//printf("%d\n",up);
    ll ans=0,tmp;
    for(int i=0;i<=up;i++)
    {
        if(i==0&&!zero)
            ans+=dfssum(pos-1,zero,sta,limit&&i==a[pos],rnum);
        else
        if(((1<<i)&sta)==0)
        {
            tmp=dfsnum(pos-1,zero|1,sta|(1<<i),limit&&i==a[pos],rnum-1);
            ans+=tmp*i*pw10[pos]%mod+dfssum(pos-1,zero|1,sta|(1<<i),limit&&i==a[pos],rnum-1);
        }else
        {
            tmp=dfsnum(pos-1,zero|1,sta,limit&&i==a[pos],rnum);
            ans+=tmp*i*pw10[pos]%mod+dfssum(pos-1,zero|1,sta,limit&&i==a[pos],rnum);
        }
        ans%=mod;
    }
    ans%=mod;
    if(!limit)
        sum[pos][sta][rnum]=ans;
    return ans;
}
ll solve(ll x,int rnum)
{
    int pos=0;
    while(x)
    {
        a[pos++]=x%10;
        x/=10;
    }
    //printf("(%I64d %I64d)\n",dfsnum(pos-1,0,0,1,rnum),dfssum(pos-1,0,0,1,rnum));
    return dfssum(pos-1,0,0,1,rnum);
}
int main()
{
    ll tt,n,m,i,j,k,s,t,l,r;
    int rnum;
    memset(dp,255,sizeof(dp));
    memset(sum,255,sizeof(sum));
    pw10[0]=1;
    for(i=1;i<=18;i++)pw10[i]=(pw10[i-1]*10)%mod;
    scanf("%I64d%I64d%d",&l,&r,&rnum);
    printf("%I64d\n",(mod+solve(r,rnum)-solve(l-1,rnum))%mod);
    return 0;
}


#include<cstdio>
#include<cstring>
#include<algorithm>
#include<stack>
#define ll long long
#define ull unsigned long long
using namespace std;
const ll mod=998244353;
ll dp[20][1024][12],sum[20][1024][12];
int a[20];
ll pw10[19];
ll dfsnum(int pos,int zero,int sta,int limit,int rnum)
{//printf("==%d %d %d %d %d\n",pos,zero,sta,limit,rnum);
    if(rnum<0)return 0;
    if(pos==-1)return 1;
    if(!limit&&dp[pos][sta][rnum]!=-1)
        return dp[pos][sta][rnum];
    int up=limit?a[pos]:9;
    ll ans=0;
    for(int i=0;i<=up;i++)
    {
        if(i==0&&!zero)
            ans+=dfsnum(pos-1,zero,sta,limit&&i==a[pos],rnum);
        else
        if(((1<<i)&sta)==0)
            ans+=dfsnum(pos-1,zero|1,sta|(1<<i),limit&&i==a[pos],rnum-1);
        else
            ans+=dfsnum(pos-1,zero|1,sta,limit&&i==a[pos],rnum);
    }
    ans%=mod;
    if(!limit)
        dp[pos][sta][rnum]=ans;
    return ans;
}
ll dfssum(int pos,int zero,int sta,int limit,int rnum)
{//printf("%d %d %d %d %d\n",pos,zero,sta,limit,rnum);
    if(rnum<0)return 0;
    if(pos==-1)return 0;
    if(!limit&&sum[pos][sta][rnum]!=-1)
        return sum[pos][sta][rnum];
    int up=limit?a[pos]:9;//printf("%d\n",up);
    ll ans=0,tmp;
    for(int i=0;i<=up;i++)
    {
        if(i==0&&!zero)
            ans+=dfssum(pos-1,zero,sta,limit&&i==a[pos],rnum);
        else
        if(((1<<i)&sta)==0)
        {
            tmp=dfsnum(pos-1,zero|1,sta|(1<<i),limit&&i==a[pos],rnum-1);
            ans+=tmp*i*pw10[pos]+dfssum(pos-1,zero|1,sta|(1<<i),limit&&i==a[pos],rnum-1);
        }else
        {
            tmp=dfsnum(pos-1,zero|1,sta,limit&&i==a[pos],rnum);
            ans+=tmp*i*pw10[pos]+dfssum(pos-1,zero|1,sta,limit&&i==a[pos],rnum);
        }
    }
    ans%=mod;
    if(!limit)
        sum[pos][sta][rnum]=ans;
    return ans;
}
ll solve(ll x,int rnum)
{
    int pos=0;
    while(x)
    {
        a[pos++]=x%10;
        x/=10;
    }
    //printf("(%I64d %I64d)\n",dfsnum(pos-1,0,0,1,rnum),dfssum(pos-1,0,0,1,rnum));
    return dfssum(pos-1,0,0,1,rnum);
}
int main()
{
    ll tt,n,m,i,j,k,s,t,l,r;
    int rnum;
    memset(dp,255,sizeof(dp));
    memset(sum,255,sizeof(sum));
    pw10[0]=1;
    for(i=1;i<=18;i++)pw10[i]=pw10[i-1]*10;
    scanf("%I64d%I64d%d",&l,&r,&rnum);
    printf("%I64d\n",(mod+solve(r,rnum)-solve(l-1,rnum))%mod);
    return 0;
}


#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
typedef long long ll;
typedef pair <ll, ll> pin;

const int N = 22;
const int S = (1 << 10) + 5;
const ll P = 998244353LL;

int k, len, bit[N], scnt[S], bin[N];
pin f[N][S];

template <typename T>
inline void inc(T &x, T y) {
	x += y;
	if(x >= P) x -= P;
}

pin dfs(int pos, int s, bool led, bool lim) {
	if(!pos) return (scnt[s] <= k) ? pin(0LL, 1LL) : pin(0LL, 0LL);
	if(!led && !lim && ~f[pos][s].first) return f[pos][s];

	pin res = pin(0LL, 0LL); int num = lim ? bit[pos] : 9;
	for(int i = 0; i <= num; i++) {
		pin tmp = pin(0LL, 0LL);
//		if(i == 0 && led) tmp = dfs(pos - 1, s, led && (i == 0), lim && (i == bit[pos]));
//		else tmp = dfs(pos - 1, s, led && (i == 0), lim && (i == bit[pos]));
		tmp = dfs(pos - 1, s | (1 << i), led && (i == 0), lim && (i == bit[pos]));
		inc(res.first, tmp.first);
		inc(res.second, tmp.second);
		inc(res.first, tmp.second * i % P * bin[pos - 1] % P);
	}

	if(!lim && !led) f[pos][s] = res;

	return res;
}

inline ll solve(ll now) {
	len = 0;
	for(ll tmp = now; tmp > 0; tmp /= 10)
		bit[++len] = (tmp % 10);

	memset(f, -1, sizeof(f));
	return dfs(len, 0, 1, 1).first;
}

int main() {
	for(int i = 0; i < (1 << 10); i++)
		scnt[i] = __builtin_popcount(i);

	bin[0] = 1LL;
	for(int i = 1; i <= 20; i++)
		bin[i] = bin[i - 1] * 10LL % P;

	ll l, r;
//	scanf("%I64d%I64d%d", &l, &r, &k);
//	printf("%I64d\n", (solve(r) - solve(l - 1) + P) % P);

	cin >> l >> r >> k;
	cout << (solve(r) - solve(l - 1) + P) % P << endl;
	return 0;
}


#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
typedef long long ll;
typedef pair <ll, ll> pin;

const int N = 20;
const int S = (1 << 10) + 5;
const ll P = 998244353LL;

int k, len, bit[N], scnt[S], bin[N];
pin f[N][S];

template <typename T>
inline void inc(T &x, T y) {
	x += y;
	if(x >= P) x -= P;
}

pin dfs(int pos, int s, bool led, bool lim) {
	if(!pos) return (scnt[s] <= k) ? pin(0LL, 1LL) : pin(0LL, 0LL);
	if(!led && !lim && ~f[pos][s].first) return f[pos][s];

	pin res = pin(0LL, 0LL); int num = lim ? bit[pos] : 9;
	for(int i = 0; i <= num; i++) {
		pin tmp = dfs(pos - 1, s | (1 << i), led && (i == 0), lim && (i == bit[pos]));
		inc(res.first, tmp.first);
		inc(res.second, tmp.second);
		inc(res.first, tmp.second * i % P * bin[pos - 1] % P);
	}

	if(!lim && !led) f[pos][s] = res;

	return res;
}

inline ll solve(ll now) {
	len = 0;
	for(ll tmp = now; tmp > 0; tmp /= 10)
		bit[++len] = (tmp % 10);

	memset(f, -1, sizeof(f));
	return dfs(len, 0, 1, 1).first;
}

int main() {
	for(int i = 0; i < (1 << 10); i++)
		scnt[i] = __builtin_popcount(i);

	bin[0] = 1LL;
	for(int i = 1; i <= 10; i++)
		bin[i] = bin[i - 1] * 10LL % P;

	ll l, r;
//	scanf("%I64d%I64d%d", &l, &r, &k);
//	printf("%I64d\n", (solve(r) - solve(l - 1) + P) % P);

	cin >> l >> r >> k;
	cout << (solve(r) - solve(l - 1) + P) % P << endl;
	return 0;
}


#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
typedef long long ll;
typedef pair <ll, ll> pin;

const int N = 20;
const int S = (1 << 10) + 5;
const ll P = 998244353LL;

int k, len, bit[N], scnt[S], bin[N];
pin f[N][S];
bool vis[N][S];

template <typename T>
inline void inc(T &x, T y) {
	x += y;
	if(x >= P) x -= P;
}

pin dfs(int pos, int s, bool led, bool lim) {
	if(!pos) return (scnt[s] <= k) ? pin(0LL, 1LL) : pin(0LL, 0LL);
	if(!led && !lim && vis[pos][s]) return f[pos][s];

	pin res = pin(0LL, 0LL); int num = lim ? bit[pos] : 9;
	for(int i = 0; i <= num; i++) {
		pin tmp = dfs(pos - 1, s | (1 << i), led && (i == 0), lim && (i == bit[pos]));
		inc(res.first, tmp.first);
		inc(res.second, tmp.second);
		inc(res.first, tmp.second * i % P * bin[pos - 1] % P);
	}

	if(!lim && !led) {
		vis[pos][s] = 1;
		f[pos][s] = res;
	}

	return res;
}

inline ll solve(ll now) {
	len = 0;
	for(ll tmp = now; tmp > 0; tmp /= 10)
		bit[++len] = (tmp % 10);

	memset(vis, 0, sizeof(vis));
	return dfs(len, 0, 1, 1).first;
}

int main() {
	for(int i = 0; i < (1 << 10); i++)
		scnt[i] = __builtin_popcount(i);

	bin[0] = 1LL;
	for(int i = 1; i <= 10; i++)
		bin[i] = bin[i - 1] * 10LL % P;

	ll l, r;
	scanf("%lld%lld%d", &l, &r, &k);
	printf("%lld\n", (solve(r) - solve(l - 1) + P) % P);
	return 0;
}


#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
typedef long long ll;
typedef pair <ll, ll> pin;

const int N = 22;
const int S = (1 << 10) + 5;
const ll P = 998244353LL;

int k, len, bit[N], scnt[S], bin[N];
pin f[N][S];

template <typename T>
inline void inc(T &x, T y) {
	x += y;
	if(x >= P) x -= P;
}

pin dfs(int pos, int s, bool led, bool lim) {
	if(!pos) return (scnt[s] <= k) ? pin(0LL, 1LL) : pin(0LL, 0LL);
	if(!led && !lim && ~f[pos][s].first) return f[pos][s];

	pin res = pin(0LL, 0LL); int num = lim ? bit[pos] : 9;
	for(int i = 0; i <= num; i++) {
		pin tmp = pin(0LL, 0LL);
		if(i == 0 && led) tmp = dfs(pos - 1, s, led && (i == 0), lim && (i == bit[pos]));
		else tmp = dfs(pos - 1, s | (1 << i), led && (i == 0), lim && (i == bit[pos]));
//		tmp = dfs(pos - 1, s | (1 << i), led && (i == 0), lim && (i == bit[pos]));
		inc(res.first, tmp.first);
		inc(res.second, tmp.second);
		inc(res.first, tmp.second * i % P * bin[pos - 1] % P);
	}

	if(!lim && !led) f[pos][s] = res;

	return res;
}

inline ll solve(ll now) {
	len = 0;
	for(ll tmp = now; tmp > 0; tmp /= 10)
		bit[++len] = (tmp % 10);

	memset(f, -1, sizeof(f));
	return dfs(len, 0, 1, 1).first;
}

int main() {
	for(int i = 0; i < (1 << 10); i++)
		scnt[i] = __builtin_popcount(i);

	bin[0] = 1LL;
	for(int i = 1; i <= 20; i++)
		bin[i] = bin[i - 1] * 10LL % P;

	ll l, r;
//	scanf("%I64d%I64d%d", &l, &r, &k);
//	printf("%I64d\n", (solve(r) - solve(l - 1) + P) % P);

	cin >> l >> r >> k;
	cout << (solve(r) - solve(l - 1) + P) % P << endl;
	return 0;
}


#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
typedef long long ll;
typedef pair <ll, ll> pin;

const int N = 20;
const int S = (1 << 10) + 5;
const ll P = 998244353LL;

int k, len, bit[N], scnt[S], bin[N];
pin f[N][S];

template <typename T>
inline void inc(T &x, T y) {
	x += y;
	if(x >= P) x -= P;
}

pin dfs(int pos, int s, bool led, bool lim) {
	if(!pos) return (scnt[s] <= k) ? pin(0LL, 1LL) : pin(0LL, 0LL);
	if(!led && !lim && ~f[pos][s].first) return f[pos][s];

	pin res = pin(0LL, 0LL); int num = lim ? bit[pos] : 9;
	for(int i = 0; i <= num; i++) {
		pin tmp = dfs(pos - 1, s | (1 << i), led && (i == 0), lim && (i == bit[pos]));
		inc(res.first, tmp.first);
		inc(res.second, tmp.second);
		inc(res.first, tmp.second * i % P * bin[pos - 1] % P);
	}

	if(!lim && !led) f[pos][s] = res;

	return res;
}

inline ll solve(ll now) {
	len = 0;
	for(ll tmp = now; tmp > 0; tmp /= 10)
		bit[++len] = (tmp % 10);

	memset(f, -1, sizeof(f));
	return dfs(len, 0, 1, 1).first;
}

int main() {
	for(int i = 0; i < (1 << 10); i++)
		scnt[i] = __builtin_popcount(i);

	bin[0] = 1LL;
	for(int i = 1; i <= 10; i++)
		bin[i] = bin[i - 1] * 10LL % P;

	ll l, r;
	scanf("%I64d%I64d%d", &l, &r, &k);
	printf("%I64d\n", (solve(r) - solve(l - 1) + P) % P);
	return 0;
}


#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
typedef long long ll;
typedef pair <ll, ll> pin;

const int N = 20;
const int S = (1 << 10) + 5;
const ll P = 998244353LL;

int k, len, bit[N], scnt[S], bin[N];
pin f[N][S];

template <typename T>
inline void inc(T &x, T y) {
	x += y;
	if(x >= P) x -= P;
}

pin dfs(int pos, int s, bool led, bool lim) {
	if(!pos) return (scnt[s] <= k) ? pin(0LL, 1LL) : pin(0LL, 0LL);
	if(!led && !lim && f[pos][s].first) return f[pos][s];

	pin res = pin(0LL, 0LL); int num = lim ? bit[pos] : 9;
	for(int i = 0; i <= num; i++) {
		pin tmp = dfs(pos - 1, s | (1 << i), led && (i == 0), lim && (i == bit[pos]));
		inc(res.first, tmp.first);
		inc(res.second, tmp.second);
		inc(res.first, tmp.second * i % P * bin[pos - 1] % P);
	}

	if(!lim && !led) f[pos][s] = res;

	return res;
}

inline ll solve(ll now) {
	len = 0;
	for(ll tmp = now; tmp > 0; tmp /= 10)
		bit[++len] = (tmp % 10);

	return dfs(len, 0, 1, 1).first;
}

int main() {
	for(int i = 0; i < (1 << 10); i++)
		scnt[i] = __builtin_popcount(i);

	bin[0] = 1LL;
	for(int i = 1; i <= 10; i++)
		bin[i] = bin[i - 1] * 10LL % P;

	ll l, r;
	scanf("%I64d%I64d%d", &l, &r, &k);
	printf("%I64d\n", (solve(r) - solve(l - 1) + P) % P);
	return 0;
}


#include<bits/stdc++.h>
#define lowbit(_) _&-_
#define now [len][k][sm][pre]
#define int long long
using namespace std;
struct data{
	int p0,p1;
};
int L,R,K,num[500],cnt,sum[2005],ksm[200];
data dp[20][2050][2][2];
const int mod=998244353;
void init(){
	for (int i=0;i<=1023;i++){
		int p=i,res=0;
		while (p!=0){
			p-=lowbit(p);
			res++;
		}
		sum[i]=res;
	}
	memset(dp,-1,sizeof(dp));
	ksm[0]=1;
	for (int i=1;i<=100;i++) ksm[i]=ksm[i-1]*10,ksm[i]%=mod;
}
//p0记录方案数，p1记录数字和
data dfs(int len,int k,bool sm,bool pre){
	if (len==0) return (data){sum[k]<=K,0};
	if (dp now.p0!=-1 || dp now.p1!=-1) return dp now;
	int lim=sm?9:num[len];
	data ret = (data){0,0};
	for (int i=0;i<=lim;i++){
		int skip=k|(!pre||i)<<i;
		data val=dfs(len-1,skip,sm||i<lim,pre&&!i);
		ret.p0+=val.p0;
		ret.p0%=mod;
		ret.p1+=i*ksm[len-1]*val.p0+val.p1;
		ret.p1%=mod;
	}
	dp now=ret;
	return ret;
}
int solve(int n){
	memset(dp,-1,sizeof(dp));
	memset(num,0,sizeof(num)); cnt=0;
	while (n!=0){
		num[++cnt]=n%10;
		n/=10;
	}
	int ans=dfs(cnt,0,false,true).p1;
	ans%=mod;
	return ans;
}
main(){
	init();
	cin >> L >> R >> K;
	cout <<  (mod+solve(R)-solve(L-1))%mod <<  endl;
	return 0;
}


#include<bits/stdc++.h>
#define lowbit(_) _&-_
#define now [len][k][sm][pre]
#define int long long
using namespace std;
struct data{
	int p0,p1;
};
int L,R,K,num[500],cnt,sum[2005],ksm[200];
data dp[20][2050][2][2];
const int mod=998244353;
void init(){
	for (int i=0;i<=1023;i++){
		int p=i,res=0;
		while (p!=0){
			p-=lowbit(p);
			res++;
		}
		sum[i]=res;
	}
	memset(dp,-1,sizeof(dp));
	ksm[0]=1;
	for (int i=1;i<=100;i++) ksm[i]=ksm[i-1]*10,ksm[i]%=mod;
}
//p0记录方案数，p1记录数字和
data dfs(int len,int k,bool sm,bool pre){
	if (len==0) return (data){sum[k]<=K,0};
	if (dp now.p0!=-1 || dp now.p1!=-1) return dp now;
	int lim=sm?9:num[len];
	data ret = (data){0,0};
	for (int i=0;i<=lim;i++){
		int skip=k|(!pre||i)<<i;
		data val=dfs(len-1,skip,sm||i<lim,pre&&!i);
		ret.p0+=val.p0;
		ret.p0%=mod;
		ret.p1+=i*ksm[len-1]*val.p0+val.p1;
	}
	dp now=ret;
	return ret;
}
int solve(int n){
	memset(dp,-1,sizeof(dp));
	memset(num,0,sizeof(num)); cnt=0;
	while (n!=0){
		num[++cnt]=n%10;
		n/=10;
	}
	int ans=dfs(cnt,0,false,true).p1;
	return ans;
}
main(){
	init();
	cin >> L >> R >> K;
	cout <<  solve(R)-solve(L-1) <<  endl;
	return 0;
}


#include<bits/stdc++.h>
#define lowbit(_) _&-_
#define now [len][k][sm][pre]
using namespace std;
struct data{
	int p0,p1;
};
int L,R,K,num[500],cnt,sum[2005],ksm[200];
data dp[20][2050][2][2];
const int mod=998244353;
void init(){
	for (int i=0;i<=1023;i++){
		int p=i,res=0;
		while (p!=0){
			p-=lowbit(p);
			res++;
		}
		sum[i]=res;
	}
	memset(dp,-1,sizeof(dp));
	ksm[0]=1;
	for (int i=1;i<=100;i++) ksm[i]=ksm[i-1]*10,ksm[i]%=mod;
}
//p0记录方案数，p1记录数字和
data dfs(int len,int k,bool sm,bool pre){
	if (len==0) return (data){sum[k]<=K,0};
	if (dp now.p0!=-1 || dp now.p1!=-1) return dp now;
	int lim=sm?9:num[len];
	data ret = (data){0,0};
	for (int i=0;i<=lim;i++){
		int skip=k|(!pre||i)<<i;
		data val=dfs(len-1,skip,sm||i<lim,pre&&!i);
		ret.p0+=val.p0;
		ret.p0%=mod;
		ret.p1+=i*ksm[len-1]*val.p0+val.p1;
	}
	dp now=ret;
	return ret;
}
int solve(int n){
	memset(dp,-1,sizeof(dp));
	memset(num,0,sizeof(num)); cnt=0;
	while (n!=0){
		num[++cnt]=n%10;
		n/=10;
	}
	int ans=dfs(cnt,0,false,true).p1;
	return ans;
}
int main(){
	init();
	cin >> L >> R >> K;
	cout <<  solve(R)-solve(L-1) <<  endl;
	return 0;
}


#include<cstdio>
#include<algorithm>
#include<cstring>
using namespace std;
typedef long long ll;
const int maxn=100;
const int maxnum=(1<<10);
const int mod=998244353;
int k;
int cnt[maxnum+5];
int dp1[maxn+5][maxnum+5];
int dp2[maxn+5][maxnum+5];
ll l,r;
int a[maxn+5],pw[20];
int dfs1(int len,int st,bool zero,bool equ) // return num
{
    if (len<=0) {
        return 1;
    }
    if (!zero&&!equ&&dp1[len][st]!=-1) return dp1[len][st];
    int up=equ?a[len]:9;
    int ans=0;
    for (int i=0;i<=up;i++) {
        if (zero&&!i) ans=(ans+dfs1(len-1,st,true,equ&(i==up)))%mod;
        else {
            int nxt=(st|(1<<i));
            if (cnt[nxt]>k) continue;
            ans=(ans+dfs1(len-1,nxt,false,equ&(i==up)))%mod;
        }
    }
    if (!zero&&!equ) dp1[len][st]=ans;
    return ans;
}
int dfs2(int len,int st,bool zero,bool equ)
{
    if (len<=0) return 0;
    if (!zero&&!equ&&dp2[len][st]!=-1) return dp2[len][st];
    int up=equ?a[len]:9;
    int ans=0;
    for (int i=0;i<=up;i++) {
        if (zero&&!i) ans=(ans+dfs2(len-1,st,true,equ&(i==up)))%mod;
        else {
            int nxt=(st|(1<<i));
            if (cnt[nxt]>k) continue;
            ans=(ans+dfs2(len-1,nxt,false,equ&(i==up)))%mod;
            ans=(ans+1LL*i*pw[len-1]%mod*dfs1(len-1,nxt,false,equ&(i==up))%mod)%mod;
        }
    }
    if (!zero&&!equ) dp2[len][st]=ans;
    return ans;
}
int getCnt(int x)
{
    int cnt=0;
    while (x) {
        x=(x&(x-1)); cnt++;
    }
    return cnt;
}
void Init()
{
    for (int i=0;i<=maxnum;i++) cnt[i]=getCnt(i);
    pw[0]=1;
    for (int i=1;i<20;i++) pw[i]=1LL*pw[i-1]*10%mod;
}
int calc(ll x)
{
    int len=0;
    while (x) {
        a[++len]=x%10; x/=10;
    }
    memset(dp1,-1,sizeof(dp1));
    memset(dp2,-1,sizeof(dp2));
    return dfs2(len,0,true,true);
}
int main()
{
    Init();
    scanf("%lld%lld%d",&l,&r,&k);
    int ans2=calc(r);
    int ans1=calc(l-1);
    printf("%d\n",(ans2-ans1+mod)%mod);
    return 0;
}


#include <bits/stdc++.h>
using namespace std;

#define LL long long

const int N=20;
const int mod=998244353;

struct node {
	int sum,tot;
	node() {};
	node(int S,int T) { sum=S; tot=T; }
	bool check() { return ~sum && ~tot; }
}f[2][2][N][1<<10];

int A[N],ret,pw[30],k;

int lowbit(int x) {
	return x&-x;
}

int ccount(int x) {
	int cnt=0;
	if(!x) return 0;
	while(x) { x^=lowbit(x); cnt++; }
	return cnt;
}

node dfs(bool lim,bool zero,int pos,int st) {
	if(!pos) return node(0,1);
	node now=f[lim][zero][pos][st];
	if(now.sum>=0 && now.tot>=0) return now;
	now.sum=now.tot=0;
	for(int i=0;i<= (lim?A[pos]:9);i++) {
		if(__builtin_popcount(zero&&!i?0:st|(1<<i))<=k) {
			node nxt=dfs(lim && i==A[pos],zero && !i,pos-1,zero&&!i?0:st|(1<<i));
			now.sum=(now.sum+nxt.sum+1ll*i*nxt.tot%mod*pw[pos-1]%mod)%mod;
			now.tot=(now.tot+nxt.tot)%mod;
		}
	}
	return now;

}

int calc(LL x) {
	ret=0;
	memset(f,-1,sizeof(f));
	while(x) { A[++ret]=x%10; x/=10; }
	return dfs(1,1,ret,0).sum;
}

int main() {
	pw[0]=1;
	for(int i=1;i<=20;i++) pw[i]=10ll*pw[i-1]%mod;
	LL l,r;
	cin>>l>>r>>k;
	cout<<(mod+calc(r)-calc(l-1))%mod;
}


#include<cstdio>
#include<cstring>
#include<cmath>
#include<iostream>
#include<algorithm>
#include<queue>
#include<vector>
#include<map>
#define mod 998244353
using namespace std;
struct node {
	long long x,y;
	node(){};
	node(long long X,long long Y){
		x = X,y = Y;
	}
}dp[20][(1 << 10) + 5];
long long l,r,pw[20];
int k,num[20],cnt;
node dfs(int x,int s,int up,int zero){
	if (!x)
		return node(__builtin_popcount(s) <= k,0);
	if (!up && ! zero && ~dp[x][s].x)
		return dp[x][s];
	node ans = node(0,0);
	for (int i = 0;i <= 9;i ++){
		if (up && i > num[x])
			break;
		int to;
		if (i == 0 && zero)
			to = s;
		else
			to = (s | (1 << i));
		node t = dfs(x - 1,to,(up && i == num[x]),(zero && i == 0));
		ans.x = (ans.x + t.x) % mod;
		ans.y = (ans.y + t.y + i * pw[x - 1] % mod * t.x % mod) % mod;
	}
	if (!up && ! zero)
		dp[x][s] = ans;
	return ans;
}
long long solve(long long x){
	cnt = 0;
	while (x){
		num[++ cnt] = x % 10;
		x /= 10;
	}
	return dfs(cnt,0,1,1).y;
}
int main(){
	memset(dp,-1,sizeof(dp));
	scanf ("%lld%lld%d",&l,&r,&k);
	pw[0] = 1;
	for (int i = 1;i <= 18;i ++)
		pw[i] = pw[i - 1] * 10 % mod;
	printf("%lld\n",(solve(r) - solve(l - 1) + mod) % mod);
}


#include<iostream>
#include<cstdio>
#include<cmath>
#include<cstring>
#define LL long long

using namespace std;
const int maxn=20;
const int mod=998244353;

struct node
{
    LL cnt,sum;
};
int k;
node dp[20][1<<11];
LL fac[maxn];
LL st[maxn];

void init()
{
    fac[0]=1;
    for(int i=1;i<maxn;i++)
    {
        fac[i]=fac[i-1]*10%mod;
    }
    memset(dp,-1,sizeof(dp));
    return ;
}
int judge(LL x)
{
    int cnt=0;
    for(int i=0;i<11;i++)
    {
        if(x&(1<<i))
        {
            cnt++;
        }
    }
    return cnt;
}
node dfs(int len,int now,LL statu,bool limit)
{
    node p,value;
    p.cnt=0;
    p.sum=0;
    value.cnt=0;
    value.sum=0;

    if(len==-1)
    {
        p.cnt=1;
        return p;
    }
    if(!limit&&dp[len][statu].cnt!=-1)
    {
        return dp[len][statu];
    }
    int up=st[len];
    if(!limit)
    {
        up=9;
    }
    for(int i=0;i<=up;i++)
    {
        LL sta=statu|((now||i)<<i);
        if(judge(sta)<=k)
        {
           // cout<<len<<" "<<i<<endl;
            p=dfs(len-1,now||i,sta,i==up&&limit);
            value.cnt+=p.cnt;
            value.cnt%=mod;
            value.sum=(value.sum+p.sum%mod+p.cnt*1LL*i*fac[len]%mod)%mod;
            value.sum%=mod;
        }
    }
    if(limit)
    {
        return value;
    }
    dp[len][statu]=value;
    return dp[len][statu];

}

LL slove(LL x)
{
    int cnt=0;
    while(x)
    {
        st[cnt++]=x%10;
        x/=10;
    }

    node temp=dfs(cnt-1,0,0,true);

    return temp.sum;
}
int main()
{

    LL l,r;
    init();
    scanf("%lld%lld%d",&l,&r,&k);
    //cout<<slove<<(r)<<" "<<slove(l-1)<<endl;
    LL ans=(slove(r)-slove(l-1)+mod)%mod;
    printf("%lld\n",ans);
    return 0;
}


#include <bits/stdc++.h>
using namespace std;

#define LL long long

const int N=20;
const int mod=998244353;

struct node {
	int sum,tot;
	node() {};
	node(int S,int T) { sum=S; tot=T; }
	bool check() { return ~sum && ~tot; }
}f[2][2][N][1<<10];

int A[N],ret,pw[30],k;

int lowbit(int x) {
	return x&-x;
}

int ccount(int x) {
	int cnt=0;
	if(!x) return 0;
	while(x) { x^=lowbit(x); cnt++; }
	return cnt;
}

node dfs(bool lim,bool zero,int pos,int st) {
	if(!pos) return node(0,1);
	node now=f[lim][zero][pos][st];
	if(now.sum>=0 && now.tot>=0) return now;
	now.sum=now.tot=0;
	for(int i=0;i<= (lim?A[pos]:9);i++) {
		if(ccount(zero&&!i?0:st|(1<<i))<=k) {
			node nxt=dfs(lim && i==A[pos],zero && !i,pos-1,zero&&!i?0:st|(1<<i));
			now.sum=(now.sum+nxt.sum+1ll*i*nxt.tot%mod*pw[pos-1]%mod)%mod;
			now.tot=(now.tot+nxt.tot)%mod;
		}
	}
	return now;

}

int calc(LL x) {
	ret=0;
	memset(f,-1,sizeof(f));
	while(x) { A[++ret]=x%10; x/=10; }
	return dfs(1,1,ret,0).sum;
}

int main() {
	pw[0]=1;
	for(int i=1;i<=20;i++) pw[i]=10ll*pw[i-1]%mod;
	LL l,r;
	cin>>l>>r>>k;
	cout<<(mod+calc(r)-calc(l-1))%mod;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define mod 998244353
ll L,R;
int k;
int len,a[20];
ll f[20][2][2][1050],g[20][2][2][1050];
ll p[19];
ll dp(int i,int less,int have0,int sta){
	if(f[i][less][have0][sta]==-1||g[i][less][have0][sta]==-1){
		if(i==0){
			f[i][less][have0][sta]=0;
			if(sta==0) g[i][less][have0][sta]=1;
			else g[i][less][have0][sta]=0;
		}
		else{
			g[i][less][have0][sta]=0;
			f[i][less][have0][sta]=0;
			int end=less?9:a[i];
			for(ll j=0;j<=end;j++){
				if(!((1<<j)&sta)&&(!have0||j!=0)) continue;
				if(!have0||have0&&j!=0){
					f[i][less][have0][sta]+=dp(i-1,less|(j<end),have0&(j==0),sta^(1<<j))+g[i-1][less|(j<end)][have0&(j==0)][sta^(1<<j)]*j*p[i-1];
					g[i][less][have0][sta]+=g[i-1][less|(j<end)][have0&(j==0)][sta^(1<<j)];
					f[i][less][have0][sta]%=mod;
					g[i][less][have0][sta]%=mod;
				}
				f[i][less][have0][sta]+=dp(i-1,less|(j<end),have0&(j==0),sta)+g[i-1][less|(j<end)][have0&(j==0)][sta]*j*p[i-1];
				g[i][less][have0][sta]+=g[i-1][less|(j<end)][have0&(j==0)][sta];
				f[i][less][have0][sta]%=mod;
				g[i][less][have0][sta]%=mod;
			}
		}
	}
	return f[i][less][have0][sta];
}
int cal(int x){
	int ans=0;
	while(x) ans+=x&1,x>>=1;
	return ans;
}
ll sol(ll x){
	memset(a,0,sizeof(a));
	len=0;
	while(x>0){
		a[++len]=x%10;
		x/=10;
	}
	memset(f,-1,sizeof(f));
	memset(g,-1,sizeof(g));
	ll ans=0;
	for(int i=1;i<=(1<<10)-1;i++){
		if(cal(i)<=k) ans+=dp(len,0,1,i),ans%=mod /*cout<<ans<<endl*/;
	}
//	cout<<ans<<endl;
	return ans;
}
int main(){
	p[0]=1;
	for(int i=1;i<=18;i++) p[i]=p[i-1]*10ll;
	cin>>L>>R>>k;
	cout<<(sol(R)-sol(L-1)+mod)%mod<<endl;
	return 0;
}


#include<bits/stdc++.h>
#define pll pair<long long,long long>
using namespace std;
template<typename T>void read(T &x){
	x=0;int f(1);char c(getchar());
	for(;!isdigit(c);c=getchar())if(c=='-')f=-f;
	for(; isdigit(c);c=getchar())x=(x<<3)+(x<<1)+(c-'0');
	x*=f;
}
template<typename T>void write(T x){
	if(x<0)putchar('-'),x=-x;
	if(x/10)write(x/10),x%=10;
	putchar(x+'0');
}
const long long mod=998244353;
int a[20],t[20],num[1024];long long k,M[20];pll dp[20][1024][2];
pll dfs(int pos,int sta,bool limit,bool lead){
	if(pos==-1){
		return pll(0,1);
	}
	if(!limit&&dp[pos][sta][lead].first!=-1)return dp[pos][sta][lead];
	int up=limit?a[pos]:9;pll ans=pll(0,0);
	for(int i=1;i<=up;++i){
		if(num[sta|(1<<i)]<=k){
			pll temp=dfs(pos-1,sta|(1<<i),limit&&i==a[pos],0);
			ans.first=(ans.first+i*M[pos]%mod*temp.second%mod+temp.first)%mod;
			ans.second=(ans.second+temp.second)%mod;
		}
	}
	if(lead){
		pll temp=dfs(pos-1,sta,0,1);
		ans.first=(ans.first+temp.first)%mod;
		ans.second=(ans.second+temp.second)%mod;
	}
	else if(num[sta|1]<=k){
		pll temp=dfs(pos-1,sta|1,limit&&a[pos]==0,0);
		ans.first=(ans.first+temp.first)%mod;
		ans.second=(ans.second+temp.second)%mod;
	}
	if(!limit)dp[pos][sta][lead]=ans;
	return ans;
}
long long solve(long long x){
	int num=0;
	while(x){
		a[num++]=x%10;
		x/=10;
	}
	return dfs(num-1,0,1,1).first;
}
int lowbit(int x){
	return x&-x;
}
int main(){
	memset(dp,-1,sizeof dp);
	for(int s=1;s<1024;++s)
		num[s]=num[s^lowbit(s)]+1;
	M[0]=1;
	for(int i=1;i<20;++i)
		M[i]=M[i-1]*10%mod;
	long long l,r;
	read(l),read(r),read(k);
	write((solve(r)-solve(l-1)+mod)%mod);
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define pii pair<int,int>
const int mo = 998244353;
int readint(){
    int x=0,f=1;char s=getchar();
    #define sc (s=getchar())
    while(s<'0'||s>'9'){
        if(s=='-')
            f=-1;
        sc;
    }
    while(s>='0'&&s<='9'){
        x=(x<<3)+(x<<1)+(s^48);
        sc;
    }
    #undef sc
    return x*f;
}
int a[20];
int k,pw[20];
pii dp[20][1024];
pii dfs(int now,int s,int limit,int zero){
    if(!now)
        return make_pair(__builtin_popcount(s)<=k,0);
    if(!limit&&!zero&&~dp[now][s].first)
        return dp[now][s];
    pii ans=make_pair(0,0);
    for(int i=0;i<=9;i++){
        if(limit&&i>a[now])
            break;
        int to=(zero&&i==0)?s:(s|(1<<i));
        pii t=dfs(now-1,to,limit&&i==a[now],zero&&i==0);
        ans=make_pair((ans.first+t.first)%mo,(ans.second+t.second+i*pw[now-1]%mo*t.first)%mo);
    }
    if(!limit&&!zero)
        dp[now][s]=ans;
    return ans;
}
int getans(int x){
    int n=0;
    while(x){
        a[++n]=x%10;
        x/=10;
    }
    return dfs(n,0,1,1).second;
}
signed main (){
    memset(dp,-1,sizeof(dp));
    pw[0]=1;
    for(int i=1;i<20;i++){
        pw[i]=pw[i-1]*10%mo;
    }
    int l=readint(),r=readint();
    k=readint();
    cout<<(getans(r)-getans(l-1)+mo)%mo;
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define fi			first
#define se			second
#define fz(i,a,b)	for(int i=a;i<=b;i++)
#define fd(i,a,b)	for(int i=a;i>=b;i--)
#define foreach(it,v) for(__typeof(v.begin()) it=v.begin();it!=v.end();it++)
#define all(a)		a.begin(),a.end()
#define giveup(...) return printf(__VA_ARGS__),0;
#define fill0(a)	memset(a,0,sizeof(a))
#define fill1(a)	memset(a,-1,sizeof(a))
#define fillbig(a)	memset(a,0x3f,sizeof(a))
#define fillsmall(a) memset(a,0xcf,sizeof(a))
#define mask(a)		(1ll<<(a))
#define maskx(a,x)	((a)<<(x))
#define _bit(a,x)	(((a)>>(x))&1)
#define _sz(a)		((int)(a).size())
#define filei(a)	freopen(a,"r",stdin);
#define fileo(a)	freopen(a,"w",stdout);
#define fileio(a) 	freopen(a".in","r",stdin);freopen(a".out","w",stdout)
#define eprintf(...) fprintf(stderr,__VA_ARGS__)
#define put(x)		putchar(x)
#define eoln        put('\n')
#define space		put(' ')
#define y1			y_chenxiaoyan_1
#define y0			y_chenxiaoyan_0
#define int long long
typedef pair<int,int> pii;
inline int read(){
	int x=0,neg=1;char c=getchar();
	while(!isdigit(c)){
		if(c=='-')	neg=-1;
		c=getchar();
	}
	while(isdigit(c))	x=x*10+c-'0',c=getchar();
	return x*neg;
}
int chong;
inline void print(int x){
	if(x<0){
		putchar('-');
		print(abs(x));
		return;
	}
	if(x<=9)	putchar(x+'0');
	else{
		print(x/10);
		putchar(x%10+'0');
	}
}
inline int qpow(int x,int e,int _MOD){
	int ans=1;
	while(e){
		if(e&1)	ans=ans*x%_MOD;
		x=x*x%_MOD;
		e>>=1;
	}
	return ans;
}
const int MOD=998244353;
int l=read(),r=read(),k=read();
int a[20],cnt,P[20];
pii dp[20][1024];
inline pii dfs(int pos,int sta,bool lead,bool limit){
	if(!~pos)	return pii(__builtin_popcount(sta)<=k,0);
	if(!lead&&!limit&&~dp[pos][sta].fi)	return dp[pos][sta];
	int up=(limit)?a[pos]:9;
	pii ans=pii(0,0);
	for(int i=0;i<=up;i++){
		int nsta=(lead&&i==0)?sta:(sta|(1<<i));
		pii nxt=dfs(pos-1,nsta,(lead&&i==0),(limit&&i==up));
		ans=pii((ans.fi+nxt.fi)%MOD,(nxt.fi*P[pos]%MOD*i%MOD+nxt.se+ans.se)%MOD);
	}
//	cout<<pos<<" "<<sta<<" "<<ans.fi<<" "<<ans.se<<endl;
	if(!limit&&!lead)	dp[pos][sta]=ans;
	return ans;
}
inline int solve(int x){
	fill0(a);cnt=0;
	while(x){
		a[cnt++]=x%10;x/=10;
	}
	fz(i,0,18)	fz(j,0,1023)	dp[i][j].fi=dp[i][j].se=-1;
	return dfs(cnt-1,0,1,1).se;
}
signed main(){
	P[0]=1;fz(i,1,18)	P[i]=P[i-1]*10%MOD;
	cout<<(solve(r)-solve(l-1)+MOD)%MOD<<endl;
	return 0;
}


#include <cstdio>
#include <algorithm>
#include <cstring>
using namespace std;
#define ll long long
#define mod 998244353
#define pii pair<ll,ll>
ll l; ll r; ll s[100]; pii dp[100][1<<10]; ll len; ll T; ll pow[20]; ll cnt[1<<10]; ll k;
pii dfs(ll pos,int msk,int lead,int limit)//记搜
{
    if(pos<1) return make_pair(1LL, 0LL);
    if((dp[pos][msk].first!=-1&&(!limit)&&(!lead))) return dp[pos][msk];//记录当前值
    pii ret=make_pair(0LL, 0LL);
    ll res=limit?s[pos]:9;//res当前位能取到的最大值
    for(ll i=0;i<=res;i++)
    {
        if((!i)&&lead){
            pii tmp=dfs(pos-1, 0, 1, limit&&(i==res));
            (ret.first+=tmp.first)%=mod;
            (ret.second+=tmp.second)%=mod;
        }
        else{
            int nxt=msk|(1<<i);
            if(cnt[nxt]>k) continue;
            pii tmp=dfs(pos-1, nxt, 0, limit&&(i==res));
            (ret.first+=tmp.first)%=mod;
            (ret.second+=tmp.second+i*pow[pos-1]%mod*tmp.first%mod)%=mod;

        }
    }
    if(!limit&&!lead) dp[pos][msk]=ret;//当前状态方案数记录
    return ret;
}
pii part(ll x)//把数按位拆分
{
    len=0;
    while(x) s[++len]=x%10,x/=10;
    return dfs(len,0,1,1);//进入记搜
}
int main()
{
    pow[0]=1LL; for(ll i=1;i<20;++i) pow[i]=pow[i-1]*10LL%mod;
    for(int i=0;i<(1<<10);++i){
        int cur=0;
        for(int j=0;j<10;++j){
            if(i&(1<<j)) ++cur;
        }
        cnt[i]=1LL*cur;
    }
//    printf("%lld %lld\n",pow[1],pow[2]);
//    ll ans00=0LL;
//    for(ll i=0;i<=50;++i) ans00+=i;
//    printf("%lld\n",ans00);
    memset(dp,-1,sizeof dp);//初始化-1（因为有可能某些情况下的方案数是0）
    scanf("%lld %lld",&l,&r); scanf("%lld",&k);
    ll ans=part(r).second-part(l-1).second;
//    printf("%lld %lld\n",part(r).first,part(r).second);
//    printf("%lld %lld\n",part(l-1).first,part(l-1).second);
    ans=(ans+mod)%mod;
    printf("%lld\n",ans);
    return 0;
}


#include<bits/stdc++.h>
#define LL long long
#define Mod 998244353
using namespace std;
inline void read(LL &x)
{
	LL f=1;x=0;char ch=getchar();
	while (!isdigit(ch)){if (ch=='-') f=-1;ch=getchar();}
	while (isdigit(ch)){x=(x<<3)+(x<<1)+(ch&15);ch=getchar();}
	x*=f;
}
LL K,L,R,a[20],top,F[20][(1<<10)+5],power[20],ans,G[20][(1<<10)+5];
inline LL dfs(LL now,LL tmp,LL limit,LL is_zero)
{
	if (now>top) return __builtin_popcount(tmp)<=K;
	if (F[now][tmp]!=-1&&(!limit)&&(!is_zero)) {ans+=G[now][tmp];ans%=Mod;return F[now][tmp];}
	LL sum=0,Max=limit?a[top-now+1]:9,lstans=ans;
	for (LL i=0;i<=Max;i++)
	{
//		if (__builtin_popcount((is_zero&&i==0)?tmp:tmp|(1<<i))>K) continue;
		LL X=dfs(now+1,(is_zero&&(i==0))?tmp:tmp|(1<<i),limit&&(i==Max),is_zero&&(i==0));
		ans+=(X%Mod)*i*power[top-now]%Mod;
		ans%=Mod;
		sum+=X;
	}
	if (!limit&&(!is_zero)) F[now][tmp]=sum,G[now][tmp]=(ans-lstans+Mod)%Mod;
	return sum;
}
inline LL solve(LL x)
{
	top=ans=0;
	memset(F,-1,sizeof(F));
	while (x){a[++top]=x%10;x/=10;}
	dfs(1,0,1,1);
	return ans;
}
int main()
{
	power[0]=1;
	for (int i=1;i<=18;i++) power[i]=(power[i-1]<<3)+(power[i-1]<<1),power[i]%=Mod;
	read(L),read(R),read(K);
	cout<<(solve(R)-solve(L-1)+Mod)%Mod<<"\n";
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
const long long p=998244353,N=20;
long long l,r,k,p10[N],a[N];
struct node{
    long long tot,sum;
    void clear(){
        tot=sum=0;
    }
    bool check(){
        return ~tot&&~sum;
    }
}dp[2][2][N][1024];
node dfs(long long pos,long long mark,bool lim,bool zero){
    if(!pos)
        return (node){1,0};
    node& res=dp[lim][zero][pos][mark];
    if(res.check())
        return res;
    res.clear();
    node ret;
    for(long long i=0;i<=(lim?a[pos]:9);i++){
        long long bp=zero&&!i?0:mark|1<<i;
        if(__builtin_popcount(bp)<=k){
            ret=dfs(pos-1,bp,lim&&i==a[pos],zero&&!i);
            res.tot=(res.tot+ret.tot)%p;
            res.sum=(res.sum+ret.sum+(long long)i*p10[pos-1]%p*ret.tot%p)%p;
        }
    }
    return res;
}
long long clac(long long x){
    memset(dp,-1,sizeof(dp));
    long long len=0;
    while(x)
        a[++len]=x%10,
        x/=10;
    return dfs(len,0,1,1).sum;
}
int main(){
    p10[0]=1;
    for(long long i=1;i<=19;i++)
        p10[i]=10ll*p10[i-1]%p;
    scanf("%lld%lld%lld",&l,&r,&k);
    printf("%lld",(clac(r)-clac(l-1)+p)%p);
}


#include<bits/stdc++.h>
using namespace std;
#define SZ(v) ((int)(v).size())
#define zero(v) memset(v,0,sizeof(v))
#define rep(i,n) for(int i=0;i<(n);i++)
#define foreach(it,c) for(__typeof(c.begin()) it=c.begin();it!=c.end();it++)
#define all(v) (v).begin(),(v).end()
template<typename T>inline bool chkmin(T &a,const T &b){return a>b?a=b,1:0;}
template<typename T>inline bool chkmax(T &a,const T &b){return a<b?a=b,1:0;}
typedef unsigned uint;
const int INF=0x3f3f3f3f;
const double EPS=1e-10;
typedef pair<int,int> pii;
int inline in(){int x=0,c;for(;(uint)((c=getchar())-'0')>=10;)
{if(c=='-')return -in();if(!~c)throw ~0;}do{x=(x<<3)+(x<<1)+(c-'0');}
while((uint)((c=getchar())-'0')<10);return x;}

#define ll int64_t
ll L,R;
int k;
ll mod=998244353;
//ll mod=1e18;
int pw[20];
int dp[20][10][1<<10];
int cnt[20][10][1<<10];
vector<int>vec;

int dfs(int cur,int end,int pre,int nmask){
//	cout<<"dfs:"<<cur<<' '<<end<<' '<<pre<<' '<<nmask<<endl;
	if(__builtin_popcount(nmask)>k)return 0;
	if(cur==end)return 0;

	int ret=0;
	int i=end-cur;
	for(int j=(cur==0);j<=vec[cur]-(cur!=end-1);j++){
		for(int mask=0;mask<(1<<10);mask++){
			if(dp[i][j][mask]!=-1&&__builtin_popcount(nmask|mask)<=k){
				ret=((ll)ret+(ll)pre*pw[i]%mod*cnt[i][j][mask]%mod+dp[i][j][mask])%mod;
			}
		}
	}
//	cout<<ret<<endl;
	ret=((ll)ret+dfs(cur+1,end,((ll)pre*10+vec[cur])%mod,nmask|(1<<vec[cur])))%mod;
	return ret;
}

int solve(ll x){
	if(x<=0)return 0;
	vec.clear();
	for(ll tmp=x;tmp;tmp=tmp/10)vec.push_back(tmp%10);
	reverse(all(vec));
//	cout<<"vec:";for(int i=0;i<SZ(vec);i++)cout<<vec[i]<<' ';cout<<endl;

	int ret=0;
	for(int i=1;i<SZ(vec);i++){
		int ppr=ret;
		for(int j=1;j<=9;j++){
			for(int mask=0;mask<(1<<10);mask++){
				if(dp[i][j][mask]!=-1&&__builtin_popcount(mask)<=k){
					ret=((ll)ret+dp[i][j][mask])%mod;
				}
			}
		}
//		int diff=(((ll)ret-ppr)%mod+mod)%mod;
//		cout<<"num_of_dig="<<i<<' '<<diff<<endl;
	}
//	cout<<"preret:"<<ret<<endl;
	ret=((ll)ret+dfs(0,SZ(vec),0,0))%mod;
//	cout<<"lastret:"<<ret<<endl;cout<<endl;

	return ret;
}

int main(){
	pw[0]=1;
	for(int i=1;i<20;i++){
		pw[i]=(ll)pw[i-1]*10%mod;
	}
//	for(int i=0;i<19;i++)for(int j=0;j<10;j++)for(int k=0;k<(1<<10);k++)dp[i][j][k]=-INF;
	memset(dp,-1,sizeof(dp));
	for(int j=0;j<=9;j++){
		dp[1][j][1<<j]=j;
		cnt[1][j][1<<j]=1;
	}

	for(int i=1;i<=18;i++)for(int j=0;j<=9;j++)for(int mask=1;mask<(1<<10);mask++){
		for(int num=0;num<=9;num++){//ÊýÎ»dpÌ«ËûÂèÈÝÒ×Ð´´íÁË
			if(dp[i][j][mask]>=0){
				if(dp[i+1][j][mask|(1<<num)]==-1)dp[i+1][j][mask|(1<<num)]=0;//ÈôÒªÊ¹ÓÃdp[i][j][mask]È¥¸üÐÂ£¬Ôòdp[i][j][mask]±ØÐëÒª×ÔÏàÈÚÇ¡£¬¼´maskÖÐÈ·È·ÊµÊµ×°ÁËi¸öÊýµÄ¼¯ºÏ,±í´ïÎªdp[i][j][mask]!=-1
//				if(i==1&&j==1&&mask==2&&num==2)cout<<"pp"<<endl;
//				if(i+1==2&&j==1&&(mask|(1<<num))==6)cout<<"oo"<<' '<<mask<<' '<<num<<endl;

				dp[i+1][j][mask|(1<<num)]=((ll)dp[i+1][j][mask|(1<<num)]+(ll)dp[i][j][mask]*10%mod+(ll)cnt[i][j][mask]*num%mod)%mod;
				cnt[i+1][j][mask|(1<<num)]=((ll)cnt[i+1][j][mask|(1<<num)]+cnt[i][j][mask])%mod;
			}
		}
	}
	cin>>L>>R>>k;
	int ans=(((ll)solve(R)-solve(L-1))%mod+mod)%mod;
	cout<<ans<<endl;
//
//	int tmp=0;
//	for(int mask=0;mask<(1<<10);mask++){
//		if(dp[4][1][mask]!=-1)tmp+=dp[4][1][mask];
//	}
//	cout<<tmp<<endl;
//	for(int j=0;j<=9;j++){
//		int tmp=0;
//		for(int mask=0;mask<(1<<10);mask++){
//			if(dp[4][j][mask]!=-1)tmp+=dp[4][j][mask];
//		}
//		cout<<tmp<<endl;
//	}
//	cout<<dp[1][0][1]<<endl;
//	cout<<endl;
//	cout<<dp[3][1][1]*10+1<<endl;
//	cout<<dp[3][1][2]*10+0<<endl;
//	cout<<dp[3][1][3]*10+1<<endl;
//	cout<<dp[3][1][3]*10+0<<endl;
//	cout<<dp[2][1][2]<<endl;
//	cout<<dp[2][2][4]<<endl;
//	cout<<dp[2][3][8]<<endl;
//	cout<<dp[2][4][16]<<endl;
//	cout<<dp[2][5][32]<<endl;
//	cout<<dp[2][6][64]<<endl;
//	cout<<dp[2][7][128]<<endl;
//	cout<<dp[2][8][256]<<endl;
//	cout<<dp[2][9][512]<<endl;
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define SZ(v) ((int)(v).size())
#define zero(v) memset(v,0,sizeof(v))
#define rep(i,n) for(int i=0;i<(n);i++)
#define foreach(it,c) for(__typeof(c.begin()) it=c.begin();it!=c.end();it++)
#define all(v) (v).begin(),(v).end()
template<typename T>inline bool chkmin(T &a,const T &b){return a>b?a=b,1:0;}
template<typename T>inline bool chkmax(T &a,const T &b){return a<b?a=b,1:0;}
typedef unsigned uint;
const int INF=0x3f3f3f3f;
const double EPS=1e-10;
typedef pair<int,int> pii;
int inline in(){int x=0,c;for(;(uint)((c=getchar())-'0')>=10;)
{if(c=='-')return -in();if(!~c)throw ~0;}do{x=(x<<3)+(x<<1)+(c-'0');}
while((uint)((c=getchar())-'0')<10);return x;}

#define ll int64_t
ll L,R;
ll k;
ll mod=998244353;
ll pw[20];
ll dp[20][10][1<<10];
ll cnt[20][10][1<<10];
vector<ll>vec;

ll dfs(ll cur,ll end,ll pre,ll nmask){
//	cout<<"dfs:"<<cur<<' '<<end<<' '<<pre<<' '<<nmask<<endl;
	if(__builtin_popcount(nmask)>k)return 0;
	if(cur==end)return 0;

	ll ret=0;
	ll i=end-cur;
	for(ll j=(cur==0);j<=vec[cur]-(cur!=end-1);j++){
		for(ll mask=0;mask<(1<<10);mask++){
			if(dp[i][j][mask]!=-1&&__builtin_popcount(nmask|mask)<=k){
				ret=((ll)ret+(ll)pre*pw[i]%mod*cnt[i][j][mask]%mod+dp[i][j][mask])%mod;
			}
		}
	}
//	cout<<ret<<endl;
	ret=((ll)ret+dfs(cur+1,end,((ll)pre*10+vec[cur])%mod,nmask|(1<<vec[cur])))%mod;
	return ret;
}

ll solve(ll x){
	if(x<=0)return 0;
	vec.clear();
	for(ll tmp=x;tmp;tmp=tmp/10)vec.push_back(tmp%10);
	reverse(all(vec));
//	cout<<"vec:";for(int i=0;i<SZ(vec);i++)cout<<vec[i]<<' ';cout<<endl;

	ll ret=0;
	for(ll i=1;i<SZ(vec);i++){
		for(ll j=1;j<=9;j++){
			for(ll mask=0;mask<(1<<10);mask++){
				if(dp[i][j][mask]!=-1){
					ret=((ll)ret+dp[i][j][mask])%mod;
				}
			}
		}
//		cout<<ret<<endl;
	}
//	cout<<"preret:"<<ret<<endl;
	ret=((ll)ret+dfs(0,SZ(vec),0,0))%mod;
//	cout<<"lastret:"<<ret<<endl;cout<<endl;

	return ret;
}

int main(){
	pw[0]=1;
	for(ll i=1;i<20;i++){
		pw[i]=(ll)pw[i-1]*10%mod;
	}
//	for(int i=0;i<19;i++)for(int j=0;j<10;j++)for(int k=0;k<(1<<10);k++)dp[i][j][k]=-INF;
	memset(dp,-1,sizeof(dp));
	for(ll j=0;j<=9;j++){
		dp[1][j][1<<j]=j;
		cnt[1][j][1<<j]=1;
	}

	for(ll i=1;i<=18;i++)for(ll j=0;j<=9;j++)for(ll mask=0;mask<(1<<10);mask++){
		for(ll num=0;num<=9;num++){//ÊýÎ»dpÌ«ËûÂèÈÝÒ×Ð´´íÁË
			if(dp[i][j][mask]>=0){
				if(dp[i+1][j][mask|(1<<num)]==-1)dp[i+1][j][mask|(1<<num)]=0;//ÈôÒªÊ¹ÓÃdp[i][j][mask]È¥¸üÐÂ£¬Ôòdp[i][j][mask]±ØÐëÒª×ÔÏàÈÚÇ¡£¬¼´maskÖÐÈ·È·ÊµÊµ×°ÁËi¸öÊýµÄ¼¯ºÏ,±í´ïÎªdp[i][j][mask]!=-1
//				if(i==1&&j==1&&mask==2&&num==2)cout<<"pp"<<endl;
//				if(i+1==2&&j==1&&(mask|(1<<num))==6)cout<<"oo"<<' '<<mask<<' '<<num<<endl;

				dp[i+1][j][mask|(1<<num)]=((ll)dp[i+1][j][mask|(1<<num)]+dp[i][j][mask]*10+cnt[i][j][mask]*num)%mod;
				cnt[i+1][j][mask|(1<<num)]=((ll)cnt[i+1][j][mask|(1<<num)]+cnt[i][j][mask])%mod;
			}
		}
	}
	cin>>L>>R>>k;
	ll ans=(((ll)solve(R)-solve(L-1))%mod+mod)%mod;
	cout<<ans<<endl;
//
//	int tmp=0;
//	for(int mask=0;mask<(1<<10);mask++){
//		if(dp[4][1][mask]!=-1)tmp+=dp[4][1][mask];
//	}
//	cout<<tmp<<endl;
//	for(int j=0;j<=9;j++){
//		int tmp=0;
//		for(int mask=0;mask<(1<<10);mask++){
//			if(dp[4][j][mask]!=-1)tmp+=dp[4][j][mask];
//		}
//		cout<<tmp<<endl;
//	}
//	cout<<dp[1][0][1]<<endl;
//	cout<<endl;
//	cout<<dp[3][1][1]*10+1<<endl;
//	cout<<dp[3][1][2]*10+0<<endl;
//	cout<<dp[3][1][3]*10+1<<endl;
//	cout<<dp[3][1][3]*10+0<<endl;
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define SZ(v) ((int)(v).size())
#define zero(v) memset(v,0,sizeof(v))
#define rep(i,n) for(int i=0;i<(n);i++)
#define foreach(it,c) for(__typeof(c.begin()) it=c.begin();it!=c.end();it++)
#define all(v) (v).begin(),(v).end()
template<typename T>inline bool chkmin(T &a,const T &b){return a>b?a=b,1:0;}
template<typename T>inline bool chkmax(T &a,const T &b){return a<b?a=b,1:0;}
typedef unsigned uint;
const int INF=0x3f3f3f3f;
const double EPS=1e-10;
typedef pair<int,int> pii;
int inline in(){int x=0,c;for(;(uint)((c=getchar())-'0')>=10;)
{if(c=='-')return -in();if(!~c)throw ~0;}do{x=(x<<3)+(x<<1)+(c-'0');}
while((uint)((c=getchar())-'0')<10);return x;}

#define ll int64_t
ll L,R;
int k;
int mod=998244353;
int pw[20];
int dp[20][10][1<<10];
int cnt[20][10][1<<10];
vector<int>vec;

int dfs(int cur,int end,int pre,int nmask){
//	cout<<"dfs:"<<cur<<' '<<end<<' '<<pre<<' '<<nmask<<endl;
	if(__builtin_popcount(nmask)>k)return 0;
	if(cur==end)return 0;

	int ret=0;
	int i=end-cur;
	for(int j=(cur==0);j<=vec[cur]-(cur!=end-1);j++){
		for(int mask=0;mask<(1<<10);mask++){
			if(dp[i][j][mask]!=-1&&__builtin_popcount(nmask|mask)<=k){
				ret=((ll)ret+(ll)pre*pw[i]%mod*cnt[i][j][mask]%mod+dp[i][j][mask])%mod;
			}
		}
	}
//	cout<<ret<<endl;
	ret=((ll)ret+dfs(cur+1,end,((ll)pre*10+vec[cur])%mod,nmask|(1<<vec[cur])))%mod;
	return ret;
}

int solve(ll x){
	if(x<=0)return 0;
	vec.clear();
	for(ll tmp=x;tmp;tmp=tmp/10)vec.push_back(tmp%10);
	reverse(all(vec));
//	cout<<"vec:";for(int i=0;i<SZ(vec);i++)cout<<vec[i]<<' ';cout<<endl;

	int ret=0;
	for(int i=1;i<SZ(vec);i++){
		for(int j=1;j<=9;j++){
			for(int mask=0;mask<(1<<10);mask++){
				if(dp[i][j][mask]!=-1){
					ret=((ll)ret+dp[i][j][mask])%mod;
				}
			}
		}
//		cout<<ret<<endl;
	}
//	cout<<"preret:"<<ret<<endl;
	ret=((ll)ret+dfs(0,SZ(vec),0,0))%mod;
//	cout<<"lastret:"<<ret<<endl;cout<<endl;

	return ret;
}

int main(){
	pw[0]=1;
	for(int i=1;i<20;i++){
		pw[i]=(ll)pw[i-1]*10%mod;
	}
//	for(int i=0;i<19;i++)for(int j=0;j<10;j++)for(int k=0;k<(1<<10);k++)dp[i][j][k]=-INF;
	memset(dp,-1,sizeof(dp));
	for(int j=0;j<=9;j++){
		dp[1][j][1<<j]=j;
		cnt[1][j][1<<j]=1;
	}

	for(int i=1;i<=18;i++)for(int j=0;j<=9;j++)for(int mask=0;mask<(1<<10);mask++){
		for(int num=0;num<=9;num++){//ÊýÎ»dpÌ«ËûÂèÈÝÒ×Ð´´íÁË
			if(dp[i][j][mask]>=0){
				if(dp[i+1][j][mask|(1<<num)]==-1)dp[i+1][j][mask|(1<<num)]=0;//ÈôÒªÊ¹ÓÃdp[i][j][mask]È¥¸üÐÂ£¬Ôòdp[i][j][mask]±ØÐëÒª×ÔÏàÈÚÇ¡£¬¼´maskÖÐÈ·È·ÊµÊµ×°ÁËi¸öÊýµÄ¼¯ºÏ,±í´ïÎªdp[i][j][mask]!=-1
//				if(i==1&&j==1&&mask==2&&num==2)cout<<"pp"<<endl;
//				if(i+1==2&&j==1&&(mask|(1<<num))==6)cout<<"oo"<<' '<<mask<<' '<<num<<endl;

				dp[i+1][j][mask|(1<<num)]=((ll)dp[i+1][j][mask|(1<<num)]+dp[i][j][mask]*10+cnt[i][j][mask]*num)%mod;
				cnt[i+1][j][mask|(1<<num)]=((ll)cnt[i+1][j][mask|(1<<num)]+cnt[i][j][mask])%mod;
			}
		}
	}
	cin>>L>>R>>k;
	int ans=(((ll)solve(R)-solve(L-1))%mod+mod)%mod;
	cout<<ans<<endl;
//
//	int tmp=0;
//	for(int mask=0;mask<(1<<10);mask++){
//		if(dp[4][1][mask]!=-1)tmp+=dp[4][1][mask];
//	}
//	cout<<tmp<<endl;
//	for(int j=0;j<=9;j++){
//		int tmp=0;
//		for(int mask=0;mask<(1<<10);mask++){
//			if(dp[4][j][mask]!=-1)tmp+=dp[4][j][mask];
//		}
//		cout<<tmp<<endl;
//	}
//	cout<<dp[1][0][1]<<endl;
//	cout<<endl;
//	cout<<dp[3][1][1]*10+1<<endl;
//	cout<<dp[3][1][2]*10+0<<endl;
//	cout<<dp[3][1][3]*10+1<<endl;
//	cout<<dp[3][1][3]*10+0<<endl;
	return 0;
}


#include<bits/stdc++.h>
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cmath>
#include<cstring>
#include<iomanip>
#include<time.h>
#include<vector>
#define ll long long
#define mem(x,y) memset(x,y,sizeof(x))
#define rep(x,m,n) for(int x=m;x<=n;x++)
#define per(x,m,n) for(int x=m;x>=n;x--)
#define pb push_back
#define mp make_pair
#define println(x) cout<<(x)<<'\n'
#define pin cout<<"\n";
#define printsp(x) cout<<(x)<<" ";
#define read(x) cin>>(x)
#define pause system("pause");
ll power(ll a,ll b,ll mod);
using namespace std;
const double eps=1e-8;
const double pi=acos(-1.0);
const ll INF=0x3f3f3f3f3f3f3f3f;
const int inf=0x3f3f3f3f;
const int N=1e6+5;
ll l,r;
int k;
int mod=998244353;
ll p[25];
pair<ll,ll> dp[20][1100][15][2];
int digit[20];
pair<ll,ll> dfs(int pos,int state,int num,bool limit)
{
    if(!pos) return mp(0,1);
    if(dp[pos][state][num][limit]!=mp(-1LL,-1LL))
    {
        return dp[pos][state][num][limit];
    }

    int up=limit?digit[pos]:9;
    ll ans=0;
    ll cnt=0;
    for(ll i=0; i<=up; i++)
    {
        if(num==k&&(state&(1<<i))==0) continue;

        pair<ll,ll> t;
        if((num==0&&i==0&&pos>1)||state&(1<<i))
        {
            t=dfs(pos-1,state,num,limit&&i==up);
        }
        else
        {
            t=dfs(pos-1,state+(1<<i),num+1,limit&&i==up);
        }

        ans+=i*power(10,pos-1,mod)%mod*t.second%mod;
        ans+=t.first;
        ans%=mod;

        cnt+=t.second;
        cnt%=mod;
    }

    dp[pos][state][num][limit]=mp(ans,cnt);
    return dp[pos][state][num][limit];
}
ll cal(ll x)
{
    mem(dp,-1);
    int pos=0;
    while(x)
    {
        pos++;
        digit[pos]=x%10;
        x/=10;
    }
    auto t=dfs(pos,0,0,true);
    return t.first;
}
void INIT()
{
    //fill

//    rep(i,1,n)
//    {
//        e[i].clear();
//    }
}
/* �������Ȱ����۸�����ˣ��ٿ�ʼд����Ҫ��������
       ��ȫ���������ٿ�ʼ����Ҫ�뵽һ��Ϳ�ʼ

   dp���ԵĽ��һ������:
   ����ֱ��������н�
   �����Ը���״̬֮��Ĺ�ϵ����ת��
   �Ӷ�����ö���������

   dp˼��==���ƣ����������ǵ���
 */
void solve()
{
    INIT();
    rep(i,0,20)
    {
        p[i]=power(10,i,mod);
    }

    ll res=cal(r)-cal(l-1)+mod;
    res%=mod;
    println(res);
}
/*
�벻����ʱ��
(1)�ڿ���������̰���㷨��ʱ�򣬵����п����ҵ����Դ������̰�Ĺ��ڼ�ʱ
   [1]dp�����ܻ������������������״��������ݽṹ�ȣ�
   [2]���ִ�
(2)�����Ž⿼�Ƕ�Դbfs��dfsö�ٲ����������ʱ��
(3)������޵�����¿����÷��η������簴������λ���ֵȵȣ�
(4)�����ʱ�䲻���������ͻ�˼·
(5)��Ҫ�����ѯʱ�����Ƿֿ�/Ī��
*/
int main()
{
    ios::sync_with_stdio(false);
    while(cin>>l>>r>>k)
    {
        solve();
    }
//    int t;
//    while(cin>>t)
//    {
//        while(t--)
//        {
//            cin>>n;
//            solve();
//        }
//    }
    return 0;
}

ll power(ll a,ll b,ll mod)
{
    ll ans=1;
    while(b)
    {
        if(b%2)
            ans=ans*a%mod;
        a=a*a%mod;
        b=b/2;
    }
    return ans;

}


#include<bits/stdc++.h>
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cmath>
#include<cstring>
#include<iomanip>
#include<time.h>
#include<vector>
#define ll long long
#define mem(x,y) memset(x,y,sizeof(x))
#define rep(x,m,n) for(int x=m;x<=n;x++)
#define per(x,m,n) for(int x=m;x>=n;x--)
#define pb push_back
#define mp make_pair
#define println(x) cout<<(x)<<'\n'
#define pin cout<<"\n";
#define printsp(x) cout<<(x)<<" ";
#define read(x) cin>>(x)
#define pause system("pause");
ll power(ll a,ll b,ll mod);
using namespace std;
const double eps=1e-8;
const double pi=acos(-1.0);
const ll INF=0x3f3f3f3f3f3f3f3f;
const int inf=0x3f3f3f3f;
const int N=1e6+5;
ll l,r;
int k;
int mod=998244353;
ll p[25];
pair<ll,ll> dp[20][1100][15][2];
int digit[20];
pair<ll,ll> dfs(int pos,int state,int num,bool limit)
{
    if(!pos) return mp(0,1);
    if(dp[pos][state][num][limit]!=mp(-1LL,-1LL))
    {
        return dp[pos][state][num][limit];
    }

    int up=limit?digit[pos]:9;
    ll ans=0;
    ll cnt=0;
    for(ll i=0; i<=up; i++)
    {
        if(num==k&&(state&(1<<i))==0) continue;

        pair<ll,ll> t;
        if((num==0&&i==0&&pos>1)||state&(1<<i))
        {
            t=dfs(pos-1,state,num,limit&&i==up);
        }
        else
        {
            t=dfs(pos-1,state+(1<<i),num+1,limit&&i==up);
        }

        ans+=i*p[pos-1]%mod*t.second%mod;
        ans+=t.first;
        ans%=mod;

        cnt+=t.second;
    }

    dp[pos][state][num][limit]=mp(ans,cnt);
    return dp[pos][state][num][limit];
}
ll cal(ll x)
{
    mem(dp,-1);
    int pos=0;
    while(x)
    {
        pos++;
        digit[pos]=x%10;
        x/=10;
    }
    auto t=dfs(pos,0,0,true);
    return t.first;
}
void INIT()
{
    //fill

//    rep(i,1,n)
//    {
//        e[i].clear();
//    }
}
/* �������Ȱ����۸�����ˣ��ٿ�ʼд����Ҫ��������
       ��ȫ���������ٿ�ʼ����Ҫ�뵽һ��Ϳ�ʼ

   dp���ԵĽ��һ������:
   ����ֱ��������н�
   �����Ը���״̬֮��Ĺ�ϵ����ת��
   �Ӷ�����ö���������

   dp˼��==���ƣ����������ǵ���
 */
void solve()
{
    INIT();
    rep(i,0,20)
    {
        p[i]=power(10,i,mod);
    }

    ll res=cal(r)-cal(l-1)+mod;
    res%=mod;
    println(res);
}
/*
�벻����ʱ��
(1)�ڿ���������̰���㷨��ʱ�򣬵����п����ҵ����Դ������̰�Ĺ��ڼ�ʱ
   [1]dp�����ܻ������������������״��������ݽṹ�ȣ�
   [2]���ִ�
(2)�����Ž⿼�Ƕ�Դbfs��dfsö�ٲ����������ʱ��
(3)������޵�����¿����÷��η������簴������λ���ֵȵȣ�
(4)�����ʱ�䲻���������ͻ�˼·
(5)��Ҫ�����ѯʱ�����Ƿֿ�/Ī��
*/
int main()
{
    ios::sync_with_stdio(false);
    while(cin>>l>>r>>k)
    {
        solve();
    }
//    int t;
//    while(cin>>t)
//    {
//        while(t--)
//        {
//            cin>>n;
//            solve();
//        }
//    }
    return 0;
}

ll power(ll a,ll b,ll mod)
{
    ll ans=1;
    while(b)
    {
        if(b%2)
            ans=ans*a%mod;
        a=a*a%mod;
        b=b/2;
    }
    return ans;

}


#include<bits/stdc++.h>
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cmath>
#include<cstring>
#include<iomanip>
#include<time.h>
#include<vector>
#define ll long long
#define mem(x,y) memset(x,y,sizeof(x))
#define rep(x,m,n) for(int x=m;x<=n;x++)
#define per(x,m,n) for(int x=m;x>=n;x--)
#define pb push_back
#define mp make_pair
#define println(x) cout<<(x)<<'\n'
#define pin cout<<"\n";
#define printsp(x) cout<<(x)<<" ";
#define read(x) cin>>(x)
#define pause system("pause");
ll power(ll a,ll b,ll mod);
using namespace std;
const double eps=1e-8;
const double pi=acos(-1.0);
const ll INF=0x3f3f3f3f3f3f3f3f;
const int inf=0x3f3f3f3f;
const int N=1e6+5;
ll l,r;
int k;
int mod=998244353;
ll p[25];
pair<ll,ll> dp[20][1100][15][2];
int digit[20];
pair<ll,ll> dfs(int pos,int state,int num,bool limit)
{
    if(!pos) return mp(0,1);
    if(dp[pos][state][num][limit]!=mp(-1LL,-1LL))
    {
        return dp[pos][state][num][limit];
    }

    int up=limit?digit[pos]:9;
    ll ans=0;
    ll cnt=0;
    for(ll i=0; i<=up; i++)
    {
        if(num==k&&(state&(1<<i))==0) continue;

        pair<ll,ll> t;
        if((num==0&&i==0&&pos>1)||state&(1<<i))
        {
            t=dfs(pos-1,state,num,limit&&i==up);
        }
        else
        {
            t=dfs(pos-1,state+(1<<i),num+1,limit&&i==up);
        }

        ans+=i*p[pos-1]%mod*t.second%mod;
        ans+=t.first;
        ans%=mod;

        cnt+=t.second;
        cnt%=mod;
    }

    dp[pos][state][num][limit]=mp(ans,cnt);
    return dp[pos][state][num][limit];
}
ll cal(ll x)
{
    mem(dp,-1);
    int pos=0;
    while(x)
    {
        pos++;
        digit[pos]=x%10;
        x/=10;
    }
    auto t=dfs(pos,0,0,true);
    return t.first;
}
void INIT()
{
    //fill

//    rep(i,1,n)
//    {
//        e[i].clear();
//    }
}
/* �������Ȱ����۸�����ˣ��ٿ�ʼд����Ҫ��������
       ��ȫ���������ٿ�ʼ����Ҫ�뵽һ��Ϳ�ʼ

   dp���ԵĽ��һ������:
   ����ֱ��������н�
   �����Ը���״̬֮��Ĺ�ϵ����ת��
   �Ӷ�����ö���������

   dp˼��==���ƣ����������ǵ���
 */
void solve()
{
    INIT();
    rep(i,0,20)
    {
        p[i]=power(10,i,mod);
    }

    ll res=cal(r)-cal(l-1)+mod;
    res%=mod;
    println(res);
}
/*
�벻����ʱ��
(1)�ڿ���������̰���㷨��ʱ�򣬵����п����ҵ����Դ������̰�Ĺ��ڼ�ʱ
   [1]dp�����ܻ������������������״��������ݽṹ�ȣ�
   [2]���ִ�
(2)�����Ž⿼�Ƕ�Դbfs��dfsö�ٲ����������ʱ��
(3)������޵�����¿����÷��η������簴������λ���ֵȵȣ�
(4)�����ʱ�䲻���������ͻ�˼·
(5)��Ҫ�����ѯʱ�����Ƿֿ�/Ī��
*/
int main()
{
    ios::sync_with_stdio(false);
    while(cin>>l>>r>>k)
    {
        solve();
    }
//    int t;
//    while(cin>>t)
//    {
//        while(t--)
//        {
//            cin>>n;
//            solve();
//        }
//    }
    return 0;
}

ll power(ll a,ll b,ll mod)
{
    ll ans=1;
    while(b)
    {
        if(b%2)
            ans=ans*a%mod;
        a=a*a%mod;
        b=b/2;
    }
    return ans;

}


#include<bits/stdc++.h>
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cmath>
#include<cstring>
#include<iomanip>
#include<time.h>
#include<vector>
#define ll long long
#define mem(x,y) memset(x,y,sizeof(x))
#define rep(x,m,n) for(int x=m;x<=n;x++)
#define per(x,m,n) for(int x=m;x>=n;x--)
#define pb push_back
#define mp make_pair
#define println(x) cout<<(x)<<'\n'
#define pin cout<<"\n";
#define printsp(x) cout<<(x)<<" ";
#define read(x) cin>>(x)
#define pause system("pause");
ll power(ll a,ll b,ll mod);
using namespace std;
const double eps=1e-8;
const double pi=acos(-1.0);
const ll INF=0x3f3f3f3f3f3f3f3f;
const int inf=0x3f3f3f3f;
const int N=1e6+5;
ll l,r;
int k;
int mod=998244353;
ll p[25];
pair<ll,ll> dp[20][1100][15][2];
int digit[20];
pair<ll,ll> dfs(int pos,int state,int num,bool limit)
{
    if(!pos) return mp(0,1);
    if(dp[pos][state][num][limit]!=mp(-1LL,-1LL))
    {
        return dp[pos][state][num][limit];
    }

    int up=limit?digit[pos]:9;
    ll ans=0;
    ll cnt=0;
    for(int i=0; i<=up; i++)
    {
        if(num==k&&(state&(1<<i))==0) continue;

        pair<ll,ll> t;
        if((num==0&&i==0&&pos>1)||state&(1<<i))
        {
            t=dfs(pos-1,state,num,limit&&i==up);
        }
        else
        {
            t=dfs(pos-1,state+(1<<i),num+1,limit&&i==up);
        }

        ans+=i*p[pos-1]%mod*t.second%mod;
        ans+=t.first;
        ans%=mod;

        cnt+=t.second;
    }

    dp[pos][state][num][limit]=mp(ans,cnt);
    return dp[pos][state][num][limit];
}
ll cal(ll x)
{
    mem(dp,-1);
    int pos=0;
    while(x)
    {
        pos++;
        digit[pos]=x%10;
        x/=10;
    }
    auto t=dfs(pos,0,0,true);
    return t.first;
}
void INIT()
{
    //fill

//    rep(i,1,n)
//    {
//        e[i].clear();
//    }
}
/* �������Ȱ����۸�����ˣ��ٿ�ʼд����Ҫ��������
       ��ȫ���������ٿ�ʼ����Ҫ�뵽һ��Ϳ�ʼ

   dp���ԵĽ��һ������:
   ����ֱ��������н�
   �����Ը���״̬֮��Ĺ�ϵ����ת��
   �Ӷ�����ö���������

   dp˼��==���ƣ����������ǵ���
 */
void solve()
{
    INIT();
    rep(i,0,20)
    {
        p[i]=power(10,i,mod);
    }

    ll res=cal(r)-cal(l-1)+mod;
    res%=mod;
    println(res);
}
/*
�벻����ʱ��
(1)�ڿ���������̰���㷨��ʱ�򣬵����п����ҵ����Դ������̰�Ĺ��ڼ�ʱ
   [1]dp�����ܻ������������������״��������ݽṹ�ȣ�
   [2]���ִ�
(2)�����Ž⿼�Ƕ�Դbfs��dfsö�ٲ����������ʱ��
(3)������޵�����¿����÷��η������簴������λ���ֵȵȣ�
(4)�����ʱ�䲻���������ͻ�˼·
(5)��Ҫ�����ѯʱ�����Ƿֿ�/Ī��
*/
int main()
{
    ios::sync_with_stdio(false);
    while(cin>>l>>r>>k)
    {
        solve();
    }
//    int t;
//    while(cin>>t)
//    {
//        while(t--)
//        {
//            cin>>n;
//            solve();
//        }
//    }
    return 0;
}

ll power(ll a,ll b,ll mod)
{
    ll ans=1;
    while(b)
    {
        if(b%2)
            ans=ans*a%mod;
        a=a*a%mod;
        b=b/2;
    }
    return ans;

}


#include<bits/stdc++.h>
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cmath>
#include<cstring>
#include<iomanip>
#include<time.h>
#include<vector>
#define ll long long
#define mem(x,y) memset(x,y,sizeof(x))
#define rep(x,m,n) for(int x=m;x<=n;x++)
#define per(x,m,n) for(int x=m;x>=n;x--)
#define pb push_back
#define mp make_pair
#define println(x) cout<<(x)<<'\n'
#define pin cout<<"\n";
#define printsp(x) cout<<(x)<<" ";
#define read(x) cin>>(x)
#define pause system("pause");
ll power(ll a,ll b,ll mod);
using namespace std;
const double eps=1e-8;
const double pi=acos(-1.0);
const ll INF=0x3f3f3f3f3f3f3f3f;
const int inf=0x3f3f3f3f;
const int N=1e6+5;
ll l,r;
int k;
int mod=998244353;
ll p[15];
pair<ll,ll> dp[20][1100][15][2];
int digit[20];
pair<ll,ll> dfs(int pos,int state,int num,bool limit)
{
    if(!pos) return mp(0,1);
    if(dp[pos][state][num][limit]!=mp(-1LL,-1LL))
    {
        return dp[pos][state][num][limit];
    }

    int up=limit?digit[pos]:9;
    ll ans=0;
    ll cnt=0;
    for(int i=0; i<=up; i++)
    {
        if(num==k&&(state&(1<<i))==0) continue;

        pair<ll,ll> t;
        if((num==0&&i==0&&pos>1)||state&(1<<i))
        {
            t=dfs(pos-1,state,num,limit&&i==up);
        }
        else
        {
            t=dfs(pos-1,state+(1<<i),num+1,limit&&i==up);
        }

        ans+=i*p[pos-1]%mod*t.second%mod;
        ans+=t.first;
        ans%=mod;

        cnt+=t.second;
    }

    dp[pos][state][num][limit]=mp(ans,cnt);
    return dp[pos][state][num][limit];
}
ll cal(ll x)
{
    mem(dp,-1);
    int pos=0;
    while(x)
    {
        pos++;
        digit[pos]=x%10;
        x/=10;
    }
    auto t=dfs(pos,0,0,true);
    return t.first;
}
void INIT()
{
    //fill

//    rep(i,1,n)
//    {
//        e[i].clear();
//    }
}
/* �������Ȱ����۸�����ˣ��ٿ�ʼд����Ҫ��������
       ��ȫ���������ٿ�ʼ����Ҫ�뵽һ��Ϳ�ʼ

   dp���ԵĽ��һ������:
   ����ֱ��������н�
   �����Ը���״̬֮��Ĺ�ϵ����ת��
   �Ӷ�����ö���������

   dp˼��==���ƣ����������ǵ���
 */
void solve()
{
    INIT();
    rep(i,0,10)
    {
        p[i]=power(10,i,mod);
    }

    ll res=cal(r)-cal(l-1)+mod;
    res%=mod;
    println(res);
}
/*
�벻����ʱ��
(1)�ڿ���������̰���㷨��ʱ�򣬵����п����ҵ����Դ������̰�Ĺ��ڼ�ʱ
   [1]dp�����ܻ������������������״��������ݽṹ�ȣ�
   [2]���ִ�
(2)�����Ž⿼�Ƕ�Դbfs��dfsö�ٲ����������ʱ��
(3)������޵�����¿����÷��η������簴������λ���ֵȵȣ�
(4)�����ʱ�䲻���������ͻ�˼·
(5)��Ҫ�����ѯʱ�����Ƿֿ�/Ī��
*/
int main()
{
    ios::sync_with_stdio(false);
    while(cin>>l>>r>>k)
    {
        solve();
    }
//    int t;
//    while(cin>>t)
//    {
//        while(t--)
//        {
//            cin>>n;
//            solve();
//        }
//    }
    return 0;
}

ll power(ll a,ll b,ll mod)
{
    ll ans=1;
    while(b)
    {
        if(b%2)
            ans=ans*a%mod;
        a=a*a%mod;
        b=b/2;
    }
    return ans;

}


#include <bits/stdc++.h>
#define For(i,a,b) for ( int i=(a);i<=(b);i++ )
#define Dow(i,b,a) for ( int i=(b);i>=(a);i-- )
#define GO(i,x) for ( int i=head[x];i;i=e[i].nex )
#define mem(x,s) memset(x,s,sizeof(x))
#define cpy(x,s) memcpy(x,s,sizeof(x))
#define YES return puts("YES"),0
#define NO return puts("NO"),0
#define GG return puts("-1"),0
#define pb push_back
#define int long long
using namespace std;

struct IO
{
	#define MAXSIZE (1 << 20)
	#define isdigit(x) (x >= '0' && x <= '9')
  	char buf[MAXSIZE],*p1,*p2;
  	char pbuf[MAXSIZE],*pp;
  	IO():p1(buf),p2(buf),pp(pbuf){}
  	inline char gc() {
    	return getchar();
    	if (p1==p2) p2=(p1=buf)+fread(buf,1,MAXSIZE,stdin);
    	return p1==p2?' ':*p1++;
  	}
	inline bool blank(char ch) {return ch==' '||ch =='\n'||ch == '\r'||ch == '\t';}
  	template <class T>
  	inline void read(T &x)
	{
	    register double tmp=1;register bool sign=0; x=0;
	    register char ch=gc();
	    for (;!isdigit(ch);ch=gc()) if(ch=='-') sign=1;
	    for (;isdigit(ch);ch=gc()) x=x*10+(ch-'0');
	    if (ch=='.') for (ch=gc();isdigit(ch);ch=gc()) tmp/=10.0,x+=tmp*(ch-'0');
	    if (sign) x=-x;
  	}
  	inline void read(char *s)
	{
    	register char ch=gc();
		for (;blank(ch);ch=gc());
		for (;!blank(ch);ch=gc()) *s++=ch;
    	*s=0;
  	}
  	inline void read(char &c) {for(c=gc();blank(c);c=gc());}
  	template<class t> inline void write(t x){
		if(x<0) putchar('-'),write(-x);
		else{if(x>9) write(x/10);putchar('0'+x%10);}
	}
} io;

const int mod=1e9+7;
const int mo=998244353;
const int N=2e5+5;

int l,r,s,fac[25],bit[25],f[21][1030],g[21][1030],len;

struct Node
{
	int s,gs;
};

inline Node dfs(int pos,int las,int sta,int cnt,int lead,int lim)
{
	if(!pos)
	{
		if(lead) return (Node){0,0};
		else return (Node){0,1};
	}
	if(!lead&&!lim&&g[pos][sta]!=-1) return (Node){f[pos][sta],g[pos][sta]};
	int up=(lim)?bit[pos]:9ll;
	Node ans;
	ans.s=0,ans.gs=0;
	For(i,0,up)
	{
		if(cnt==s&&(sta&(1ll<<i))==0) continue;
		if(lead&&(!i))
		{
			Node now;
			now.s=now.gs=0;
			now=dfs(pos-1,-10,sta,cnt,1,lim&&(i==up));
			ans.gs=(ans.gs+now.gs)%mo;
			ans.s=(ans.s+now.s)%mo;
			continue;
		}
		if(sta&(1ll<<i))
		{
			Node now;
			now.s=now.gs=0;
			now=dfs(pos-1,i,sta,cnt,0,lim&&(i==up));
			ans.gs=(ans.gs+now.gs)%mo;
			ans.s=(ans.s+now.s)%mo;
			ans.s=(ans.s+fac[pos]*i%mo*now.gs%mo)%mo;
		}
		else
		{
			Node now;
			now.s=now.gs=0;
			now=dfs(pos-1,i,sta|(1ll<<i),cnt+1,0,lim&&(i==up));
			ans.gs=(ans.gs+now.gs)%mo;
			ans.s=(ans.s+now.s)%mo;
			ans.s=(ans.s+fac[pos]*i%mo*now.gs%mo)%mo;
		}
	}
	if(!lim&&!lead) f[pos][sta]=ans.s,g[pos][sta]=ans.gs;
	return ans;
}

inline int calc(int x)
{
	len=0;
	while(x) bit[++len]=x%10,x/=10;
	mem(f,0),mem(g,-1);
	return dfs(len,-10,0,0,1,1).s;
}

signed main()
{
	io.read(l),io.read(r),io.read(s);
	fac[1]=1ll;
	For(i,2,18) fac[i]=fac[i-1]*10%mo;
	io.write(calc(r)-calc(l-1));
	return 0;
}


#include <bits/stdc++.h>
#define For(i,a,b) for ( int i=(a);i<=(b);i++ )
#define Dow(i,b,a) for ( int i=(b);i>=(a);i-- )
#define GO(i,x) for ( int i=head[x];i;i=e[i].nex )
#define mem(x,s) memset(x,s,sizeof(x))
#define cpy(x,s) memcpy(x,s,sizeof(x))
#define YES return puts("YES"),0
#define NO return puts("NO"),0
#define GG return puts("-1"),0
#define pb push_back
#define int long long
using namespace std;

struct IO
{
	#define MAXSIZE (1 << 20)
	#define isdigit(x) (x >= '0' && x <= '9')
  	char buf[MAXSIZE],*p1,*p2;
  	char pbuf[MAXSIZE],*pp;
  	IO():p1(buf),p2(buf),pp(pbuf){}
  	inline char gc() {
    	return getchar();
    	if (p1==p2) p2=(p1=buf)+fread(buf,1,MAXSIZE,stdin);
    	return p1==p2?' ':*p1++;
  	}
	inline bool blank(char ch) {return ch==' '||ch =='\n'||ch == '\r'||ch == '\t';}
  	template <class T>
  	inline void read(T &x)
	{
	    register double tmp=1;register bool sign=0; x=0;
	    register char ch=gc();
	    for (;!isdigit(ch);ch=gc()) if(ch=='-') sign=1;
	    for (;isdigit(ch);ch=gc()) x=x*10+(ch-'0');
	    if (ch=='.') for (ch=gc();isdigit(ch);ch=gc()) tmp/=10.0,x+=tmp*(ch-'0');
	    if (sign) x=-x;
  	}
  	inline void read(char *s)
	{
    	register char ch=gc();
		for (;blank(ch);ch=gc());
		for (;!blank(ch);ch=gc()) *s++=ch;
    	*s=0;
  	}
  	inline void read(char &c) {for(c=gc();blank(c);c=gc());}
  	template<class t> inline void write(t x){
		if(x<0) putchar('-'),write(-x);
		else{if(x>9) write(x/10);putchar('0'+x%10);}
	}
} io;

const int mod=1e9+7;
const int mo=998244353;
const int N=2e5+5;

int l,r,s,fac[25],bit[25],f[21][2050],g[21][2050],len;

struct Node
{
	int s,gs;
};

inline Node dfs(int pos,int las,int sta,int cnt,int lead,int lim)
{
	if(!pos)
	{
		if(lead) return (Node){0,0};
		else return (Node){0,1};
	}
	if(!lead&&!lim&&g[pos][sta]!=-1) return (Node){f[pos][sta],g[pos][sta]};
	int up=(lim)?bit[pos]:9ll;
	Node ans;
	ans.s=0,ans.gs=0;
	For(i,0,up)
	{
		if(cnt==s&&(sta&(1ll<<i))==0) continue;
		if(lead&&(!i))
		{
			Node now;
			now.s=now.gs=0;
			now=dfs(pos-1,-10,sta,cnt,1,lim&&(i==up));
			ans.gs=(ans.gs+now.gs+mo)%mo;
			ans.s=(ans.s+now.s)%mo;
			continue;
		}
		if(sta&(1ll<<i))
		{
			Node now;
			now.s=now.gs=0;
			now=dfs(pos-1,i,sta,cnt,0,lim&&(i==up));
			ans.gs=(ans.gs+now.gs+mo)%mo;
			ans.s=(ans.s+now.s+mo)%mo;
			ans.s=(ans.s+fac[pos]*i%mo*now.gs%mo+mo)%mo;
		}
		else
		{
			Node now;
			now.s=now.gs=0;
			now=dfs(pos-1,i,sta|(1ll<<i),cnt+1,0,lim&&(i==up));
			ans.gs=(ans.gs+now.gs+mo)%mo;
			ans.s=(ans.s+now.s+mo)%mo;
			ans.s=(ans.s+fac[pos]*i%mo*now.gs%mo+mo)%mo;
		}
	}
	if(!lim&&!lead) f[pos][sta]=ans.s,g[pos][sta]=ans.gs;
	return ans;
}

inline int calc(int x)
{
	len=0;
	while(x) bit[++len]=x%10,x/=10;
	mem(f,0),mem(g,-1);
	return dfs(len,-10,0,0,1,1).s;
}

signed main()
{
	io.read(l),io.read(r),io.read(s);
	fac[1]=1ll;
	For(i,2,19) fac[i]=fac[i-1]*10%mo;
	io.write((calc(r)-calc(l-1)+mo)%mo);
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

#define LL long long

const int N=20;
const int mod=998244353;

struct node {
	int sum,tot;
	node() {};
	node(int S,int T) { sum=S; tot=T; }
	bool check() { return ~sum && ~tot; }
}f[2][2][N][1<<10];

int A[N],ret,pw[30],k;

int lowbit(int x) {
	return x&-x;
}

int ccount(int x) {
	int cnt=0;
	if(!x) return 0;
	while(x) { x^=lowbit(x); cnt++; }
	return cnt;
}

node dfs(bool lim,bool zero,int pos,int st) {
	if(!pos) return node(0,1);
	node now=f[lim][zero][pos][st];
	if(now.check()) return now;
	now.sum=now.tot=0;
	for(int i=0;i<= (lim?A[pos]:9);i++) {
		if(ccount(zero&&!i?0:st|(1<<i))<=k) {
			node nxt=dfs(lim && i==A[pos],zero && !i,pos-1,zero&&!i?0:st|(1<<i));
			now.sum=(now.sum+nxt.sum+1ll*i*nxt.tot%mod*pw[pos-1]%mod)%mod;
			now.tot=(now.tot+nxt.tot)%mod;
		}
	}
	return now;

}

int calc(int x) {
	ret=0;
	memset(f,-1,sizeof(f));
	while(x) { A[++ret]=x%10; x/=10; }
	return dfs(1,1,ret,0).sum;
}

int main() {
	pw[0]=1;
	for(int i=1;i<=20;i++) pw[i]=10ll*pw[i-1]%mod;
	int l,r;
	cin>>l>>r>>k;
	cout<<(mod+calc(r)-calc(l-1))%mod;
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
const int p = 998244353;
int k, a[20], pw[20];
struct pr {
	int tot, sum;
	pr() {}
	pr(int a, int b) : tot(a), sum(b) {}
	void clr() { tot = sum = 0; }
	bool chk() { return ~tot && ~sum; }
} dp[2][2][20][1 << 10];

void add(pr& a, pr b, int num, int pos) {
	a.tot = (a.tot + b.tot) % p;
	a.sum = (a.sum + 1ll * num * pw[pos] % p * b.tot % p + b.sum) % p;
}

pr dfs(bool lim, bool zero, int pos, int mark) {
	if (!pos) return pr(1, 0);
	pr& res = dp[lim][zero][pos][mark];
	if (res.chk()) return res;
	res.clr();
	for (int i = 0; i <= (lim ? a[pos] : 9); i++) {
		if (__builtin_popcount(zero && !i ? 0 : mark | 1 << i) <= k) {
			int t1 = lim && i == a[pos], t2 = zero && !i, t3 = pos - 1, t4 = t2 ? 0 : mark | 1 << i;
			add(res, dfs(t1, t2, t3, t4), i, pos - 1);
		}
	}
	return res;
}

int calc(ll x) {
	int len = 0;
	memset(dp, -1, sizeof dp);
	while (x) a[++len] = x % 10, x /= 10;
	return dfs(1, 1, len, 0).sum;
}

int main() {
	pw[0] = 1;
	for (int i = 1; i < 19; i++) {
		pw[i] = 10ll * pw[i - 1] % p;
	}
	ll l, r;
	scanf("%lld %lld %d", &l, &r, &k);
	printf("%d %d\n", calc(r), calc(l - 1));
	printf("%d", (calc(r) - calc(l - 1) + p) % p);
	return 0;
}


#include<bits/stdc++.h>
#define int long long
#define pa pair<int,int>
using namespace std;
inline int read(){int x=0,f=1,ch=getchar(); while(ch<'0'||ch>'9'){if(ch=='-') f=-1; ch=getchar();} while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();} return x*f;}
inline void write(int x){if (x<0) putchar('-'),x=-x; if (x>=10) write(x/10); putchar(x%10+'0');}
inline void writeln(int x){write(x); puts("");}
const int mod=998244353;
int g[20][1<<11],l,r,k,len,num[20],f[20][1<<11],bin[20],sz[1<<11];
inline void init(){
	l=read(); r=read(); k=read();
}
pa dfs(int now,int st,bool limit){
	if (now==0) return pa(sz[st]<=k,0);
	if (!limit&&~f[now][st]) return pa(f[now][st],g[now][st]);
	int ans1=0,ans2=0,mx=9; bool sta=1;
	if (st==0) sta=0;
	if (limit) mx=num[now];
	for (int i=0;i<=mx;i++){
		pa tmp=dfs(now-1,(!sta&&i==0)?st:st|(1<<i),limit&(i==mx));
		(ans1+=tmp.first)%=mod; (ans2+=tmp.second+tmp.first*i%mod*bin[now-1]%mod)%=mod;
	}
	if (!limit) f[now][st]=ans1,g[now][st]=ans2;
	return pa(ans1,ans2);
}
inline int sol(int x){
	len=0;
	for (;x;x/=10) num[++len]=x%10;
	return dfs(len,0,1).second;
}
inline void solve(){
	for (int i=1;i<(1<<11);i++){
		int cnt=0;
		for (int x=i;x;x-=x&(-x)) cnt++;
		sz[i]=cnt;
	}
	bin[0]=1;
	for (int i=1;i<=18;i++) bin[i]=bin[i-1]*10%mod;
	memset(f,-1,sizeof f);
	writeln(((sol(r)-sol(l-1))%mod+mod)%mod);
}
signed main(){
	init(); solve();
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define MAXN 1005
typedef long long LL;
typedef pair<LL,LL> pii;
const LL INF=0x7f7f7f7f7f7f;
const LL mo=998244353;
LL k,l,cnt,r,a[20],pw[20];
pii dp[20][(1<<10)+5];
pii dfs(LL pos,LL S,bool lead,bool lim){
	if(!~pos)return pii(__builtin_popcount(S)<=k,0);
	if(!lead&&!lim&&~dp[pos][S].first)return dp[pos][S];
	LL up=lim?a[pos]:9;pii ans=make_pair(0,0);
	for(LL i=0;i<=up;i++){
		LL S1=(lead&&i==0)?S:(S|(1<<i));
		pii nxt=dfs(pos-1,S1,lead&&i==0,lim&&i==up);
		ans=pii((ans.first+nxt.first)%mo,(nxt.first*pw[pos]%mo*i%mo+nxt.second+ans.second)%mo);
	}
	if(!lim&&!lead)dp[pos][S]=ans;return ans;
}
LL calc(int x){
	memset(a,0,sizeof(a));cnt=0;
	while(x)a[cnt++]=x%10,x/=10;
	for(int i=0;i<=18;i++)
		for(int j=0;j<(1<<10);j++)
			dp[i][j].first=dp[i][j].second=-1;
	return dfs(cnt-1,0,1,1).second;
}
signed main(){
	pw[0]=1;for(int i=1;i<=18;i++)pw[i]=pw[i-1]*10ll%mo;
	scanf("%lld %lld %lld",&l,&r,&k);\
	printf("%lld\n",(calc(r)-calc(l-1)+mo)%mo);
	return 0;
}


#include <cstdio>
#include <algorithm>
#include <cstring>
using namespace std;
#define ll long long
#define mod 998244353
#define pii pair<ll,ll>
ll l; ll r; ll s[100]; pii dp[100][1<<10]; ll len; ll T; ll fac[20]; ll cnt[1<<10]; ll k;
pii dfs(ll pos,int msk,int lead,int limit)//记搜
{
    if(pos<1) return make_pair(1LL, 0LL);
    if((dp[pos][msk].first!=-1&&(!limit)&&(!lead))) return dp[pos][msk];//记录当前值
    pii ret=make_pair(0LL, 0LL);
    ll res=limit?s[pos]:9;//res当前位能取到的最大值
    for(ll i=0;i<=res;i++)
    {
        if((!i)&&lead){
            pii tmp=dfs(pos-1, 0, 1, limit&&(i==res));
            (ret.first+=tmp.first)%=mod;
            (ret.second+=tmp.second)%=mod;
        }
        else{
            int nxt=msk|(1<<i);
            if(cnt[nxt]>k) continue;
            pii tmp=dfs(pos-1, nxt, 0, limit&&(i==res));
            (ret.first+=tmp.first)%=mod;
            (ret.second+=tmp.second+i*fac[pos-1]%mod*tmp.first%mod)%=mod;

        }
    }
    if(!limit&&!lead) dp[pos][msk]=ret;//当前状态方案数记录
    return ret;
}
pii part(ll x)//把数按位拆分
{
    len=0;
    while(x) s[++len]=x%10,x/=10;
    return dfs(len,0,1,1);//进入记搜
}
int main()
{
    fac[0]=1LL; for(ll i=1;i<20;++i) fac[i]=fac[i-1]*10LL%mod;
    for(int i=0;i<(1<<10);++i){
        int cur=0;
        for(int j=0;j<10;++j){
            if(i&(1<<j)) ++cur;
        }
        cnt[i]=1LL*cur;
    }
//    printf("%lld %lld\n",pow[1],pow[2]);
//    ll ans00=0LL;
//    for(ll i=0;i<=50;++i) ans00+=i;
//    printf("%lld\n",ans00);
    memset(dp,-1,sizeof dp);//初始化-1（因为有可能某些情况下的方案数是0）
    scanf("%lld %lld",&l,&r); scanf("%lld",&k);
    ll ans=part(r).second-part(l-1).second;
//    printf("%lld %lld\n",part(r).first,part(r).second);
//    printf("%lld %lld\n",part(l-1).first,part(l-1).second);
    ans=(ans+mod)%mod;
    printf("%lld\n",ans);
    return 0;
}


#include <bits/stdc++.h>
using namespace std;

#define LL long long

const int N=20;
const int mod=998244353;

struct node {
	int sum,tot;
	node() {};
	node(int S,int T) { sum=S; tot=T; }
	bool check() { return ~sum && ~tot; }
}f[2][2][N][1<<10];

int A[N],ret,pw[30],k;

int lowbit(int x) {
	return x&-x;
}

int ccount(int x) {
	int cnt=0;
	if(!x) return 0;
	while(x) { x^=lowbit(x); cnt++; }
	return cnt;
}

node dfs(bool lim,bool zero,int pos,int st) {
	if(!pos) return node(0,1);
	node now=f[lim][zero][pos][st];
	if(now.check()) return now;
	now.sum=now.tot=0;
	for(int i=0;i<= (lim?A[pos]:9);i++) {
		if(ccount(zero&&!i?0:st|(1<<i))<=k) {
			node nxt=dfs(lim && i==A[pos],zero && !i,pos-1,zero&&!i?0:st|(1<<i));
			now.sum=(now.sum+nxt.sum+1ll*i*nxt.tot%mod*pw[pos-1]%mod)%mod;
			now.tot=(now.tot+nxt.tot)%mod;
		}
	}
	return now;

}

int calc(LL x) {
	ret=0;
	memset(f,-1,sizeof(f));
	while(x) { A[++ret]=x%10; x/=10; }
	return dfs(1,1,ret,0).sum;
}

int main() {
	pw[0]=1;
	for(int i=1;i<=20;i++) pw[i]=10ll*pw[i-1]%mod;
	LL l,r;
	cin>>l>>r>>k;
	cout<<(mod+calc(r)-calc(l-1))%mod;
}