题目描述:
题解:
利用带短路效应的递归
class Solution{ public int sumNums(int n){ boolean x = n>1&&(n+=sumNums(n-1))>0; return n; } }
标签:Offer,int,题解,Solution,sumNums,64 From: https://www.cnblogs.com/zhz123567/p/17446178.html
题目描述:
题解:
利用带短路效应的递归
class Solution{ public int sumNums(int n){ boolean x = n>1&&(n+=sumNums(n-1))>0; return n; } }
标签:Offer,int,题解,Solution,sumNums,64 From: https://www.cnblogs.com/zhz123567/p/17446178.html