#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define repl(i,a,b) for(int i=(int)(a);i<(int)(b);i++) #define rep(i,n) repl(i,0,n) #define mp(a,b) make_pair((a),(b)) #define pb(a) push_back((a)) #define all(x) (x).begin(),(x).end() #define dbg(x) cout<<#x"="<<((x))<>a>>b>>p; if(p==8){ cout << (solve(b,true,true) - solve(a,true,false) + MOD)%MOD << endl; return 0; } long ans = solve(b,false,true) - solve(a,false,false); int r=0; if(p==80) r=1; else if(p==800) r=2; if(p>=80){ if(a.size()<=r) a="1"; else a.resize(a.size()-r); if(b.size()<=r) b="1"; else b.resize(b.size()-r); } ans = ans - (solve(b,true,true) - solve(a,true,false)); cout << (ans+5LL*MOD)%MOD << endl; return 0; }