기출 문제 / 삼성 2022 Second Half Morning Problem 2

Santa's Gift Factory

With Christmas approaching, Santa is in a hurry and has set up a gift factory. Santa proceeds with the work according to q commands in sequence at the factory. The types of work are broadly divided into the following five categories: