走台阶
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.
题目描述
楼梯有 阶台阶,上楼可以一步上一阶,也可以一步上二阶。用递归的方法编一程序计算共有多少种不同的走法。
输入格式
输入一个数 。
输出格式
输出答案。
4
5
数据范围
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.
楼梯有 n 阶台阶,上楼可以一步上一阶,也可以一步上二阶。用递归的方法编一程序计算共有多少种不同的走法。
输入一个数 n。
输出答案。
4
5
1≤n≤60
注册一个 CZOJ 通用账户,您就可以在我们提供的所有在线评测服务上提交代码、参与讨论。