#Lutece0220. A Greedy Boss
A Greedy Boss
Migrated from Lutece 220 A Greedy Boss
All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.
Description
Cloudiris is a greedy boss. On one hand, she wants her workers to work as long as possible. On the other hand, she doesn’t want to pay her workers much salary. She has found a relationship between the money() she pays for a hour’s work and the time() workers would like to work. And the relationship is something like this: .(the here are positive variables that will be specified in the input). The Salary() she pays for each worker will be . Now, as Cloudiris’s secretary, you are given and the maximum amount salary() she would like to pay for each worker, and you are required to tell her how much money() she should pay for a hour’s work so workers will work as long as possible and at the same time won’t exceed .
Input
The first line of the input contains a integer representing the number of test cases;
The following N lines each contains real numbers representing and .
and will be larger than zero.
The input guarantees that won’t be larger than hours.
Output
For each test case, output one line with a real number , rounded to digits after decimal point.
Samples
2
1 1 1 39
1.5 0.2 0.1 10
3.00
3.18
Resources
第四届北京邮电大学程序设计竞赛网络预赛