4 solutions

  • 1
    @ 2025-7-4 9:15:37
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
        double n,e,cnt;
        cin>>n;
        for(int i=1;i<=n;i++)
        {
            cin>>e;
            cnt+=e;
        }
        cout<<fixed<<setprecision(2)<<cnt/n;
        return 0;
    }
    
    • 0
      @ 2026-10-24 15:58:37

      000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

      • 0
        @ 2025-1-17 21:28:42
        #include<bits/stdc++.h>
        using namespace std;
        int main()
        {
        int n;
        cin>>n;
        double s=0;
        for(int i=1;i<=n;i++)
        {
        	int x;
        	cin>>x;
        	s=s+x;
        }
        double a=s*1.0/n;
        cout<<fixed<<setprecision(2)<<a;
        return 0;
        }
        
        
        • -1
          @ 2026-8-5 10:27:06
          给我点赞的是彭于晏
          #include<bits/stdc++.h>
          using namespace std;
          int main()
          {
              double n,e,cnt;
              cin>>n;
              for(int i=1;i<=n;i++)
              {
              	cin>>e;
              	cnt+=e;
          	}
          	cout<<fixed<<setprecision(2)<<cnt/n; 
              return 0;
          }
          
          • 1

          Information

          ID
          871
          Time
          1000ms
          Memory
          256MiB
          Difficulty
          1
          Tags
          (None)
          # Submissions
          347
          Accepted
          133
          Uploaded By