Moved solutions till 35 to Python.

This commit is contained in:
2019-07-16 12:51:07 -04:00
parent f76b36c8d3
commit d94fc90600
13 changed files with 262 additions and 66 deletions

View File

@@ -1,3 +1,4 @@
from functools import lru_cache
try:
from lib_misc import get_item_counts
from lib_misc import product
@@ -43,6 +44,7 @@ def prime_factors_count(n):
return get_item_counts(prime_factors(n))
@lru_cache(maxsize=10000)
def is_prime(n):
"""Returns True if n is prime and False otherwise.