Virtu Financial Interview Question

Programme code to solve math question