# -*- coding:utf-8 -*- class Solution: def Sum_Solution(self, n): # write code here if n==1:#用递归来做 return n return n+self.Sum_Solution(n-1)