题解 | #中彩票的的概率#
中彩票的的概率
https://www.nowcoder.com/practice/531e409e1b564cfbbb275c6a8d3a4b45
num = input().split() prob = input().split() prob = [float(x) for x in prob] d = dict(zip(num,prob)) choice = input().split() m = 1.0 for ch in choice: m *= d.get(ch) print(round(m,3))