Type: RemoteJudge 1000ms 128MiB

数楼梯

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

题目描述

楼梯有 NN 阶,上楼可以一步上一阶,也可以一步上二阶。

编一个程序,计算共有多少种不同的走法。

输入格式

一个数字,楼梯数。

输出格式

输出走的方式总数。

4
5

提示

  • 对于 60%60\% 的数据,N≤50N \leq 50;
  • 对于 100%100\% 的数据,1≤N≤50001 \le N \leq 5000。

入门3 递推 DP 背包

Not Attended
Status
Done
Rule
IOI
Problem
6
Start at
2026-9-21 1:00
End at
2026-9-28 1:00
Duration
168 hour(s)
Host
Partic.
33