![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
斐波那契数
llnou
这个作者很懒,什么都没留下…
展开
-
hdu2041 超级楼梯
Problem Description 有一楼梯共M级,刚开始时你在第一级,若每次只能跨上一级或二级,要走上第M级,共有多少种走法? Input 输入数据首先包含一个整数N,表示测试实例的个数,然后是N行数据,每行包含一个整数M(1 Output 对于每个测试实例,请输出不同走法的数量 Sample Input 2 2 3 Sam原创 2014-07-28 11:21:38 · 315 阅读 · 0 评论 -
hdu2044 一只小蜜蜂...
Problem Description 有一只经过训练的蜜蜂只能爬向右侧相邻的蜂房,不能反向爬行。请编程计算蜜蜂从蜂房a爬到蜂房b的可能路线数。 其中,蜂房的结构如下所示。 Input 输入数据的第一行是一个整数N,表示测试实例的个数,然后是N 行数据,每行包含两个整数a和b(0 Output 对于每个测试实例,请输出蜜蜂从蜂房a爬到蜂房b的可能路线数,原创 2014-07-25 15:59:58 · 300 阅读 · 0 评论 -
hdu1021 Fibonacci Again
Problem Description There are another kind of Fibonacci numbers: F(0) = 7, F(1) = 11, F(n) = F(n-1) + F(n-2) (n>=2). Input Input consists of a sequence of lines, each containing an integer n原创 2014-07-29 16:50:37 · 299 阅读 · 0 评论 -
hdu2070 Fibbonacci Number
Problem Description Your objective for this question is to develop a program which will generate a fibbonacci number. The fibbonacci function is defined as such: f(0) = 0 f(1) = 1 f(n) = f(n-1)原创 2014-07-25 10:35:34 · 375 阅读 · 0 评论