• + 0 comments

    i made solution using python!

    def pageCount(n, p):
        front = p // 2
        back = (n - p) // 2 if n % 2 != 0 else (n - p + 1) // 2
        return min(front, back)