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