|
|
back to boardBeware of the end cases.... 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. |
|
|