提交时间:2024-11-15 19:24:34
运行 ID: 56757
#include<bits/stdc++.h> using namespace std; int main(){ int a,times,cishu,result=0.0; cin>>times; cishu=times; while(times>=1){ cin>>a; result+=a; times-=1; } cout<<result<<" "<<fixed<<setprecision(5)<<1.0*result/cishu; return 0; }