Moved solutions till 35 to Python.
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user