Superman, with his incredible power, can fly faster than rockets! He can even pierce the Great Wall if it is in his path, and this doesn’t affect his speed. But he is facing an unbearable problem in large cities now a days. Some regions of these cities are covered with polluted air. When flying through these regions, he can hardly breathe and his speed reduces significantly. He wants to find out whether he could pass through such regions by finding out the length of his path through these regions. Superman knows that each regions of polluted air have the shape of a sphere. He also knows where the polluted regions are located. But he doesn’t know how to calculate the path length inside a sphere. So, he requests you to do that for him.
There are multiple datasets. Input is terminated by EOF. Each dataset consists of the followings (All numbers are integers < 21 in absolute value):
For each dataset, print the city name in a line followed by the percentage of his path inside polluted regions. The result should be correct to 2 places after the decimal point.
範例輸入 1
Dhaka 10 10 10 30 10 10 2 15 10 10 5 25 10 10 5 Rio 10 10 10 30 10 10 1 20 10 5 10
範例輸出 1
Dhaka 100.00 Rio 86.60
Pro 專屬功能: 查看這題在歷屆 CPE 出現過幾次 — 升級以解鎖.