J. Ninja`s Are in Action

Transcription

J. Ninja`s Are in Action
J. Ninja’s Are in Action
The Teenage Mutant Ninja Turtles (TMNT), often shortened to Ninja Turtles, are a fictional
team of four teenage anthropomorphic turtles, who were trained by their anthropomorphic
rat sensei in the art of ninjutsu and named after four Renaissance artists. From their home
in the storm sewers of New York City, they battle petty criminals, evil overlords and alien
invaders, all while remaining isolated from society-at-large.
Problem
A villainous ninjutsu master called Oroku Saki, came into town with a destruction plan.
TMNT team figured out the plan of Saki and they want to take a step against him. Saki
placed some nuclear bombs in different region of the city. TMNT team finds the map where
Saki placed those bombs. After finding the map they realized that the consequence of this
bombing is destructive to huge region of the city. But they cannot calculate the area
because the map is something like that:
There are Five circles with the same radius intersecting others. As you can see there are
regions colored black in the map. These black regions are affected by the bombing and
TMNT team has to find out the area. There are 16 black regions here and we can easily say
that all regions have the same area. So, if you able to find the area of one region you can
find the total area.
Input:
Input consists of several test cases T (T<=1000). Each case consist of a floating point
number R (0<=R<=1000), the radius of the circle.
Output:
For each test case print the case number and the total area of the intersecting region (black
portion of the picture ). Only the integer value. ( if answer is something like 4.8934 or 4.213
, then just print 4 ) .
Sample Input:
2
5.000
10.000
Sample Output:
Case 1: 228
Case 2: 913