编辑代码

class Solution {
    private $result = [];
    /**
     * @param Integer $n
     * @return Integer
     */
    function climbStairs($n) {
        if(1 == $n) return 1;
        if(2 == $n) return 2;

        $ret = $this->climbStairs($n - 1) + $this->climbStairs($n - 2);
        return $ret;
    }
}