백준: 21335번 Another Eruption (Python3)
Another Eruption 성공스페셜 저지다국어
1 초 | 1024 MB | 739 | 585 | 521 | 83.628% |
문제
A volcano has recently erupted in Geldingadalur, Iceland. Fortunately this eruption is relatively small, and---unlike the infamous Eyjafjallajökull eruption---is not expected to cause delayed international flights or global outrage.
There is some concern about the magmatic gas that has been released as part of the eruption, as it could pose danger to human populations in the surrounding area. Scientists have estimated the total amount of gas emitted, which, due to lack of wind, has spread out uniformly across a circular area around the centre of the volcano. The authorities have evacuated the area, and would now like to close it off by surrounding the perimeter with barrier tape.
입력
The input consists of:
- One line with an integer a (1≤a≤1018 ), the total area covered by gas in square metres.
출력
Output the total length of barrier tape needed to surround the area covered by gas, in metres. Your answer should have an absolute or relative error of at most 10−6 .
예제 입력 1
50
예제 출력 1
25.066282746
예제 입력 2
1234
예제 출력 2
124.526709336
답안
1
2
|
from math import pi; n = int(input())
print((n/pi)**0.5*2*pi)
|
cs |
'공부 > 코딩테스트' 카테고리의 다른 글
백준: 20833번 Kuber (Python3) (0) | 2022.08.10 |
---|---|
백준: 20867번 Rulltrappa (Python3) (0) | 2022.08.10 |
백준: 21354번 Äpplen och päron (Python3) (0) | 2022.08.09 |
백준: 21591번 Laptop Sticker (Python3) (0) | 2022.08.09 |
백준: 21598번 SciComLove (Python3) (0) | 2022.08.09 |
댓글