CARVIEW |
Select Language
HTTP/2 200
date: Sat, 11 Oct 2025 13:31:37 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=55c74fa52f2cdb28cfcb6b181ab1673696916b2a3d87cbd7d06a68083fbca628a%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22an0KBGEvH3dZCo9EjxQAtTRKafNEQsua%22%3B%7D; HttpOnly; Path=/
cf-ray: 98ceb8051aa0c467-BLR
Maximum prime divisor (functional) - Pastebin.com
SHARE
TWEET

Maximum prime divisor (functional)
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /usr/bin/env python3
- # The script calculates maximum prime divisor of a positive integer.
- # Apart from input and output instructions the code's purely
- # functional (as far as I can judge). The script may exceed the
- # maximum recursion depth or make the interpreter freeze.
- def divisorGenerator(a, b):
- return divisibilityCheck(a, a // (a // b + 1))
- def divisibilityCheck(a, b):
- if a % b == 0:
- return primeCheck(a, b)
- else:
- return limitCheck(a, b)
- def limitCheck(a, b):
- if b > 1:
- return divisorGenerator(a, b)
- else:
- return b
- def primeCheck(a, b):
- if not [c for c in range(2, b // 2 + 1) if b % c == 0]:
- return b
- else:
- return limitCheck(a, b)
- def intializer(a):
- return limitCheck(a, a // 2)
- a = None
- while not a:
- a = input("Enter a positive decimal integer to start evaluation or a non-number to exit: ")
- if a.isnumeric():
- try:
- print(intializer(int(a)))
- except:
- print("Ouch! This one didn't go down well!")
- a = None
- else:
- exit("Oh, well...")
Advertisement
Add Comment
Please, Sign In to add comment
-
⭐⭐Exchange Exploit⭐⭐ 1
JavaScript | 10 sec ago | 0.24 KB
-
⭐⭐⭐Instant Profit Method⭐⭐
Java | 10 sec ago | 0.10 KB
-
⭐ ✅ Free Products Method ✅ ✅ NEVER SEEN BEFOR...
JavaScript | 12 sec ago | 0.24 KB
-
✅⭐ Make huge profits on trading ⭐⭐ A
JavaScript | 21 sec ago | 0.24 KB
-
⭐⭐⭐ChangeNOW Exploit⭐⭐
Java | 21 sec ago | 0.10 KB
-
⭐ G2A Bug ⭐ (Get more on BTC swaps) ✅ NEVER S...
JavaScript | 22 sec ago | 0.24 KB
-
⭐✅ Jack's Profit Method ✅ NEVER SEEN BEF...
JavaScript | 31 sec ago | 0.24 KB
-
⭐✅ MAKE $2500 IN 15 MIN⭐⭐⭐ 6
JavaScript | 32 sec ago | 0.24 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand