Drawing Book

  • + 0 comments
    def pageCount(n, p):
    
        if p == 1:
            return 0
    
        if n - p == 1 and n % 2 == 0:
            return 1
    
    
        return (n - p) // 2 if p > n // 2 else p // 2