5. Is It a Valid Distribution?

Easy

The probabilities assigned to all outcomes of a sample space must each lie in [0,1][0, 1] and together sum to one:

∑ω∈ΩP(ω)=1\sum_{\omega \in \Omega} P(\omega) = 1

Return True if the list is a valid distribution, else False. Allow a tiny floating-point tolerance on the sum.

Input

[0.5, 0.25, 0.25]

Output

True
Implement solve(...)