Jane Street Interview Question

Optimization question - dice game (2 dices)