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


查看1道真题和解析