Skip to content

Instantly share code, notes, and snippets.

@cocodrips
Last active August 29, 2015 13:55
Show Gist options
  • Select an option

  • Save cocodrips/8727626 to your computer and use it in GitHub Desktop.

Select an option

Save cocodrips/8727626 to your computer and use it in GitHub Desktop.
素数判定
def is_prime(n):
i = 2
while i * i <=n:
if n % i == 0:
return False
i += 1
return True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment