euler/python/e047.py

18 lines
359 B
Python
Raw Normal View History

2019-07-18 03:29:59 +02:00
from lib_prime import prime_factors_count
def euler_047():
2019-07-18 03:29:59 +02:00
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()))
2019-07-18 03:29:59 +02:00
assert(euler_047() == 134043)