Слайд 2Program z_2018;
var
N,i,j,k:integer;
a:array[1..10000] of integer;
begin
readln(N);
for i:=1 to N do
readln(a[i]);
k:=0;
for i:=1 to N-1 do
for j:=i+1 to N do
if a[i]*a[j]mod 26=0 then
k:=k+1;
writeln(k);
end.
Слайд 3Program z_2019;
var
N,i,j,k:integer;
a:array[1..10000] of integer;
begin
readln(N);
for i:=1 to N do
readln(a[i]);
k:=0;
for i:=1 to N-4 do
for j:=i+4 to N do
if a[i]*a[j]mod 29=0 then
inc(k);
writeln(k);
end.