1 条题解

  • 0
    @ 2025-12-23 13:54:08
    #include<bits/stdc++.h>
    using namespace std;
    int a[999999];
    int main(){
    	int t=0;
    	int n;
    	cin>>n;
    	for(int i=1;i<=n;i++){
    		cin>>a[i];
    		t=t+a[i];	
    	}
    	double p=t*1.0/n;
    	cout<<"AVE=";
    	printf("%.1lf",p);
    	cout<<endl;
    	for(int i=1;i<=n;i++){
    		if(a[i]>p){
    			cout<<i<<":"<<a[i]<<" ";
    		}
    	}
    	
    	return 0;
    } 
    
    • 1

    【入门】找找谁的身高超过全家的平均身高

    信息

    ID
    4727
    时间
    1000ms
    内存
    16MiB
    难度
    8
    标签
    (无)
    递交数
    15
    已通过
    7
    上传者