Basalt Breakdown
InterviewTime limit1sMemory limit1024 MB
Given the area of a regular hexagon, compute its perimeter, allowing a small floating-point error.
- Level
Easy2 of 10
- Topics
- Math, Geometry, Implementation
- Solved
- No attempts yet
Problem
One of Iceland's most popular attractions is Svartifoss ("black waterfall"). Its name derives from the black hexagonal basalt columns that frame the waterfall on either side. Originally formed from cooling lava, centuries of erosion have shaped the columns into their characteristic shape.
A group of geologists at RU went on an excursion to Svartifoss. They took some probes and performed various measurements on the hexagonal rocks that have broken off the basalt walls.
Just as they return to RU, they realise that they have forgotten a crucial measurement. They have determined the area of the hexagonal face, but they did not write down what its perimeter was. Assuming that the face has the shape of a perfect regular hexagon, help the geologists compute the perimeter.
Input
The input consists of:
- One line with an integer (), the area of the hexagonal rock face in square centimetres.
Output
Output the perimeter of the rock face in centimetres. Your answer should have an absolute or relative error of at most .