You stand at the bottom of n stairs. In one move you go up 1 stair or 2 stairs. Count every possible list of moves that lands you exactly on the top stair, and return that count.
- The order of moves matters:
1then2is not the same as2then1. nis between 1 and 45, so the count fits in a normal number.
Input: n = 4
Output: 51+1+1+1, 1+1+2, 1+2+1, 2+1+1, 2+2
Input: n = 2
Output: 21+1 or 2
Input: n = 1
Output: 1