Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
54879 | zhangweiran | 最大数max(x,y,z) | C++ | Accepted | 1 MS | 248 KB | 284 | 2024-11-01 14:46:54 |
#include<bits/stdc++.h> using namespace std; double max(double x,double y,double z){ double sum=0,mx=x; if(mx<y) mx=y; if(mx<z) mx=z; return mx; } int main(){ double a,b,c,m; cin>>a>>b>>c; m=max(a,b,c)/(max(a+b,b,c)*max(a,b,b+c)); printf("%.3lf",m); return 0; }