题解 | #跳台阶#
跳台阶
https://www.nowcoder.com/practice/8c82a5b80378478f9484d87d1c5f12a4
function jumpFloor(number) { // write code here let resNum = (1 / Math.sqrt(5)) * (Math.pow(((1 + Math.sqrt(5)) / 2), number+1) - Math.pow(((1 - Math.sqrt(5)) / 2), number+1)); return Math.floor(resNum); }推导通项公式,结束
#牛客专项练习#