【思路】用&&的短路思想来求和
1 class Solution { 2 public: 3 int Sum_Solution(int n) { 4 int sum = n; 5 sum && (sum += Sum_Solution(n - 1)); 6 return sum; 7 } 8 };