euler/python/e047.py

18 lines
359 B
Python

from lib_prime import prime_factors_count
def euler_047():
s = []
for n in range(2, 1000000):
if len(prime_factors_count(n)) == 4:
s.append(n)
else:
s = []
if len(s) == 4:
return s[0]
if __name__ == "__main__":
print("e047.py: " + str(euler_047()))
assert(euler_047() == 134043)