We are all quite familiar with finding 'average'. Let us define new kind of average of a function.
Given a function f(x) and two values a and b (a ≤ b) if we take all the numbers (not necessarily integers) from a to b then
$$ y = \frac{Summation \space of \space f(x) \space (a \leq x \leq b)}{Total \space Numbers \space in [a, b]} $$
Now for f(x) = xk you are given k, a and b, you have to find the average (y) according to the description.
Input
Input starts with an integer T (≤ 400), denoting the number of test cases.
Each case contains an integer k (1 ≤ k ≤ 4) and two real numbers a and b (0 < a ≤ b ≤ 10).
Output
For each case, print the case number and the average. Error less than 10-6 will be ignored.
Sample
Sample Input | Sample Output |
---|---|
4 1 2 2 2 2 2.0 1 2.0 4 2 2 4.0 | Case 1: 2 Case 2: 4 Case 3: 3 Case 4: 9.3333333333 |