提交时间:2025-12-26 15:45:32

运行 ID: 78423

#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; }