Criteo Interview Question

not that difficult, if you feel free to basic calculus.