±êÌ⣺ΪʲôһֱÌáʾ²»ËùÓдúÂ붼Óзµ»ØÖµ£¿
Ö»¿´Â¥Ö÷
¿¨°Í˹
Rank: 2
µÈ¡¡¼¶£ºÂÛ̳ÓÎÃñ
Ìû¡¡×Ó£º50
ר¼Ò·Ö£º31
×¢¡¡²á£º2012-12-18
½áÌûÂÊ£º100%
ÒѽáÌù¡Ì  ÎÊÌâµãÊý£º5 »Ø¸´´ÎÊý£º2 
ΪʲôһֱÌáʾ²»ËùÓдúÂ붼Óзµ»ØÖµ£¿
³ÌÐò´úÂ룺
 private int digui(int n)
        {
            if (n<=2)
            {
                return 1;
            }
            if(n>2)
            {
                 return digui(n - 1) + digui(n - 2);
            }
        }
´úÂëÒѾ­°üº¬ÁËÔÚ²»Í¬Ìõ¼þϵķµ»ØÖµÎÊÌ⣬Ϊʲô»¹ÊÇÌáʾ²»ÊÇËùÓдúÂ붼Óзµ»ØÖµ£¿ÔÚºóÃæ¼ÓÁËÒ»¸öreturn»òÕ߰ѵڶþ¸öif¸ÄΪelse¾Í¿ÉÒÔÁË£¬ÎªÊ²Ã´°¡£¿
2013-04-12 00:09
°Ë»­Ð¡×Ó
Rank: 11Rank: 11Rank: 11Rank: 11
µÈ¡¡¼¶£º¹ó±ö
Íþ¡¡Íû£º37
Ìû¡¡×Ó£º705
ר¼Ò·Ö£º2043
×¢¡¡²á£º2010-11-11
µÃ·Ö:5 
´ÓÈ˵ĽǶȿ´ÄãµÄÁ½¸öifȷʵ°ÑËùÓÐÇé¿ö¶¼¿¼Âǵ½ÁË£¬²»ÂÛÊÇN<=2»¹ÊÇN>2£¬¶¼Óзµ»ØÖµ¡£
µ«±àÒëÆ÷»¹Ã»ÓÐÕâôÖÇÄÜ»¯£¬µ±Ëü¶½µ¼µÚÒ»¸öIFʱ£¬ÈÏΪµ±N>2µÄʱºòûÓзµ»ØÖµ¡£È»ºóÔÙ¶Áµ½µÚ¶þ¸öIFʱ£¬ÈÏΪµ±N<=2ʱûÓзµ»ØÖµ¡£²»ÂÛÊÇÄĸö¶¼´æÔÚûÓзµ»ØÖµµÄÇé¿ö£¬ËùÓлáÓÐÄÇÑùµÄÌáʾ¡£
2013-04-12 00:26
lxb932979339
Rank: 5Rank: 5
µÈ¡¡¼¶£ºÖ°ÒµÏÀ¿Í
Íþ¡¡Íû£º4
Ìû¡¡×Ó£º84
ר¼Ò·Ö£º313
×¢¡¡²á£º2013-4-24
µÃ·Ö:0 
Ïȶ¨ÒåÒ»¸ö±äÁ¿£¬ÔÚifÓï¾äÖиø±äÁ¿¸³Öµ£¬·µ»Ø±äÁ¿
2013-04-24 06:01



²ÎÓëÌÖÂÛÇëÒƲ½Ô­ÍøÕ¾Ìù×Ó£ºhttps://bbs.bccn.net/thread-403918-1-1.html




¹ØÓÚÎÒÃÇ | ¹ã¸æºÏ×÷ | ±à³ÌÖйú | Çå³ýCookies | TOP | ÊÖ»ú°æ

±à³ÌÖйú °æȨËùÓУ¬²¢±£ÁôËùÓÐȨÀû¡£
Powered by Discuz, Processed in 0.294269 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved