Решение с массивом
var a: array[1..1000] of longint;
i, n, k1, k2: longint;
begin
k1 := 0;
k2 := 0;
read(n);
for i := 1 to n do
begin
read(a[i]);
if (a[i] mod 2 = 0) and (a[i] mod 5 = 0) then k1 := k1 + 1;
if (a[i] mod 3 = 0) and (a[i] mod 2 = 1) then k2 := k2 + 1;
end;
writeln(k1, ' ', k2);
end.
Решение без массива
var x, i, n, k1, k2: longint;
begin
k1 := 0;
k2 := 0;
read(n);
for i := 1 to n do
begin
read(x);
if (x mod 2 = 0) and (x mod 5 = 0) then k1 := k1 + 1;
if (x mod 3 = 0) and (x mod 2 = 1) then k2 := k2 + 1;
end;
writeln(k1, ' ', k2);
end.