#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std ; using ll = long long ; using ld = long double ; template using V = vector ; template using VV = V> ; using pll = pair ; #define all(v) v.begin(),v.end() ll mod = 1e9+7 ; long double pie = acos(-1) ; ll INF = 1000000000000 ; void yorn(bool a){if(a) cout << "Yes" << endl ; else cout << "No" << endl ;} //void YorN(bool a){if(a) cout << "YES" << endl ; else cout << "NO" << endl ;} ll gcd(long long a,long long b){if(b==0) return a ; return gcd(b,a%b) ;} ll lcm(long long a,long long b){return a/gcd(a,b)*b ;} void fix_cout(){cout << fixed << setprecision(20) ;} template void chmax(T &a,T &b){if(a void chmin(T &a,T &b){if(a>b) a = b ;} ll modpow(ll a,ll b){ ll res = 1 ; while(b){ if(b&1) res = res*a%mod ; a = a*a%mod ; b >>= 1 ; } return res ; } ll f(int n){ string s = to_string(n) ; ll res = 1 ; for(int i=0;i> n ; int d = n.size() ; V sum = {0,1,3,6,10,15,21,28,36,45} ; ll ans = sum[n[0]-'0'-1]*modpow(45,d-1)%mod ; ll mul = n[0]-'0' ; for(int i=1;i