From e8e39fabc1fea20de922308bf293c26cfad6012a Mon Sep 17 00:00:00 2001 From: ebnail <51423625+ebnail@users.noreply.github.com> Date: Sun, 11 May 2025 14:48:11 -0500 Subject: [PATCH] test file --- new.txt | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 new.txt diff --git a/new.txt b/new.txt new file mode 100644 index 0000000..c194fe4 --- /dev/null +++ b/new.txt @@ -0,0 +1,23 @@ +if p%2==0 and p==n-1: + return 0 + + + if p==1 or p==n: + return 0 + + pageList = list(range(0,n+1)) + print(pageList) + + fIndex = pageList.index(p) + print(int(fIndex/2)) + + fPages = int(fIndex/2) + pageList.reverse() + print(pageList) + rIndex = pageList.index(p) + #print(rIndex) + rPages = int(rIndex/2) + print(int(rIndex/2)) + return min(fPages,rPages) + #pageDiff = n-p + #pageHalf = int(n/2) \ No newline at end of file