问题标题: 酷町堂:4905

0
0
已解决
高子骞
高子骞
高级守护
高级守护

4905

高子骞在2022-12-11 15:41:22追加了内容

#include<iostream>

#include<iomanip>

#include<cmath>

#include<string>

using namespace std;

double d,f,h,hg;

double sz(double a,double b,double c){

    double cnt1,cnt2,cnt3;

    if(a+b>c){

        cnt1=a+b;

    }else{

        cnt1=c;

    }

    if(b+c>a){

        cnt2=b+c;

    }else{

        cnt2=a;

    }

    cnt1*=cnt2;

    if(a>b&&a>c){

        cnt3=a;

    }else if(b>a&&b>c){

        cnt3=b;

    }else if(c>a&&c>b){

        cnt3=c;

    }

    cnt1/=cnt3;

return cnt1;

}

int main(){

    cin>>hg;

    for(int i=1;i<=hg;i++){

        cin>>d>>f>>h;

        cout<<setprecision(2)<<fixed<<sz(d,f,h)<<endl;

    }

    return 0;

}


0
0
我要回答