Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from math import ceil
- def has_only_four_dividers(x):
- dividers = 2
- for i in range(2, ceil(x ** 0.5)):
- if x % i == 0:
- dividers += 2
- if dividers > 4:
- return False
- return True
- START = 126849
- END = 126871
- for i in range(START, END + 1):
- if has_only_four_dividers(i):
- print(i)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement