Код (Pascal)
var
c: array[1..15] of integer;
i, k: integer;
pr: longint;
begin
for i:=1 to 15 do
read(c[i]);
pr:=1;
k:=0;
if c[i]=30 then
pr:=pr*3;
k:=k+1;
end;
if k=0 then pr:=0;
write(pr);
for i := 1 to k do write(0);
writeln(' ', k);
end.
Код (Pascal)
var
c: array[1..15] of integer;
i, k: integer;
pr: longint;
begin
for i:=1 to 15 do
read(c[i]);
pr:=1;
k:=0;
for i:=1 to 15 do
if c[i]=30 then
begin
pr:=pr*3;
k:=k+1;
end;
if k=0 then pr:=0;
write(pr);
for i := 1 to k do write(0);
writeln(' ', k);
end.