Y
Hacker News
new
|
ask
|
show
|
jobs
by
jagtodeath
2364 days ago
A python implementation of is_prime(n):
return re.compile(r'^1?$|^(11+)\1+$').match('1' * n) is None