Boeing and Airbus are the two Major Commercial plane-producing companies. The planes produced by Boeing have two engines and the planes produced by Airbus have four engines. But this does not guarantee that Airbus planes are safer than those of Boeing. Both Boeing and Airbus try to hype up their products as much as possible but in this problem will not try to cover this issue. There are some interesting probability problems with 2-engine and 4-engine planes. Many people say that for a plane to remain on air successfully, at least 50% of its engines must remain operative. In this problem we will assume it to be true. So if a plane has 5 engines then at least 3 of them needs to be operative to ensure a successful flight. If all the engines have equal probability p of remaining operative throughout the flight and failure of engines is independent of one another then we can use binomial theorem to calculate the probability of successful flight. For example the probability that a 5-engine plane will make a successful flight is: ()()()() F(5)= 5 p3(1−p)2+ 5 p4(1−p)+ 5 p5,here n = n! So in general, F(n)= Another function CF is defined as: () 3 4 5 r r!(n−r)! ∑n ni n−i i=⌊ n+1 ⌋ 2 CF(m) = In the planes of present time we generally dont see more than four engines. But some scientists are planning to make planes with thousands of very small engines. The reasons are the following:
2/2 Output For each set of input Q + 1 lines of output. The first line contains the serial of the set. Each of the next Q lines contains one floating-point number which denotes the value of CF(m). These floating-point numbers should have 8 digits after the decimal point. Look at the output for sample input for details. Errors less than max(2 ∗ 10−8, 2 ∗ 10−6%) will be ignored. Sample Input 0.9 3 10 11 12 0.1 3 100 20 30 0.4 0 Sample Output Case 1: 9.84427253 10.84397682 11.84392664 Case 2: 0.40625000 0.40624417 0.40624997