#include<stdio.h>
#define N 20
#define M 5
struct student
{
int num;
char name[N];
int score[M];
double ave;
}stu[M];
void average()
{
int i,j;
double s;
for(i=0;i<M;i++)
{
s=0;
for(j=0;j<3;j++)
{
s=s+stu[i].score[j];
}
stu[i].ave=s/3.0;
}
}
void input()
{
int i,j;
for(i=0;i<M;i++)
{
scanf("%d",&stu[i].num);
scanf("%s",stu[i].name);
for(j=0;j<3;j++)
{
scanf("%d",&stu[i].score[j]);
}
}
}
int max()
{
int i;
double max;
int count=0;
for(i=0;i<M;i++)
{
if(stu[i].ave<=stu[i+1].ave)
{
max=stu[i+1].ave;
count=i+1;
}
}
return count;
}
main()
{
int count;
int i;
input();
average();
count=max();
printf("学号%d\n",stu[count].num);
printf("姓名%s\n",stu[count].name);
printf("成绩\n");
for(i=0;i<3;i++)
printf("%d\n",stu[count].score[i]);
printf("平均值%.2lf\n",stu[count].ave);
}