Prime factor of 300 000 000 000?

前端 未结 19 674
无人及你
无人及你 2021-01-03 10:23

I need to find out the prime factors of over 300 billion. I have a function that is adding to the list of them...very slowly! It has been running for about an hour now and i

19条回答
  •  孤街浪徒
    2021-01-03 11:06

    You only need to check it's remainder mod(n) where n is a prime <= sqrt(N) where N is the number you are trying to factor. It really shouldn't take over an hour, even on a really slow computer or a TI-85.

提交回复
热议问题