🟢 剑指 Offer 10- II. 青蛙跳台阶问题
LeetCode 提示
题目难度 简单
原题链接 🔗 leetcode
#
题解 1.py# 就是斐波拉契数列class Solution: def numWays(self, n: int) -> int: a, b = 1, 1 for _ in range(n): a, b = b, a+b return a % 1000000007
题目难度 简单
原题链接 🔗 leetcode
# 就是斐波拉契数列class Solution: def numWays(self, n: int) -> int: a, b = 1, 1 for _ in range(n): a, b = b, a+b return a % 1000000007