알고리즘

[알고리즘] 백준 14264 - 정육각형과 삼각형 (C++)

blueberrysoda 2025. 4. 10. 23:37

[문제 링크] : https://www.acmicpc.net/problem/14264

#include <iostream>
#include <cmath>
using namespace std;

int main(){
    double D;
    cin >> D;

    cout << fixed;
    cout.precision(9);

    cout << sqrt(3) * pow(D, 2) / 4 << "\n";
    return 0;
}