Abbey Courtyard
InterviewTime limit1sMemory limit512 MB
Given the area of a square courtyard, compute the perimeter as 4 times the square root of the area, rounded to six decimal places.
- Level
Easy2 of 10
- Topics
- Math, Implementation, Geometry
- Solved
- No attempts yet
Problem
Bath's annual Christmas market runs from the 23rd of November 2017 until the 10th of December 2017. During this time, the market occupies the entire square courtyard of Bath Abbey.
To brighten things up at night, a single long strand of festive lights will be run along all four equally long edges of the courtyard.
You are in charge of buying the electrical wiring to which the lights will be fixed. How much wiring do you need to outline the whole Christmas market with lights?
Input
The first line contains one integer , the area of the courtyard in square metres. ()
Output
Print the total length of wiring needed to surround the market, , in metres. Round the value to six digits after the decimal point and print exactly six digits after the decimal point.