From 9602a6e2ace29e3b5a7193ee9818f226a329db38 Mon Sep 17 00:00:00 2001 From: Abhinav Anand Date: Wed, 13 May 2020 13:46:25 +0530 Subject: [PATCH] Create Drawing_Book.py --- HackerRank-Drawing Book/Drawing_Book.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 HackerRank-Drawing Book/Drawing_Book.py diff --git a/HackerRank-Drawing Book/Drawing_Book.py b/HackerRank-Drawing Book/Drawing_Book.py new file mode 100644 index 0000000..ba13686 --- /dev/null +++ b/HackerRank-Drawing Book/Drawing_Book.py @@ -0,0 +1,21 @@ +#!/bin/python3 + +import os +import sys + +# Complete the pageCount function below. +def pageCount(n, p): + return (min(p//2,n//2-(p//2))) + +if __name__ == '__main__': + fptr = open(os.environ['OUTPUT_PATH'], 'w') + + n = int(input()) + + p = int(input()) + + result = pageCount(n, p) + + fptr.write(str(result) + '\n') + + fptr.close() pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy