Loading...
Loading...
Loading...
A security module only accepts key numbers that are prime. Read a number and print prime if it is prime and not prime otherwise.
prime or not prime.Example 1
Input
17
Output
prime
Example 2
Input
15
Output
not prime
Try the problem first. Open one hint at a time.
Try divisors d = 2, 3, ... and stop when d * d is above n.
Treat n below 2 as not prime first.
Write your Python code, run it on the examples and submit it to hidden tests.
Solve in the editor