class Solution(object): def maxA(self, N): res = [0, 1] for i in range(2, N+1): last = i for j in range(1, i-2): last = max(last, res[j]*(i-j-1)) last = max(res[-1]+1, last) res.append(last) return res[-1]
Python, LintCode, 867. 四键键盘
猜你喜欢
转载自blog.csdn.net/u010342040/article/details/80068577
今日推荐
周排行