1230. Toss Strange Coins
https://leetcode.com/problems/toss-strange-coins
Description
You have some coins. The i
-th coin has a probability prob[i]
of facing heads when tossed.
Return the probability that the number of coins facing heads equals target
if you toss every coin exactly once.
Example 1:
Example 2:
Constraints:
1 <= prob.length <= 1000
0 <= prob[i] <= 1
0 <= target``<= prob.length
Answers will be accepted as correct if they are within
10^-5
of the correct answer.
ac
Last updated