본문 바로가기
공부/코딩테스트

백준: 21335번 Another Eruption (Python3)

by 혼밥맨 2022. 8. 9.
반응형

백준: 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
반응형

댓글