代码如下:
public int Sum_Solution(int n) { int temp = n; boolean b = (temp>0)&&(temp += Sum_Solution(n-1))>0; return temp; }
时间: 2024-10-12 10:43:05
代码如下:
public int Sum_Solution(int n) { int temp = n; boolean b = (temp>0)&&(temp += Sum_Solution(n-1))>0; return temp; }