Pregunta de entrevista de Evening Star

Make a state machine based on given parameters