题目: 传送门
题目描述
This is a very simple problem, just like previous one.
You are given a postive integer n, and you need to divide this integer into m pieces. Then multiply the m pieces together. There are many way to do this. But shadow95 want to know the maximum result you can get.
输入
Following T lines, each line there are two integer n, m. (0<=n<=10^18, 0 < m < log10(n))
输出
Output the maximum result you can get.
示例输入
示例输出
提示
You can divide "123" to "12" and "3".
Then the maximum result is 12*3=36.
题意很简单,但是我就是个渣渣,dp的题在比赛里从来没有A过,果断还是看了题解,也只是会了这个类型,其他类型的区间dp果断还是不会,果断不能举一反三啊。
代码如下: