- 一级
1 7
- 2023-8-2 13:55:54 @
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n,a,t=0;
cin>>n;
int k[n];
for(int i=1; i<=n; i++ )
{
cin>>a;
k[i]=a;
t+=a;
}
cout<<t<<" ";
double t1=0;
for(int i=1; i<=n; i++ )
{
t1+=k[i];
}
printf("%.5f",t1/n);
return 0;
}
0 comments
No comments so far...