Jane Street Interview Question

prob about coins and dices