SHARE
TWEET

special_numbers

a guest Feb 24th, 2020 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. number = int(input())
  2.  
  3. for first_digit in range(1, 10):
  4.     for second_digit in range(1, 10):
  5.         for third_digit in range(1, 10):
  6.             for fourth_digit in range(1, 10):
  7.                
  8.                 digits = [first_digit, second_digit, third_digit, fourth_digit]
  9.                 evens = [digit for digit in digits if number % digit == 0]  
  10.                
  11.                 if len(evens) == 4:
  12.                     print(f'{first_digit}{second_digit}{third_digit}{fourth_digit}', end=' ')
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top