/* 找规律求解,不管剪多少次,都会归结到2和3上,重点是3上,因为2*2*2小于3*3 */
class Solution {
public:
    int cutRope(int number) {
        int res;
        int a = number / 3;
        int b = number % 3;
        if (b == 0) {
            res = pow(3, a);
        } else if (b == 1) {
            res = 2 * 2 * pow(3, a - 1);
        } else {
            res = 2 * pow(3, a);
        }
        return res;
    }
};