|
|
вернуться в форумWhy I have got WA? Послано Koala 26 май 2002 19:29 This is my program. I will really appreciate your help. program nontrivial; var m,n,i,j,k,s,mi:longint; min:real; begin readln(m,n); min:=1e+10; mi:=0; for k:=n downto m do begin s:=0; for j:=1 to k-1 do if k mod j=0 then inc(s,j); if s=1 then begin writeln(k); halt end; if s/k<min then begin min:=s/k; mi:=k end; end; writeln(mi); end. |
|
|