문제 링크입니다: www.acmicpc.net/problem/21335
21335번: Another Eruption
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
www.acmicpc.net
간단한 수학 문제였습니다.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <cmath> | |
using namespace std; | |
const double PI = 3.14159265359; | |
int main(void) | |
{ | |
ios_base::sync_with_stdio(0); | |
cin.tie(0); | |
double a; | |
cin >> a; | |
double perimeter = sqrt(a / PI) * 2 * PI; | |
printf("%.7lf\n", perimeter); | |
return 0; | |
} |


개발환경:Visual Studio 2017
지적, 조언, 질문 환영입니다! 댓글 남겨주세요~
반응형
'알고리즘 > BOJ' 카테고리의 다른 글
백준 1333번 부재중 전화 (0) | 2021.04.04 |
---|---|
백준 1284번 집 주소 (0) | 2021.04.04 |
백준 1247번 부호 (0) | 2021.03.31 |
백준 1009번 분산처리 (0) | 2021.03.31 |
백준 21185번 Some Sum (0) | 2021.03.30 |