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.
- Drawing Book
- Discussions
Drawing Book
Drawing Book
Sort by
recency
|
133 Discussions
|
Please Login in order to post a comment
def pageCount(n, p): # Write your code here return min(p//2,(n//2)-(p//2))
one liner solution in python return int(min(p-0,(n+1 if n%2==0 else n)-p)/2)
My solution in Python
Python 3 solution: