Sponsored
Sponsored
Solve with full IDE support and test cases
Use these hints if you're stuck. Try solving on your own first.
Suppose that <code>k ≥ n</code>, there is exactly one player who can win <code>k</code> games in a row. Who is it?
In case <code>k < n</code>, you can simulate the competition process described.