1 条题解

  • 1
    @ 2026-2-2 18:50:34
    #include<bits/stdc++.h>
    using namespace std;
    int main(){
        double a,b,c;
        cin>>a>>b>>c; 
        if(a+b>c&&a+c>b&&b+c>a){
            double s=(a+b+c)/2.0;
            double n=sqrt(s*(s-a)*(s-b)*(s-c));
            printf("%.2f\n", n);
        }
        else
            cout<<"No solution."<<endl;
        return 0;
    }
    
    • 1

    信息

    ID
    11892
    时间
    1000ms
    内存
    512MiB
    难度
    1
    标签
    递交数
    10
    已通过
    4
    上传者