Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def delit(n):
- ans = []
- d = 1
- while d * d <= n:
- if n % d == 0:
- if d % 2 == 0:
- ans.append(d)
- d_b = n // d
- if d != d_b and d_b % 2 == 0:
- ans.append(d_b)
- d += 1
- ans.sort()
- return ans
- count = 0
- from fnmatch import*
- for x in range(65000, 10**6):
- if fnmatch(str(x), '6*97*5?') == True and len(delit(x)) >= 4:
- count += 1
- print(x, sum(delit(x)))
- if count == 7:
- break
Advertisement
Add Comment
Please, Sign In to add comment