Sort by

recency

|

2099 Discussions

|

  • + 0 comments

    I initially overcomplicated it by trying to simulate the entire book, but then I realized it's just about comparing the number of page turns from the front and back. Here's a simple Python solution: python

    def pageCount(n, p): return min(p // 2, (n // 2 - p // 2))

    Interestingly, this concept is also applied in healthcare systems. For instance, revenue cycle management services help streamline processes by efficiently handling tasks, much like minimizing unnecessary steps in a problem-solving approach. You can learn more about this here: https://swiftmds.com/services/healthcare-revenue-cycle-management-services/.

    Hope this helps!

  • + 0 comments

    Isn't it should be 'back' instead of 'front' in the following sentence from the problem? "...The last page may only be printed on the front, given the length of the book."

    I don't understand that sentence

  • + 1 comment
     public static int pageCount(int n, int p) {
            int totalFaces = 1 + (n-1)/2 + (n-1) % 2; // a face is the left the right page
            int forwardTurns = p/2;
            int reverseTurns = (totalFaces-1) - forwardTurns; //totalFaces-1 is the index of the last face; the first face's index is 0
    
            return Math.min(forwardTurns, reverseTurns);
    }
    
  • + 0 comments

    public static int pageCount(int n, int p) { int totalFaces = 1 + (n-1)/2 + (n-1) % 2; // a face is the left the right page int forwardTurns = p/2; int reverseTurns = (totalFaces-1) - forwardTurns; //totalFaces-1 is the index of the last face; the first face's index is 0

        return Math.min(forwardTurns, reverseTurns);
    

    }

  • + 0 comments

    A drawing book is a creative space where artists of all ages express ideas through sketches, doodles, and designs. It encourages imagination, improves hand-eye coordination, and helps develop artistic skills. With the Accelerated App, users can now digitize their drawing book pages instantly, enhancing creativity by blending traditional drawing with modern technology, making it easier to share and store artwork.