#P474. 【例86.1】 上台阶
【例86.1】 上台阶
Description
A staircase has steps (). When climbing the stairs, you can take either 1, 2, or 3 steps at a time. Write a program to calculate the number of different ways to climb the stairs.
Input Format
Each line of input contains a test case, which is the number of steps . The last line contains 0, indicating the end of the test cases.
Output Format
For each line of input, output one line containing the number of different ways to climb the stairs.
Sample
1
2
3
4
01
2
4
7