题解 | #辅导计划#

辅导计划

https://ac.nowcoder.com/acm/problem/22220

80% 的注意一下平均分需要小数部分

#include<bits/stdc++.h>
using namespace std;
int n,a[101];
float s;
int main(){
    while(scanf("%d",&n)!=EOF){
        s=0;
        for(int i=0;i<n;i++){
            cin>>a[i];
            s+=a[i];
        }
        s/=n;
        for(int i=0;i<n;i++){
            if(a[i]<s) cout<<a[i]<<' ';
        }
        cout<<endl;
    }
    return 0;
}
全部评论
我就是%80谢谢你的题解,太棒了
点赞 回复 分享
发布于 2023-11-06 21:20 湖北

相关推荐

06-23 11:28
门头沟学院 Java
牛客91966197...:也有可能是点拒绝的时候自动弹的话术
点赞 评论 收藏
分享
投递长鑫存储等公司8个岗位
点赞 评论 收藏
分享
评论
7
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务