0
Write a code that can tell if a number is a prime number
3 Respostas
+ 2
https://code.sololearn.com/cNNTzSL9tlV3/?ref=app
+ 1
this is my code, as it uses the square root of the number you are checking as a limit, and uses only prime numbers in the array "primes", it is the fastest algorythm;
note that you can check only numbers which are < of P*P, where P is the biggest prime number in the array (all the prime numbers between 2 and P must be present and ordered in the array)
https://code.sololearn.com/cn1cz2EdhtBP