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

Who can give me a good hint about this problem, have no idea how to solve it :) (-)
Posted by Miguel Angel 8 Feb 2002 05:50
But I sent you some hints,didn't I?
Posted by Nazarov Denis (nsc2001@rambler.ru) 8 Feb 2002 15:43
>
Re: Who can give me a good hint about this problem, have no idea how to solve it :) (-)
Posted by Tomasz Klos 8 Feb 2002 16:14
I can
but my solution isn't the best (my program ran 3 seconds)
Re: Who can give me a good hint about this problem, have no idea how to solve it :) (-)
Posted by Tomasz Klos 9 Feb 2002 15:32
all you have to do is to find the least divisor of k
and the answer is (divisor-1)
or (k-1) if k is a prime number