program z1;
var
i,j,m,k,z,x,l:integer;
begin
readln(m);
for i:=0 to m do begin z:=1;
if i=0 then z:=1 else begin
x:=i;
while x<>0 do begin
z:=z*4;
x:=x-1;
end; end;
if ((zm)) then writeln(i);
if z=m then writeln(i-1);
end;
end.
program z2;
var
i,j,n,k,z,x,l:integer;
begin
readln(n);
for i:=0 to n do begin z:=1;
if i=0 then z:=1 else begin
x:=i;
while x<>0 do begin
z:=z*2;
x:=x-1;
end; end;
if ((z>n) and (z/2if z=n then writeln(i+1);
end;
end.
program z3;
var
i,j,n,k,z,x,s:integer;
begin
readln(n); s:=0;
for i:=1 to n do begin z:=1;
for j:=i to 2*i do
z:=z*j;
s:=s+z; end;
writeln(s);
end.
время 2 ночи
...думаю пора спать )