Max has a rectangular prism with dimensions A, B, and C. He writes A, B, and C on piece of paper. When he is not looking, Andrew replaces these numbers with X=A+B, Y=B+C, and Z=A+C. Now, Max sees three numbers X, Y, Z on the piece of paper. But Max needs help computing the surface area of this rectangular prism. Help him!
Input
First line contains T - number of test cases.
Each of next T lines contains 3 integers, X, Y, Z, in that order. It is guaranteed that numbers X, Y, Z are accurate and A, B, C form dimensions of a prism.
Output
Output surface area of each original prism in a new line. Round your answer to 2 decimal places.
Constraints
T <= 10
2 <= X, Y, Z <= 10^7
Please login to use the editor
You need to be logged in to access the code editor
Loading...
Please wait while we load the editor
Login to unlock the editorial