// Arup Guha
// 2/7/2015
// Solution to 2015 UCF Online High School Contest Problem: The Woe of Painting

import java.util.*;

public class painting {

	public static void main(String[] args) {

		Scanner stdin = new Scanner(System.in);
		int numCases = stdin.nextInt();

		// Process all cases.
		for (int loop=1; loop<=numCases; loop++) {

			int n = stdin.nextInt();
			int radius = stdin.nextInt();
			double result = 0;

			// Add up all unpainted "wedges".
			for (int i=0; i<n; i++) {

				// Use the two right triangles, and sub out sector.
				double angle = stdin.nextInt()*Math.PI/180.0;
				double sectorAngle = Math.PI - angle;
				double base = radius/(Math.tan(angle/2));
				result += (base*radius-sectorAngle/2*radius*radius);
			}

			// Print result.
			System.out.printf("Canvas #%d: %.4f\n", loop, result);
		}
	}
}