The Josephus problem (n=7, k=3)

Seven people stand in a circle, numbered 1 through 7. Starting from person 1, count 3 people (inclusive of the starting person) and eliminate the third; continue counting from the next survivor. Print the 1-indexed number of the last person remaining.

Liseh Academy