Sichanov

special numbers

Aug 8th, 2021
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.30 KB | None | 0 0
  1. number = int(input())
  2.  
  3. for each_number in range(1111, 10000):
  4.     is_special = True
  5.     for index, value in enumerate(str(each_number)):
  6.         if int(value) == 0 or number % int(value) != 0:
  7.             is_special = False
  8.             break
  9.     if is_special:
  10.         print(each_number, end=" ")
Advertisement
Add Comment
Please, Sign In to add comment