- C20250278's blog
可爱的代码 A1152 最大数max(x,y,z)
- 2023-3-13 9:59:27 @
#include<bits/stdc++.h>
using namespace std;
int maxhy(int x,int y,int z){
if(x>=y&&y>=z||x>=z&&z>=y)return x;
if(y>=x&&x>=z||y>=z&&z>=x)return y;
if(z>=y&&y>=x||z>=x&&x>=y)return z;
}
int main(){
double m;
int a,b,c;
cin>>a>>b>>c;
double laoliu=maxhy(a+b,b,c)*maxhy(a,b,b+c);
m=maxhy(a,b,c)/laoliu;
cout<<fixed<<setprecision(3)<<m;
return 0;
}