SHARE
TWEET

Untitled

a guest Oct 15th, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def IsPrime(a):
  2.     i = 2
  3.     if a < 2:
  4.         return 0
  5.     while i * i <= a:
  6.         if a % i == 0:
  7.             return 0
  8.         i += 1
  9.     return a
  10. #---------------------
  11. while n > 1:
  12.     if not (n % i) and IsPrime(i):
  13.         if i in b:
  14.             continue
  15.         else:
  16.             b[i] = 1
  17.             n /= i
  18.             while not (n % i):
  19.                 b[i] += 1
  20.                 n /= i
  21.     i += 1
RAW Paste Data
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
 
Top