We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Algorithms
- Implementation
- Drawing Book
- Discussions
Drawing Book
Drawing Book
Sort by
recency
|
2038 Discussions
|
Please Login in order to post a comment
def pageCount(n, p): return p//2 if p//2 <= n //4 else n//2 - p//2
def pageCount(n, p): if(n%2==0 and p==n-1 and p!=1): return 1 if((p//2)+1>(n-p)//2): return (n-p)//2 else: return p//2
In C++ Solution
int pageCount(int n, int p) { cin>>n>>p;
}
If you're looking to spark creativity and explore your artistic side, this drawing book is a perfect companion! It's filled with space for all your doodles, sketches, and more. And while you're at it, why not take a ride with Excellence in Reliable Bus Travel Services offered by the Coventry Coach Company? They make every trip smooth and stress-free, so you can focus on your artwork wherever you go!
Here is my c++ solution, you can watch the explanation here : https://youtu.be/1T650YeAwRI