Sherlock and The Beast

  • + 1 comment

    While the time spent to compute the number of threes and fives to print is well reduced, you still have to print N digits, so technically the complexity still is O(n).