MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / upf_len

Function upf_len

project_euler/problem_047/sol1.py:50–56  ·  view source on GitHub ↗

Memoize upf() length results for a given value. >>> upf_len(14) 2

(num: int)

Source from the content-addressed store, hash-verified

48
49@lru_cache
50def upf_len(num: int) -> int:
51 """
52 Memoize upf() length results for a given value.
53 >>> upf_len(14)
54 2
55 """
56 return len(unique_prime_factors(num))
57
58
59def equality(iterable: list) -> bool:

Callers 1

runFunction · 0.85

Calls 1

unique_prime_factorsFunction · 0.70

Tested by

no test coverage detected