class Solution { public: int getSum(int n) { int s = n; n > 0 && (s += getSum(n-1));//将if判断语句改成bool型判断语句 return s; } };