编程介的小学生 2017-12-03 16:27 采纳率: 20.5%
浏览 866
已采纳

Rain Fall

Problem Description

Rainfall is measured in millimeters. The rain is collected in a vertical transparent tube with millimeter markings, and once the rain has stopped falling, one can check the height of the water in the tube.

In our problem, the tube unfortunately has a leak at height L millimeters (mm). If the water level is above the leak then water drains from the tube at a rate of K millimeters per hour (mm/h).

We want to figure out how much rain fell during a particular rainfall. We assume that the tube is high enough that it does not overflow. We also assume that rain falls at an (unknown) uniform rate during a rainfall, and that water does not evaporate from the tube. The height of the leak itself is also negligible.

Input
The input is a line with five positive numbers: L K T1 T2 H where

L is where the leak is (mm)

K is the rate at which water leaks (mm/h)

T1 is the duration of the rainfall (h)

T2 is the time between the end of the rainfall and the observation of the water level (h)

H is the water level in the tube when we observe it (mm)

Each number is at least 0.01 and at most 1000.00, and each is given with two decimals.

Output
One line with two floating point numbers F1 F2 where F1 is the smallest rainfall in millimeters that would result in the given observation, and F2 is the largest rainfall in millimeters that would result in the given observation. Values with either absolute or relative error smaller than 10-9 are acceptable.

Sample Input
80.00 0.50 2.00 1.50 80.00
150.00 1.00 100.00 150.00 100.00

Sample Output
80.000000000 80.759403280
100.000000000 100.000000000

  • 写回答

2条回答

  • threenewbee 2017-12-09 15:31
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥50 永磁型步进电机PID算法
  • ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
  • ¥88 找成都本地经验丰富懂小程序开发的技术大咖
  • ¥15 如何处理复杂数据表格的除法运算
  • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)
  • ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
  • ¥200 uniapp长期运行卡死问题解决
  • ¥15 latex怎么处理论文引理引用参考文献
  • ¥15 请教:如何用postman调用本地虚拟机区块链接上的合约?
  • ¥15 为什么使用javacv转封装rtsp为rtmp时出现如下问题:[h264 @ 000000004faf7500]no frame?