class Solution {
public:
int Sum_Solution(int n) {
//通过与运算判断n是否为正数,以结束递归
n && (n += Sum_Solution(n - 1));
return n;
}
};

class Solution {
public:
int Sum_Solution(int n) {
//通过与运算判断n是否为正数,以结束递归
n && (n += Sum_Solution(n - 1));
return n;
}
};