All Tracks Basic Programming Recursion Recursion and Backtracking Problem

Simran and stairs
/

Recursion

Problem
Editorial
Analytics

Simran is running up a staircase with N steps, and can hop(jump) either 1 step, 2 steps or 3 steps at a time.You have to count, how many possible ways Simran can run up to the stairs.

Input Format:
Input contains integer N that is number of steps

Output Format:
Output for each integer N the no of possible ways w.

Constraints
\(1 \le N \le 30\)

 

 

SAMPLE INPUT
4
SAMPLE OUTPUT
7
Time Limit: 0.15 sec(s) for each input file.
Memory Limit: 256 MB
Source Limit: 1024 KB

Best Submission

Similar Problems

Contributors

Initializing Code Editor...
Notifications
View All Notifications

?