Climbing Stairs
You are climbing a stair case. It takesnsteps to reach to the top.
Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?
Note:Givennwill be a positive integer.
分析
DP, n+1的数组,f[0] 和f[1]都是1 ,计算f[1],f[2]推出来的
不用数组
Last updated