AltSource Interview Question

Small whiteboard exercise for a simple math function