讨论 / !!!
Jetbrother 2013-11-08 19:59:43
点我顶贴 收藏 删除
var

a:array[1..100]of longint;

ave,i,j,k,n,sum,time:longint;

begin

readln(n);

for i:=1 to n do

begin

read(a[i]);

sum:=sum+a[i];

end;

ave:=sum div n;

sum:=0;

i:=1;

while i<=n do

begin

sum:=sum+a[i];

if sum=ave then inc(time);

inc(i);

end;

writeln(n-time);

end.

查看更多回复
提交回复