22708_FIFAWorldcup2006

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

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

Pro.ID

22708

Title

FIFA World cup 2006

Title链接

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

AC

0

Submit

0

Ratio

-

时间&空间限制

  • Time Limit: 2000/1000 MS (Java/Others)     Memory Limit: 6/65536 K (Java/Others)
  • 描述

    Football is one of the most popular words in 2006.

    Bob cannot go to Germany for the FIFA world cup 2006 and can only watch the TV instead. As the following figure, height of the TV is L, and TV is placed at H above Bob's eyes, shown in Figure 1.

    Bob want to maximize the angle a. You need to tell Bob x, the distance between the TV and Bob's eyes, when the angle a is maximum.

    Attention please, xD (or TV will do harm to Bob).


    Figure 1    Bob and TV

    输入

    The first line of the input is a positive integer T. T is the number of the test cases followed. Each test case contains three integer L, H, D ( -1000 < H < 1000,   0 < L, D < 1000 ). There may be one or several spaces before or after the integer.

    输出

    Description

    Football is one of the most popular words in 2006.

    Bob cannot go to Germany for the FIFA world cup 2006 and can only watch the TV instead. As the following figure, height of the TV is L, and TV is placed at H above Bob's eyes, shown in Figure 1.

    Bob want to maximize the angle a. You need to tell Bob x, the distance between the TV and Bob's eyes, when the angle a is maximum.

    Attention please, xD (or TV will do harm to Bob).


    Figure 1    Bob and TV
    Input

    The first line of the input is a positive integer T. T is the number of the test cases followed. Each test case contains three integer L, H, D ( -1000 < H < 1000,   0 < L, D < 1000 ). There may be one or several spaces before or after the integer.

    Output

    The output of the program should consist of one line of output for each test case.

    The output of each test case only contains x rounded to two decimal places past the decimal point, and always showing the two decimal places past the decimal point. No any redundant spaces is needed.

    Sample Input

    3
    2 -1 10
    1 1 1
    1 -2 1

    Sample Output

    10.00
    1.41
    1.41

    Source

    样例输入

    3
    2 -1 10
    1 1 1
    1 -2 1

    样例输出

    10.00
    1.41
    1.41

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部