#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define INF (1<<29) #define rep(i,n) for(int i=0;i<(int)(n);i++) #define all(v) v.begin(),v.end() #define uniq(v) v.erase(unique(all(v)),v.end()) #define indexOf(v,x) (find(all(v),x)-v.begin()) #define MOD 1000000007 int pow_mod(long long x,long long y){ int res=1; while(y){ if(y&1)res=(res*x)%MOD; y>>=1; x=(x*x)%MOD; } return res; } pair dp[10000+2][2][24]; int calc(string &s,bool eq){ memset(dp,0,sizeof(dp)); dp[0][0][0].second=1; rep(i,s.size()){ long long p=pow_mod(10,s.size()-i-1); rep(j,2)rep(k,24){ pair v=dp[i][j][k]; rep(d,10){ if(j==0&&s[i]-'0'>a>>b; cout<<(calc(b,true)-calc(a,false)+MOD)%MOD<