Domanda di colloquio di Factorial

How would you solve the problem I have?