0
已解决
胡景轩
资深守护
资深守护
#include<iostream>
#include<cstdio>
#include<cmath>
#include<string>
#include<algorithm>
using namespace std;
int main(){
double n,s,a,b,c;
cin>>n;
for(int i=1;i<=n;i++){
cin>>a>>b>>c;
s=max(a+b,b,c)*max(a,b,b+c)/max(a,b,c);
cout<<s<<endl;
}
return 0;
}
胡景轩在2022-10-25 12:29:59追加了内容
#include<iostream>
#include<cstdio>
#include<cmath>
#include<string>
#include<algorithm>
using namespace std;
int main(){
int n,s,a,b,c;
cin>>n;
for(int i=1;i<=n;i++){
cin>>a>>b>>c;
s=1.0*max(a+b,b,c)*max(a,b,b+c)/max(a,b,c);
printf("%.2f",s);
cout<<endl;
}
return 0;
}
0
0
0