This file contains hidden or 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 <stdio.h> | |
#define pi 3.14159265358979 | |
int main(void) { | |
int r; // 반지름 | |
scanf("%d", &r); | |
printf("%.6lf\n%.6lf", r*r*pi, 2.0*r*r); | |
return 0; | |
} |
문제 :
https://www.acmicpc.net/problem/3053
3053번: 택시 기하학
첫째 줄에는 유클리드 기하학에서 반지름이 R인 원의 넓이를, 둘째 줄에는 택시 기하학에서 반지름이 R인 원의 넓이를 출력한다. 정답과의 오차는 0.0001까지 허용한다.
www.acmicpc.net
풀이참고 :
'문제풀이 > 백준' 카테고리의 다른 글
12865 - 평범한 배낭 (0) | 2021.09.11 |
---|---|
2606 - 바이러스 (0) | 2021.09.11 |
9251 - LCS (0) | 2021.09.11 |
4153 - 직각삼각형 (0) | 2021.09.11 |
11054 - 가장 긴 바이토닉 부분 수열 (0) | 2021.09.11 |