Triple Step
A child is running up a staircase with n steps and can hop either 1 step, 2 steps, or 3 steps at a time.
Implement a method to count how many possible ways the child can run up the stairs.
Examples:
n=1 → 1 (just 1-step)
n=2 → 2 (1+1 or 2)
n=3 → 4 (1+1+1, 1+2, 2+1, 3)
n=4 → 7
Hints
solution.py
Python ready
Test Output
▶
Click "Run Tests" to execute your code