|  | 
|  | 
| вернуться в форум | Why I get WA? Послано Alex  30 июл 2003 01:33var i,k:longint;ok:boolean;
 begin
 ok:=false;
 readln(k);
 for i:=trunc(sqrt(k)) downto 2 do
 if ((k mod i)=0) and (not ok) then begin
 ok:=true;
 writeln(i);
 end;
 if not ok then writeln(k-1);
 end.
 | 
 | 
|