1 #include <iostream>
2 #include <cstdio>
3 #include <cstring>
4 #include <cmath>
5 #include <algorithm>
6 #include <climits>
7 #include <vector>
8 #include <queue>
9 #include <cstdlib>
10 #include <string>
11 #include <set>
12 #include <stack>
13 #define LL long long
14 #define pii pair<int,int>
15 #define INF 0x3f3f3f3f
16 using namespace std;
17 const int maxn = 100;
18 char str[maxn];
19 int N,K;
20 LL dp[maxn][maxn];
21 LL calc(int u,int v){
22 LL ans = 0;
23 for(int i = u; i <= v; ++i)
24 ans = ans*10 + str[i] - ‘0‘;
25 return ans;
26 }
27 int main() {
28 while(~scanf("%d %d",&N,&K)){
29 scanf("%s",str+1);
30 memset(dp,0,sizeof(dp));
31 for(int i = 1; i <= N; ++i) dp[i][0] = calc(1,i);
32 for(int k = 1; k <= K; ++k){
33 for(int i = k + 1; i <= N; ++i){
34 for(int j = k; j < i; ++j){
35 dp[i][k] = max(dp[i][k],dp[j][k-1]*calc(j+1,i));
36 }
37 }
38 }
39 cout<<dp[N][K]<<endl;
40 }
41 return 0;
42 }