ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1023. Buttons

Show all messages Hide all messages

var i,k:longint;
begin
 read(k);
 i:=k div 3;
 while(k mod i<>0) do
   i:=k div(k div i +1);
write(k div i-1);
end.


Edited by author 19.05.2007 23:58
So fabulous.
Re: why this code correct and more than, so fast? Участник 4 Oct 2008 20:21
Excellent... After you found maximal divider of K you can found minimal devider of K.... Excellent solution...
Explain this solution, please.
I'm a beginning programmer, so I can't understand.