Problem
A baby can eat a jar of jam in A1 minutes, a basket of cookies in B1 minutes, drink a bottle of milk in C1 minutes. And Carlson can do it in A2, B2, C2 minutes, respectively. Write a program that calculates the minimum time it takes for them to finish their breakfast of a jar of jam, a basket of cookies, and a bottle of milk?
The first line of the input file contains three space-separated integers – values of parameters A1, B1, C1. The second line of the input file contains three space-separated integers – values of parameters A2, B2, C2. All numbers between 1 and 106.
Output a single number – minimum breakfast time with an accuracy of 10
−5.
Input |
Output |
13 10 14
6 6 7
|
12.00000 |
(c) South Ural Open Team Championship, 2006