1 # -*- coding:utf-8 -*- 2 class Solution: 3 def Sum_Solution(self, n): 4 return n and n + self.Sum_Solution(n-1) 5 # write code here
1 # -*- coding:utf-8 -*- 2 class Solution: 3 def Sum_Solution(self, n): 4 return n and n + self.Sum_Solution(n-1) 5 # write code here