function countStairways(n) { if (n <= 1) { return 1; } else { return countStairways(n - 1) + countStairways(n - 2); } } const numOfWays = countStairways(20); console.log("楼梯的走法数量:", numOfWays);