VHL is an international mail service company. Customers can send various packages to different places of the world via them.
VHL is planning to make a standard package box to contain the client's documents and stuff.
And they want to use different paper in different side of the box. And each paper costs different or maybe same.
The paper costs , and per square meter for the bottom, sides and the top respectively.
The box have to have a total volume of . Check the figure below:
The company wants to have the dimensions in a way such that the total cost of construction is as low as possible.
Now you need to write a program that will take , , and as input and output the minimum cost of building the box.
Input starts with a positive integer (), denoting the number of test cases.
Each case starts with a line containing four real numbers denoting , , , .
Each value is at least 1.0 and at most and contains at most five places after the decimal point.
And , , will be distinct.
For each line of input produce a line of output. Each line will contain one real number denoting the minimum cost to build the box. Errors less than will be ignored.
Input | Output |
---|---|
1 1 2 5 96 | 288.00000000 |
For the , , , we get the minimum cost of 288. |