#include using namespace std; using ll = long long; #define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i)) #define all(x) (x).begin(),(x).end() #define pb push_back #define fi first #define se second #define dbg(x) cout<<#x" = "<<((x))< ostream& operator<<(ostream& o, const pair &p){o<<"("< ostream& operator<<(ostream& o, const vector &v){o<<"[";for(T t:v){o<=0) return dp[d][s]; ll ret = 0; int l=0; if(d==0) l=1; int r=9; if(s==0) r=n[d]-'0'; for(int i=l; i<=r; ++i) (ret += dfs(d+1,s|(i>n; N = n.size(); mod = 1e9; cout << solve() << endl; mod += 7; cout << solve() << endl; return 0; }