Andrew and Max
Practice
3.3 (125 votes)
Ad Hoc
Open
Approved
Simple Math
Easy
Mathamatics
Problem
86% Success 7194 Attempts 20 Points 3s Time Limit 256MB Memory 1024 KB Max Code

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

Loading...
Results
Custom Input
Run your code to see the output
Submissions
Please login to view your submissions
Similar Problems
Points:20
96 votes
Tags:
ReadyMathematicsApprovedEasyMathamatics
Points:20
22 votes
Tags:
Easy
Points:20
11 votes
Tags:
Basic ProgrammingOpenApprovedEasyMathamatics