Untitled
user_1066898782
pascal
4 years ago
434 B
17
Indexable
uses math,crt;
var m,n,a,b:longint;
s:real;
begin
clrscr;
readln(m,n);
a:=0;
s:=1;
while (s<m) do
begin
inc(a);
s:=s+log10(a);
end;
if (s>n) then write(a,' ',a-1)
else
begin
b:=a;
while (s<n) do
begin
inc(b);
s:=s+log10(b);
end;
write(a,' ',b);
end;
readln
end.
Editor is loading...