4215 - 动态规划:剪绳子
Time Limit : 1 秒
Memory Limit : 128 MB
剪绳子问题
给你一根长度为N的绳子,请把绳子剪成M段(m,n都是整数,M>=0,1<N<=50),每段绳子的
长度记为k[0],k[1],k[2]…. 请问如何剪绳子使得k[0],k[1],k[2]
的乘积最大
例如 绳子长度8 最大乘积18 = 2*3*3
Input
绳子的长度(整数,不超过100)
Output
最大乘积
Examples
Input
8
Output
18