fork download
  1. import time; from random import randint # PRIME_mult.py DANILIN
  2. p = randint(1, 2**25); s=int(p**0.5); f=0; j=2; q=0; # p=2**31-1;
  3. while f < 2: # rextester.com/QFZD94890
  4. if j >= s: # 2**31-1 = 2_147_483_647
  5. f=2 # max 2_308_621_829
  6. if p % j == 0:
  7. q=1
  8. print (p,j,int(p/j))
  9. j+=1
  10. if q != 1:
  11. print(p," Prime", p/10**9, " BillionS")
  12. print(time.perf_counter(), " seconds")
  13.  
Success #stdin #stdout 0.12s 14272KB
stdin
Standard input is empty
stdout
19222106 2 9611053
39551671.88835241  seconds