Sponsored
Use these hints if you're stuck. Try solving on your own first.
Can you think of a DP solution?
Consider a state that remembers the last 1 or 2 rolls.
Do you need to consider the last 3 rolls?
Solve with full IDE support and test cases