406472: GYM102419 E Geometry Problem

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

E. Geometry Problemtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output

There are 2 circles the first circle has a radius of $$$r_1$$$ and the second one has a radius of $$$r_2$$$.

Find the area of the grey area, in the figure.

Input

The first line contains one integer $$$t$$$ $$$(1 \leq t \leq 10 ^ {5})$$$, which is the number of test cases.

For the next $$$t$$$ lines, the input will contains two integers for each, $$$r_1$$$ and $$$r_2$$$ $$$(1 \leq r_1 , r_2 \leq 10 ^ {6})$$$, which is the radius of the first circle and the radius of the second circle.

Output

For every test case print the answer on a line.

the relative error is $$$10^{-3}$$$.

ExampleInput
2
10 5
5 10
Output
1.7565653168
2.3212820551

Source/Category

加入题单

算法标签: