1 solutions

  • 0
    @ 2022-8-28 19:06:18

    求平均值

    #include<bits/stdc++.h>
    using namespace std;
    int x,countt;
    int main(){
    	cin>>n>>m;
    	for(int i=1;i<=n;i++){
    		cin>>x;
    		countt+=x;
    	}
    	if(1.0/n*countt>=m) cout<<"YES";
    	else cout<<"NO";
    }

    Information

    ID
    6552
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    5
    Tags
    (None)
    # Submissions
    52
    Accepted
    26
    Uploaded By