40求调,回复即关注,谢谢
查看原帖
40求调,回复即关注,谢谢
1649619
yunzhang0707楼主2025/2/3 08:21
#include <bits/stdc++.h>
using namespace std;
int main(){
    int k0,k1;
    double k2;
    cin>>k0;
    for(int k3=1;k3<=k0;k3++){
        cin>>k1;
        k2+=k1;
    }
    cout<<k2<<' ';
    k2/=k0;
    cout<<fixed<<setprecision(5)<<k2;
}
2025/2/3 08:21
加载中...