Pregunta de entrevista de Bending Spoons

Solve a stochastic problem exercise