题解
2023-06-25 15:18:30
发布于:上海
61阅读
0回复
0点赞
#include <iostream>
using namespace std;
int n, maxx=0, minx=105, t, sum;
int main()
{
cin >> n;
for (int i=1; i<=n; i++)
{
int maxf = 0, minf = 105;
for (int j=1; j<=3; j++)
{
cin >> t;
sum += t;
maxf = max(maxf, t);
minf = min(minf, t);
}
sum -= maxf + minf;
minx = min(minx, maxf);
maxx = max(maxx, minf);
}
printf("%d %d %.1lf\n", minx, maxx, sum*1.0/n);
return 0;
}
这里空空如也
有帮助,赞一个