Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
38299 | jiabokai | 最大数max(x,y,z) | C++ | 通过 | 0 MS | 240 KB | 339 | 2024-01-26 14:44:08 |
#include<bits/stdc++.h> using namespace std; double max(double a,double b,double c){ double maxn; if(a>b){ maxn=a; }else maxn=b; if(c>maxn){ return c; }else return maxn; } int main() { double a,b,c; cin>>a>>b>>c; double m=max(a,b,c)/(max(a+b,b,c)*max(a,b,b+c) ); cout<<fixed<<setprecision(3)<<m; return 0; }