Sponsored
Use these hints if you're stuck. Try solving on your own first.
Think simulation
Note that the number of turns will never be more than 50 / 4 * n
Solve with full IDE support and test cases