#P109. [Extra Contest #1] Polygon Areas
[Extra Contest #1] Polygon Areas
Person in Charge
Problem Description
Given that the vertices of a simple -gon form exactly an square grid (each small square has side length ), find the average area of all such polygons.
Input Format
This problem contains multiple test cases.
The first line contains a positive integer , indicating the number of test cases.
The following lines each contain two positive integers .
Output Format
For each test case, output a line with a -decimal-place number representing the answer. No errors are allowed.
Samples
1
6 6
17.000