题解 | #小乐乐计算函数#
小乐乐计算函数
https://www.nowcoder.com/practice/89238e99c36e450786ccf3a9e7481b7b
#include <stdio.h> int max3(int a,int b,int c) { int max=a>(b>c?b:c)?a:(b>c?b:c); return max; } int main() { int a,b,c; scanf("%d %d %d",&a,&b,&c); double m; m=max3(a+b,b,c)*1.0/(max3(a,b+c,c)+max3(a,b,b+c)); printf("%.2f",m); return 0; }