Pregunta de entrevista de AltSource

Small whiteboard exercise for a simple math function