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