数学家们喜欢各种类型的有奇怪特性的数.例如,他们认为945是一个有趣的数,因为它是第一个所有约数之和大于本身的奇数. 为了帮助他们寻找有趣的数,你将写一个程序扫描一定范围内的数,并确定在此范围内约数个数最多的那个数.不幸的是,这个数和给定的范围都比较大,用简单的方法寻找可能需要较多的运行时间.所以请确定你的算法能在几秒内完成最大范围的扫描. 标程: {$a+,b-,d-,e-,f-,g+,i-,l-,n-,o-,p-,q-,r-,s-,t-,v-,x-,y-} {$m ,0,} const fin =  ; fon = divisors.o t ; maxprime = ; amo nt = 3401; var primes :array [1..amo nt] of word; l, , n mber :longint; max :word; proced re getprimes; var get :array [2..maxprime] of boolean; i, j :word; begin fillchar(get, sizeof(get), 1); for i := 2 to maxprime do if get[i] then begin j := i + i; while j = maxprime do begin get[j] := false; inc(j, i) end end; j := 0; for i := 2 to maxprime do if get[i] then begin inc(j); primes[j] := i end end; proced re try(from, tot :word; n m, low, p :longint); var x, y, n, m, p :longint; i, j, t :word; begin if n m = l then if (tot  max) or ((tot = max) and (n m span n mber)) then begin max := tot; n mber := n m end; if (low = p) and (low  n m) then try(from, tot * 2, n m * low, 1, 1); for i := from to amo nt do if primes[i]  p then exit else begin j := primes[i]; x := low - 1; y := p; n := n m; t := tot; m := 1; while tr e do begin inc(m); inc(t, tot); x := x div j; y := y div j; if x = y then break; n := n * j; try(i + 1, t, n, x + 1, y) end; m := 1 shl m; if tot span max div m then exit end end; begin getprimes; readln(l, ); if (l = 1) and ( = 1) then begin max := 1; n mber := 1 end else begin max := 2; n mber := l; try(1, 1, 1, l, ) end; writeln( between , l, and , , , , n mber, has a maxim m of , max, divisors. ); end.