题解 | #求1+2+3+...+n#
求1+2+3+...+n
https://www.nowcoder.com/practice/7a0da8fc483247ff8800059e12d7caf1
/**
* 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可
*
* @param n int整型
* @return int整型
*/
export function Sum_Solution(n: number): number {
// write code here
(n !== 1) && (n += Sum_Solution(n - 1))
return n
}

