Arithmetic Masha
Easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
Misha writes 2 numbers: n and m, and Masha must divide the number n into m parts, without changing the order of digits. Misha still requires that the product obtained by m numbers is maximum. Help Masha.
Input
The input data contains several test cases. Each test case is located on a separate line and contains two numbers separated with a space: first, n (1 ≤ n ≤ 10^15), then m (1 ≤ m ≤ [lg(n)]).
Output
For each test case print in a separate line the maximum product.
Examples
Input #1
Answer #1
Submissions 423
Acceptance rate 26%