Pregunta de entrevista de drchrono

How to solve a combination game problem.