Expectation

Hi I need just 1 hint about the explanation in the given test.Can anyone explain me with what number do we multiply the probabily to find expectation in the example given below.

https://www.codechef.com/JUNE18B/problems/BUILDIT
Hey please someone help me here
Hello anyone done with this
Topic archived. No new replies allowed.