- 最大数max(x,y,z)
key
- @ 2025-7-17 9:16:09
#include<bits/stdc++.h>
using namespace std;
int a,b,c;
double m;
int maxx(int a,int b,int c){
if(a<b){
if(b<c){
return c;
}
else{
return b;
}
}
else{
if(a<c){
return c;
}
else{
return a;
}
}
}
int main(){
cin>>a>>b>>c;
m=maxx(a,b,c)*1.0/(maxx(a+b,b,c)*maxx(a,b,b+c));
cout<<fixed<<setprecision(3)<<m;
return 0;
}
1 条评论
-
joker (陆奕辰) LV 7 @ 2025-7-28 11:15:06求π的值也发一个
- 1
信息
- ID
- 156
- 时间
- ms
- 内存
- MiB
- 难度
- 6
- 标签
- 递交数
- 193
- 已通过
- 65
- 上传者