Comment

Comment by jagtodeath

A python implementation of is_prime(n):

  return re.compile(r'^1?$|^(11+)\1+$').match('1' * n) is None
parent jagtodeath 6 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton