题解 | #连续子数组的最大和#
剪绳子
http://www.nowcoder.com/questionTerminal/57d85990ba5b440ab888fc72b0751bf8
# -*- coding:utf-8 -*- class Solution: def cutRope(self, number): if number<=3: return number-1 else: a,b=number//3,number%3 if b==0: return 3**a elif b==1: return 4*3**(a-1) else: return 2*3**a