| CodeRams Practice Problem Archive |
|---|
| Finished |
Triangles are one of the simplest geometric shapes. Equilateral triangles have the special property of all three of their sides being equal to each other. In this problem, you will be given a list of side lengths of equilateral triangles. You should find the sum of the perimeters of the triangles, given that the triangles are all equilateral.
The first line of the input will contain a positive integer n indicating the number of triangles. Each of the next n lines will contain an integer t, indicating the side length of each triangle.
Print one number, the calculated sum of the perimeters of the triangles.
3 3 4 6
39
In the example, the first triangle has a side length of 3, so it has a perimeter of 9. The second triangle has a perimeter of 12, and the third triangle has a perimeter of 18.
| Name |
|---|


