精華區beta Marginalman 關於我們 聯絡資訊
509.費氏數列 class Solution(object): def fib(self, n): """ :type n: int :rtype: int """ if n <= 1: return n else: return self.fib(n-1) + self.fib(n-2) 看到了好多新的報錯 賦值錯誤 return outside function 未定義 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 42.72.62.214 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/Marginalman/M.1702566463.A.A5F.html
sustainer123: 程式課經典範例 12/14 23:33
SecondRun: 大師 12/14 23:37