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 1131. Copying

Beware of the end cases....
Posted by Eli Bendersky 25 May 2004 18:05
Many subtle boundary cases here. For instance, whenever N is 1, the answer is 0. Whenever K is 1, the answer should be equal to N - 1, etc.

If you're using a formula once K is reached to work faster, beware of Ns which divide K without a remainder.