You are given a fence with n posts and k different colors. Determine the total number of valid ways to paint the fence such that no more than
Constraints:
n
k
The test cases are generated such that the answer is within the range n and k.
You are given a fence with n posts and k different colors. Determine the total number of valid ways to paint the fence such that no more than
Constraints:
n
k
The test cases are generated such that the answer is within the range n and k.