#include <bits/stdc++.h> using namespace std; int main() { int n; while(cin>>n) { double sum=0; double data; int num=n; while(num--) { cin>>data; sum+=data; } double avg=sum/n; cout<<fixed<<setprecision(2)<<avg<<endl; } } // 64 位输出请用 printf("%lld")
#include <bits/stdc++.h> using namespace std; int main() { int n; while(cin>>n) { double sum=0; double data; int num=n; while(num--) { cin>>data; sum+=data; } double avg=sum/n; cout<<fixed<<setprecision(2)<<avg<<endl; } } // 64 位输出请用 printf("%lld")