Rose windows
Mr. Arnold Gerald Nostik is in charge of the design of the main rose window of the new cathedral in his town. The rose window is circular, 2r units wide. Since Mr. A. G. Nostik knows little about Virgins, Saints and Angels, he is thinking about a geometric pattern: Let n be an even integer number, at least 4. Mr. Nostik plans to pick n points, each at distance r of the center of the window, these points being the vertices of a regular polygon. (The next page shows an example with n = 8.) These points are to be joined with straight lines, and the resulting regions colored as shown in the example. (The colors of the example are arbitrary.) Note that for n = 8 there are four regions. We number these regions 1, 2, 3 and 4 starting to count from the center of the rose. In general, there are n/2 regions.
Write a program to help Mr. Nostik to know how much glass of every color he needs in order to build a given rose window.
Input
The first line contains number of test cases t. t lines follow, each with a real number r (1 ≤ r ≤ 100), an even integer n (4 ≤ n ≤ 40), and k (1 ≤ k ≤ n / 2).
Output
For every combination of r, n and k, print the area (in square units) of the k-th region of a rose window, rounded to four decimal digits.