A stair of 100 steps. You can either climb either one step or two steps but
no more each time and you can walk up entire stair any way you like with
rule above obeyed. How many possible combinations of ways to finish the walk?
谢谢
p*****k 发帖数: 318
2
generalize it to n-step stair. the recursion formula is
x(n)=x(n-1)+x(n-2)
by considering whether first move is one or two-step;
the initial condition is
x(0)=x(1)=1.
so Fibonacci_number: http://en.wikipedia.org/wiki/Fibonacci_number