The Knights Of The Round Table

2020年1月17日 877点热度 0人点赞 0条评论

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

提示:

参考答案:

解锁文章

没有看到答案?微信扫描二维码可免费解锁文章

微信扫描二维码解锁

使用微信扫描二维码打开广告页面后可以立即关闭,再刷新此页面即可正常浏览此文章

所跳转广告均由第三方提供,并不代表本站观点!

已经扫描此二维码?点此立即跳转

code

这个人很懒,什么都没留下

文章评论