题目:小谢 喜欢爬楼梯,有时一次爬1阶,有时一次爬2阶.
如果,楼梯有20阶,小明一共有多少次爬法.
 public static void main(String[] args) {
        System.out.println(getNumber(20));
    }
    public static int getNumber(int n){
        if(n==1){
            return 1;
        }
        if (n==2){
            return 2;
        }
        return getNumber(n-1)+getNumber(n-2);
    }小谢,一次最多可以爬2阶
当在19阶 时,到达20阶只要一步
当在18阶 时,到达20阶只要两步
且 到达19阶的过程包括了18,17,16....的过程
所以20阶,只能是19 和18阶到达
 



















