Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:不用循环吧 这样就好了In Reply To:Re:请问:怎么递归啊? Posted by:ggg at 2004-06-03 10:14:49 int PlaceApple(int m, int n) { if(m < 0) return 0; if(m == 0) return 1; if(n == 0) return 1; return PlaceApple(m - n, n) + PlaceApple(m, n - 1); } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator