Const n = 20;
var a :array [1..n] of integer; i, sum :integer;
begin
randomize; for i:= 1 to n do a[i]:= random(100); for i:= 1 to n do write(a[i],' '); writeln; sum:= 0; for i:= 1 to n do if i mod 2 = 1 then sum:= sum + sqr(a[i]); writeln(sum);
end.