시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 1024 MB171717100.000%

문제

When going to your internship you got a nice apartment with a skylight. However, one crazy party later and you now have a square-shaped hole where your skylight used to be. Rather than telling the landlord, you decided you would “fix” it by putting a circular pot to collect the water but, as the saying goes, round peg square hole. You need to determine how much of the square the circle covers to help you determine if you should buy a larger pot. Don’t worry about the area not covered; you can do multiplication and subtraction easily in your head.

Given the radius of a circular pot and the length of the square skylight, calculate the amount of skylight rain area covered by the pot assuming the two shapes have the same center (i.e., are coaxial) with respect to the direction rain falls from (up). In other words, the center of the square will be directly above the center of the circle. See the picture for an example; let up be the direction from above the page, while the dotted square is the skylight and the solid circle is the pot to collect water.

입력

The first input line contains a positive integer, n, indicating the number of scenarios to check. Each of the following n lines contains a pair of integers, s, r (1 ≤ s ≤ 100, 1 ≤ r ≤ 100), which represents the length of the side of the skylight and the radius of the pot, respectively.

출력

For each scenario, output a single decimal representing the area under the skylight that is covered by the pot. Round the answers to two decimal places (e.g., 1.234 rounds to 1.23 and 1.235 rounds to 1.24). For this problem, use 3.14159265358979 as the value of pi.

예제 입력 1

3
1 1
8 5
10 4

예제 출력 1

1.00
62.19
50.27