기출 문제 / 삼성 2017 Second Half Afternoon Problem 1

Rotating Octagonal Chairs

There are a total of 4 octagonal chairs with people from two regions sitting on them. They are marked as N for the northern region and S for the southern region. The octagonal chairs are numbered from 1 to 4 from left to right.

Each chair is to be rotated a total of k times.