Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from math import sqrt
- def five_divs(n):
- count_divs = 1
- for div in range(2, int(sqrt(n)) + 1):
- if n % div == 0:
- count_divs += 1 if div % 2 == 0 else 0
- count_divs += 1 if (n // div) % 2 == 0 and n // div != div else 0
- if count_divs > 5:
- break
- return True if count_divs == 5 else False
- for n in range(1000000, 2000001, 2):
- if five_divs(n):
- print(n)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement