int n,a[110]={0},s=0,ans=0;
int main()
{
scanf("%d",&n);
for(int i=1;i<=n;i++) { scanf("%d",&a[i]); s+=a[i]; }
int f=s/n;
for(int i=1;i<=n;i++)
if(a[i]!=f) { a[i+1]+=a[i]-f; ans++; }
printf("%d",ans);
}
快速帮助 | 运行状态 | 反馈举报 | 关于我们 | 免责声明 | 浙ICP备11060257号 Processed in 0.0035 Second(s) Copyright (C) RQNOJ 2007-2019. All Rights Reserved.