Pregunta de entrevista de Fortinet

First step was to pass Hackerrank Test