围圈报数
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
Description
有个人依次围成一圈,从第个人开始报数,数到第个人出列,然后从出列的下一个人开始报数,数到第个人又出列,…,如此反复到所有的人全部出列为止。设个人的编号分别为,打印出列的顺序。
Input Format
和。
Output Format
出列的顺序。
4 17
1 3 4 2
Hint
。