Pregunta de entrevista de Servian

Hackerank test was not hard