Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
78423 sh25_wanghy 最大数max(x,y,z) C++ 通过 0 MS 248 KB 490 2025-12-26 15:45:32

Tests(1/1):


#include <iostream> #include <iomanip> using namespace std; // 函数:计算三个数的最大值 double max(double x, double y, double z) { return max(max(x, y), z); } // 过程:计算m值 void calculateM(double a, double b, double c) { double m = max(a, b, c) / (max(a + b, b, c) * max(a, b, b + c)); cout << fixed << setprecision(3) << m << endl; } int main() { double a, b, c; cin >> a >> b >> c; calculateM(a, b, c); return 0; }


测评信息: