DevRoss:# -*- coding: utf-8 -*-
# Created by Ross on 19-4-12
n = int(input())
if n < 1:
exit()
neg = 1 # 表示前面两人都抽不中的概率
c = 0
ps = []
for i in range(n):
p = float(input())
ps.append(p)
i = 0
while i < 100:
if i % 2 == 0: # 轮到小明
p = ps[i % n]
c += neg * p
neg *= (1 - p)
else: # 轮到小华
p = ps[i % n]
neg *= 1 - p
i += 1
print('%.4f' % c)
投递阿里巴巴等公司10个岗位 >
0 点赞 评论 收藏
分享
关注他的用户也关注了: