In function 'main':
error: stray '\357' in program
error: stray '\274' in program
error: stray '\237' in program
error: stray '\357' in program
error: stray '\274' in program
error: stray '\237' in program
error: stray '\357' in program
error: stray '\274' in program
error: stray '\237' in program
error: stray '\357' in program
error: stray '\274' in program
error: stray '\237' in program
已采纳回答 / 康振宁
递归的时候,都会有一个变量的,所以课程中的写法是 (getPeachNumber(n+1)+1)*2。getPeachNumber(n+1)这里的n+1代表的是第n+1天,然后getPeachNumber(n+1)+1这个是获取吃了一半多吃的那一个,然后乘以2。因为在递归的时候一定要有递归条件的,n+1就代表的天数的递归
2015-03-07