Program z1;
var k, z, s: integer;
a: array [1..10] of integer;
begin
write('введи число K '); readln(k);
for z := 1 to 10 do
begin
write('Введи a[',z,']='); readln(a[z]);
end;
s := 0;
for z := 1 to 10 do
if a[z] mod k = 0 then s := s + a[z];
writeln('Сумма элементов кратных K = ', s);
end.