Maximum Volume of a Rectangular Box
Submissions: 2185   Accuracy:

16.62%

  Difficulty: Easy   Marks: 2

John was given a task to make a rectangular box during his innovation competition. He was given with
the A cm of wire and B cm2 of special paper. He had to use all the wire (for the 12 edges) and paper (for the 6 sides) to make the box. So what will be the maximum volume of that box?

Input:
The first line contains T, the number of test cases.
Each test case contains two integers A and B in a line.

Output:
Single lined output for the maximum floored volume of the made box.

Constraints:
1<=T<=100
1<=A,B<=106
Example:

Input:
2
20 14
20 16

Output:
3
4

** For More Input/Output Examples Use 'Expected Output' option **

Author: gauravjjs


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.


to report an issue on this page.