function F(N: integer): integer;
begin
if N = 1 then Result := 0
else Result := 1 + F(N div 2);
end;
var N := ReadInteger();
Write(F(N))
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
function F(N: integer): integer;
begin
if N = 1 then Result := 0
else Result := 1 + F(N div 2);
end;
begin
var N := ReadInteger();
Write(F(N))
end.
begin
Result := 0;
var x := 1;
repeat
x *= 2;
Result += 1
until N = x
end;
begin
var N := ReadInteger();
Write(Iter(N))
end.