func_code_string: #include <bits/stdc++.h>   using namespace std;   long long zyo[114514], sum[114514], kai[114514];   long long mo = 1000000007;   long long extgcd(long long a, long long b, long long &x, long long &y) {     long long g = a;     x = 1;     y = 0;     if (b != 0) g = extgcd(b, a % b, y, x), y -= (a / b) * x;     return g;   }   long long invMod(long long a, long long m) {     long long x, y;     if (extgcd(a, m, x, y) == 1) return (x + m) % m;     return 0;   }   long long co(int a, int b) {     if (a < 0 || b < 0 || b > a) return 0;     return ((kai[a] * invMod(kai[b], mo)) % mo * invMod(kai[a - b], mo)) % mo;   }   int main() {     long long out = 0;     int n, k;     string s;     zyo[0] = kai[0] = 1;     sum[0] = 0;     for (int i = 0; i < 100100; i++) {       zyo[i + 1] = (zyo[i] * 10) % mo;       kai[i + 1] = (kai[i] * (i + 1)) % mo;     }     cin >> n >> k;     cin >> s;     reverse(s.begin(), s.end());     for (int i = 0; i < n; i++) sum[i + 1] = sum[i] + (s[i] -  0 );     for (int i = 0; i < n; i++) {       int now = (s[i] -  0 );       out = (out + (zyo[i] * co(n - i - 1, k)) % mo * now) % mo;     }     for (int i = 1; i < n; i++) {       long long now = sum[n] - sum[i];       out = (out + (zyo[i - 1] * co(n - i - 1, k - 1)) % mo * now) % mo;     }     cout << out << endl;   }   