#t311. 上台阶
上台阶
Climbing the Stairs
Problem Background
Special for beginners, ^_^
Problem Description
A staircase has steps (). You may climb , , or steps in a single move. Write a program to compute how many different ways there are to climb to the top.
Input Format
Each line of the input is one test case, giving the number of steps . The last line is , marking the end of the input.
Output Format
For each input line, output the corresponding number of ways on its own line.
Sample Input 1
1
2
3
4
0
Sample Output 1
1
2
4
7
Constraints
1s, 1024KiB for each test case.