Wise Interview Question

An exercise about currency exchange