题解 | #中彩票的的概率#
中彩票的的概率
https://www.nowcoder.com/practice/531e409e1b564cfbbb275c6a8d3a4b45
num_all = input().split() ratio = input().split() niu = input().split() dt1 = {} j = 0 for i in num_all: dt1[i] = ratio[j] j += 1 mult = [] for i in niu: mult.append(dt1[i]) # print(mult) result = float(mult[0])*float(mult[1])*float(mult[2]) print('%.3f' %result)