Farz0l1x

Untitled

Mar 26th, 2023
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.38 KB | None | 0 0
  1. def delit(n):
  2.     ans = []
  3.     d = 1
  4.     while d * d <= n:
  5.         if n % d == 0:
  6.             ans.append(d)
  7.             d_b = n // d
  8.             if d != d_b and d_b % 2 == 0:
  9.                 ans.append(d_b)
  10.         d += 1
  11.     ans.sort()
  12.     return ans
  13.  
  14.  
  15.  
  16. from fnmatch import *
  17. for x in range(0, 10**7):
  18.     if fnmatch(str(x), '9?*55*7'):
  19.         print(x, sum(delit(x)) % 21)
Advertisement
Add Comment
Please, Sign In to add comment