标签:style blog http color os io for 2014
#include <iostream> using namespace std; int main() { int a[51],n,k=1; while(cin>>n,n) { int i,ans=0,s=0; for(i=0;i<n;i++) { cin>>a[i]; s+=a[i]; } s/=n; for(i=0;i<n;i++) if(a[i]>s)ans+=a[i]-s; cout<<"Set #"<<k++<<endl; cout<<"The minimum number of moves is "<<ans<<‘.‘<<endl<<endl; } return 0; }
zju 1251 Bricks box 砖盒----------hdu 1326,布布扣,bubuko.com
zju 1251 Bricks box 砖盒----------hdu 1326
标签:style blog http color os io for 2014
原文地址:http://www.cnblogs.com/2014acm/p/3885951.html