3866.Parallelepiped

Time Limit: 1s Memory Limit: 256MB

You've got a rectangular parallelepiped with integer edge lengths. You know the areas of its three faces that have a common vertex. Your task is to find the sum of lengths of all 12 edges of this parallelepiped.

Input Format(From the terminal/stdin)

The first and the single line contains three space-separated integers - the areas of the parallelepiped's faces. The area's values are positive ( \gt 0) and do not exceed 104. It is guaranteed that there exists at least one parallelepiped that satisfies the problem statement.

Output Format(To the terminal/stdout)

Print a single number - the sum of all edges of the parallelepiped.

Sample Input 1

Copy
1 1 1
 · · \n

Sample Output 1

Copy
12
  \n

Sample Input 2

Copy
4 6 6
 · · \n

Sample Output 2

Copy
28
  \n

Hints

In the first sample the parallelepiped has sizes 1 \times 1 \times 1, in the second one- 2 \times 2 \times 3.

Submit

请先 登录

© 2025 FAQs