1 solutions

  • 0
    @ 2023-8-3 14:13:34
    #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;
    
    
    
    
    }
    
    • 1

    Information

    ID
    553
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    7
    Tags
    # Submissions
    106
    Accepted
    22
    Uploaded By