Criteo interview question

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