Sponsored
Use these hints if you're stuck. Try solving on your own first.
Use dynamic programming. The states are how many dice are remaining, and what sum total you have rolled so far.
Solve with full IDE support and test cases