Stained-glass window
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
In the house of an Owl there is one unusual circular window with radius R, which consists of 12 pieces of glass, all of these pieces can be classified into 3 groups by shape. Each piece of glass of one form denoted by a letter, so, we have 4 pieces with notations A, 4 pieces with symbols B and 4 C.
One day, a strong wind broke some of the elements window and in front of the wise Owl a question stood, what the area is damaged in each separated group.
Input
In one line is written integer R (0 < R ≤ 10^6), then after a space described each group of defeated elements in the format A:X B:Y C:Z, where X, Y, Z are integers (0 ≤ X, Y, Z ≤ 4).
Output
To put out the area of each group using space with an accuracy of 3 decimal places.
Examples
Input #1
Answer #1
Submissions 274
Acceptance rate 41%