#include <bits/stdc++.h> using namespace std; int main() { int n=0,h=0; double b=0; cin>>n; for(int i=1;i<=n;i++) { int a=0; cin>>a; h=h+a; } b=1.0*h/n; printf("%d %.5f\n",h,b); return 0; }
By signing up a 羽润编程 universal account, you can submit code and join discussions in all online judging services provided by us.
Using your 羽润编程 universal account