Sherlock and The Beast

  • + 1 comment

    I might be wrong :). But I can still get a result even with N=1000. What is the correct answer for N=1000? Also I don't understand why you need to check (pivot%3 != 0) while it is checked in getPivot() function.