224A.md (971B)
1 Source: https://codeforces.com/problemset/problem/224/A 2 3 A. Parallelepiped 4 5 time limit per test 6 7 2 seconds 8 9 memory limit per test 10 11 256 megabytes 12 13 input 14 15 stdin 16 17 output 18 19 stdout 20 21 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. 22 23 Input 24 25 The first and the single line contains three space-separated integers — the areas of the parallelepiped's faces. The area's values are positive ( > 0) and do not exceed 104. It is guaranteed that there exists at least one parallelepiped that satisfies the problem statement. 26 27 Output 28 29 Print a single number — the sum of all edges of the parallelepiped. 30 31 Examples 32 33 Input 34 35 ``` 36 1 1 1 37 ``` 38 39 Output 40 41 ``` 42 12 43 ``` 44 45 Input 46 47 ``` 48 4 6 6 49 ``` 50 51 Output 52 53 ``` 54 28 55 ``` 56 57 Note 58 59 In the first sample the parallelepiped has sizes 1 × 1 × 1, in the second one — 2 × 2 × 3.