Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|---|
147673 | 龚梓嘉 | 统计成绩 | C++ | Accepted | 100 | 0 MS | 260 KB | 441 | 2024-05-18 17:33:20 |
#include<bits/stdc++.h> using namespace std; struct students { int id,x,y,z; string s; float pj; }; students a[20]; int main() { int i,s=0,t; float mx=0; for(i=1;i<=10;i++) { cin>>a[i].id>>a[i].s>>a[i].x>>a[i].y>>a[i].z; a[i].pj=1.0*(a[i].x+a[i].y+a[i].z)/3; s+=a[i].x+a[i].y+a[i].z; if(a[i].pj>mx) { mx=a[i].pj; t=i; } } printf("%.2f\n%d ",1.0*s/30,t); cout<<a[t].s; printf(" %.2f",a[t].pj); return 0; }