Wise interview question

An exercise about currency exchange