Pregunta de entrevista de Acrontum

Very simple programming problem which had to be solved with the interviewer.