https://ac.nowcoder.com/acm/contest/80743/E
#include <bits/stdc++.h>
using namespace std;
#define int long long
typedef pair<int, int> PII;
typedef vector<int> VI;
typedef vector<VI> VVI;
#define rep(i,a,n) for (int i=a;i<=n;i++)
#define per(i,a,n) for (int i=a;i>=n;i--)
#define oz 998244353
#define N 200010
#define INF 0x3f3f3f3f
typedef long long ll;
#define endl '\n'
const int mod = 1e9 + 7;
//组合数公式 c(n, m) = c(n - 1, m - 1) + c(n - 1, m)
int pow10[N]; //pow10[i] = 10的i次方
int c[1010][1010];
int n, k;
void solve() {
cin >> n >> k;
string s;
cin >> s;
for (int i = 0; i < 1010; i++) { //组合数预处理
for (int j = 0; j <= i; j ++) {
if (i == j || j == 0) {
c[i][j] = 1;
} else c[i][j] = c[i - 1][j - 1] + c[i - 1][j] % mod;
}
}
pow10[0] = 1;
for (int i = 1; i <= 1000; i++)pow10[i] = pow10[i - 1] * 10 % mod;
int res = 0;
for (int i = 0; i < n; i ++) { //把第二个数放在第j个位置的贡献
for (int j = 0; j < k; j ++) {
res += pow10[k - 1 - j] * (s[i] - '0') % mod * c[i][j] % mod * c[n - i - 1][k - j - 1] % mod;
res %= mod;
}
}
cout << res << endl;
}
signed main() {
ios::sync_with_stdio(false);
cin.tie(0), cout.tie(0);
int T = 1;
// cin >> T;
while (T --)
solve();
return 0;
}