劍指Offer(Python多種思路實現):求1+2+···+n

劍指Offer(Python多種思路實現):求1+2+···+n 題目:64題python 求1+2+3+...+n,要求不能使用乘除法、for、while、if、else、switch、case等關鍵字及條件判斷語句(A?B:C)。code 解題思路一:python方法 def Sum_Solution(self, n): return n and (n+self.Sum_Solutio
相關文章
相關標籤/搜索