Lời giải:
program hotrotinhoc;
var a: array[1..32000] of integer;
d,d1,i,n: integer;
begin
write('N='); readln(n);
for i:=1 to n do
begin
write('a[',i,']='); readln(a[i]);
end;
d:=0; d1:=0;
for i:=1 to n do
begin
write(a[i],' ');
if a[i] mod 2=0 then inc(d);
if (a[i] mod 5=0) and (a[i] mod 2=0) then inc(d1);
end;
writeln('Co tat ca ',d,' so chan');
write('Co tat ca ',d1,' so chan chia het cho 5');
readln
end.