字节提前批
字节提前批
买面包的那道概率题
a = input() b = input() c = input() toal = a.split() b_sort = b.split() c_sort = c.split() N = int(toal[0]) J,K = int(toal[1]),int(toal[2]) A_J,B_J,T_J = int(b_sort[0]) ,int(b_sort[1]),int(b_sort[2]) A_k,B_k,T_k = int(c_sort[0]) ,int(c_sort[1]),int(c_sort[2]) sum_sort = (J*K)**N J,K = J-T_J,K-T_k A_J,B_J,A_k,B_k = A_J-T_J,B_J-T_J,A_k-T_k,B_k-T_k sum1_sort = (J*K)**N P1 = sum1_sort/sum_sort p2 = ((J-A_J)*(K-A_k))**N P3 = ((K-B_k)*(J-B_J))**N P4 = (p2/sum1_sort)*(P3/sum1_sort) p5 = P4*P1 print(p5)