X=Maths exams
Y:=[seq(t(i),i=100000001..100010000)]:
len:=[seq(0,i=1..30)]:
count:=1:
for i from 2 to nops(s) do
if s[i ] = s[i-1] then
count:=count+1;
else
len[count]:=len[count]+1;
count:=1;
end if;
end do:
i:=nops(len):
while len[i ] = 0 do
len:=subsop(i=NULL,len);
i:=i-1;
end do:
for i from 1 to nops(len) do
print(` There are `,len[i ],` runs of length `,i);
end do:
those in MT4111/5611 should understand that..
[hr]do you have a tastyspoon?
http://www.tastyspoon.com/forum