Inscribed Circles
Given two real numbers
B the width of the base of an isoceles triangle in inches
H the altitude of the same isoceles triangle in inches
You have to find the sum of the circumfrences of a series of inscribed circles stacked one on top of another from the base to the peak; such that the lowest inscribed circle is tangent to the base and the two sides and the next higher inscribed circle is tangent to the lowest inscribed circle and the two sides, etc. In order to keep the time required to compute the result within reasonable bounds, you may limit the radius of the smallest inscribed circle in the stack to a single precision floating point value of 0.000001.
( 0.0 <= B, H <= 500 )
Input
0.3456 0.6543Output
2.055532The image shows the inner circles of a triangle.
Submit solution
Coming laterThe grading service will be connected in a later migration step. You can inspect the task and your previous results now.