c++ int main() { int a,b,c,d=0; cin>>a; while (a--) { cin>>b; c+=b; } printf("%d\n%.2f",c,(double)c/a); } //也许有中文字符,你改一下