/in/foo.cc: In function 'int main()':
/in/foo.cc:7:15: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long unsigned int*' [-Wformat=]
scanf("%d",&n);for(int i=1;i<=n;i++){scanf("%d",&a[i]);sum+=a[i];}k=sum/n;
^
/in/foo.cc:7:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
scanf("%d",&n);for(int i=1;i<=n;i++){scanf("%d",&a[i]);sum+=a[i];}k=sum/n;
~^~~
/in/foo.cc:7:55: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long unsigned int*' [-Wformat=]
scanf("%d",&n);for(int i=1;i<=n;i++){scanf("%d",&a[i]);sum+=a[i];}k=sum/n;
^
/in/foo.cc:8:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=1;i<=n;i++){if(a[i]<k){a[i+1]-=k-a[i];ans+=1;}if(a[i]>k){a[i+1]+=a[i]-k;ans+=1;} }
~^~~
/in/foo.cc:9:17: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long long unsigned int' [-Wformat=]
printf("%d",ans);
^