Rose windows#1508

Rose windows

1 second
64 megabytes
Hard

Mr. Arnold Gerald Nostik is in charge of designing the main rose window of the new city cathedral. The window is circular, with a diameter of . Since Mr. A. G. Nostik knows little about virgins, saints, and angels, he is considering a geometric pattern:

Let be an even integer, at least . Mr. Nostik plans to choose points, each at a distance from the center of the window, such that they form the vertices of a regular polygon (the figure below shows an example for n = 8). These points are then joined by straight lines, and the resulting regions are colored as shown in the example (the colors in the example are arbitrary). Note that for n = 8, there are four regions. Number these regions 1, 2, 3, 4, starting from the center of the rose. In general, there are regions.

Help Mr. Nostik determine how much glass of each color is needed to build the window.

Input

The first line contains the number of test cases . The next lines follow, each containing a real number (1 \le r \le 100), an even integer (4 \le n \le 40), and (1 \le k \le n/2).

Output

For each input triple , , , output on a separate line the area of the -th region of the window, rounded to four decimal digits.

Examples

Example 1

Loading
Loading