21461_ExpandingRods

2022-5-16 18:19| 发布者: Hocassian| 查看: 32| 评论: 0|原作者: 肇庆学院ACM合集

摘要:
C:\Users\Administrator\Downloads\2019-10-12-10-14-4-89505284761800-Problem List-采集的数据-后羿采集器.html

Pro.ID

21461

Title

Expanding Rods

Title链接

http://10.20.2.8/oj/exercise/problem?problem_id=21461

AC

24

Submit

44

Ratio

54.55%

时间&空间限制

  • Time Limit: 200/100 MS (Java/Others)     Memory Limit: 32768/32768 K (Java/Others)
  • 描述

    When a thin rod of length L is heated n degrees, it expands to a new length L'=(1+n×CL, where C is the coefficient of heat expansion.

    When a thin rod is mounted on two solid walls and then heated, it expands and takes the shape of a circular segment, the original rod being the chord of the segment.

    Your task is to compute the distance by which the center of the rod is displaced.

    输入

    The input contains multiple lines. Each line of input contains three non-negative numbers: the initial lenth of the rod in millimeters, the temperature change in degrees and the coefficient of heat expansion of the material. Input data guarantee that no rod expands by more than one half of its original length. The last line of input contains three negative numbers and it should not be processed.

    输出

    Description

    When a thin rod of length L is heated n degrees, it expands to a new length L'=(1+n×CL, where C is the coefficient of heat expansion.

    When a thin rod is mounted on two solid walls and then heated, it expands and takes the shape of a circular segment, the original rod being the chord of the segment.

    Your task is to compute the distance by which the center of the rod is displaced.

    Input

    The input contains multiple lines. Each line of input contains three non-negative numbers: the initial lenth of the rod in millimeters, the temperature change in degrees and the coefficient of heat expansion of the material. Input data guarantee that no rod expands by more than one half of its original length. The last line of input contains three negative numbers and it should not be processed.

    Output

    For each line of input, output one line with the displacement of the center of the rod in millimeters with 3 digits of precision.

    Sample Input

    1000 100 0.0001
    15000 10 0.00006
    10 0 0.001
    -1 -1 -1

    Sample Output

    61.329
    225.020
    0.000

    Source

    样例输入

    1000 100 0.0001
    15000 10 0.00006
    10 0 0.001
    -1 -1 -1

    样例输出

    61.329
    225.020
    0.000

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部