기출 문제 / 삼성 2020 Second Half Morning Problem 1

Unstable Moving Walkway

We want to test the stability of a moving walkway of length n. A moving walkway is a machine that transports people from one end to the other and consists of a total of 2n plates as shown below.

The rail of the moving walkway rotates clockwise. When it rotates once, plates from position 1 to position 2n−1 move to the position of the 2nth plate, and the 2nth plate moves to the position of the 1st plate.