You are given a non negative integer k. There is an infinite staircase with stairs numbered from jump initialized to
Alice can perform two types of operations:
Move down to stair
Move up to stair jump by
Return the total number of distinct ways Alice can reach stair k.
Note: A way is defined by the sequence of operations performed to reach stair
k. Reaching stairkmultiple times across different points in an execution path counts as a distinct way at each arrival.
Constraints:
k
You are given a non negative integer k. There is an infinite staircase with stairs numbered from jump initialized to
Alice can perform two types of operations:
Move down to stair
Move up to stair jump by
Return the total number of distinct ways Alice can reach stair k.
Note: A way is defined by the sequence of operations performed to reach stair
k. Reaching stairkmultiple times across different points in an execution path counts as a distinct way at each arrival.
Constraints:
k