Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Simulate the process.
Maintain in a circular list the people who are still in the circle and the current person you are standing at.
In each turn, count k people and remove the last person from the list.