Pregunta de entrevista de Pevaar Software Factory

Code test in hackerrank, you can use your preferred language