
130  ZOJ Monthly, January 2014  H
Long long ago, the territory of Snowflake Island Kingdom is an equilateral triangle whose center is in the coordinate origin (0,0). One edge of this triangle is parallel to the xaxis. And all the edges of this equilateral triangle are considered as long as 1. Everyone in the Kingdom reclaimed to expand territory every year. The picture below shows how the territory expands from an equilateral triangle in the first seven years. And it has expanded for very many years. The length of the coastline of Snowflake Island Kingdom grows one third every year, but the area of the territory grows slower and slower. This year, kingdom splits into two independent kingdoms, Left Kingdom and Right Kingdom. The part x≤d of Snowflake Island is Left Kingdom, and the rest part is Right Kingdom. The King of Right Kingdom wants to know the proportion of the Left Kingdom's coastline. InputThere are multiple test cases. Each case is a fraction d in a line. (1/2≤ d≤ 1/2, the numerator and denominator of d are integers in [1000, 1000]) OutputFor each case, output the proportion of the Left Kingdom's coastline in percentage. Please reserve 100 decimal digits after the decimal point. Sample Input0/1 1/5 Sample Output50.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000% 32.3529411764705882352941176470588235294117647058823529411764705882352941176470588235294117647058823529% Author: ZHOU, Yuchen 