题解 | #中彩票的的概率#
中彩票的的概率
https://www.nowcoder.com/practice/531e409e1b564cfbbb275c6a8d3a4b45
lottery=input().split() possibility=input().split() n=input().split() lottery_combination={} result=1 j=0 for i in lottery: lottery_combination[i]=possibility[j] j=j+1 for i in n: result=result*float(lottery_combination[i]) # print(possibility) # print(lottery_combination) print('{:.3f}'.format(result))