#BS0000380. Thanh kim loại giãn nở (Expanding Rods)
Bài tập thuộc lộ trình
Mục lục đề ⌄
Thanh kim loại giãn nở (Expanding Rods)
Expanding Rods
Source: UVa
Version: Phuoc Hung OJ Extended
Problem Statement
A thin metal rod initially measures millimetres and is fixed at both ends. After a temperature increase of degrees, its length is , with thermal expansion coefficient . Since its endpoints remain fixed, the rod bends into a circular arc whose chord is the original rod. Its length grows by at most half of the original length. Find the displacement of its midpoint.

Input
One line contains three nonnegative real numbers : initial length (mm), temperature increase, and thermal expansion coefficient.
Output
Print in millimetres, rounded to exactly three decimal places.
Subtasks
The numeric bounds and scoring groups below are specific to the Phuoc Hung OJ version.
- Subtask 1 (20 points): ; . Each number uses ordinary decimal notation, with at most 8 fractional digits. .
- Subtask 2 (30 points): ; . Each number uses ordinary decimal notation, with at most 8 fractional digits. or .
- Subtask 3 (50 points): ; . Each number uses ordinary decimal notation, with at most 8 fractional digits.
Examples
Input
1000 100 0.0001
Output
61.329
Explanation
The 1000 mm rod grows by 10 mm because . The 1010 mm arc has a 1000 mm chord, giving a midpoint displacement of about 61.329 mm.
Input
15000 10 0.00006
Output
225.020
Explanation
The expansion fraction is 0.0006, adding 9 mm. A 15009 mm arc with a 15000 mm chord has displacement approximately 225.020 mm.
Input
10 0 0.001
Output
0.000
Explanation
There is no temperature increase, so the rod remains straight and its midpoint stays fixed.