+ 1
How to find prime numbers?
this is very important
5 Respuestas
+ 2
Check out the function isPrime in this code:
https://code.sololearn.com/cJ1rV8PUIzC3/?ref=app
0
https://en.m.wikipedia.org/wiki/Prime_number
0
https://rosettacode.org/wiki/Miller–Rabin_primality_test#Ada
- 1
Like this up to n<4759123141
DeterministiccMiller-Rabin test - for low Ns only 3 tests are needed. You cant be faster.
https://code.sololearn.com/cZo7y4VVqSJJ/?ref=app
- 1
Also look at this one to find prime factors
https://code.sololearn.com/cU9K9ia897vz/?ref=app