Light Mode
Dark Mode
Why is primality test "dumb" ?

To check if it's prime is also very simple, but kinda dumb and slow.

This is a quote from hints. I understand slow, but why checking primality would be dumb ?

My best solution for primality is

all(n%x for x in range(2,n))

Is there another way to solve it ? If there is, I think I miss mathematical skills here...

Created: May 20, 2015, 2:19 p.m.
Updated: May 20, 2015, 5:56 p.m.
0
16
User avatar
waxdesf