解释: 1.记得要long long
**
拓展: 如果只能走2,3级楼梯,如下图
**
#include<bits/stdc++.h>
using namespace std;
long long ans[75]={0,1,2,4,7};
int main(){
freopen("cpp.in","r",stdin);
freopen("cpp.out","w",stdout);
for(int i=5;i<=71;i++){
ans[i] = ans[i-3]+ans[i-2]+ans[i-1];
}
while(1){
int n;
cin>>n;
if(n==0){
break;
}
cout<<ans[n]<<endl;
}
return 0;
}