{*******************************************}
{* Program name: divisors *}
{* Input file: divisors.in *}
{* Ouptut file: divisors.out *}
{* Date: 2008.10.29 *}
{* Programmer: Peng Bo *}
{*******************************************}
program divisors;
const
filename='divisors.';
type
jl=record
p,d:longint;
end;
var
f:text;
l,u:longint;
g:jl;
{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
procedure main;
var
i,t:longint;
{--------------------------}
function howmany(n:longint):longint;
var
i,t:longint;
begin
t:=2;
for i:=2 to trunc(sqrt(n)) do
if n mod i=0
then
t:=t+2;
if frac(sqrt(n))=0
then
dec(t);
howmany:=t;
end;{howmany}
{--------------------------}
begin
for i:=l to u do
begin
t:=howmany(i);
if t>g.d
then
begin
g.d:=t;
g.p:=i;
end;{then}
end;{for}
end;{main}
{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
begin
assign(f,filename+'in');
reset(f);
read(f,l,u);
close(f);
{===========}
g.d:=0;
main;
{===========}
assign(f,filename+'out');
rewrite(f);
write(f,'Between ',l,' and ',u,',',g.p,' has a maximum of ',g.d,' divisors.');
close(f);
end.