Return True if n is a prime number.
For n = 97 the answer is True; for n = 91 it is False (7 × 13).
The starter code tries every divisor up to the square root. It is correct but too slow for primes near 10^15.
Example 1
Input:
is_prime(97)
Output:
True
Example 2
Input:
is_prime(91)
Output:
False
0 <= n <= 9 * 10**15No results yet
Run your code to check it against the examples, or submit to run every test.