# 幫 ```=c++ #include<iostream> using namespace std; int f(int stepp){ if(stepp==1){ return 1; } else if(stepp==2){ return 2; } else if(stepp==3){ return 3; } else { return f(stepp-1)+f(stepp-2)+f(stepp-3); } } int main(){ int step; cin>>step; cout<<f(step); return 0; } ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up