Premium problem25. All of n Independent Events

Easy Locked

For independent events the intersection is just the product:

P(⋂i=1nAi)=∏i=1nP(Ai)P\left(\bigcap_{i=1}^{n} A_i\right) = \prod_{i=1}^{n} P(A_i)

Return the probability that all of them happen.

Input

[0.5, 0.5]

Output

0.25

Premium problem

This one's part of Premium. Unlock the full Probability track plus every other premium problem on the site.

Implement solve(...)