func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 3e5 + 2;   long long fact[N];   void factorial() {     fact[0] = fact[1] = 1;     for (long long i = 2; i < N; i++) fact[i] = (fact[i - 1] * i) % 1000000007;   }   long long power(long long a, long long b, long long mod) {     long long x = 1, y = a;     while (b > 0) {       if (b % 2) {         x = (x * y) % mod;       }       y = (y * y) % mod;       b /= 2;     }     return x % mod;   }   long long modular_inverse(long long n, long long mod) {     return power(n, mod - 2, mod);   }   long long nCr(long long n, long long k, long long mod) {     if (k > n)       return 0;     else if (n == k)       return 1;     return (fact[n] * ((modular_inverse(fact[k], 1000000007) *                         modular_inverse(fact[n - k], 1000000007)) %                        mod)) %            mod;   }   int main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     string s;     cin >> s;     long long int n = s.size(), temp = 0, p = 1, ans = 0;     for (long long int i = 0; i < n; i++) {       temp += s[i] -  0 ;     }     for (long long int i = n - 1; i >= 0; i--) {       temp -= s[i] -  0 ;       ans = (ans + (((p * (n - i)) % 1000000007) * (temp)) % 1000000007) %             1000000007;       ans = (ans + (((((i * (i + 1) / 2) % 1000000007) * p) % 1000000007) *                     (s[i] -  0 )) %                        1000000007) %             1000000007;       p *= 10;       p %= 1000000007;     }     cout << ans;     return 0;   }   