lingvini2013
Вот у меня рандомное произведение >:D 14100008624407312170194446029585625619393783923762323254253277737505163580939921640784521124532003349522116155331745686586847807114867137609161018485905275037311040565203392768458195386523475895707950408269824
Answers & Comments
const N = 100;
var a: array [1..N] of integer;
i, count, sum, p: integer;
arith: real;
mult: biginteger;
begin
randomize;
for i:= 1 to N do a[i]:= random(1, 1000);
sum:= 0;
for i:= 1 to N do begin
if a[i] mod 2 = 0 then begin
inc(count);
sum:= sum + a[i];
arith:= sum / count;
end;
if a[i] mod 2 = 0 then begin
p:= a[i] * a[i];
if mult = 0 then mult:= p else mult:= mult * p;
// Произведение капец длинное
if a[i] mod 3 = 0 then a[i]:= i * i;
end
end;
writeln(arith);
writeln(mult);
end.