Farz0l1x

Untitled

Oct 16th, 2022
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.28 KB | None | 0 0
  1. def raz(n):
  2.     sum = 0
  3.     for i in n:
  4.         sum += int(i)
  5.     return sum
  6.  
  7. from fnmatch import *
  8. for x in range(700001, 10**12, 13):
  9.     if fnmatch(str(x), '*0??3*') == False or fnmatch(str(x), '*4??2') == False or fnmatch(str(x), '*1*') == False:
  10.         print(x, raz(str(x)))
Advertisement
Add Comment
Please, Sign In to add comment