Mathnasium interview question

not difficult