The Knights Of The Round Table
时间: 1ms 内存:64M
描述:
King Arthur is planning to build the round table in a room which has a triangular window in the ceiling. He wants the sun to shine on his round table. In particular, he wants the table to be totally in the sunlight when the sun is directly overhead at noon.
Thus the table must be built in a particular triangular region of the room. Of course, the king wants to build the largest possible table under the circumstances.
As Merlin is out to lunch, write a program which finds the radius of the largest circular table that fits in the sunlit area.
输入:
There will be an arbitrary number of test cases, each represented by three real numbers (a, b, and c), which stand for the side lengths of the triangular region. No side length will be greater than 1,000,000, and you may assume that max(a, b, c)<=(a + b + c)/2. You must read until you reach the end of the file.
输出:
For each room configuration read, you must print the following line:
The radius of the round table is: r
where r is the radius of the largest round table that fits in the sunlit area, rounded to three decimal digits.
示例输入:
12.0 12.0 8.0
示例输出:
The radius of the round table is: 2.828
提示:
参考答案:
文章评论