Type: Default 1000ms 256MiB

走楼梯

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级楼梯有多少种走法?

输入格式

一行一个整数n,0<n≤30。

输出格式

一行n个整数,之间用一个空格隔开,表示走到第1级、第2级、……第n级分别有多少种走法。

2
1 2

A班第二天测试

Not Attended
Status
Done
Rule
Ledo
Problem
8
Start at
2025-7-22 19:00
End at
2025-7-22 21:00
Duration
2 hour(s)
Host
Partic.
10