Cutting Cake
Gozz is planning to cut a cake. However, he is not going to cut it in the usual way. The cake can be described as a circle with a positive integer radius \(R\). Gozz is going to cut away every possible chord of this initial circle with some fixed length \(C\) (yes, there are infinitely many, Gozz is pretty bored). What will be the remaining area of the cake?
Note that Gozz will cut chords away even if he has already cut some of the cake in the chord's area before.
Input Specification
The first line will contain a single integer, \(T\), the number of test cases to follow. Each test case has the following format. There will be one line containing two space separated integers, \(R\) and \(C\) respectively.
Output Specification
For each test case, output a single number on its own line. The remaining area of the cake. Your solution will be considered correct if the relative error is less than \(10^{-6}\). Make sure you force your language to output with enough decimal places, as they may truncate the number by default.
Bounds
\(1 \leq T \leq 100\)
\(1 \leq C < R \leq 100\)
Sample Input
2
2 1
3 2
Sample Output
11.780972451
25.1327412287
Comments