• + 0 comments

    In C++ Solution

    int pageCount(int n, int p) { cin>>n>>p;

    return min(p/2,n/2-p/2);
    

    }