斐波那契數列Python實現

def fbi(n): s1 = 1 s2 = 1 if(n<=0): return -1 else: if( n==1 | n==2): return 1 else: for num in range(2, n): s2 = s1+s
相關文章
相關標籤/搜索