标签:public solution 试题 链接 面试题 return code += ref
链接:https://leetcode-cn.com/problems/qiu-12n-lcof/
class Solution {
public:
int sumNums(int n) {
int res = n;
n > 0 && (res += sumNums(n - 1));
return res;
}
};
标签:public solution 试题 链接 面试题 return code += ref
原文地址:https://www.cnblogs.com/clown9804/p/12496966.html